Number of Groups

   2233   2   1
User Avatar
Member
208 posts
Joined: Nov. 2010
Offline
How do you use the total number of primitive groups in a parameter? I have 7 primitive groups created by the Partition SOP and want to use that to drive the number of material created by a Material SOP.

I was thinking it would be a $NUMGRPS or numgroups(“..”) or something similar…

Thanks!
User Avatar
Member
8573 posts
Joined: July 2007
Offline
you can use
primgrouplist() - to get space separeated list of prim groups
or
primgroupmask() - to get space separated list of prim groups by pattern

then argc() - will give you number of elements in that list

so
argc(primgroupmask(opinputpath(“.”,0), “grp*”) )
will give you number of groups matching grp* pattern from the first input, etc.
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
208 posts
Joined: Nov. 2010
Offline
Thanks Tomas, worked like a charm.
Kevin
  • Quick Links