Compare commits

..
4 Commits
Author SHA1 Message Date
Alexander Piskun 895c4de920 disabled rounding for VixUiRangeFloat and VixUiRangeScaleFloat (3)
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-08-26 16:28:31 +03:00
Alexander Piskun 0186662ea3 disabled rounding for VixUiRangeFloat and VixUiRangeScaleFloat (2)
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-08-26 14:42:24 +03:00
Alexander Piskun 9dc9633474 disabled rounding for VixUiRangeFloat and VixUiRangeScaleFloat
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-08-26 14:33:41 +03:00
Alexander Piskun 3648146f35 added lazy_loading to Logic nodes
Signed-off-by: Alexander Piskun <bigcat88@icloud.com>
2024-08-24 12:17:42 +03:00
+40 -16
View File
@@ -41,13 +41,13 @@ class VixUiRangeFloat:
def INPUT_TYPES(cls):
return {
"required": {
"value": ("FLOAT", {"default": 4.0}),
"value": ("FLOAT", {"default": 4.0, "step": 0.01, "round": False}),
"display_name": ("STRING", {"default": "Display Range"}),
"optional": ("BOOLEAN", {"default": True}),
"advanced": ("BOOLEAN", {"default": True}),
"min": ("FLOAT", {"default": 1.0}),
"max": ("FLOAT", {"default": 9.0}),
"step": ("FLOAT", {"default": 0.1}),
"min": ("FLOAT", {"default": 1.0, "step": 0.01, "round": False}),
"max": ("FLOAT", {"default": 9.0, "step": 0.01, "round": False}),
"step": ("FLOAT", {"default": 0.1, "step": 0.01, "round": False}),
"order": ("INT", {"default": 99}),
"custom_id": ("STRING", {"default": ""}),
},
@@ -70,14 +70,14 @@ class VixUiRangeScaleFloat:
def INPUT_TYPES(cls):
return {
"required": {
"value": ("FLOAT", {"default": 4.0}),
"value": ("FLOAT", {"default": 4.0, "step": 0.01, "round": False}),
"display_name": ("STRING", {"default": "Image Size Factor"}),
"optional": ("BOOLEAN", {"default": True}),
"advanced": ("BOOLEAN", {"default": True}),
"source_input_name": ("STRING", {"default": ""}),
"min": ("FLOAT", {"default": 1.0}),
"max": ("FLOAT", {"default": 9.0}),
"step": ("FLOAT", {"default": 0.1}),
"min": ("FLOAT", {"default": 1.0, "step": 0.01, "round": False}),
"max": ("FLOAT", {"default": 9.0, "step": 0.01, "round": False}),
"step": ("FLOAT", {"default": 0.1, "step": 0.01, "round": False}),
"order": ("INT", {"default": 99}),
"custom_id": ("STRING", {"default": ""}),
},
@@ -191,8 +191,8 @@ class VixUiCheckboxLogic:
"custom_id": ("STRING", {"default": ""}),
},
"optional": {
"input_off_state": (any_typ,),
"input_on_state": (any_typ,),
"input_off_state": (any_typ, {"lazy": True}),
"input_on_state": (any_typ, {"lazy": True}),
"hidden": ("BOOLEAN", {"default": False}),
},
}
@@ -208,6 +208,12 @@ class VixUiCheckboxLogic:
return (kwargs.get("input_off_state", None),)
return (kwargs.get("input_on_state", None),)
@staticmethod
def check_lazy_status(state, **kwargs):
if state is False:
return ["input_off_state"]
return ["input_on_state"]
class VixUiListLogic:
@classmethod
@@ -223,12 +229,12 @@ class VixUiListLogic:
"custom_id": ("STRING", {"default": ""}),
},
"optional": {
"input_first": (any_typ,),
"input_second": (any_typ,),
"input_third": (any_typ,),
"input_fourth": (any_typ,),
"input_fifth": (any_typ,),
"input_sixth": (any_typ,),
"input_first": (any_typ, {"lazy": True}),
"input_second": (any_typ, {"lazy": True}),
"input_third": (any_typ, {"lazy": True}),
"input_fourth": (any_typ, {"lazy": True}),
"input_fifth": (any_typ, {"lazy": True}),
"input_sixth": (any_typ, {"lazy": True}),
"hidden": ("BOOLEAN", {"default": False}),
},
}
@@ -256,6 +262,24 @@ class VixUiListLogic:
return (kwargs["input_sixth"],)
raise RuntimeError("Workflow logic error")
@staticmethod
def check_lazy_status(default_value, **kwargs):
list_with_values: list = json.loads(kwargs["possible_values"])
index_to_return = list_with_values.index(default_value)
if index_to_return == 0:
return ["input_first"]
if index_to_return == 1:
return ["input_second"]
if index_to_return == 2:
return ["input_third"]
if index_to_return == 3:
return ["input_fourth"]
if index_to_return == 4:
return ["input_fifth"]
if index_to_return == 5:
return ["input_sixth"]
raise RuntimeError("Workflow logic error")
class VixUiWorkflowMetadata:
@classmethod