| Parenting Layer to Null & Adding Expression to Layer
• | | | |
 | Parenting Layer to Null & Adding Expression to Layer
by Jay Munoz on Jun 19, 2012 at 7:34:13 pm |
I've been searching online for answer but can't seem to find what I'm looking for.. maybe someone here can help:
I have 10 (text) layers tied to one NULL object. I keyframed the Null object to move from point A to point B (top to bottom). I'd like to insert an expression, to all the text layers, which would make them arrive to point B at an offset time. Almost cascade-like. Anyone want to take a stab?
Thanks, fellas!
Jay
| | | | |
• | | | |  | Re: Parenting Layer to Null & Adding Expression to Layer by Wim Bruyninckx on Jun 19, 2012 at 8:05:02 pm |
Hi,
valueAtTime is something that may be useful for you
i don't think it's necessary to use a parent null layer..
i would just keyframe the position from one layer from point A to B, and then for each of the other layers: add an expression for the position:
thisComp.layer("animated_layer").transform.position.valueAtTime(time-2);
where thisComp.layer("animated_layer").transform.position is the pick-whipped position value of the keyframed layer
valueAtTime(time-2) where 2 is the time offset ... you can change this value of course...
hope it helps
Wim
thisComp.layer("animated_layer").transform.position.valueAtTime(time-2);
| | | | |
• | | | |  | Re: Parenting Layer to Null & Adding Expression to Layer by Jay Munoz on Jun 19, 2012 at 8:22:40 pm |
Sweet! I'll try that now.. thanks so much!
But just to clear it up.. the reason I don't want to keyframe each layer is because I'm setting it up as a template to use again. I may have to move the position of the text layers here and there for future versions. Any ideas?
| | | | |
• | | | |  | Re: Parenting Layer to Null & Adding Expression to Layer by Dan Fredley on Jun 19, 2012 at 8:28:56 pm |
Unparent the null place it at the top then paste this expression on the position of all layers underneath--must be in order in the timeline since this expression uses the relative (index-1)--in other words it pulls info from layer above). This one only reads the y value if that's all you want to affect:
[value[0],thisComp.layer(index-1).transform.position.valueAtTime(time-2)[1]]
Or if you want to have control over both values:
[value[0],value[1] + thisComp.layer(index-1).transform.position.valueAtTime(time-2)[1]]
| | | | |
• | | | |  | Re: Parenting Layer to Null & Adding Expression to Layer by Darby Edelen on Jun 20, 2012 at 2:31:52 pm |
Here's a way to leave the layers parented, just apply this to the position property of the child layers:
offset = 3;
p = toWorld(anchorPoint, time - offset);
parent.fromWorld(p);
You even maintain the ability to keyframe the position of the child layers independently. The offset value is in seconds. If you want it in frames you could add a framesToTime(); function.
Darby Edelen
| | | | |
| |
|