Merge pull request #5419 from ynput/enhancement/OP-6452_implement_box_nuke_server_settings

nuke: update server addon settings with box
This commit is contained in:
Jakub Ježek 2023-08-07 17:17:06 +02:00 committed by GitHub
commit 083b800c1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 1 deletions

View file

@ -645,6 +645,9 @@ def _convert_nuke_knobs(knobs):
elif knob_type == "vector_3d":
value = [value["x"], value["y"], value["z"]]
elif knob_type == "box":
value = [value["x"], value["y"], value["r"], value["t"]]
new_knob[value_key] = value
return new_knobs

View file

@ -39,6 +39,15 @@ class Vector3d(BaseSettingsModel):
z: float = Field(1.0, title="Z")
class Box(BaseSettingsModel):
_layout = "compact"
x: float = Field(1.0, title="X")
y: float = Field(1.0, title="Y")
r: float = Field(1.0, title="R")
t: float = Field(1.0, title="T")
def formatable_knob_type_enum():
return [
{"value": "text", "label": "Text"},
@ -74,6 +83,7 @@ knob_types_enum = [
{"value": "vector_2d", "label": "2D vector"},
{"value": "vector_3d", "label": "3D vector"},
{"value": "color", "label": "Color"},
{"value": "box", "label": "Box"},
{"value": "expression", "label": "Expression"}
]
@ -118,6 +128,10 @@ class KnobModel(BaseSettingsModel):
(0.0, 0.0, 1.0, 1.0),
title="RGBA Float"
)
box: Box = Field(
default_factory=Box,
title="Value"
)
formatable: Formatable = Field(
default_factory=Formatable,
title="Formatable"

View file

@ -1 +1 @@
__version__ = "0.1.1"
__version__ = "0.1.2"