Skip to main content
Participant
March 8, 2023
Question

Expression error - Ignore parent scale

  • March 8, 2023
  • 1 reply
  • 770 views

I'm following this tutorial https://www.youtube.com/watch?v=Qupphl-scQY and the first time I got an error message for the first part of the expression. In project settings I switched from JavaScript to Legacy ExtendScript, restarted AE and tried again: the first error solved itself but a new error appeared instead. The orange object is the parent and a 3D object if it matters. Any thoughts on how I could solve this? 

s = [];
parentScale = parent.transform.scale.value;
for (i = 0; i < parentScale.length; i++){
s[i] = (parentScale[i]== 0) ? 0 : value[i]*100/parentScale[i];
}
s

This topic has been closed for replies.

1 reply

Mylenium
Legend
March 8, 2023

Your parent layer is a 3D layer and thus has three scale values whereas your ball is 2D. Thus the code looks for a value that doesn't exist. Tunr on 3D or modify the expression to be parentScale.length-1.

 

Mylenium

Participant
March 15, 2023

Ohh makes sense! Thank you!!