Skip to main content
Participant
September 20, 2023
Question

control animation angle in a précompte

  • September 20, 2023
  • 1 reply
  • 341 views

hello 

i would like to find a way to control my settings controler angle in a precomp

maybe with markers or whatever 

would like to have an expression on my controler that take the ref of the layer comp markers to set the angle of my select items 

 

i have to duplicate multiple time the comp with different settings each time 

not sur to be clear ... so i took some screen grab 

This topic has been closed for replies.

1 reply

Mylenium
Legend
September 20, 2023
Participant
September 20, 2023

i 've tried but it don't change my value...☹

Dan Ebberts
Community Expert
Community Expert
September 20, 2023

If you have an expression in a precomp that's looking at layer markers on that precomp layer in the main comp, you'll need to adjust the expression to compensate for a non-zero start time of the precomp layer. It will end up looking something like this:

L = comp("Main").layer(thisComp.name);
m = L.marker;
val = value;
if (m.numKeys > 0){
  n = m.nearestKey(time + L.startTime).index;
  if (time + L.startTime < m.key(n).time) n--;
  if (n > 0){
    val = parseInt(m.key(n).comment);
  }
}
val