PDA

View Full Version : custom attributeMenu for HyperGraph


Stylerxxx
01-22-2013, 09:51 AM
Hi guys,
I want to create custom attributeMenu that has to pop up when i connect custom nodes in HyperGraph. I don't want to see all suitable input attributes, but only some of them. Documentation says that "regPulldownMenuCommand" arg in attributeMenu is responsible for that. This is callback, which should parse arguments and return 1 and initialize menu items, if we have proper node and plug.

Here is a code:
global proc int cbTestNode(string $editorName, string $nodeName, string $plug, string $mode, string $menuType){
menuItem -l "item 1";
menuItem -l "item 2";
return 1;
}

$cbID = `attributeMenu -rpm "cbTestNode"`; // reg callback

When i try to use it, hyperGraph complains about menu items. "// Menu Item menu not found. // ". `setParent -q -m` tells me NONE. Obviously i have to parent items to menu, but how to get menu itself?

CGTalk Moderation
01-22-2013, 09:51 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.