• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Variable expression error

New Here ,
May 21, 2020 May 21, 2020

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. 
 


TOPICS
Error or problem , Expressions , Scripting

Views

2.2K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , May 21, 2020 May 21, 2020

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. 😉

Votes

Translate

Translate
Valorous Hero ,
May 21, 2020 May 21, 2020

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. 😉

Motion Graphics Brand Guidelines & Motion Graphics Responsive Design Toolkits

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 21, 2020 May 21, 2020

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.  

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 22, 2020 May 22, 2020

Copy link to clipboard

Copied

LATEST

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.

sample_vertical_optimized

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines