Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsMotion GraphicsTrainingCinema 4DFAQ

"Layer Control" Expression Control

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Monroe Ekilah"Layer Control" Expression Control
by on Aug 13, 2008 at 2:24:31 am

i am pretty solid on the basics of expressions, and all that. Im no java programmer, but at least i get it.

my question is this. how can i employ the "Layer Control" effect? i understand the vast usability (is that a word? :P ) of slider controls, checkboxes, etc., and have used them before. however, in my browsing of AE, i stumbled upon the layer control, applied it to a null, and then i stopped.

what would i do with this? in my curiosity, i linked a source text property to the layer, and that just displays "[OBJECT LAYER]" (not that i thought it would actually work haha)

can i have a few examples of how to use this control, as im sure it is powerful...

thansk in advance,

new Cow user


Return to posts index
Reply   Like  

Dan EbbertsRe: "Layer Control" Expression Control
by on Aug 13, 2008 at 5:25:24 am

If you link to a layer control, you actually get a layer object, so if you had tacked on a layer attribute like .name, your text layer expression would have displayed the name of the layer selected by the control.

The unfortunate thing about the layer control is that you can't keyframe it, but it's still useful. Fanciful example: Let's say you have a layer with an expression to orbit another layer and you have that layer defined with a layer control. Duplicate the layer a bunch of times and then with each of the copies you can select a different layer to orbit. Otherwise you'd have to go in and edit each expression.

It's not something you use everyday, but it is useful from time to time.

Dan



Return to posts index
Reply   Like  

Monroe EkilahRe: "Layer Control" Expression Control
by on Aug 13, 2008 at 5:30:49 am

(in order to increase my understanding of your example... hang with me :P )

so in your example, would the expression that linked to the layer control have to have ".position" or something like that tacked on to it?

like you said it gives me a "layer object." this is a completely new subject to me... but cool all the same. ill play with it, but if anyone has a link to a site or tutorial, etc. explaining this concept of layer objects, that would be nice :]




Monroe, AE user and Sound Engineer


Return to posts index
Reply   Like  


Dan EbbertsRe: "Layer Control" Expression Control
by on Aug 13, 2008 at 6:24:03 am

Yes - you could add .position to access up the layer's position.

Here's a 2D layer orbit example adapted from the expression sampler that ships with AE. Add a layer control to a layer, use it to select another layer in the comp, and drop this expression into the position property of the layer with the control:

r = 75; //radius
f = 1.9; //frequency

try{
L = effect("Layer Control")("Layer");
center = L.toWorld(L.anchorPoint);
}catch(err){
center = value;
}

myTime = Math.max(0,time - inPoint);
angle = f*myTime*2*Math.PI;
center + [Math.sin(angle)/thisComp.pixelAspect, - Math.cos(angle)]*r

The layer with the expression should now orbit whichever layer is selected by the control.

The try/catch stuff is just there so that the expression doesn't break if you select "None" with the layer control.

Dan



Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>


FORUMSTUTORIALSMAGAZINESTOCKYARDVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2012 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]