Character Blend Shapes Add SOP has this neat dropdown menu:
It has always been a mystery to me. The items in this dropdown menu seem to be updated along with the input geometry's name attribute. How could I make something similar for my own HDA?
I checked it's parameter interface, but surprisingly, there isn't a special tag or something:
How to make a dropdown menu of all values of an attribute?
475 1 0- raincole
- Member
- 444 posts
- Joined: Aug. 2019
- Offline
- tamte
- Member
- 8555 posts
- Joined: July 2007
- Offline
you can for example use this menu script to get menu out of unique values of primitive name attribute of first input geo:
menu = [] geo = kwargs['node'].inputGeometry(0) if geo: attrib = geo.findPrimAttrib("name") if attrib: for name in attrib.strings(): menu += [name, name] return menu
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links