mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
resolve conflict
This commit is contained in:
commit
aecf8e6457
136 changed files with 2400 additions and 3567 deletions
|
|
@ -1,6 +1,4 @@
|
|||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings import BaseSettingsModel, SettingsField
|
||||
|
||||
|
||||
def image_format_enum():
|
||||
|
|
@ -57,27 +55,27 @@ def anti_aliasing_enum():
|
|||
|
||||
|
||||
class CreateReviewModel(BaseSettingsModel):
|
||||
review_width: int = Field(1920, title="Review Width")
|
||||
review_height: int = Field(1080, title="Review Height")
|
||||
percentSize: float = Field(100.0, title="Percent of Output")
|
||||
keep_images: bool = Field(False, title="Keep Image Sequences")
|
||||
image_format: str = Field(
|
||||
review_width: int = SettingsField(1920, title="Review Width")
|
||||
review_height: int = SettingsField(1080, title="Review Height")
|
||||
percentSize: float = SettingsField(100.0, title="Percent of Output")
|
||||
keep_images: bool = SettingsField(False, title="Keep Image Sequences")
|
||||
image_format: str = SettingsField(
|
||||
enum_resolver=image_format_enum,
|
||||
title="Image Format Options"
|
||||
)
|
||||
visual_style: str = Field(
|
||||
visual_style: str = SettingsField(
|
||||
enum_resolver=visual_style_enum,
|
||||
title="Preference"
|
||||
)
|
||||
viewport_preset: str = Field(
|
||||
viewport_preset: str = SettingsField(
|
||||
enum_resolver=preview_preset_enum,
|
||||
title="Preview Preset"
|
||||
)
|
||||
anti_aliasing: str = Field(
|
||||
anti_aliasing: str = SettingsField(
|
||||
enum_resolver=anti_aliasing_enum,
|
||||
title="Anti-aliasing Quality"
|
||||
)
|
||||
vp_texture: bool = Field(True, title="Viewport Texture")
|
||||
vp_texture: bool = SettingsField(True, title="Viewport Texture")
|
||||
|
||||
|
||||
DEFAULT_CREATE_REVIEW_SETTINGS = {
|
||||
|
|
|
|||
|
|
@ -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 ImageIOSettings(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,5 +1,4 @@
|
|||
from pydantic import Field
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings import BaseSettingsModel, SettingsField
|
||||
from .imageio import ImageIOSettings
|
||||
from .render_settings import (
|
||||
RenderSettingsModel, DEFAULT_RENDER_SETTINGS
|
||||
|
|
@ -23,8 +22,8 @@ def unit_scale_enum():
|
|||
|
||||
|
||||
class UnitScaleSettings(BaseSettingsModel):
|
||||
enabled: bool = Field(True, title="Enabled")
|
||||
scene_unit_scale: str = Field(
|
||||
enabled: bool = SettingsField(True, title="Enabled")
|
||||
scene_unit_scale: str = SettingsField(
|
||||
"Centimeters",
|
||||
title="Scene Unit Scale",
|
||||
enum_resolver=unit_scale_enum
|
||||
|
|
@ -33,37 +32,37 @@ class UnitScaleSettings(BaseSettingsModel):
|
|||
|
||||
class PRTAttributesModel(BaseSettingsModel):
|
||||
_layout = "compact"
|
||||
name: str = Field(title="Name")
|
||||
value: str = Field(title="Attribute")
|
||||
name: str = SettingsField(title="Name")
|
||||
value: str = SettingsField(title="Attribute")
|
||||
|
||||
|
||||
class PointCloudSettings(BaseSettingsModel):
|
||||
attribute: list[PRTAttributesModel] = Field(
|
||||
attribute: list[PRTAttributesModel] = SettingsField(
|
||||
default_factory=list, title="Channel Attribute")
|
||||
|
||||
|
||||
class MaxSettings(BaseSettingsModel):
|
||||
unit_scale_settings: UnitScaleSettings = Field(
|
||||
unit_scale_settings: UnitScaleSettings = SettingsField(
|
||||
default_factory=UnitScaleSettings,
|
||||
title="Set Unit Scale"
|
||||
)
|
||||
imageio: ImageIOSettings = Field(
|
||||
imageio: ImageIOSettings = SettingsField(
|
||||
default_factory=ImageIOSettings,
|
||||
title="Color Management (ImageIO)"
|
||||
)
|
||||
RenderSettings: RenderSettingsModel = Field(
|
||||
RenderSettings: RenderSettingsModel = SettingsField(
|
||||
default_factory=RenderSettingsModel,
|
||||
title="Render Settings"
|
||||
)
|
||||
CreateReview: CreateReviewModel = Field(
|
||||
CreateReview: CreateReviewModel = SettingsField(
|
||||
default_factory=CreateReviewModel,
|
||||
title="Create Review"
|
||||
)
|
||||
PointCloud: PointCloudSettings = Field(
|
||||
PointCloud: PointCloudSettings = SettingsField(
|
||||
default_factory=PointCloudSettings,
|
||||
title="Point Cloud"
|
||||
)
|
||||
publish: PublishersModel = Field(
|
||||
publish: PublishersModel = SettingsField(
|
||||
default_factory=PublishersModel,
|
||||
title="Publish Plugins")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
import json
|
||||
from pydantic import Field, validator
|
||||
from pydantic import validator
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings import BaseSettingsModel, SettingsField
|
||||
from ayon_server.exceptions import BadRequestException
|
||||
|
||||
|
||||
class ValidateAttributesModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="ValidateAttributes")
|
||||
attributes: str = Field(
|
||||
enabled: bool = SettingsField(title="ValidateAttributes")
|
||||
attributes: str = SettingsField(
|
||||
"{}", title="Attributes", widget="textarea")
|
||||
|
||||
@validator("attributes")
|
||||
|
|
@ -28,68 +28,68 @@ class ValidateAttributesModel(BaseSettingsModel):
|
|||
|
||||
|
||||
class FamilyMappingItemModel(BaseSettingsModel):
|
||||
product_types: list[str] = Field(
|
||||
product_types: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Product Types"
|
||||
)
|
||||
plugins: list[str] = Field(
|
||||
plugins: list[str] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Plugins"
|
||||
)
|
||||
|
||||
|
||||
class ValidateLoadedPluginModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
family_plugins_mapping: list[FamilyMappingItemModel] = Field(
|
||||
enabled: bool = SettingsField(title="Enabled")
|
||||
optional: bool = SettingsField(title="Optional")
|
||||
family_plugins_mapping: list[FamilyMappingItemModel] = SettingsField(
|
||||
default_factory=list,
|
||||
title="Family Plugins Mapping"
|
||||
)
|
||||
|
||||
|
||||
class BasicValidateModel(BaseSettingsModel):
|
||||
enabled: bool = Field(title="Enabled")
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
enabled: bool = SettingsField(title="Enabled")
|
||||
optional: bool = SettingsField(title="Optional")
|
||||
active: bool = SettingsField(title="Active")
|
||||
|
||||
|
||||
class PublishersModel(BaseSettingsModel):
|
||||
ValidateFrameRange: BasicValidateModel = Field(
|
||||
ValidateFrameRange: BasicValidateModel = SettingsField(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Frame Range",
|
||||
section="Validators"
|
||||
)
|
||||
ValidateAttributes: ValidateAttributesModel = Field(
|
||||
ValidateAttributes: ValidateAttributesModel = SettingsField(
|
||||
default_factory=ValidateAttributesModel,
|
||||
title="Validate Attributes"
|
||||
)
|
||||
|
||||
ValidateLoadedPlugin: ValidateLoadedPluginModel = Field(
|
||||
ValidateLoadedPlugin: ValidateLoadedPluginModel = SettingsField(
|
||||
default_factory=ValidateLoadedPluginModel,
|
||||
title="Validate Loaded Plugin"
|
||||
)
|
||||
ValidateRenderPasses: BasicValidateModel = Field(
|
||||
ValidateRenderPasses: BasicValidateModel = SettingsField(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Validate Render Passes"
|
||||
)
|
||||
ExtractModelObj: BasicValidateModel = Field(
|
||||
ExtractModelObj: BasicValidateModel = SettingsField(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract OBJ",
|
||||
section="Extractors"
|
||||
)
|
||||
ExtractModelFbx: BasicValidateModel = Field(
|
||||
ExtractModelFbx: BasicValidateModel = SettingsField(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract FBX"
|
||||
)
|
||||
ExtractModelUSD: BasicValidateModel = Field(
|
||||
ExtractModelUSD: BasicValidateModel = SettingsField(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract Geometry (USD)"
|
||||
)
|
||||
ExtractModel: BasicValidateModel = Field(
|
||||
ExtractModel: BasicValidateModel = SettingsField(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract Geometry (Alembic)"
|
||||
)
|
||||
ExtractMaxSceneRaw: BasicValidateModel = Field(
|
||||
ExtractMaxSceneRaw: BasicValidateModel = SettingsField(
|
||||
default_factory=BasicValidateModel,
|
||||
title="Extract Max Scene (Raw)"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
from ayon_server.settings import BaseSettingsModel, SettingsField
|
||||
|
||||
|
||||
def aov_separators_enum():
|
||||
|
|
@ -26,19 +24,19 @@ def image_format_enum():
|
|||
|
||||
|
||||
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(
|
||||
enum_resolver=image_format_enum,
|
||||
title="Output Image Format"
|
||||
)
|
||||
multipass: bool = Field(title="multipass")
|
||||
multipass: bool = SettingsField(title="multipass")
|
||||
|
||||
|
||||
DEFAULT_RENDER_SETTINGS = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue