Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

After Effects Trigger Animation By Markers

New Here ,
Jul 27, 2022 Jul 27, 2022

Hi, guys! I'm a newbie motion designer. And I have difficulties with anderstanding expressions. I have this expression which attached to size property. This  ends animation when it hits the nearest marker. But I need to have more markers before my animation ends. Is it possible to trigger only the last marker to end my animation. Thank you a lot for your help.

n = 0;
if (thisComp.marker.numKeys > 0) {
n = thisComp.marker.nearestKey(time).index;
if (thisComp.marker.key(n).time > time) n--;
}

if (n > 0) {
try {
t = time - thisComp.marker.key(n).time;
if (n % 2 == 1) {
lastKeyTime = thisProperty.key(thisProperty.numKeys).time;
thisProperty.valueAtTime(lastKeyTime - t);
} else {
thisProperty.valueAtTime(t + thisProperty.key(1).time);
}
} catch (err) {
value
};
} else value

TOPICS
Error or problem , Expressions , How to
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jul 27, 2022 Jul 27, 2022
LATEST

It's always best to go back to the original source:

 

http://www.motionscript.com/design-guide/marker-sync.html

 

Mylenium

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines