ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

World scale

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
David Jouppi
World scale
on Nov 29, 2017 at 4:45:23 pm

Alright, I have tried to find an answer to this a few times over the past couple days with no avail. I have checked many forums, and dug through adobe's expression language page, and haven't found an answer.

Im trying to find a simple solution for maintaining a world scale to an object. I have a complicated rig built... with 40 shape layers parented to individual nulls. Those individual nulls daisy chained parented, all the way up to a master control. That master control null needs to control the scale and rotation of the entire rig, and the individual nulls are intended to control the position of the shape layers via the null's scale and rotation.

Is there a simple expression that I can put on the scale property that would maintain its scale when I animate the parent nulls?


Return to posts index

Dan Ebberts
Re: World scale
on Nov 29, 2017 at 5:04:17 pm

Try this:


L = thisLayer;
s = transform.scale.value;
while (L.hasParent){
L = L.parent;
for (i = 0; i < s.length; i++) s[i] *= 100/L.transform.scale.value[i]
}
s



Dan



Return to posts index

David Jouppi
Re: World scale
on Nov 29, 2017 at 5:09:26 pm

That did it! I tried something similar, but I couldn't quite get it. This is perfect. Thanks, Dan!


Return to posts index

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