Copy link to clipboard
Copied
Hi,
I'm trying to make a simple variable for a sourceRectAtTime expression but I am getting an error on my first variable definition.
var s = thisComp.layer("name");
That's the first variable I want to define and I get the following error:
"Undefined value used in expression"
There is literally one composition in my project with only a shape layer and a text layer in it, so I don't think AE could be confused about the syntax. I tried switching the expression mode to legacy and that made no difference.
I just updated to the lastest version of AE, so maybe this is a bug?
Screenshot attached.
Any suggestions on how to troubleshoot would be greatly appreciated.
1 Correct answer
That single line won't do anything for the Size property which requires a number value for input.
There are tutorials on sourceRectAtTime which should help you out even though every tutorial on sourceRectAtTime that I've seen is either simplistic (doesn't cover realworld use cases) and is unnecessarily bloated. 😉
Copy link to clipboard
Copied
That single line won't do anything for the Size property which requires a number value for input.
There are tutorials on sourceRectAtTime which should help you out even though every tutorial on sourceRectAtTime that I've seen is either simplistic (doesn't cover realworld use cases) and is unnecessarily bloated. 😉
Copy link to clipboard
Copied
Yeah, I realized that I was making an error with the sourceRectAtTime values but AE was underlining that variable as the problem so I was completely confused. Operator error! Thanks for the reply.
Copy link to clipboard
Copied
Also note that my extension Pins & Boxes can take care of all the technical details of writing sourceRectAtTime expressions for you. You can create complex dynamic layouts with it easily.

