Skip to main content
Participant
April 24, 2024
Question

Problem with stop/play composition control, lower down the hierarchy

  • April 24, 2024
  • 1 reply
  • 159 views

Hi!

I have a variable for example 'POS'.

And there is a composition 'ONE', where on a layer is placed a composition 'TWO' with some layers inside and an animation on its timeline.

I need that as long as the POS variable is less than 1000, the animation in TWO is paused at 1m frames.

If POS is more than 1000, then the animation in TWO starts from the first frame until the end.

Tried 'Time remap' on comp "TWO" with '<1000'  - 0; 
and  with '>=1000' - value;  - doesn`t work correctly, `cose TWO starts playing not from 1st frame.



This topic has been closed for replies.

1 reply

Dan Ebberts
Community Expert
Community Expert
April 24, 2024

I can't tell for sure from your description, but it sounds like there might be a couple of 'limitations' of expressions at play here. One is that there is no external access to an expression's variables. The only way an expression can communicate to the outside world is through its calculated result, as applied to the property hosting the expression. It has no control over anything else, and other expressions have no access to anything about the expression except its result.

 

Secondly, expressions have no memory. So with a time remapping expression, for example if you want the time remapping to be driven by how long ago something happened, if that "something" isn't directly detectable (time of a marker or keyframe, for example), you'll likely have to create a loop that goes back in time, frame by frame, using valueAtTime(), to recreate the conditions at each previous frame, until the triggering condition is found.