How do I create a "percentage of length" slider that will work in a MOGRT with scaling?
I have a slider that represents the percentage of a comp.
onePercentInFrames = (thisComp.duration * 30) / 100;
percentageMoved = onePercentInFrames * thisComp.layer("slider null").effect("Percentage Slider")("Slider");
thisComp.layer("Master Null Move in").transform.yPosition.valueAtTime(time-(percentageMoved/30));
That's the way I achieved it so that the slider controls how far into the comp that the animation starts. This part I can make work.
My issue is: When I export it into Premiere Pro, if I stretch or shrink the clip of the effect at all, that percentage gets thrown off. I'm assuming it's becuase the original MOGRT measures thisComp.duration as a set number upon export, and doesn't change that as I change the clip length in Premiere Pro.
Is there a way to do this? To have the exported slider actually represent the percentage of the length of the clip while it's in Premiere Pro?
As an FYI, I need the same graphic multiple times with quite a range of lengths. I used to measure it in frames and just set the top of the slider to be 3000 frames, but it became really tricky to find the right spot, especially in short uses. The reason I can't just cut it instead of shrinking it is because I have some animation at the end of the clip as well (all in protected ranges) so I can't just cut it in half.
Thanks