Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions scale multiple layers to fit comp

  • Colin Braley

    October 12, 2007 at 2:39 am

    Try this, I cant test it as I have no AE on my laptop, but Im pretty sure it should do the trick:


    xRatio = (thisComp.width - thisLayer.width) /thisLayer.width;
    yRatio = (thisComp.height - thisLayer.height) /thisLayer.height;
    x = 100 + (xRatio * 100 );
    y = 100 + (yRatio * 100);
    [x, y]

    I justt realized this dosent factor in pixel aspect ratio…oh well, I have to go study so no more time 🙂 If you need a solution that does try searching aenhancers.com or here at the cow for something. I bet Dan or Filip or someone has done something like this before.

    And don’t foreget you can right click on a layer and go to Transform>Scale to fit to comp, or something like that.

    ~Colin Braley

    Expressions and other stuff at
    http://www.colinbraley.com

  • Dan Ebberts

    October 12, 2007 at 3:46 am

    This seems to work:

    x = thisComp.width*thisComp.pixelAspect/(width*source.pixelAspect);
    y = thisComp.height/height;
    [x,y]*100

    Dan

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