Search - User list
Full Version: opmenu is smarter than hou.Parm.parmTemplate()
Root » Technical Discussion » opmenu is smarter than hou.Parm.parmTemplate()
jrcooper
If I have a string parameter that uses a menu script to turn it into a dropdown menu, opmenu -l properly returns the item/label pairs. However, the documented python equivalent/replacement for opmenu (hou.MenuParmTemplate) can't apply here because the hou.Parm.parmTemplate() method returns an object of type hou.StringParmTemplate, not hou.MenuParmTemplate, and the menuItem() and menuLabel() methods return empty tuples as a result.

This makes opmenu quite a bit smarter than the hou.ParmTemplate system since it seems to be able to figure out that such string parms are actually menu parms with items and labels.

Is there any ETA on when the hou.Parm.parmTemplate() method will be smart enough to return a hou.MenuParmTemplate object under these conditions?
graham
I wouldn't hold your breath. It's been in this messed up state for quite a while and probably isn't going to get fixed any time soon. Best thing to do would be to file a proper support bug and get yourself added to the list of the existing bug(s) for this which I'm sure exist. Who knows, maybe it will get fixed sooner than later.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB