Copy link to clipboard
Copied
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");
 
The expression references a property in another composition in the project. I get an error.
Error: layer named "Pre_Source_Crop" is missing or does not exist...
???!??? 
Adobe After Effect version 23.3.0
1 Correct answer
Another possibility is that you have more than one comp named "MaskPrep" and the expression is looking at the wrong one.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Another possibility is that you have more than one comp named "MaskPrep" and the expression is looking at the wrong one.
Copy link to clipboard
Copied
Replacing a composition name with an index in an expression 
error: Layer index 2 out of range !!!!
 
Retrieving an expression from a locked effects control panel produces the same result !!!
 
Copy link to clipboard
Copied
Yes, I had two compositions in my project named "MaskPrep"

