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

Checkbox Control using Expressions

Community Beginner ,
Feb 15, 2011 Feb 15, 2011

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!

TOPICS
Expressions
3.2K
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 , Feb 15, 2011 Feb 15, 2011

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

Translate
Community Expert ,
Feb 15, 2011 Feb 15, 2011

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

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 Beginner ,
Feb 15, 2011 Feb 15, 2011

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?

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 ,
Feb 15, 2011 Feb 15, 2011

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

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 Beginner ,
Feb 15, 2011 Feb 15, 2011

Thanks Dan,

Here, I was under the impression you could do anything with expressions. Thanks for the education!

Eric

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 ,
Feb 15, 2011 Feb 15, 2011
LATEST

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

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