Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Creating a Slider and changing its range via script

  • Creating a Slider and changing its range via script

    Posted by Fabian Brugger on May 9, 2023 at 10:18 am

    Is it possible to change a sliders range, like if you right klick the slider and change set the min and max value, when creating it via a script?

    var comp = app.project.activeItem;

    var layers = comp.selectedLayers;

    for (var p = 0; p < layers.length; p++) {

    layers[p].effect.addProperty(“ADBE Slider Control”);

    }

    Fabian Brugger replied 4 weeks, 1 day ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    May 9, 2023 at 1:00 pm

    I don’t think there’s any way to do that. An alternative might be to create a pseudo effect, which would allow you to define the slider range and apply the slider via a .ffx file, but you’d have to define the range when you create the pseudo effect, not when you run the script.

  • Fabian Brugger

    May 10, 2023 at 12:09 pm

    Thanks for the quick replay, if you ever in vienna austria ill buy you some beers haha

    I worked around it with just using a linear funktion to translate 0 to 100 into 0 to 360.

    sliderValue = effect(“GlobalOffset”)(“Slider”);

    linear(sliderValue, 0, 100, 0, 360)

    Cheers

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