mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Updated settings for Ayon
This commit is contained in:
parent
153a299901
commit
0f1bf31f69
5 changed files with 168 additions and 3 deletions
|
|
@ -9,6 +9,10 @@ from .publish_plugins import (
|
|||
PublishPuginsModel,
|
||||
DEFAULT_BLENDER_PUBLISH_SETTINGS
|
||||
)
|
||||
from .render_settings import (
|
||||
RenderSettingsModel,
|
||||
DEFAULT_RENDER_SETTINGS
|
||||
)
|
||||
|
||||
|
||||
class UnitScaleSettingsModel(BaseSettingsModel):
|
||||
|
|
@ -37,6 +41,8 @@ class BlenderSettings(BaseSettingsModel):
|
|||
default_factory=BlenderImageIOModel,
|
||||
title="Color Management (ImageIO)"
|
||||
)
|
||||
render_settings: RenderSettingsModel = Field(
|
||||
default_factory=RenderSettingsModel, title="Render Settings")
|
||||
workfile_builder: TemplateWorkfileBaseOptions = Field(
|
||||
default_factory=TemplateWorkfileBaseOptions,
|
||||
title="Workfile Builder"
|
||||
|
|
@ -55,6 +61,7 @@ DEFAULT_VALUES = {
|
|||
},
|
||||
"set_frames_startup": True,
|
||||
"set_resolution_startup": True,
|
||||
"render_settings": DEFAULT_RENDER_SETTINGS,
|
||||
"publish": DEFAULT_BLENDER_PUBLISH_SETTINGS,
|
||||
"workfile_builder": {
|
||||
"create_first_version": False,
|
||||
|
|
|
|||
|
|
@ -26,6 +26,16 @@ class ValidatePluginModel(BaseSettingsModel):
|
|||
active: bool = Field(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(
|
||||
default_factory=list,
|
||||
title="Exclude product types"
|
||||
)
|
||||
|
||||
|
||||
class ExtractBlendModel(BaseSettingsModel):
|
||||
enabled: bool = Field(True)
|
||||
optional: bool = Field(title="Optional")
|
||||
|
|
@ -53,6 +63,16 @@ class PublishPuginsModel(BaseSettingsModel):
|
|||
title="Validate Camera Zero Keyframe",
|
||||
section="Validators"
|
||||
)
|
||||
ValidateFileSaved: ValidateFileSavedModel = Field(
|
||||
default_factory=ValidateFileSavedModel,
|
||||
title="Validate File Saved",
|
||||
section="Validators"
|
||||
)
|
||||
ValidateRenderCameraIsSet: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Render Camera Is Set",
|
||||
section="Validators"
|
||||
)
|
||||
ValidateMeshHasUvs: ValidatePluginModel = Field(
|
||||
default_factory=ValidatePluginModel,
|
||||
title="Validate Mesh Has Uvs"
|
||||
|
|
@ -118,6 +138,17 @@ DEFAULT_BLENDER_PUBLISH_SETTINGS = {
|
|||
"optional": True,
|
||||
"active": True
|
||||
},
|
||||
"ValidateFileSaved": {
|
||||
"enabled": True,
|
||||
"optional": False,
|
||||
"active": True,
|
||||
"exclude_families": []
|
||||
},
|
||||
"ValidateRenderCameraIsSet": {
|
||||
"enabled": True,
|
||||
"optional": False,
|
||||
"active": True
|
||||
},
|
||||
"ValidateMeshHasUvs": {
|
||||
"enabled": True,
|
||||
"optional": True,
|
||||
|
|
|
|||
106
server_addon/blender/server/settings/render_settings.py
Normal file
106
server_addon/blender/server/settings/render_settings.py
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
"""Providing models and values for Blender Render Settings."""
|
||||
from pydantic import Field
|
||||
|
||||
from ayon_server.settings import BaseSettingsModel
|
||||
|
||||
|
||||
def aov_separators_enum():
|
||||
return [
|
||||
{"value": "dash", "label": "- (dash)"},
|
||||
{"value": "underscore", "label": "_ (underscore)"},
|
||||
{"value": "dot", "label": ". (dot)"}
|
||||
]
|
||||
|
||||
|
||||
def image_format_enum():
|
||||
return [
|
||||
{"value": "exr", "label": "OpenEXR"},
|
||||
{"value": "bmp", "label": "BMP"},
|
||||
{"value": "rgb", "label": "Iris"},
|
||||
{"value": "png", "label": "PNG"},
|
||||
{"value": "jpg", "label": "JPEG"},
|
||||
{"value": "jp2", "label": "JPEG 2000"},
|
||||
{"value": "tga", "label": "Targa"},
|
||||
{"value": "tif", "label": "TIFF"},
|
||||
]
|
||||
|
||||
|
||||
def aov_list_enum():
|
||||
return [
|
||||
{"value": "empty", "label": "< none >"},
|
||||
{"value": "combined", "label": "Combined"},
|
||||
{"value": "z", "label": "Z"},
|
||||
{"value": "mist", "label": "Mist"},
|
||||
{"value": "normal", "label": "Normal"},
|
||||
{"value": "diffuse_light", "label": "Diffuse Light"},
|
||||
{"value": "diffuse_color", "label": "Diffuse Color"},
|
||||
{"value": "specular_light", "label": "Specular Light"},
|
||||
{"value": "specular_color", "label": "Specular Color"},
|
||||
{"value": "volume_light", "label": "Volume Light"},
|
||||
{"value": "emission", "label": "Emission"},
|
||||
{"value": "environment", "label": "Environment"},
|
||||
{"value": "shadow", "label": "Shadow"},
|
||||
{"value": "ao", "label": "Ambient Occlusion"}
|
||||
]
|
||||
|
||||
|
||||
def custom_passes_types_enum():
|
||||
return [
|
||||
{"value": "COLOR", "label": "Color"},
|
||||
{"value": "VALUE", "label": "Value"},
|
||||
]
|
||||
|
||||
|
||||
class CustomPassesModel(BaseSettingsModel):
|
||||
"""Custom Passes"""
|
||||
_layout = "compact"
|
||||
|
||||
attribute: str = Field("", title="Attribute name")
|
||||
value: str = Field(
|
||||
"Color",
|
||||
title="Type",
|
||||
enum_resolver=custom_passes_types_enum
|
||||
)
|
||||
|
||||
|
||||
class RenderSettingsModel(BaseSettingsModel):
|
||||
default_render_image_folder: str = Field(
|
||||
title="Default Render Image Folder"
|
||||
)
|
||||
aov_separator: str = Field(
|
||||
"underscore",
|
||||
title="AOV Separator Character",
|
||||
enum_resolver=aov_separators_enum
|
||||
)
|
||||
image_format: str = Field(
|
||||
"exr",
|
||||
title="Image Format",
|
||||
enum_resolver=image_format_enum
|
||||
)
|
||||
multilayer_exr: bool = Field(
|
||||
title="Multilayer (EXR)"
|
||||
)
|
||||
aov_list: list[str] = Field(
|
||||
default_factory=list,
|
||||
enum_resolver=aov_list_enum,
|
||||
title="AOVs to create"
|
||||
)
|
||||
custom_passes: list[CustomPassesModel] = Field(
|
||||
default_factory=list,
|
||||
title="Custom Passes",
|
||||
description=(
|
||||
"Add custom AOVs. They are added to the view layer and in the "
|
||||
"Compositing Nodetree,\nbut they need to be added manually to "
|
||||
"the Shader Nodetree."
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_RENDER_SETTINGS = {
|
||||
"default_render_image_folder": "renders/blender",
|
||||
"aov_separator": "underscore",
|
||||
"image_format": "exr",
|
||||
"multilayer_exr": True,
|
||||
"aov_list": [],
|
||||
"custom_passes": []
|
||||
}
|
||||
|
|
@ -1 +1 @@
|
|||
__version__ = "0.1.1"
|
||||
__version__ = "0.1.2"
|
||||
|
|
|
|||
|
|
@ -208,6 +208,16 @@ class CelactionSubmitDeadlineModel(BaseSettingsModel):
|
|||
)
|
||||
|
||||
|
||||
class BlenderSubmitDeadlineModel(BaseSettingsModel):
|
||||
enabled: bool = Field(True)
|
||||
optional: bool = Field(title="Optional")
|
||||
active: bool = Field(title="Active")
|
||||
use_published: bool = Field(title="Use Published scene")
|
||||
priority: int = Field(title="Priority")
|
||||
chunk_size: int = Field(title="Frame per Task")
|
||||
group: str = Field("", title="Group Name")
|
||||
|
||||
|
||||
class AOVFilterSubmodel(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
name: str = Field(title="Host")
|
||||
|
|
@ -276,8 +286,10 @@ class PublishPluginsModel(BaseSettingsModel):
|
|||
title="After Effects to deadline")
|
||||
CelactionSubmitDeadline: CelactionSubmitDeadlineModel = Field(
|
||||
default_factory=CelactionSubmitDeadlineModel,
|
||||
title="Celaction Submit Deadline"
|
||||
)
|
||||
title="Celaction Submit Deadline")
|
||||
BlenderSubmitDeadline: BlenderSubmitDeadlineModel = Field(
|
||||
default_factory=BlenderSubmitDeadlineModel,
|
||||
title="Blender Submit Deadline")
|
||||
ProcessSubmittedJobOnFarm: ProcessSubmittedJobOnFarmModel = Field(
|
||||
default_factory=ProcessSubmittedJobOnFarmModel,
|
||||
title="Process submitted job on farm.")
|
||||
|
|
@ -384,6 +396,15 @@ DEFAULT_DEADLINE_PLUGINS_SETTINGS = {
|
|||
"deadline_chunk_size": 10,
|
||||
"deadline_job_delay": "00:00:00:00"
|
||||
},
|
||||
"BlenderSubmitDeadline": {
|
||||
"enabled": True,
|
||||
"optional": False,
|
||||
"active": True,
|
||||
"use_published": True,
|
||||
"priority": 50,
|
||||
"chunk_size": 10,
|
||||
"group": "none"
|
||||
},
|
||||
"ProcessSubmittedJobOnFarm": {
|
||||
"enabled": True,
|
||||
"deadline_department": "",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue