how to "sync" 2 ordered menu
3209 3 1- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
suppose I have two ordered menus as show in the first 2 images below.
May I ask how to use python code within the “Menu Script” area of the 2nd ordered menu to make the 2nd menu automatically show an item with the same index as that of the item currently chosen in the 1st menu (see the last 2 images)?
Thanks!
May I ask how to use python code within the “Menu Script” area of the 2nd ordered menu to make the 2nd menu automatically show an item with the same index as that of the item currently chosen in the 1st menu (see the last 2 images)?
Thanks!
- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
- pezetko
- Member
- 387 posts
- Joined: Nov. 2008
- Offline
- oat
- Member
- 479 posts
- Joined: Dec. 2009
- Offline
Thank you very much, pezetko!
a minor variation of your suggestion:
hou.pwd().parm('menu_driven').set(hou.pwd().evalParm(menu_driver'))
I found that the code works when it is in the the main “Code” area of the Python operator node. But it doesn't work when put in the “Callback Script” area for the “driven” menu.
Am I missing something about how to use “callback script” here?
Much obliged!
a minor variation of your suggestion:
hou.pwd().parm('menu_driven').set(hou.pwd().evalParm(menu_driver'))
I found that the code works when it is in the the main “Code” area of the Python operator node. But it doesn't work when put in the “Callback Script” area for the “driven” menu.
Am I missing something about how to use “callback script” here?
Much obliged!
-
- Quick Links