added VixUiRangeInt UI node
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
This commit is contained in:
committed by
Alexander Piskun
parent
d69086a098
commit
0ba0dc83f5
@@ -11,6 +11,7 @@ Current `Visionatrix/UI` nodes list:
|
||||
- **VixUI-Checkbox** - simple checkbox boolean input field;
|
||||
- **VixUi-RangeFloat** - range float number input, e.g. for prompt strength selection;
|
||||
- **VixUi-RangeScaleFloat** - special range float number input, to define the scale factor of the input image (e.g. for upscale)
|
||||
- **VixUi-RangeInt** - range int number input, e.g. for number of steps selection;
|
||||
- **VixUi-List** - define list of options to be displayed in Visionatrix UI;
|
||||
- **VixUI-Prompt** - to define a textarea input in Visionatrix UI and pass it to your CLIPTextEncode node with prompt;
|
||||
- **VixUi-CheckboxLogic** - to define the boolean logical switch (checkbox), e.g. two modes and paths of workflow execution;
|
||||
|
||||
+28
@@ -86,6 +86,32 @@ class VixUiRangeScaleFloat:
|
||||
return (value,)
|
||||
|
||||
|
||||
class VixUiRangeInt:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
return {
|
||||
"required": {
|
||||
"value": ("INT", {"default": 10}),
|
||||
"display_name": ("STRING", {"default": "Display Range"}),
|
||||
"optional": ("BOOLEAN", {"default": True}),
|
||||
"advanced": ("BOOLEAN", {"default": True}),
|
||||
"min": ("INT", {"default": 1}),
|
||||
"max": ("INT", {"default": 20}),
|
||||
"step": ("INT", {"default": 1}),
|
||||
"order": ("INT", {"default": 99}),
|
||||
"custom_id": ("STRING", {"default": ""}),
|
||||
},
|
||||
}
|
||||
|
||||
FUNCTION = "do_it"
|
||||
CATEGORY = "Visionatrix/UI"
|
||||
RETURN_TYPES = ("INT",)
|
||||
|
||||
@classmethod
|
||||
def do_it(cls, value, **kwargs) -> tuple:
|
||||
return (value,)
|
||||
|
||||
|
||||
class VixUiList:
|
||||
@classmethod
|
||||
def INPUT_TYPES(cls):
|
||||
@@ -243,6 +269,7 @@ NODE_CLASS_MAPPINGS = {
|
||||
"VixUiCheckbox": VixUiCheckbox,
|
||||
"VixUiRangeFloat": VixUiRangeFloat,
|
||||
"VixUiRangeScaleFloat": VixUiRangeScaleFloat,
|
||||
"VixUiRangeInt": VixUiRangeInt,
|
||||
"VixUiList": VixUiList,
|
||||
"VixUiPrompt": VixUiPrompt,
|
||||
"VixUiCheckboxLogic": VixUiCheckboxLogic,
|
||||
@@ -254,6 +281,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
|
||||
"VixUiCheckbox": "VixUI-Checkbox",
|
||||
"VixUiRangeFloat": "VixUI-RangeFloat",
|
||||
"VixUiRangeScaleFloat": "VixUI-RangeScaleFloat",
|
||||
"VixUiRangeInt": "VixUI-RangeInt",
|
||||
"VixUiList": "VixUI-List",
|
||||
"VixUiPrompt": "VixUI-Prompt",
|
||||
"VixUiCheckboxLogic": "VixUI-CheckboxLogic",
|
||||
|
||||
Reference in New Issue
Block a user