Jump to content

Capture a specific frame from @Frame


Recommended Posts

Hi everyone.
I'm trying to save the value of a specific frame in a variable. I want that when a sphere reaches a specific place in time, it captures that frame number for later use.
Does anyone know how to do this? I'm trying to put it in a variable and then when I exit the if loop I equal it to itself so that it saves that value, but it's initialized to 0.

image.thumb.png.6f5c5d30953fb3eaa05c310689149615.pngimage.thumb.png.1240b36d1f9aa092ebad56c88a6cfec1.png

Link to comment
Share on other sites

Try plugging a Time Shift node of the frame you want into the second input of your wrangle. You can fetch any attribute from that point in time by using the point expression...

f@my_attribute = point(1,"my_attribute",@ptnum,0);

 

Edited by Atom
  • Like 1
Link to comment
Share on other sites

If in the scene, which is more complex, I have the timeshift to capture said attribute, the problem I encounter is that for some reason, @Frame does not let me keep the value of the frame, in this case 206 is reset to 0.
I don't know how to control @Frame so that the information of that frame is saved, I have tried to repeat it with "i@active == i@active" to leave said value.
Thank you very much for your answer.

image.thumb.png.ae9ed1872168406ee777ad0655c69a47.png

Link to comment
Share on other sites

You might have a bit more luck by running your wrangle inside of a solver after copying over the 'myat' attribute from the previous time step, so it can store all the attributes that were evaluated in all the previous time steps

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...