ayon-core/server_addon/blender/server/settings/main.py
Jakub Trllo b43cac0b51
AYON: Addons creation enhancements (#5356)
* updated nuke settings

* added addon version to zip filename

* fix Pattern type hint

* added ignored subdirs for openpype

* added titles to addons

* type hint fix - again

* modified settings conversion

* updated aftereffects settings

* updated blender settings

* updated clockify settings

* updated core settings

* updated deadline settings

* updated harmo settings

* updated kistsu settings

* updated maya settings

* updated muster settings

* updated royal render settings

* updated timers manager settings

* updated traypublisher settings

* implemented conversion of rr paths

* formatting fix
2023-07-28 11:51:23 +02:00

63 lines
1.7 KiB
Python

from pydantic import Field
from ayon_server.settings import (
BaseSettingsModel,
TemplateWorkfileBaseOptions,
)
from .imageio import BlenderImageIOModel
from .publish_plugins import (
PublishPuginsModel,
DEFAULT_BLENDER_PUBLISH_SETTINGS
)
class UnitScaleSettingsModel(BaseSettingsModel):
enabled: bool = Field(True, title="Enabled")
apply_on_opening: bool = Field(
False, title="Apply on Opening Existing Files")
base_file_unit_scale: float = Field(
1.0, title="Base File Unit Scale"
)
class BlenderSettings(BaseSettingsModel):
unit_scale_settings: UnitScaleSettingsModel = Field(
default_factory=UnitScaleSettingsModel,
title="Set Unit Scale"
)
set_resolution_startup: bool = Field(
True,
title="Set Resolution on Startup"
)
set_frames_startup: bool = Field(
True,
title="Set Start/End Frames and FPS on Startup"
)
imageio: BlenderImageIOModel = Field(
default_factory=BlenderImageIOModel,
title="Color Management (ImageIO)"
)
workfile_builder: TemplateWorkfileBaseOptions = Field(
default_factory=TemplateWorkfileBaseOptions,
title="Workfile Builder"
)
publish: PublishPuginsModel = Field(
default_factory=PublishPuginsModel,
title="Publish Plugins"
)
DEFAULT_VALUES = {
"unit_scale_settings": {
"enabled": True,
"apply_on_opening": False,
"base_file_unit_scale": 0.01
},
"set_frames_startup": True,
"set_resolution_startup": True,
"publish": DEFAULT_BLENDER_PUBLISH_SETTINGS,
"workfile_builder": {
"create_first_version": False,
"custom_templates": []
}
}