get primitives of a Group

   2534   2   1
User Avatar
Member
18 posts
Joined: May 2006
Offline
Hello,

how can I get the value of a group in primitives for use in a switch sop?

example: if the group A have 10 primitives then switch = 1, else switch=0.

I think is easy but I don´t know how write it.


very thanks
User Avatar
Staff
3456 posts
Joined: July 2005
Offline
exhelp nprims

float nprims (string name)
Returns the number of primitives in a surface node.
Michael Goldfarb | www.odforce.net
Training Lead
SideFX
www.sidefx.com
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
in the textport type exhelp -k group will return a few express that may help. nprimgroup() may be what you are after.

Personally I have moved over to using python for the switch sop. Just more straight forward IMHO.
There's at least one school like the old school!
  • Quick Links