FORUMS: list search recent posts

Make expression only apply in the absence of keyframes?

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Robert Headrick
Make expression only apply in the absence of keyframes?
on Apr 8, 2013 at 9:39:11 pm

I'm trying to come up with a general way to modify an expression so that it only affects the layer when it's not being moved around by keyframes. I've done something where I simply add "value +" to whatever expression I'm using, which allows me to use keyframes to accentuate what the expression is doing, but what I'm looking for now is more of an "on/off" mechanism.

To be more specific, I'm using a Beam effect to create a bar that connects two dots. I'm setting the Starting Point and Ending Point with an expression that ties those to the centers of the dots. However, I want to animate the beam into place by having the ending point move from one dot to the other (so it looks like the beam is growing out from one dot and connecting to the second one). So what I'd like to do is be able to add keyframes that animate the ending point the way I want, but then after that have the expression bind it to the ending point.

Hope that makes sense. I imagine I'm overcomplicating this somehow, but I haven't been able to see through it yet. Thanks!


Return to posts index

Robert Headrick
Re: Make expression only apply in the absence of keyframes?
on Apr 8, 2013 at 9:41:56 pm

Wow, I think just writing this post made my brain click somehow. I'm going to add a null object that's parented to the center of the dot, and change my expression for the end point to bind it to the null object's position value. That way I can simply animate the null.

Thanks for being my rubber duck! :-)


Return to posts index

Robert Headrick
Re: Make expression only apply in the absence of keyframes?
on Apr 8, 2013 at 9:48:41 pm

*Sigh* I spoke too quickly, after thinking that I asked too quickly. Posted that on the fly and then actually tried it. Expression yields the wrong values because the Null's values reflect the fact that it's parented, rather than it's absolute position.

My original question still stands! Will keep mucking around though. Maybe I'll figure something out that'll make this thread make me look a little less like a fool. ;-)


Return to posts index



Dan Ebberts
Re: Make expression only apply in the absence of keyframes?
on Apr 8, 2013 at 10:10:59 pm

To make the expression take effect after the last keyframe, you could do this:


if (numKeys > 0 && time > key(numKeys).time){
(your expression here)
}else
value


Dan



Return to posts index

Robert Headrick
Re: Make expression only apply in the absence of keyframes?
on Apr 9, 2013 at 2:23:28 pm

That did it! I actually ended up deciding that in this situation, it would be easier in the end to just animate the dots themselves to make the beams grow (with the scale of the dots starting at 0% until the beams reach where I want the dots to be). But, I'm logging this away for future reference because I've wanted to do this before and for some reason just couldn't make my brain see this solution. Thanks!


Return to posts index

Robert Headrick
Re: Make expression only apply in the absence of keyframes?
on Apr 9, 2013 at 2:32:30 pm

To answer my own question, and hopefully for the benefit of others looking this up, I figured out how to compensate for the issues with parenting. If the Position value for Layer X is linked with an expression to the Position value of Layer Y, and then you parent Layer Y to Layer Z, you just need to modify your expression to add the Position value of Layer Z.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]