Copy link to clipboard
Copied
Hello guys,
I have below expression on time-remap property which triggers transition based on the markers set on Action layer.
Is it possible to add certain frames of pre-roll to this expression?
so if the maker is set at 1 sec the transition start at 0.5 sec.
I have added n=1 so that it skips first marker as it does not require transition.
I have already tried replacing
t = m.key(n).time-0.5; or t = m.nearestkey(time+0.5).index
which for some reason does not work.
Ae file attached if that help to understand my problem.
m = thisComp.layer("Action").marker;
n = 1;
if (m.numKeys > 1){
n = m.nearestKey(time).index;
if (m.key(n).time > time) n--;
}
if (n > 1){
t = m.key(n).time;
time - t ;
}else
0
Chances are your add/ subtract messes with the nearestKey() logic in that some keys may "flip over" to the other side and then you get wrong results if they are less than a certain time apart.
Mylenium
Copy link to clipboard
Copied
Chances are your add/ subtract messes with the nearestKey() logic in that some keys may "flip over" to the other side and then you get wrong results if they are less than a certain time apart.
Mylenium
Copy link to clipboard
Copied
Thank a lot man !!! that works ...removing
if (m.key(n).time > time) n--;get the job done for me.
Final expression here
m = thisComp.layer("Action").marker;
n = 1;
if (m.numKeys > 1){
n = m.nearestKey(time).index;
}
if (n > 1){
t = m.key(n).time-.5;
time - t ;
}else
0
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more