Hi there, trying to find a way to parse volume primitives by name, so i can infer the index of the primitive i want (in particular rest) MMB on my incoming volume i see:
>>> pattrs = g.primAttribs() >>> pattrs (<hou.Attrib Prim ‘maximum’ (1 Float) of geometry in /obj/GET/vol_Noise/VOL_IN>, <hou.Attrib Prim ‘minimum’ (1 Flo at) of geometry in /obj/GET/vol_Noise/VOL_IN>, <hou.Attrib Prim ‘dopobject’ (1 String) of geometry in /obj/GET/vol _Noise/VOL_IN>, <hou.Attrib Prim ‘name’ (1 String) of geometry in /obj/GET/vol_Noise/VOL_IN>) >>> pattrs.strings() ('density', ‘vel.x’, ‘vel.y’, ‘vel.z’, ‘rest.x’, ‘rest.y’, ‘rest.z’, ‘rest2.x’, ‘rest2.y’, ‘rest2.z’)
Afterwhich its straightforward to infer the primitive index from the name.
string listbyvals (string surface_node, float class, string attribute, string id) Returns a list of elements with a given value for a string attribute.
The <class> can be one of D_VERTEX, D_POINT, D_PRIMITIVE, or D_DETAIL for the corresponding attribute class.