mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
introducing new baking targeting
Added ColorspaceConfigurationModel for baking target selection and override in various settings to enhance flexibility and customization.
This commit is contained in:
parent
6ecff1924e
commit
67b59f9af4
3 changed files with 95 additions and 16 deletions
|
|
@ -133,3 +133,53 @@ class KnobModel(BaseSettingsModel):
|
|||
"",
|
||||
title="Expression"
|
||||
)
|
||||
|
||||
|
||||
colorspace_types_enum = [
|
||||
{"value": "colorspace", "label": "Use Colorspace"},
|
||||
{"value": "display_view", "label": "Use Display & View"},
|
||||
]
|
||||
|
||||
|
||||
class DisplayAndViewProfileModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
|
||||
display: str = SettingsField(
|
||||
"",
|
||||
title="Display",
|
||||
description="What display to use",
|
||||
)
|
||||
|
||||
view: str = SettingsField(
|
||||
"",
|
||||
title="View",
|
||||
description="What view to use",
|
||||
)
|
||||
|
||||
|
||||
class ColorspaceConfigurationModel(BaseSettingsModel):
|
||||
enabled: bool = SettingsField(
|
||||
False,
|
||||
title="Enabled",
|
||||
description="Enable baking target (colorspace or display/view)",
|
||||
)
|
||||
|
||||
type: str = SettingsField(
|
||||
"colorspace",
|
||||
title="Target baking type",
|
||||
description="Switch between different knob types",
|
||||
enum_resolver=lambda: colorspace_types_enum,
|
||||
conditionalEnum=True,
|
||||
)
|
||||
|
||||
colorspace: str = SettingsField(
|
||||
"",
|
||||
title="Colorspace",
|
||||
description="What colorspace name to use",
|
||||
)
|
||||
|
||||
display_view: DisplayAndViewProfileModel = SettingsField(
|
||||
title="Display & View",
|
||||
description="What display & view to use",
|
||||
default_factory=DisplayAndViewProfileModel,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -6,8 +6,10 @@ from ayon_server.settings import (
|
|||
ensure_unique_names,
|
||||
)
|
||||
|
||||
from .common import KnobModel
|
||||
|
||||
from .common import (
|
||||
KnobModel,
|
||||
ColorspaceConfigurationModel,
|
||||
)
|
||||
|
||||
class NodesModel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
|
|
@ -198,12 +200,10 @@ class ImageIOSettings(BaseSettingsModel):
|
|||
Creation of new viewer node at knob viewerProcess"""
|
||||
)
|
||||
|
||||
"""# TODO: enhance settings with host api:
|
||||
to restructure settings for simplification.
|
||||
|
||||
now: nuke/imageio/baking/viewerProcess
|
||||
future: nuke/imageio/baking
|
||||
"""
|
||||
baking_target: ColorspaceConfigurationModel = SettingsField(
|
||||
default_factory=ColorspaceConfigurationModel,
|
||||
title="Baking Target Colorspace"
|
||||
)
|
||||
baking: ViewProcessModel = SettingsField(
|
||||
default_factory=ViewProcessModel,
|
||||
title="Baking",
|
||||
|
|
@ -235,6 +235,11 @@ DEFAULT_IMAGEIO_SETTINGS = {
|
|||
"viewerProcess": "ACES/sRGB",
|
||||
"output_transform": "ACES/sRGB"
|
||||
},
|
||||
"baking_target": {
|
||||
"enabled": False,
|
||||
"type": "colorspace",
|
||||
"colorspace": ""
|
||||
},
|
||||
"baking": {
|
||||
"viewerProcess": "ACES/Rec.709",
|
||||
"output_transform": "ACES/Rec.709"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,11 @@ from ayon_server.settings import (
|
|||
ensure_unique_names,
|
||||
task_types_enum
|
||||
)
|
||||
from .common import KnobModel, validate_json_dict
|
||||
from .common import (
|
||||
KnobModel,
|
||||
ColorspaceConfigurationModel,
|
||||
validate_json_dict,
|
||||
)
|
||||
|
||||
|
||||
def nuke_render_publish_types_enum():
|
||||
|
|
@ -130,19 +134,30 @@ class IntermediateOutputModel(BaseSettingsModel):
|
|||
title="Filter", default_factory=BakingStreamFilterModel)
|
||||
read_raw: bool = SettingsField(
|
||||
False,
|
||||
title="Read raw switch"
|
||||
)
|
||||
viewer_process_override: str = SettingsField(
|
||||
"",
|
||||
title="Viewer process override"
|
||||
title="Input read node RAW switch"
|
||||
)
|
||||
bake_viewer_process: bool = SettingsField(
|
||||
True,
|
||||
title="Bake viewer process"
|
||||
title="Bake viewer process",
|
||||
section="Baking target",
|
||||
)
|
||||
colorspace_override: ColorspaceConfigurationModel = SettingsField(
|
||||
title="Target baking colorspace override",
|
||||
description="Override Baking target with colorspace or display/view",
|
||||
default_factory=ColorspaceConfigurationModel
|
||||
)
|
||||
viewer_process_override: str = SettingsField(
|
||||
"",
|
||||
title="Viewer process override",
|
||||
description=(
|
||||
"[DEPRECATED - use 'Target baking colorspace override'] "
|
||||
"Override viewer process node (LUT)"
|
||||
),
|
||||
)
|
||||
bake_viewer_input_process: bool = SettingsField(
|
||||
True,
|
||||
title="Bake viewer input process node (LUT)"
|
||||
title="Bake viewer input process node (LUT)",
|
||||
section="Baking additional",
|
||||
)
|
||||
reformat_nodes_config: ReformatNodesConfigModel = SettingsField(
|
||||
default_factory=ReformatNodesConfigModel,
|
||||
|
|
@ -330,6 +345,15 @@ DEFAULT_PUBLISH_PLUGIN_SETTINGS = {
|
|||
},
|
||||
"read_raw": False,
|
||||
"viewer_process_override": "",
|
||||
"colorspace_override": {
|
||||
"enabled": False,
|
||||
"type": "colorspace",
|
||||
"colorspace": "",
|
||||
"display_view": {
|
||||
"display": "",
|
||||
"view": ""
|
||||
}
|
||||
},
|
||||
"bake_viewer_process": True,
|
||||
"bake_viewer_input_process": True,
|
||||
"reformat_nodes_config": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue