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

After Effects Trigger Animation By Markers

New Here ,
Jul 27, 2022 Jul 27, 2022

Copy link to clipboard

Copied

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

Views

909

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

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

 

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

 

Mylenium

Votes

Translate

Translate

Report

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