Elisey Lobanov
Yelisey
About Me
EXPERTISE
Generalist
INDUSTRY
Film/TV
Houdini Skills
Availability
Not Specified
My Gallery
My Tutorials
Recent Forum Posts
Radial submenus in Python Feb. 27, 2019, 8:07 p.m.
Is there any way to get a reference to an existing radial submenu? This code:
submenu = menu.item(hou.radialItemLocation.Top) #submenu at this location was created earlier
item = submenu.item(hou.radialItemLocation.Right) #trying to call an item from submenu
Throws an error:
AttributeError: ‘RadialItem’ object has no attribute ‘item’
But if I check all items in initial menu with menu.items():
{radialItemLocation.Top: <hou.RadialSubmenu at 000000000575AAC0>, radialItemLocation.Left: <hou.RadialScriptItem at 0000000005B81490>, radialItemLocation.BottomLeft: <hou.RadialScriptItem at 0000000005B82340>, radialItemLocation.BottomRight: <hou.RadialScriptItem at 00000000834D5030>, radialItemLocation.TopLeft: <hou.RadialScriptItem at 0000000005B805E0>, radialItemLocation.TopRight: <hou.RadialScriptItem at 0000000004ECD580>, radialItemLocation.Right: <hou.RadialScriptItem at 00000000834D6070>, radialItemLocation.Bottom: <hou.RadialScriptItem at 0000000005B83380>}
submenu = menu.item(hou.radialItemLocation.Top) #submenu at this location was created earlier
item = submenu.item(hou.radialItemLocation.Right) #trying to call an item from submenu
Throws an error:
AttributeError: ‘RadialItem’ object has no attribute ‘item’
But if I check all items in initial menu with menu.items():
{radialItemLocation.Top: <hou.RadialSubmenu at 000000000575AAC0>, radialItemLocation.Left: <hou.RadialScriptItem at 0000000005B81490>, radialItemLocation.BottomLeft: <hou.RadialScriptItem at 0000000005B82340>, radialItemLocation.BottomRight: <hou.RadialScriptItem at 00000000834D5030>, radialItemLocation.TopLeft: <hou.RadialScriptItem at 0000000005B805E0>, radialItemLocation.TopRight: <hou.RadialScriptItem at 0000000004ECD580>, radialItemLocation.Right: <hou.RadialScriptItem at 00000000834D6070>, radialItemLocation.Bottom: <hou.RadialScriptItem at 0000000005B83380>}