Quantcast
Viewing latest article 43
Browse Latest Browse All 30854

checkboxes control layers on a timeline

Hello,

sorry if the title is confusing, I'm a little bit lost either.

 

I'm trying to build a setup where three layers are following each other on the timeline (for example layer 1 from 0 to 1 sec, layer 2 from 1 to 2 and layer 3 from 2 to 3 ) and each layer is linked to a checkbox. When the checkbox is off : the layer disappear. I wanted to use the layer's visibility as we can do with scripting, but it seems impossible with expressions, and it's the same for inPoint and outPoint I think,  so I do this with opacity.

 

So far so good.

 

But I want, for example if the Layer 1's checkbox is off, that the Layer 2 starts automatically at 0 sec and not at 1 anymore. I don't want "empty spaces" into the timeline. You see the point ?

 

And finaly, I would like everything linked to markers, so that I could control the "lenght" of each layer (I mean the amount of time each layerhas it's opacity to 100)

 

I tried some stuffs, I read some threads but I could'nt really link this to my idea.

I tried some if / else like when some checkbox of layer 1 is off, the opacity of layer 2 starts to marker one and I wrote different figure case, but all the expressions are read by the soft in order, so they finaly all cancel each other.

 

For example, I tried to write this on the layer 2's opacity :

 

Image may be NSFW.
Clik here to view.
AFX-auto-longueurs.PNG

 

mUn = thisComp.marker.key(1).time;

mDeux = thisComp.marker.key(2).time;

mTrois = thisComp.marker.key(3).time;

mQuatre = thisComp.marker.key(4).time; //this marker is at the end of the composition

 

possA1 = linear (time,mUn,mDeux,[100],[0]);

possA2 = linear (time,mDeux, mTrois,[100],[0]);

possA3 = linear (time,mTrois, mQuatre,[100],[0]);

possDefault = linear (time,mDeux, mTrois,[100],[0]);

 

if (thisComp.layer("CONTROL").effect("Plan1")("Case") == 0) {possA1} else {possDefault};

if (thisComp.layer("CONTROL").effect("Plan2")("Case") == 0) {0} else {possDefault};

if (thisComp.layer("CONTROL").effect("Plan3")("Case") == 0) {possA2} else {possDefault};

 

 

Furthermore, the linear method isn't correct, because I want some cut transition between the different states of opacity, and I don't know neither how to do this.

 

Anyone's got an idea ?

 

Thanks a lot, have a good day !


Viewing latest article 43
Browse Latest Browse All 30854

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>