Page 1 of 1

Layer Space Transform Question.

Posted: April 12th, 2010, 6:06 am
by shapeOfMotion
Hi all!

I would like to get the 2d position of a null object nested in a 3d comp.

To explain what I have:

In the top level comp I have a null object (2d) and a comp (3d).
the 3d comp is rotated in 3d.

To get the 2d position of the nested null (inside the 3d comp) I use the following expression:
l = comp("the 3d comp").layer("the nested null");
l.toComp(l.anchorPoint);

but the expression seems to ignore the transform (rotation) applied to the 3d comp.

What am I doing wrong ?

cheers, Johan

Re: Layer Space Transform Question.

Posted: April 13th, 2010, 12:12 am
by Mylenium
Isn't it obvious? You are applying 2 transform levels and don't do anything to cater for that. That aside, layer space transforms do not work across comps. They only work inside the same comp. You will have to find other methods.

Mylenium

Re: Layer Space Transform Question.

Posted: April 13th, 2010, 1:26 am
by shapeOfMotion
If it was obvious I wouldn´t ask ... :)
But thank you for your answer. I wasn´t aware the it didn´t work across comps.

cheers,

Johan

Re: Layer Space Transform Question.

Posted: April 13th, 2010, 7:44 am
by Dan Ebberts
Try this:

L1 = comp("the 3d comp").layer("the nested null");
P = L1.toWorld(L1.anchorPoint);
L2 = thisComp.layer("the 3d comp");
L2.toComp(P);



Dan

Re: Layer Space Transform Question.

Posted: April 13th, 2010, 8:01 am
by shapeOfMotion
Great work !

That´s what I call an answer !

cheers,
Johan