Forums › Adobe After Effects Expressions › Triggering Animation with Comments.
Triggering Animation with Comments.
Jon Wooley
August 28, 2012 at 6:21 pm[Posted this in the main AE forum and received no response, hoping for better luck here, sorry if it’s too basic]
Ok, so I do a lot of overlays for pre-recorded events and I was wondering if it was possible to trigger animations by using comments. Not in the Dan Ebbert way (https://www.motionscript.com/design-guide/marker-sync.html, which I’ve used and love) but rather in a way that takes place within the same sequence using established values.
Basically is there any way in AE to say, “Look at marker comment x. When comment x = Move45, take the curent rotation value of layer y and add 45 to it over the next 20 frames.”
Is that even possible and what would be the best way of telling AE this?
Thank you all in advance.
Dan Fredley
August 28, 2012 at 7:01 pmTry this:
//user-defined values
durInFrames = 20;
txt = 'Move45';
addValue = 45;//AE-calculated values
m = marker.nearestKey(time);
str = m.comment;if(str === txt && m.time <= time) {
start = m.time;
end = m.time + durInFrames*thisComp.frameDuration;
startValue = value;
endValue = value + addValue;
ease(time, start, end, startValue, endValue);
} else {
value;
}Dan Ebberts
August 28, 2012 at 7:32 pmNote that if you wanted to execute a sequence of commands, since expressions have no memory, you’d have to have your expression loop through all previous markers and add up all the previous commands to get the current value.
Dan
Jon Wooley
October 2, 2012 at 1:55 amPerfect! Thank you both!
And Mr. Ebberts, thank you for everything you’ve posted to date, your knowledge has been instrumental to me leaning expressions in AE.
Aaron Kent
March 2, 2013 at 9:46 pmWould it be possible to see an example of looping through all the previous values in this expression so that the rotation continues to increment instead of snapping back?
Thanks
AK
Jon Wooley
May 1, 2013 at 9:23 pmI’m not good enough to answer your question fully, but this page from Dan Ebberts’s site might help:
Aaron Kent
May 1, 2013 at 9:29 pmJon, I played around with that for a while. Lotta fun sequencing stuff:
cheers
AK
Some contents or functionalities here are not available due to your cookie preferences!This happens because the functionality/content marked as “Vimeo framework” uses cookies that you choosed to keep disabled. In order to view this content or use this functionality, please enable cookies: click here to open your cookie preferences.
Log in to reply.