diff --git a/backend/src/nodes/properties/inputs/generic_inputs.py b/backend/src/nodes/properties/inputs/generic_inputs.py index 1e4a917c6..dcae8582c 100644 --- a/backend/src/nodes/properties/inputs/generic_inputs.py +++ b/backend/src/nodes/properties/inputs/generic_inputs.py @@ -17,7 +17,7 @@ from ...impl.blend import BlendMode from ...impl.color.color import Color from ...impl.dds.format import DDSFormat -from ...impl.image_utils import FillColor, normalize +from ...impl.image_utils import FillColor from ...impl.upscale.auto_split_tiles import TileSize from ...utils.format import format_color_with_channels from ...utils.seed import Seed @@ -346,9 +346,11 @@ def __init__(self, label: str = "Clipboard input"): super().__init__(["Image", "string", "number"], label, kind="text") self.input_conversions = [InputConversion("Image", '""')] + self.label_style: LabelStyle = "hidden" + def enforce(self, value: object): if isinstance(value, np.ndarray): - return normalize(value) + return value if isinstance(value, float) and int(value) == value: # stringify integers values @@ -356,6 +358,12 @@ def enforce(self, value: object): return str(value) + def to_dict(self): + return { + **super().to_dict(), + "labelStyle": self.label_style, + } + class AnyInput(BaseInput): def __init__(self, label: str):