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

Error in expression

Engaged ,
Oct 31, 2023 Oct 31, 2023

Hi all

 

I'm trying to write an expression for a property in one of the project's compositions.

 

comp("MaskPrep").layer("Pre_Source_Crop").("Effects")("Colorize Lightness")("Slider");

 

Express02.pngexpand image

 

The expression references a property in another composition in the project. I get an error.

 

Express01.pngexpand image

 

Error: layer named "Pre_Source_Crop" is missing or does not exist...

 

???!??? 

 

Adobe After Effect version 23.3.0

TOPICS
Expressions , Scripting
362
Translate
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

Community Expert , Oct 31, 2023 Oct 31, 2023

Another possibility is that you have more than one comp named "MaskPrep" and the expression is looking at the wrong one.

Translate
Community Expert ,
Oct 31, 2023 Oct 31, 2023

You might have a space in the layer or the comp name.

 

Try locking the Effects Control Panel for the slider, then drag the pickwhip from the Colorize Lightness property in the timeline to the locked expression control slider. That should work. You'll then be able to see the space.

 

You could also try typing in the comp, layer, and effect names and take the auto-complete if you have that turned on.

 

If that still does not work, try renaming the layer, or the Effect Control Slider, or the Comp and see if the rename translates to the comp.

Translate
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 ,
Oct 31, 2023 Oct 31, 2023

Another possibility is that you have more than one comp named "MaskPrep" and the expression is looking at the wrong one.

Translate
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
Engaged ,
Oct 31, 2023 Oct 31, 2023

Express03.pngexpand image

Replacing a composition name with an index in an expression 

Express04.pngexpand image

error:  Layer index 2  out of  range !!!!

Express05.pngexpand image

 

Retrieving an expression from a locked effects control panel produces the same result !!!

 

Translate
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
Engaged ,
Oct 31, 2023 Oct 31, 2023
LATEST

Yes, I had two compositions in my project named "MaskPrep"

Translate
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