ISF_Spec icon indicating copy to clipboard operation
ISF_Spec copied to clipboard

Support for integer property control

Open ttddee opened this issue 2 years ago • 1 comments

Hi!

I am in the process of adding ISF support to my image editor.

Going through the standard shaders there are a bunch of controls like this:

{
    "DEFAULT": 1,
    "LABEL": "Horizontal Repeat",
    "LABELS": [
        "1",
        "2",
        "3",
        "4",
        "5",
        "6",
        "7",
        "8",
        "9"
        ],
    "NAME": "horizontalRepeat",
    "TYPE": "long",
    "VALUES": [
        1,
        2,
        3,
        4,
        5,
        6,
        7,
        8,
        9
        ]
}

These end up being represented as a pull-down control on the website:

pulldown

This is really just an integer though and I would rather have it represented by a slider, just like "float". Would it be possible to add an "int" control type to the spec so that the above would look like this:

{
    "DEFAULT": 1,
    "LABEL": "Horizontal Repeat",
    "MAX": 9,
    "MIN": 1,
    "NAME": "horizontalRepeat",
    "TYPE": "int"
}

ttddee avatar Mar 28 '22 07:03 ttddee

+1

mattbeghin avatar Mar 28 '22 13:03 mattbeghin