Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Is it possible to convert slider decimal place to FPS?

  • Is it possible to convert slider decimal place to FPS?

    Posted by Ronan De lacy on May 19, 2021 at 7:55 am

    Hello forum.

    Does anyone know if it’s possible to change the decimal point range of a slider control from 0-99 to 0-FPS of the comp? For example if my Comp frame rate is set to 30 and I have a slider applied an effect to a value and I want that effect to occur at 1 second 15 frames, default the slider will read 1.50, but I would like it to read 1.15.

    Thanks in advance for any input.

    R

    Ronan De lacy replied 4 years, 12 months ago 2 Members · 2 Replies
  • 2 Replies
  • Filip Vandueren

    May 19, 2021 at 11:40 am

    t=effect("time")("Slider").value;

    frameRateOrderOfMagnitude = Math.pow(10,-Math.floor(Math.log10(thisComp.frameDuration)));

    secs = Math.trunc(t);

    frames = timeToFrames(t-secs);

    output = secs+(frames/frameRateOrderOfMagnitude);

  • Ronan De lacy

    May 20, 2021 at 7:36 am

    Thank you, Filip! This is just what I wanted to achieve!

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy