Copy link to clipboard
Copied
Hello.
I'm using loopOutDuration(type = "pingpong", duration = 0) between two keyframes. I'd like to randomize the value of the second keyframe. Is there a way to do this with an expression?
Thanks for the help.
Copy link to clipboard
Copied
Expressions only look at the current frame. If you build a mechanism to set a random number and hold it for a named keyframe the expression could easily become recursive. That means the longer the expression runs the slower it gets.
Maybe an easier solution would be to grab the position of a null that was assigned a random value every x number of frames. X would be the number of frames between the first and second keyframe that you want to animate. Then you could define the second keyframe's position by just linking to the position of the null. That position would change every X number of frames. I don't know if the loop method would be able to look at that changing value, but it would be a start.
This would be a perfect question to post to Dan Ebberts. You might get him to look at the problem if you posted your question in the Scripting and Expression subspace on this forum.
Copy link to clipboard
Copied
Thanks for your reply!
It's turning out it might not be worth the trouble doing it with an expression. I might have to just manually build in the randomness.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now