kunz Difference between revisions of "Houdini Python Cookbook"

Difference between revisions of "Houdini Python Cookbook"

From kunz
Line 8: Line 8:
<syntaxhighlight lang='Python'>
<syntaxhighlight lang='Python'>
print(hou.hipFile.path())
print(hou.hipFile.path())
</syntaxhighlight>
Get the version numbers in the filename
<syntaxhighlight lang='Python'>
hou.hscript('echo -n `opdigits($HIPNAME)`')
</syntaxhighlight>
</syntaxhighlight>

Revision as of 13:10, 9 August 2022

Force the entire scene to cook (all nodes)

for node in hou.node("/").allSubChildren():
    node.cook(force=True)

Print the full path of the current Houdini scene

print(hou.hipFile.path())

Get the version numbers in the filename

hou.hscript('echo -n `opdigits($HIPNAME)`')