Adobe After Effects Expressions Forum
Triggering Animation with Comments.
Triggering Animation with Comments.
by Jon Wooley on Aug 28, 2012 at 6:21:59 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 (http://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.


Re: Triggering Animation with Comments.
by Dan Fredley on Aug 28, 2012 at 7:01:40 pm

Try 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;
}



Re: Triggering Animation with Comments.
by Dan Ebberts on Aug 28, 2012 at 7:32:36 pm

Note 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




Re: Triggering Animation with Comments.
by Jon Wooley on Oct 2, 2012 at 1:55:15 am

Perfect! 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.


Re: Triggering Animation with Comments.
by Aaron Kent on Mar 2, 2013 at 9:46:42 pm

Would 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


Re: Triggering Animation with Comments.
by Jon Wooley on May 1, 2013 at 9:23:05 pm

I'm not good enough to answer your question fully, but this page from Dan Ebberts's site might help:

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


Re: Triggering Animation with Comments.
by Aaron Kent on May 1, 2013 at 9:29:37 pm

Jon, I played around with that for a while. Lotta fun sequencing stuff:

https://vimeo.com/60968609

cheers

AK





© CreativeCOW.net