Difference between revisions of "Houdini Python Cookbook"
From kunz
Views
Actions
Namespaces
Variants
Tools
Line 18: | Line 18: | ||
<syntaxhighlight lang='Python'> | <syntaxhighlight lang='Python'> | ||
hou.applicationPlatformInfo() | hou.applicationPlatformInfo() | ||
</syntaxhighlight> | |||
List all the environment variables | |||
<syntaxhighlight lang='Python'> | |||
import os | |||
for e in os.environ: | |||
print(e, os.environ[e]) | |||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 04:10, 10 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)`')
What platform is Houdini running on?
hou.applicationPlatformInfo()
List all the environment variables
import os for e in os.environ: print(e, os.environ[e])