ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

When one goes on, the other must go off

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Cesar SienaWhen one goes on, the other must go off
by on Mar 22, 2013 at 5:09:16 am

There are pairs of layers which opacity of each one is controlled by a checkbox controller (on/off). When one layer of each pair is visible (its own checkbox is on), the other must be insivible (its own checkbox is off). Keyframing both checkboxes for each pair takes too long, because their number is high. How each pair could be controlled simultaneously with only one command? In other words, how can I use just one checkbox for both (for each pair)? I’ve tried creating another checkbox, pickwhipping both to this third one and multiplying one of them by -1, but nothing happened. Thank you!


Return to posts index

Ridley WalkerRe: When one goes on, the other must go off
by on Mar 22, 2013 at 5:24:52 am

If you use this expression on the opacity of one layer in the pair, and use hold keyframes for opacity one the other layer in the pair it should work.

(thisComp.layer("One").transform.opacity*-1)+100

replace "One" with the name or index of the other layer.


Return to posts index

Cesar SienaRe: When one goes on, the other must go off
by on Mar 22, 2013 at 5:39:44 am

Thanks for the fast answer. I will try it as soon as possible (it's 02:00h at dawn around here...). But I didn't understand somethings:
The opacity of each layer is pickwhipped to checkbox controllers in a Master Null controller (so it's easier to have full control of everything in one place - the number of layers is very high). When activated, they result in hold keyframes in the timeline.
So, how could I use your expression, knowing that there are checkbox controllers involved, messing the expressions? Where or how could I put/use it? Thank you!


Return to posts index


Roland R. KahlenbergRe: When one goes on, the other must go off
by on Mar 22, 2013 at 6:07:57 am

You don't need checkboxes to control two layers. All you need to do is to designate one of the two layers to be the controller layer.

Then apply the following Expression script to other layer.
ControllerLayer = thisComp.layer("SECOND").transform.opacity;
if (ControllerLayer ==0) {
value
} else {
0
}


Don't forget to change the name of the layer in the script above, which now reads as "SECOND".

HTH
RoRK

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects ACE/ACI (version 7)


Return to posts index

Cesar SienaRe: When one goes on, the other must go off
by on Mar 23, 2013 at 3:22:53 pm

Roland, it work perfectly! Awesome! And I still continue to control all of them (around 80 expression controllers)!) from one place! Thank you very much! Best regards!


Return to posts index

Roland R. KahlenbergRe: When one goes on, the other must go off
by on Mar 24, 2013 at 12:16:15 am

[Cesar Siena] " Awesome! And I still continue to control all of them (around 80 expression controllers)!) from one place! "

The more, the merrier! :-)

Cheers Cesar!
RoRK

Intensive mocha & AE Training in Singapore and Other Dangerous Locations

Imagineer Systems (mocha) Certified Instructor
& Adobe After Effects ACE/ACI (version 7)


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]