hou.Parm.rawValue
on it returns the correct value, but you the displayed value is still the previous state. You have to click on the menu to get the correct values to show.Here is the code I am using to generate the menu.
hou.pwd().parm("engine")
acts as an override for the target node behavior.rendergpu = hou.phm().check_rendergpu(hou.pwd().parm("target").evalAsNode()) if not hou.pwd().parm("engine").isDisabled(): rendergpu = hou.pwd().parm("engine").rawValue() == "xpu" cpugpu = filter(lambda x: x["gpu"] == rendergpu, hou.phm().retrieveData()) menuList = [] for item in cpugpu: menuList.append(item["id"]) menuList.append(item["name"]) return menuList
I have been trying to figure out if I can have something on
hou.pwd().parm("engine")
as a callback that would force the menu to redraw, but no dice yet.