Activity › Forums › Adobe After Effects › COW Tutorials: After Effects Expression Controls #2
-
COW Tutorials: After Effects Expression Controls #2
Posted by Kathlyn Lindeboom on March 3, 2007 at 2:33 am
&page=https://www.creativecow.net/articles/rabinowitz_aharon/Expression_Controls_Pt2/index.html”>Expression Controls #2 In this tutorial, Creative Cow leader Aharon Rabinowitz explores most of the expression controls, showing you how they can be used to enhance your projects and save time.
Click on the link above to find Aharon’s tutorial.
Kathlyn Lindeboom
Creativecow.netJustin Productions replied 19 years, 2 months ago 5 Members · 4 Replies -
4 Replies
-
Andrew Kramer
March 3, 2007 at 7:13 amNice tutorial Aharon.
You intrigued me with the apparent mystery of the layer control function.
I may have figured out a few different uses. One specifically that helps me tremendously.
In a nutshell the Layer Control function is a dynamic way to link expressions to a specific layer that is chosen in the list of the layer control drop-down. When using expressions it’s the difference between hard-coding a layers name and dynamically accessing one.
So say I have an expression based on the rotation of a specific layer, I could call on this layer by directly typing in the layer string like so:
thisComp.layer(“Black Solid 1”).rotation
But if I use a layer control, I can create a targetLayer variable by using the pickWhip to select the layer control effect:
targetLayer = effect(“Layer Control”)(“Layer”);
So to call on the rotation of a layer that is currently selected I could type this:
targetLayer = effect(“Layer Control”)(“Layer”);
targetLayer.rotationThis is especially useful when you need to call on the direct parameter (such as the position, rotation, etc, or any associated parameter) of a specific layer. Saving time the needed to change the layer name in the script everytime you decide to reference another layer. Now you can simply select the layer you want from the drop down and the rest of you expression will update.
Admittedly, you could create your own variable that is called targetLayer and reference this in the underlying script and simply change it once as needed to the direct name of a layer… But if you are using a script across multiple parameters this variable would have to be defined every time and changed through out. So using this function, you can copy/paste this same script, and paste it across your entire composition to any parameter and change the targetLayer with one simple drop down of the layer control effect.
I’m excited about this find, and I thank you for bringing it up.
Oh, the reason it has helped me is…
I have a few expressions that I have saved as effect presets. One in particular needs to be applied to a layer with a specific name because it analyzes the position to create a springy effect. So to make it work, I have to create a layer named “spring”(case sensitive too) then apply the preset to it, easy enough, but annoying.Now I’ve saved the preset with a layer control function, with the drop-down set to layer one, then when I add the preset to my comp it automatically creates a new layer that happens to be on top or in the first position as pre-designated in my preset. This way the name of the layer is irrelevant and yet magically it does what I want. And once applied to a layer, the drop-down of the layer control effect stays set to whatever layer was in the first position. So if I move that layer to the bottom or put new layers on top the script doesn’t select the wrong layer.
Cheers!!
Andrew Kramer
https://www.videocopilot.net -
Filip Vandueren
March 3, 2007 at 5:58 pmAs Andrew pointed out,
it can be very usefull in scripts that are bit more complex.
However: it can never be pick-whip-applied directly to an effect-parameter that expects a layer (as in Gradient wipe, CC Glass, set Matte etc.)
Because those paramaters too can not be animated, an thus can’t have an expression applied. -
Aharon Rabinowitz
March 4, 2007 at 4:26 amThanks. I’ve been hearing this. I find it really funny that in every book I’ve read by the “AE Experts” (And I have about 9 of them) they skip this controller entirely, and yet, I’ve gotten a bunch of emails explaining it to me here since I made the podcast.
It only proves what a great resource the cow is.
I wonder why Adobe designed it not to be pickwhiped?
—————————————-
Aharon Rabinowitz
aharon(AT)yahoo(DOT)com
http://www.allbetsareoff.com—————————————-
Click the link below to subscribe to the Creative Cow After Effects Podcast, and get free AE video tutorials:https://phobos.apple.com/WebObjects/MZStore.woa/wa/viewPodcast?id=111087911
-
Justin Productions
March 4, 2007 at 10:06 pmWow, your expression tutorials are da’ bomb.
Keep up the good work Aharon.
Justin Productions
Tangerin01@hotmail.com
Adobe After Effects 6.5 Professional
Reply to this Discussion! Login or Sign Up