How can I crate a Group based on an attribute..?

   999   1   0
User Avatar
Member
407 posts
Joined: Aug. 2015
Offline
Hello;

I have an attribute called “name” (values are P0 to P8).
By using SOPs, how can I create a (one) group and fill it with that attribute values?



Thanks.
Edited by Masoud - Feb. 24, 2020 06:52:21
Masoud Saadatmand (MSDVFX)
User Avatar
Member
182 posts
Joined: April 2009
Offline
I'm not sure if I understood your last part of the question about “fill it with”, but if you want one group based on certain attributes, then you can add those in the Base Group parameter in the Group Create SOP:
@name=P0,P1,P2,P3,P4,P5,P6,P7,P8


If you want one group for each primitive with the same attribute and a matching group name, then you can do that in a one liner in a wrangle:
setprimgroup(0, s@name, @primnum, 1);
Edited by blackpixel - Feb. 24, 2020 07:37:02

Attachments:
group.JPG (125.9 KB)
group2.JPG (126.4 KB)
groups.hip (88.7 KB)

  • Quick Links