kunz Difference between revisions of "Houdini Python Cookbook"

Difference between revisions of "Houdini Python Cookbook"

From kunz
(Created page with "<syntaxhighlight lang='Python'> for node in hou.node("/").allSubChildren(): node.cook(force=True) </syntaxhighlight>")
 
Line 1: Line 1:
Force the entire scene to cook (all nodes)
<syntaxhighlight lang='Python'>
<syntaxhighlight lang='Python'>
for node in hou.node("/").allSubChildren():
for node in hou.node("/").allSubChildren():
     node.cook(force=True)
     node.cook(force=True)
</syntaxhighlight>
Print the full path of the current Houdini scene
<syntaxhighlight lang='Python'>
print(hou.hipFile.path())
</syntaxhighlight>
</syntaxhighlight>

Revision as of 21:25, 19 November 2021

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())