kodiak Posted June 20, 2007 Share Posted June 20, 2007 Hi there, I'm having some issue exposing a rolldown menu to the interface of an asset. What I'm trying to do is to (for example) expose the "detail" attribute of an object contained in the HDA using a similar (but more restrictive) menu on the asset interface. As there is no expression field for the menu (nor could I revert it to an integer), I don't see a way the channel reference the two together. The other method I tried is to create a callback on the asset interface side, that explicitly sets the value of the menu. Something like opparm `opfullpath("./EMBEDDEDOBJ")` detail `chs("./HDAPARAM")` This seems to be working in most cases when the asset is open, but I don't seem to be able to get it working with a closed one. Any thoughts? Thanks Andras Quote Link to comment Share on other sites More sharing options...
edward Posted June 20, 2007 Share Posted June 20, 2007 It's possible although some voodoo is involved in H8. In your unlocked asset, you need to establish a special !!ch()!! reference for menus. eg. opparm /obj/asset_instance/EMBEDDEDOBJ menu_parm ( '!!ch("../my_menu_parm")!!' Now to get the top-level my_menu_parm parameter to obtain the list of items, select the parameter in the Op Type Properties dialog and the switch to the Menu tab. Click on Menu Script. Now for the script, use something like this: opmenu -l EMBBEDDEDOBJ menu_parm All this assumes though that you want to exactly reproduce the menu. If you had promoted your menu parameter via the "plus" button next to the Create New menu in the Operator Type Properties dialog and then hit Apply, it would have done this automatically for you. If you have some really special case, then you might need to create an invisible parameter that EMBBEDEDOBJ/menu_parm references using !!ch()!! and then do your opparm on that top-level hidden parameter. Quote Link to comment Share on other sites More sharing options...
kodiak Posted June 20, 2007 Author Share Posted June 20, 2007 That's great, thanks. Just gave it a go both ways, and got it working. cheers Andras Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.