Setting default menu item on Menu Script by token name

   6082   6   1
User Avatar
Member
145 posts
Joined: Feb. 2012
Offline
I have a menu being generated by a python script. So like: , with the tokens the same as the item.
Is there a way I can specify the default value by the token string, not the menu item index in the Type Properties dialog. I want to just specify ‘b’ as the default, not 1.
User Avatar
Member
229 posts
Joined: May 2006
Offline
if you have a string menu you should be able to set a string-default value ?

Seb
User Avatar
Member
145 posts
Joined: Feb. 2012
Offline
the problem is that it doesnt set it first time you create the node. You can ‘revert to default’ to get the right value but it dosent get set initially.
Maybe the menu is trying to set the default before the menu items are built so ends up not finding the item and reverts to 0, then once the UI is available the item can be found but is already set to 0.
User Avatar
Member
229 posts
Joined: May 2006
Offline
can you post an example ?
User Avatar
Member
145 posts
Joined: Feb. 2012
Offline
Here is an otl with the menu. It is supposed to default to the 5th item, but always goes to the top item.

Attachments:
dynamincMenuTest.otl (6.1 KB)

User Avatar
Member
229 posts
Joined: May 2006
Offline
change the type from ordered menu to string, and it works

Attachments:
dynamincmenutest_300.otl (6.2 KB)

User Avatar
Member
145 posts
Joined: Feb. 2012
Offline
wonderful! Thanks!
  • Quick Links