現在開いているファイルのフォルダを開くシェルフツールのスクリプト。

シェルフ上で右クリックしてNew Tool…を選択してウインドウが開いたらOptionsに名前やラベルを入力する。

Scriptタブを押し、コードを入力する。
import re
import subprocess
fileName = hou.hipFile.basename()
if fileName == "untitled.hip":
print('No Scene!')
else:
filePath = hou.hipFile.path()
filePath = filePath.replace(fileName, "")
filePath = [re.sub("/", "\\\\", filePath)]
subprocess.Popen(['explorer', filePath])