Hello,
I'm happy to share with you the script plugin XPopMenu !
Initially developed on Softimage by Reinhard Claus, XPopMenu is a popup menu that you can associate to a hotkey to get under the hand a quick and easy customizable set of tools.
you can layout your menu using simple method like "addItem", "addTitleItem", "addSeparator" and "addSubMenu"
If you want you can add icon for each action item (icons collection come from axialis.com with some custom from Reinhard Claus)
As concrete example, I've joined two bonus tools : one to get distance and an other to get angle.
Quick demo :
I Hope you like it !
Cheers
XPopMenu.zip

Hi everyone,
I have a menu parameter that is filled using a script. The menu looks like this.
"token", "Label"
"p", "P"
"flow", "Flow"
In the VEX code I want to get the selected Token of the parameter.
int id = chi("attributes");
string name = chs("attributes");
Both of these return the selected item index but not the token or the label.
Is there a way to get the token of a menu parameter using VEX?
Thx!
Christian

Heya,
I've created a custom menu tool and added it to the menu using the MainMenuCommon.xml file - is there a way of soft-setting a hotkey to it within the xml, i.e. for multiuser project-based deployment?
I'm thinking that adding the HotkeyOverrides file might work but if it's possible to keep it all contained in the single xml file that would be far tidier.

Hi.
1. I got group field that can take points/edges/polygons.
2. i got selector that supports points/edges/polygons.
I need to limit GroupType menu to only points/edges/polygons, so the user can modify it only between those three if he wishes to change it manually. But if I set menu to only support positions 2-4, than it stops working. If I add all 0-4 positions, it works OK, but those first 2 are not supported and just confuse user. On the other hand if I use Integer parameter instead of menu as Grouptype, and limit it to only 2-4, it works.
I tried to update my custom GroupType with callback from original GroupType field, so the original would be working as it should invisible for the user and my custom field would be accessible, but callback doesn't execute if call it in viewport, only when I manually change original GroupType field in newtork view.
Anybody got some tip how to solve this?
Thanks in avance!
EDIT:
To expand a little, if I have selector:
thisType = hou.sopNodeTypeCategory().nodeTypes()['mantragora::sop::foo']
thisType.addSelector('FooSelector', selector_type='everything', primitive_types=(hou.primType.Polygon, ), prompt='Select points/edges or polygons. Press <ENTER> to accept.', group_parm_name='groupinput0', input_index=0, input_required=True)
it requires 5 positions long grouptype menu to work correctly and update what was selected. But I need to force it to work with 3 positions long grouptype menu. And I don't need positions 0-1, which are for Guess/Breakpoints. I need Point/Edges/Primitives, which are 2-4.

Hi!
I'm trying to find a way to read a config when a button is pressed, and update the available items in a menu parameter.
I've tried a couple of methods, but haven't managed to get anything to work yet.
First Attempt:
target_menu_items = ["a", "b", "c"]
menu_parm = node.parm("menu_parm")
template = menu_parm.parmTemplate()
template.setMenuItems(target_menu_items)
The interface remains unchanged. Reading the docs that is understandable:
So I tried what the docs recommended without any luck:
ptg = node.parmTemplateGroup()
menu_parm = node.parm("menu_parm")
template = menu_parm.parmTemplate()
template.setMenuItems(target_menu_items)
ptg.replace("menu_parm", template)
node.setParmTemplateGroup(ptg)
I had some success by adding a line, but this isn't really a solution.
template.setName("bahhumbug")
I assume it's failing to replace the template if the name of the replacement template matches that of the existing one. I don't understand why that would be a problem though.
I've had a thorough Google and can't find any examples of this... so I'm worried I'm approaching it the wrong way. Can anyone explain where I'm going wrong?
Many many thanks in advance,
Dan

I want to have possibility to list point or primitive attributes in my menu according to type user will pick. Lets say that my operator default state for attribute type is Point attrbute which I got covered by
PRM_Template(PRM_STRING, 1, &attributeParm_Name, PRMzeroDefaults, &SOP_Mantragora::pointAttribMenu);
and user switched type to Primitive. Should I update the menu with
PRM_Template::setChoiceListPtr(&SOP_Mantragora::primAttribMenu)
?
If so, where I should do this? Putting it in cook() method didn't worked.
EDIT: The same case is for groups. There is
SOP_Mantragora::groupMenu
But it lists all group types at once. And I want to have listed only those specified by user and switch between
SOP_Mantragora::pointGroupMenu
and
SOP_Mantragora::primGroupMenu
Thanks

Hello, I created few custom shelf tools for learning purposes and added them in tab menu of various contexts. I have deleted most of them from the shelf but all of them still exists in the tab menu. How can I remove them? Also how can I remove the tab menu itself or rename it? Thanks