Jump to content

POP Wrangle expression question


Recommended Posts

Hey guys,

 

I have a question about pop wrangle if else statement. I'm trying to record the frame number that when the particle enter a

group.

 

In the old pop using the attribute node

 

if($ENTER_GROUP == -1, $F, $ENTER_GROUP) 

 

it works however im trying the new pop n with its POP wrangle it kind of not working. Im not really sure what i did wrong

 

 

i@enter_group = -1;

 
if (@enter_group == -1) {
    @enter_group = @Frame;
} else {
    @enter_group = @enter_group;
}
 
 
Thanks u guys for your help in advance :)
Link to comment
Share on other sites

here is the example

but essentially the code is:

// this code is run only on particles in desired group
float @enter_groupf = -1; // default value for initialization of enter group frame (if you sim in negative frames, make this lower than your start frame)
if (f@enter_groupf == -1) //if current value is still at default
{
    f@enter_groupf = @Frame;  // set it to current floating frame
}

pop_enter_group_frame.hip

Edited by anim
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...