Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Link Scale to Z Position

  • Link Scale to Z Position

    Posted by Tim Montiq on October 7, 2008 at 4:44 pm
    //Start Expression.
    ZPos = thisComp.layer("Null 1").scale[0];
    minScale = 20; //minimum value for scale
    maxScale = 100; //maximum value for scale
    NewZPosMin = 0; //minimum value for ZPos
    NewZPosMax = 500; //minimum value for ZPos
    linear(ZPos,minScale,maxScale,newZPosmin,NewZPosMax)
    //End Expression 

    Is there an expression that will let me link [x,y,z] of a 3D Camera to [x,y,scale] of a 2D layer? I’ve tried the expression below but I am receiving an expected error on line 2.

    Improper planning on your part doesn’t necessarily constitute and emergency on my part

    Dan Ebberts replied 17 years, 7 months ago 2 Members · 1 Reply
  • 1 Reply
  • Dan Ebberts

    October 8, 2008 at 3:13 am

    More like this, I think:

    ZPos = thisComp.layer(“Null 1”).scale[0];
    minScale = 20; //minimum value for scale
    maxScale = 100; //maximum value for scale
    NewZPosMin = 0; //minimum value for ZPos
    NewZPosMax = 500; //minimum value for ZPos
    NewZPos = linear(ZPos,minScale,maxScale,NewZPosMin,NewZPosMax);
    [value[0],value[1],NewZPos]

    Dan

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy