Jump to content
Sign in to follow this  
Valent

trying to delete primitives by 'Attribute_Wrangle'

Recommended Posts

Hi, I'm trying to delete primitives by 'Attribute_Wrangle' based on their attribute value, and the result is not the one I expect, what am I doing wrong?

int a;
for(a=0; a<@primnum; a++)
{
  if(@c1<0.3) removeprim(1,a,1);

in my opinion, this should delete every primitive in the mesh whose value of attribute "c1" is less than 0.3. Instead, it deletes some random primitives (well not random but unrelated ones)

p.s: I know that I can do it easily by 'Blast'-node) 

Share this post


Link to post
Share on other sites

stoopid me :)

if(@c1<0.3)
{
    removeprim(0, @primnum, 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
Sign in to follow this  

×