Copy link to clipboard
Copied
Good day everyone,
In AE, I synced 4 different versions of 1 short video (a white/alpha transition for the Track Matte Key effect), so when I import it into the Graphic Essential Panel, it would be possible in Premiere Pro to toggle on a hard-keyed version, a speed-up version and a combination.
The plan is to do it by the following scheme:
Hard-key: OFF
Speed 2x: OFF
= video 1 (soft-key, speed 1x) 100% opacity.
= video 2 (soft-key, speed 2x) 0% opacity.
= video 3 (hard-key, speed 1x) 0% opacity.
= video 4 (hard-key, speed 2x) 0% opacity.
Hard-key: OFF
Speed 2x: ON
= video 1 (soft-key, speed 1x) 0% opacity.
= video 2 (soft-key, speed 2x) 100% opacity.
= video 3 (hard-key, speed 1x) 0% opacity.
= video 4 (hard-key, speed 2x) 0% opacity.
Hard-key: ON
Speed 2x: OFF
= video 1 (soft-key, speed 1x) 0% opacity.
= video 2 (soft-key, speed 2x) 0% opacity.
= video 3 (hard-key, speed 1x) 100% opacity.
= video 4 (hard-key, speed 2x) 0% opacity.
Hard-key: ON
Speed 2x: ON
= video 1 (soft-key, speed 1x) 0% opacity.
= video 2 (soft-key, speed 2x) 0% opacity.
= video 3 (hard-key, speed 1x) 0% opacity.
= video 4 (hard-key, speed 2x) 100% opacity.
The only thing is, I'm looking for a way to make the opacity of each layer depending on 2 checkboxes (in instead of 1).
Trying to let it depend on just 1 checkbox with expressions already succeeded (see above)
Copy link to clipboard
Copied
It's very similar, you can combine two or more conditions by using && (AND) or || (OR)
The expression for the video 3 would be:
controller = comp("Main").layer("Controller");
hardKey = controller.effect("Hard-Key").value;
speedx2 = controller.effect("Speed 2x").value;
if (hardKey==1 && speedx2==0) 100 else 0;
Similarly for other videos (adapt the last line for each video).
Also change the path to the controller layer in the first line.
Xavier
Copy link to clipboard
Copied
I'm trying to adapt this code to the third video and the last line to everyone, but it won't work?
I already changed comp("Main") ged and .layer("Controller") to the right names I have, but that won't work?
Copy link to clipboard
Copied
I don't know... it should work. Check the naming of everything (you can use the pickwhip for that).
Xavier
Copy link to clipboard
Copied
You might consider refactoring your expression to contain nested conditionals:
if(hardKey == 1)
{
if(speedX2 == 1)
{100}
else
{0}
}
else
{0}
Presumably in your case the evaluation is stopping after the first condition and the logic operators not processed, so it ends up only ever looking if one of the checkboxes is ticked. Forcing it into a branching test might circumvent the issue.
Mylenium