-
Slider Control Expression w/ Precomps Breaks
Working on CC17. I have a project with revolving assets.
I need to render out 20 instances with changing images, which are precomped .
I wanted to have a slider control in the master comp – Feed the slider a number which corresponds to the image layer number.
This will toggle the opacity, saving me the need to drill down each render, and turn layers on and off.The problem: After each render something breaks, and changing value on the slider doesn’t work.
The hierarchy:
Comp3 (deepest) – 20 layers, each has this expression on its opacity property:
xx = comp("Comp1").layer("PlayerControl").effect("PlayerLayer")("Slider")
if (index == Math.round(xx)) 100 else 0Comp2 – the layer from comp3, multiplied and effected.
Lives inside Comp1. No expressions in it.Comp1 – Master comp, where I render out and the slider lives.
The slider has this expression on it: locks it to integers and limiting the values to the number of layers.
Slider layer is “PlayerControl” and the effect is named “PlayerLayer”.
Math.floor(value);
clamp(value,1,20)I also added a guide text layer to display the name of the chosen image.
I applied this to the Source Text property:
p1 = thisComp.layer("PlayerControl").effect("PlayerLayer")("Slider").value;
comp("Comp3").layer(p1).name;
Again, the expressions work great until render. If I change something in Comp3’s layers opacity expression,
like change the name of the variable from “xx” to “zz” it works again, but only until the next render.I recreated the project on another system, on CC14. This works great and doesn’t break.
Here’s the project file:
https://www.dropbox.com/s/4ayyypaamrvonoq/Slider.aep.zip?dl=0Any help would be appreciated.
<== BilletHQ | Creative that Goes to 11 ==>
https://www.egg-factory.com
