Jump to content
CinnamonMetal

Array contains single primitive as 0 ?

Recommended Posts

I'm looping over all primitives but rather then primitives 5,6,7,8 being stored in a single array, each primitive is being stored in it's own array ? 

Since I'm using a primitive wrangler within a forEach SOP, I assume the reason why each primitive is being stored as primitive 0 rather then the primitive number; the iteration attribute has to be imported into the primitive wangler ?

 int oneMerge = detailattrib(0,"lopping",0,accept);

prim_Num.png

 

Share this post


Link to post
Share on other sites

Because you're iterating for each primitive. That means that there's only one primitive per iteration through the loop, so the only primitive you can see is primitive zero.

It's beating a dead horse at this point, but this is one of many reasons why you should use primitive wrangles rather than for-each loops when you want to iterate over a set of primitives.

  • Thanks 1

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

×