Jump to content
AndrewMelnychuk

Total Number Of Primitives

Recommended Posts

Hello, I just did FrenchOps breaking objects tutorial.

I was wondering whats the expression to get the number of primitives out of a partition sop. Is it something like NPR("../partition1"), how do I access the total number of primitives created by a sop to plug into the count of the copy node

Share this post


Link to post
Share on other sites

Thank you for your replay, that function is returning the number of primitives but not the number of primitive groups. Im gonna search the help file a bit more. Thanks dude. is there a way to use primgrouplist and get the total size of that list? like count.primgrouplist? or amax.primgroupmax. Im new to houdini from max btw, sry if my thinking seems fucked.

Edited by AndrewMelnychuk

Share this post


Link to post
Share on other sites
Thank you for your replay, that function is returning the number of primitives but not the number of primitive groups. Im gonna search the help file a bit more. Thanks dude. is there a way to use primgrouplist and get the total size of that list? like count.primgrouplist? or amax.primgroupmax. Im new to houdini from max btw, sry if my thinking seems fucked.

damnit i named my thread wrong, i need total number of primitive groups

Share this post


Link to post
Share on other sites
damnit i named my thread wrong, i need total number of primitive groups

Get the list of primitive groups with primgrouplist().

Parse this using argc(), wich will return the number of arguments passed to it - in this case the number of primitive groups.

number_of_primitive_groups.hip

Hope this helps.

Georg

Share this post


Link to post
Share on other sites

freaking awesome, that works perfectly, i was doing that rerecreate broken object trick and I wanted the number of copies to be connected up to the system so I wouldnt have to change stuff.

Woot!

ty both!

Edited by AndrewMelnychuk

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×