This is a simple script to search for nodes by name. You can use it in python shell. And don’t forget to increase the indentation in each line:
for node in hou.root().allSubChildren():
if "ray" in node.name():
print node.path()
This is a simple script to search for nodes by name. You can use it in python shell. And don’t forget to increase the indentation in each line:
for node in hou.root().allSubChildren():
if "ray" in node.name():
print node.path()
Share:
This is a simple VEX code that allows you to change the size of objects:matrix3 xform = primintrinsic(0, "transform", @primnum);
scale(xform, chf("scale"));
setprimintrinsic(0, "transform", @primnum, xform);
Share:
node = hou.node('/obj/matnet_explosion/new_shader')
src = hou.node('/shop/old_shader')
node.type().definition().setParmTemplateGroup(\
src.type().definition().parmTemplateGroup(),\
rename_conflicting_parms=False)
node.setParmTemplateGroup(\
node.type().definition().parmTemplateGroup(),\
rename_conflicting_parms=False)
Share:
phm() → hou.HDAModule
“This shortcut lets you write hou.phm() instead of hou.pwd().hdaModule()
. You are most likely to use this shortcut from event handlers, button callbacks, and menu generation scripts in digital assets.”
It is Houdini’s Help.
But phm()
and hou.pwd().hdaModule()
do not work in event handlers.
Use instead in event handlers:
kwargs['node'].hdaModule().foo()
Otherwise, you can use hou.phm()
to access the Python Module in the asset. For example, to call a function when a button is pressed:
hou.phm().foo(kwargs['node'])
It is worth noting that the kwargs dictionary is fully accessible only in events. Only kwargs['type']
is available in the Python Module:
https://www.sidefx.com/docs/houdini/hom/locations.html#node_event_kwargs
Share:
When you sample a VDB SDF outside its bounds, volumesample returns the value of the SDF border, volumegradient returns none.
Share: