FORUMS: list search recent posts

Position of control null in parent comp

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Lloyd Alvarez
Position of control null in parent comp
on Apr 21, 2011 at 4:41:59 pm

You would think I would understand this stuff by now but it still does my head in.

I have a parent comp "Main" that has a control null "Control Null". In a nested pre-comp that has been scaled in the parent comp I have a text layer "Text" that I would like to be able to control it's transform properties with the control null in the parent comp but no matter what combo of toWorld, etc I try I can't get it to work. Any help would be much appreciated.


Return to posts index

Dan Ebberts
Re: Position of control null in parent comp
on Apr 21, 2011 at 5:39:11 pm

Lloyd,

It can get complicated. You need to do it in two steps. Say you have have a Point Control on your null that you want to use to control the position of the text in the sub-comp. First you need to get the Position Control into the main comp's world space. Then you need to translate that result to the layer space of the sub-comp as a layer in the main comp. Like this:

L1 = comp("Main").layer("Control Null");
ptCtrl = L1.effect("Point Control")("Point");
p = L1.toWorld(ptCtrl);
L2 = comp("Main").layer(thisComp.name);
L2.fromWorld(p);

The details may differ, depending on exactly what you're trying to do.

Dan



Return to posts index

Lloyd Alvarez
Re: Position of control null in parent comp
on Apr 21, 2011 at 5:59:19 pm

That did the trick, thanks Dan. I was failing to consider the pre-comp's transforms in the parent comp.

Cheers,
Lloyd

http://aescripts.com


Return to posts index

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