menu script

   4157   3   0
User Avatar
Member
82 posts
Joined: Oct. 2007
Offline
Hi,
Ok, my hscript knowledge are near zero so I need a little bit of help.
I have an HDA with a menu item (a list: token->a string, label… ).
I need to generate another list ( in a menu ) based on the choice of the first.
Something like this:

result = “”

if my param value == someString
result = token…label…token…label
else if my param value == anotherString
result = token…label…token…label
return result

So it would be cool if someone could give me the correct syntax for the menu script.
I don't use Houdini a lot at the moment

Tky.
User Avatar
Staff
3465 posts
Joined: July 2005
Online
I could be wrong but…
I don't think this is possible - since the menus are a part of the definition and therefore can't be dynamically built…
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Member
8090 posts
Joined: July 2005
Online
Look in the help of the type properties. Yes, you can define dynamic menus.
User Avatar
Member
665 posts
Joined: July 2005
Offline
should be…

if (`ch(“param”)` == 1 ) then
set list = ‘billy billy’
else
set list = ‘joe joe’
endif

echo $list


heh, it's been a while since I've looked at the if() syntax, but gives you the idea
  • Quick Links