Need help to record a trigger frame , it reads the trigger frame but looses the information and I know because the next frame updated it, I believe there must be something wrong with the logic, can anyone look and advise the correct way of doing it.
thanks
Vex Record Trigger Frame
5934 2 0-
- rizviali110
- Member
- 79 posts
- Joined: March 2012
- Offline
-
- rizviali110
- Member
- 79 posts
- Joined: March 2012
- Offline
figured, if anyone need the same thing here is the file below, thanks to the following thread
http://forums.odforce.net/topic/20238-creating-a-boolean-attribute-that-returns-the-frame-numberlike-a-hit/ [forums.odforce.net]
http://forums.odforce.net/topic/20238-creating-a-boolean-attribute-that-returns-the-frame-numberlike-a-hit/ [forums.odforce.net]
FX - Artist / TD
-
- BabaJ
- Member
- 2164 posts
- Joined: Sept. 2015
- Offline
You can't create a ‘variable/attribute’ that persists over changing frames for the data (points/prims…) if that data is seeing the same code for each frame.
What you have to do is create some kind of conditional if/else statements based on those frame changes.
I'm guessing that is the issue ( your intended ‘record’ value is changing when you don't want it to ).
Seeing the solver node in there throws me off a bit since I have very little understanding/knowledge of solvers, hence I can't follow through the logic completely of what's going on in the scene.
However, if it is what I think; I know your issue too well.
Have had many cases when I just needed to create a ‘variable’ at a certain frame that would persist over time/frames unchanged.
Almost like a ‘global’ variable.
I've asked about this before, and some have suggested using a time shift node. It may help.
Haven't put in an RFE for it, but I think adding some kind of sytax to vex whereby one can create a ‘variable/attribute’ at a specific frame and ‘lock’ it to that value at that point and be able to access it from any other frame/time later could make coding much simpler( and easier to be more creative )….along with arrays of arrays…but I digress.
Here's a thread in which staff gave me an overview of what I was asking back in March
https://www.sidefx.com/forum/topic/48556/?page=1#post-219383 [www.sidefx.com]
What you have to do is create some kind of conditional if/else statements based on those frame changes.
I'm guessing that is the issue ( your intended ‘record’ value is changing when you don't want it to ).
Seeing the solver node in there throws me off a bit since I have very little understanding/knowledge of solvers, hence I can't follow through the logic completely of what's going on in the scene.
However, if it is what I think; I know your issue too well.
Have had many cases when I just needed to create a ‘variable’ at a certain frame that would persist over time/frames unchanged.
Almost like a ‘global’ variable.
I've asked about this before, and some have suggested using a time shift node. It may help.
Haven't put in an RFE for it, but I think adding some kind of sytax to vex whereby one can create a ‘variable/attribute’ at a specific frame and ‘lock’ it to that value at that point and be able to access it from any other frame/time later could make coding much simpler( and easier to be more creative )….along with arrays of arrays…but I digress.
Here's a thread in which staff gave me an overview of what I was asking back in March
https://www.sidefx.com/forum/topic/48556/?page=1#post-219383 [www.sidefx.com]
-
- Quick Links

