Copy link to clipboard
Copied
Hi all,
I'm trying to control the Mask Layer property in the Colorama plugin to always select the current layer. What I've done is created a Checkbox Control effect on the current layer to dictate that Mask Layer is always set to the current layer's index. If the Checkbox Control is set to off, I would like it to select layer "None". Here's what I've come up with, but since I'm new to expressions, it's not working. What am i doing wrong?
if (effect("Checkbox Control")(1)==true){
effect("Colorama")("Mask Layer")=layer(index);
}else{
effect("Colorama")("Mask Layer")=layer(None);}
Thanks in advance for your expertise!
You are correct on all counts. If you have a ton of these to do, you could write a little script that would go through the comp, looking for layers with Colorama applied, and change the Mask layer parameter, but that might be more trouble than it's worth.
Dan
Copy link to clipboard
Copied
If I understand what you're trying to do, I don't think you can do it with expressions. Colorama's layer control won't accept its own expression (it's not keyframable) and you can't control any property using an expression applied to a different property. Think of expressions as a substitue for keyframes -- if you can't keyframe it, you can't control it with an expression.
Dan
Copy link to clipboard
Copied
Dan,
So because Colorama's Mask Layer Property isn't animatable (no stopwatch icon next to the property), I cannot affect it using expressions, right?
On the other hand, if I for whatever reason wanted to control Colorama's Masking Mode dropdown list, I could, because it is animatable, correct?
Originally, I wanted to take a text layer that had Colorama applied to it, duplicate it many times, and change each layer's source text. At the same time, I wanted Colorama's Mask Layer property to always choose the current layer (index). So if what you're telling me is true, I would have to manually select the Mask Layer from the dropdown list for each layer, right?
Copy link to clipboard
Copied
You are correct on all counts. If you have a ton of these to do, you could write a little script that would go through the comp, looking for layers with Colorama applied, and change the Mask layer parameter, but that might be more trouble than it's worth.
Dan
Copy link to clipboard
Copied
Thanks Dan,
Here, I was under the impression you could do anything with expressions. Thanks for the education!
Eric
Copy link to clipboard
Copied
You may have deduced this, but just to clarify -- the only way to control a property with an expression is by applying an expression to that property. Expressions can't affect anything except the property to which they're applied.
Dan
Find more inspiration, events, and resources on the new Adobe Community
Explore Now