Expression Copied to Clipboard! 🗂
← Back to Expressions

Ignore Parent Scale (if parent has parent) - After Effects Expression

Maintain scale of a layer when parented to another layer - even if that layer has a parent. Apply to scale property of child layer.

Ignore Parent Scale (if parent has parent)

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

Copied to Clipboard!
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

Credit