mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Merge branch 'develop' into enhancement/OP-7120-blender_output-node-exr
This commit is contained in:
commit
518b9c260a
176 changed files with 3267 additions and 3831 deletions
|
|
@ -1,29 +1,29 @@
|
|||
from pydantic import Field, validator
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from pydantic import validator
|
||||
from ayon_server.settings import BaseSettingsModel, SettingsField
|
||||
from ayon_server.settings.validators import ensure_unique_names
|
||||
|
||||
|
||||
class ImageIOConfigModel(BaseSettingsModel):
|
||||
override_global_config: bool = Field(
|
||||
override_global_config: bool = SettingsField(
|
||||
False,
|
||||
title="Override global OCIO config"
|
||||
)
|
||||
filepath: list[str] = Field(
|
||||
filepath: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Config path"
|
||||
)
|
||||
|
||||
|
||||
class ImageIOFileRuleModel(BaseSettingsModel):
|
||||
name: str = Field("", title="Rule name")
|
||||
pattern: str = Field("", title="Regex pattern")
|
||||
colorspace: str = Field("", title="Colorspace name")
|
||||
ext: str = Field("", title="File extension")
|
||||
name: str = SettingsField("", title="Rule name")
|
||||
pattern: str = SettingsField("", title="Regex pattern")
|
||||
colorspace: str = SettingsField("", title="Colorspace name")
|
||||
ext: str = SettingsField("", title="File extension")
|
||||
|
||||
|
||||
class ImageIOFileRulesModel(BaseSettingsModel):
|
||||
activate_host_rules: bool = Field(False)
|
||||
rules: list[ImageIOFileRuleModel] = Field(
|
||||
activate_host_rules: bool = SettingsField(False)
|
||||
rules: list[ImageIOFileRuleModel] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Rules"
|
||||
)
|
||||
|
|
@ -35,14 +35,14 @@ class ImageIOFileRulesModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class BlenderImageIOModel(BaseSettingsModel):
|
||||
activate_host_color_management: bool = Field(
|
||||
activate_host_color_management: bool = SettingsField(
|
||||
True, title="Enable Color Management"
|
||||
)
|
||||
ocio_config: ImageIOConfigModel = Field(
|
||||
ocio_config: ImageIOConfigModel = SettingsField(
|
||||
default_factory=ImageIOConfigModel,
|
||||
title="OCIO config"
|
||||
)
|
||||
file_rules: ImageIOFileRulesModel = Field(
|
||||
file_rules: ImageIOFileRulesModel = SettingsField(
|
||||
default_factory=ImageIOFileRulesModel,
|
||||
title="File Rules"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import (
|
||||
BaseSettingsModel,
|
||||
SettingsField,
|
||||
TemplateWorkfileBaseOptions,
|
||||
)
|
||||
|
||||
|
|
@ -16,38 +16,38 @@ from .render_settings import (
|
|||
|
||||
|
||||
class UnitScaleSettingsModel(BaseSettingsModel):
|
||||
enabled: bool = Field(True, title="Enabled")
|
||||
apply_on_opening: bool = Field(
|
||||
enabled: bool = SettingsField(True, title="Enabled")
|
||||
apply_on_opening: bool = SettingsField(
|
||||
False, title="Apply on Opening Existing Files")
|
||||
base_file_unit_scale: float = Field(
|
||||
base_file_unit_scale: float = SettingsField(
|
||||
1.0, title="Base File Unit Scale"
|
||||
)
|
||||
|
||||
|
||||
class BlenderSettings(BaseSettingsModel):
|
||||
unit_scale_settings: UnitScaleSettingsModel = Field(
|
||||
unit_scale_settings: UnitScaleSettingsModel = SettingsField(
|
||||
default_factory=UnitScaleSettingsModel,
|
||||
title="Set Unit Scale"
|
||||
)
|
||||
set_resolution_startup: bool = Field(
|
||||
set_resolution_startup: bool = SettingsField(
|
||||
True,
|
||||
title="Set Resolution on Startup"
|
||||
)
|
||||
set_frames_startup: bool = Field(
|
||||
set_frames_startup: bool = SettingsField(
|
||||
True,
|
||||
title="Set Start/End Frames and FPS on Startup"
|
||||
)
|
||||
imageio: BlenderImageIOModel = Field(
|
||||
imageio: BlenderImageIOModel = SettingsField(
|
||||
default_factory=BlenderImageIOModel,
|
||||
title="Color Management (ImageIO)"
|
||||
)
|
||||
RenderSettings: RenderSettingsModel = Field(
|
||||
RenderSettings: RenderSettingsModel = SettingsField(
|
||||
default_factory=RenderSettingsModel, title="Render Settings")
|
||||
workfile_builder: TemplateWorkfileBaseOptions = Field(
|
||||
workfile_builder: TemplateWorkfileBaseOptions = SettingsField(
|
||||
default_factory=TemplateWorkfileBaseOptions,
|
||||
title="Workfile Builder"
|
||||
)
|
||||
publish: PublishPuginsModel = Field(
|
||||
publish: PublishPuginsModel = SettingsField(
|
||||
default_factory=PublishPuginsModel,
|
||||
title="Publish Plugins"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import json
|
||||
from pydantic import Field, validator
|
||||
from pydantic import validator
|
||||
from ayon_server.exceptions import BadRequestException
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings import BaseSettingsModel, SettingsField
|
||||
|
||||
|
||||
def validate_json_dict(value):
|
||||
|
|
@ -21,36 +21,36 @@ def validate_json_dict(value):
|
|||
|
||||
|
||||
class ValidatePluginModel(BaseSettingsModel):
|
||||
enabled: bool = Field(True)
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
enabled: bool = SettingsField(True)
|
||||
optional: bool = SettingsField(title="Optional")
|
||||
active: bool = SettingsField(title="Active")
|
||||
|
||||
|
||||
class ValidateFileSavedModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="ValidateFileSaved")
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
exclude_families: list[str] = Field(
|
||||
enabled: bool = SettingsField(title="ValidateFileSaved")
|
||||
optional: bool = SettingsField(title="Optional")
|
||||
active: bool = SettingsField(title="Active")
|
||||
exclude_families: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Exclude product types"
|
||||
)
|
||||
|
||||
|
||||
class ExtractBlendModel(BaseSettingsModel):
|
||||
enabled: bool = Field(True)
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
families: list[str] = Field(
|
||||
enabled: bool = SettingsField(True)
|
||||
optional: bool = SettingsField(title="Optional")
|
||||
active: bool = SettingsField(title="Active")
|
||||
families: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Families"
|
||||
)
|
||||
|
||||
|
||||
class ExtractPlayblastModel(BaseSettingsModel):
|
||||
enabled: bool = Field(True)
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
presets: str = Field("", title="Presets", widget="textarea")
|
||||
enabled: bool = SettingsField(True)
|
||||
optional: bool = SettingsField(title="Optional")
|
||||
active: bool = SettingsField(title="Active")
|
||||
presets: str = SettingsField("", title="Presets", widget="textarea")
|
||||
|
||||
@validator("presets")
|
||||
def validate_json(cls, value):
|
||||
|
|
@ -58,83 +58,83 @@ class ExtractPlayblastModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class PublishPuginsModel(BaseSettingsModel):
|
||||
ValidateCameraZeroKeyframe: ValidatePluginModel = Field(
|
||||
ValidateCameraZeroKeyframe: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Camera Zero Keyframe",
|
||||
section="General Validators"
|
||||
)
|
||||
ValidateFileSaved: ValidateFileSavedModel = Field(
|
||||
ValidateFileSaved: ValidateFileSavedModel = SettingsField(
|
||||
default_factory=ValidateFileSavedModel,
|
||||
title="Validate File Saved",
|
||||
)
|
||||
ValidateInstanceEmpty: ValidatePluginModel = Field(
|
||||
ValidateInstanceEmpty: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Instance is not Empty"
|
||||
)
|
||||
ValidateMeshHasUvs: ValidatePluginModel = Field(
|
||||
ValidateMeshHasUvs: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Mesh Has Uvs",
|
||||
section="Model Validators"
|
||||
)
|
||||
ValidateMeshNoNegativeScale: ValidatePluginModel = Field(
|
||||
ValidateMeshNoNegativeScale: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Mesh No Negative Scale"
|
||||
)
|
||||
ValidateTransformZero: ValidatePluginModel = Field(
|
||||
ValidateTransformZero: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Transform Zero"
|
||||
)
|
||||
ValidateNoColonsInName: ValidatePluginModel = Field(
|
||||
ValidateNoColonsInName: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate No Colons In Name"
|
||||
)
|
||||
ValidateRenderCameraIsSet: ValidatePluginModel = Field(
|
||||
ValidateRenderCameraIsSet: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Render Camera Is Set",
|
||||
section="Render Validators"
|
||||
)
|
||||
ValidateDeadlinePublish: ValidatePluginModel = Field(
|
||||
ValidateDeadlinePublish: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Render Output for Deadline",
|
||||
)
|
||||
ExtractBlend: ExtractBlendModel = Field(
|
||||
ExtractBlend: ExtractBlendModel = SettingsField(
|
||||
default_factory=ExtractBlendModel,
|
||||
title="Extract Blend",
|
||||
section="Extractors"
|
||||
)
|
||||
ExtractFBX: ValidatePluginModel = Field(
|
||||
ExtractFBX: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract FBX"
|
||||
)
|
||||
ExtractModelABC: ValidatePluginModel = Field(
|
||||
ExtractModelABC: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract ABC"
|
||||
)
|
||||
ExtractBlendAnimation: ValidatePluginModel = Field(
|
||||
ExtractBlendAnimation: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract Blend Animation"
|
||||
)
|
||||
ExtractAnimationFBX: ValidatePluginModel = Field(
|
||||
ExtractAnimationFBX: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract Animation FBX"
|
||||
)
|
||||
ExtractCamera: ValidatePluginModel = Field(
|
||||
ExtractCamera: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract Camera"
|
||||
)
|
||||
ExtractCameraABC: ValidatePluginModel = Field(
|
||||
ExtractCameraABC: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract Camera as ABC"
|
||||
)
|
||||
ExtractLayout: ValidatePluginModel = Field(
|
||||
ExtractLayout: ValidatePluginModel = SettingsField(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Extract Layout (JSON)"
|
||||
)
|
||||
ExtractThumbnail: ExtractPlayblastModel = Field(
|
||||
ExtractThumbnail: ExtractPlayblastModel = SettingsField(
|
||||
default_factory=ExtractPlayblastModel,
|
||||
title="Extract Thumbnail"
|
||||
)
|
||||
ExtractPlayblast: ExtractPlayblastModel = Field(
|
||||
ExtractPlayblast: ExtractPlayblastModel = SettingsField(
|
||||
default_factory=ExtractPlayblastModel,
|
||||
title="Extract Playblast"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
"""Providing models and values for Blender Render Settings."""
|
||||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings import BaseSettingsModel, SettingsField
|
||||
|
||||
|
||||
def aov_separators_enum():
|
||||
|
|
@ -99,8 +97,8 @@ class CustomPassesModel(BaseSettingsModel):
|
|||
"""Custom Passes"""
|
||||
_layout = "compact"
|
||||
|
||||
attribute: str = Field("", title="Attribute name")
|
||||
value: str = Field(
|
||||
attribute: str = SettingsField("", title="Attribute name")
|
||||
value: str = SettingsField(
|
||||
"COLOR",
|
||||
title="Type",
|
||||
enum_resolver=custom_passes_types_enum
|
||||
|
|
@ -108,33 +106,33 @@ class CustomPassesModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class RenderSettingsModel(BaseSettingsModel):
|
||||
default_render_image_folder: str = Field(
|
||||
default_render_image_folder: str = SettingsField(
|
||||
title="Default Render Image Folder"
|
||||
)
|
||||
aov_separator: str = Field(
|
||||
aov_separator: str = SettingsField(
|
||||
"underscore",
|
||||
title="AOV Separator Character",
|
||||
enum_resolver=aov_separators_enum
|
||||
)
|
||||
image_format: str = Field(
|
||||
image_format: str = SettingsField(
|
||||
"exr",
|
||||
title="Image Format",
|
||||
enum_resolver=image_format_enum
|
||||
)
|
||||
multilayer_exr: bool = Field(
|
||||
multilayer_exr: bool = SettingsField(
|
||||
title="Multilayer (EXR)"
|
||||
)
|
||||
renderer: str = Field(
|
||||
renderer: str = SettingsField(
|
||||
"CYCLES",
|
||||
title="Renderer",
|
||||
enum_resolver=renderers_enum
|
||||
)
|
||||
aov_list: list[str] = Field(
|
||||
aov_list: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
enum_resolver=aov_list_enum,
|
||||
title="AOVs to create"
|
||||
)
|
||||
custom_passes: list[CustomPassesModel] = Field(
|
||||
custom_passes: list[CustomPassesModel] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Custom Passes",
|
||||
description=(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue