ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Scale multiple layers on their anchor points

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Matteo Masin
Scale multiple layers on their anchor points
on Mar 9, 2011 at 2:15:40 pm

Hi to everybody!
Just a "simple" question we're trying to solve without success...

Suppose I have a lot of layers in a comp that I need to scale by 25%. They have different positions on the layout and different scale (some layer is at 100% scale, someone is not). I need to preserve the layout so I can't scale them with a parented null (it would scale all the layers around a single anchor points, while I need to scale them on their relative anchors).
A solution would be to scale them using a Trasform Effect but, after the scale process, I need to do some masks and i don't want to precompose all the layers...

Do you know if, using some script or expression, it's possible to do this?

Thank you in advance,


Return to posts index

Walter Soyka
Re: Scale multiple layers on their anchor points
on Mar 9, 2011 at 2:26:23 pm

If you select all the layers, hit S for scale, and scrub the Scale property, they will all adjust proportionately.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

Matteo Masin
Re: Scale multiple layers on their anchor points
on Mar 9, 2011 at 2:34:54 pm

Thanks Walter,
but this seems not to work like I expected. For some reason if I select all the layers, press S and, suppose, scrub a 100% scaled layer to 25%, the other layers don't scale down to their relative 25% (for example a layer starting with a 80% scale doesn't go to 20%). I just tried, but it seems that other layers just go down in scale by the same "absolute" scale value (in this case the 75% down).

Please let me know if I'm missing some step...

Thanks.


Return to posts index


Walter Soyka
Re: Scale multiple layers on their anchor points
on Mar 9, 2011 at 3:48:12 pm

Whoops -- you are right. Sorry I steered you down the wrong path!

You can use an expression to accomplish this as follows:
  • Alt-Click the stopwatch on the first scale property, and enter transform.scale * 0.25
  • With the scale property still selected, Edit > Copy expression only
  • Select the rest of the layers, and Edit > Paste

This will apply the scale over an animation.

Rather than using the absolute value of 0.25 as I have in the example above, I'd suggest adding a Slider expression control effect to a new null object, then pickwhipping to it in place of the 0.25 in the expression before you copy and paste. This will allow you to control (and even animate) the degree of scale very easily.

Walter Soyka
Principal & Designer at Keen Live
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
RenderBreak Blog - What I'm thinking when my workstation's thinking
Creative Cow Forum Host: Live & Stage Events


Return to posts index

Matteo Masin
Re: Scale multiple layers on their anchor points
on Mar 9, 2011 at 4:01:33 pm

GREAT! IT WORKS!
This is the reason I love Creative COW!
You're a genius! really thank you.


Return to posts index

Roland R. Kahlenberg
Re: Scale multiple layers on their anchor points
on Mar 9, 2011 at 4:05:01 pm

The "Scale Composition.jsx" script may be a more productive option depending on how many layers you have in the comp which do not require scaling.

The said script will timeout with an error should a layer be locked - IOW, all layers in the comp will be scaled for the script to complete its routine.

Just remember to re-set the comp size back to its original once you're done with the script AND re-set the scale for all layers that weren't supposed to be scaled (sense make?).

HTH
RoRK

AE Training in South East Asia. AE templates for sale and rental. Click here for more


Return to posts index

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