-
Changing Scale of Child relative to Parents H/W
This is the effect I’m looking for https://imgur.com/a/EubDf
I created it using 4 precomps, keyframed the first 4 frames with the correct scales I wanted. Then in a master comp, using time remap on all precomps linked to a slider to animate between the preset keyframes.
This idea works for static images, but I’m looking for a way to get the same slider control to drive all four panels without messing with time so I can add secondary animation to the objects within each box.
Below I have a expression I found from Dan Ebberts, and it gets me half way there. With the child layer parented and this expression pasted in the scale, the child stays centered but doesn’t scale up or down relative to the width and height of the parent while maintaining the childs original scale restraints.
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