Advertisement
mrhumbility

OTL folders trigger switch

Feb 13th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.34 KB | None | 0 0
  1. # folder callback
  2. kwargs['node'].hdaModule().tabSetChanged(kwargs['node'], kwargs['script_value0'])
  3.  
  4. # functions in pythonModule
  5. def tabSetChanged(n, index):
  6.    switch_name = 'switch_vis'
  7.    setSwitch(n, switch_name, index)
  8.  
  9.  
  10. def setSwitch(n, name, index):
  11.    switch = hou.node(n.path() + '/' + name)
  12.    switch.parm('input').set(index)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement