Hi all,
If anyone ever comes across this post and wonders, I have found a workaround to the if/else expression…
So I have all my layers of videos, with a Control Null, just like in this post.
I have Dan’s expression on the Control layer which allows me to place markers wherever I want a cut to a random layer to occur… And then I duplicated this whole comp, named it something else, with the expression below on the control Layer.
I then import this new comp to the other one, and I use it as a control layer itself, where I put markers with names like “3” or “5”, etc… whenever I’m not happy with the layer that was selected by the random one.
All this is perhaps confusing if you don’t know what I’m talking about, but hopefully if someone is trying to achieve this exact effect he will be able to work it through !
Thanks again, and stay safe (and home !).
Damien
m = comp("CompNameWithRandomGeneratedCuts").layer("CompNameWhereYouWantToPutTheMarkers").marker;
txt = "";
if (m.numKeys > 0){
n = m.nearestKey(time).index;
if (time < m.key(n).time) n--;
if (n > 0) txt = m.key(n).comment;
}
txt