monomind Posted February 22, 2021 Share Posted February 22, 2021 Trying to figure out how to check if a selected prim is in multiple base groups. I believe what I'm looking for is an "and" equivalent for the "base group" input field Quote Link to comment Share on other sites More sharing options...
monomind Posted February 24, 2021 Author Share Posted February 24, 2021 I'm still looking for a way to check how a prim is in two groups at the same time. Quote Link to comment Share on other sites More sharing options...
ryew Posted February 24, 2021 Share Posted February 24, 2021 Given that it involves detecting selected prims for attribute filtering, might want to shift this question to the scripting section of the forum Quote Link to comment Share on other sites More sharing options...
anim Posted February 25, 2021 Share Posted February 25, 2021 you can do this in Primitive Wrangle string allprimgroups[] = detailintrinsic(0, "primitivegroups"); foreach(string grp; allprimgroups){ if (inprimgroup(0, grp, @primnum)){ append(s[]@primgroups, grp); i@ngroups++; } } it will create 2 attributes: primgroups - array of all group names the primitive belongs to ngroups - number of groups that primitive belongs to (so if this is 2+ it belongs to more than 1 group) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.