Here is explanation from the file
<xs:element name="scriptMenuStripDynamicRadio" type="scriptDynamicMenuStripRadio_type"> <xs:annotation><xs:documentation> Defines a composite menu item (i.e, the strip) consisting of a set of radio items, where only one such item can be selected in a strip. The contents items are defined by a custom script. </xs:documentation></xs:annotation>
I’ve attempted to adapt the approach described for scriptMenuStripDynamic, but I can't get it to work. Has anyone else successfully used the Radio version? Any advice or suggestions would be greatly appreciated!
<?xml version="1.0" encoding="UTF-8"?> <menuDocument> <menu> <scriptMenuStripDynamicRadio id="my_desktop_strip"> <insertAtIndex>0</insertAtIndex> <contentsScriptCode> <![CDATA[ import hou menu_items = [name for desktop in hou.ui.desktops() for name in (desktop.name(), desktop.name())] return menu_items ]]> </contentsScriptCode> <scriptCode> </scriptCode> </scriptMenuStripDynamicRadio> </menu> </menuDocument>