Copy link to clipboard
Copied
Hi!
I'm looking for a way to enable expression based playback that is either playing at ordinary speed using the time function OR pausing at the current time.
This will be controlled by another layers opacity - bascially looking at if that layer has opacity 100% then pausing from current time else if layer has 0% then playback at normal speed.
Anyone has any ideas how to set this up?
Try this time remapping expression:
ctrl = thisComp.layer("Control").opacity;
f = timeToFrames(time);
accum = 0;
for (i = 0; i < f; i++){
if (ctrl.valueAtTime(framesToTime(i)) == 0) accum++;
}
framesToTime(accum)
Copy link to clipboard
Copied
Try this time remapping expression:
ctrl = thisComp.layer("Control").opacity;
f = timeToFrames(time);
accum = 0;
for (i = 0; i < f; i++){
if (ctrl.valueAtTime(framesToTime(i)) == 0) accum++;
}
framesToTime(accum)
Copy link to clipboard
Copied
Awesome Dan, as always.
Wish I understood what you did, but it works, so thank you.