Search - User list
Full Version: Copy Parameter From Active Node On A Switch
Root » Houdini Indie and Apprentice » Copy Parameter From Active Node On A Switch
luketanaka
Trying to drive the scale of an object based on the divisions of a grid. Super easy with one source grid, just copy parameter > paste relative reference, etc.

Currently working on a project that requires a lot of different scale variations so I have quite a few source grids. Currently have them all setup going into a switch.

Is it possible to copy a parameter from the active node on a switch? So that I can just change the input and it automatically references the grid divisions of the selected node upstream?
viklc
Hi you can use this py expression for your target grid (hip below):
switch_path = '/obj/geo1/switch1'
switch = hou.node(switch_path)
switch_id = switch.parm('input').eval()

grid = switch.input(switch_id)
return grid.parm('rows').eval()
# return grid.parm('cols').eval() # for columns

Image Not Found
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB