Copy Parameter From Active Node On A Switch

   253   1   0
User Avatar
Member
1 posts
Joined: March 2016
Offline
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?

Attachments:
houdini_GlC8rkXoUV.png (61.9 KB)

User Avatar
Member
218 posts
Joined: May 2017
Offline
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

Attachments:
grid_switch.hiplc (94.0 KB)

  • Quick Links