TVPaint can read AYON settings

This commit is contained in:
Jakub Trllo 2024-02-09 13:14:57 +01:00
parent 8fb6e1e4d4
commit 53df65a412
3 changed files with 6 additions and 27 deletions

View file

@ -823,30 +823,9 @@ def _convert_substancepainter_project_settings(ayon_settings, output):
def _convert_tvpaint_project_settings(ayon_settings, output):
if "tvpaint" not in ayon_settings:
return
ayon_tvpaint = ayon_settings["tvpaint"]
_convert_host_imageio(ayon_tvpaint)
ayon_publish_settings = ayon_tvpaint["publish"]
for plugin_name in (
"ValidateProjectSettings",
"ValidateMarks",
"ValidateStartFrame",
"ValidateAssetName",
):
ayon_value = ayon_publish_settings[plugin_name]
for src_key, dst_key in (
("action_enabled", "optional"),
("action_enable", "active"),
):
if src_key in ayon_value:
ayon_value[dst_key] = ayon_value.pop(src_key)
extract_sequence_setting = ayon_publish_settings["ExtractSequence"]
extract_sequence_setting["review_bg"] = _convert_color(
extract_sequence_setting["review_bg"]
)
output["tvpaint"] = ayon_tvpaint

View file

@ -1,5 +1,5 @@
from ayon_server.settings import BaseSettingsModel, SettingsField
from ayon_server.types import ColorRGBA_uint8
from ayon_server.types import ColorRGB_uint8
class CollectRenderInstancesModel(BaseSettingsModel):
@ -11,8 +11,8 @@ class CollectRenderInstancesModel(BaseSettingsModel):
class ExtractSequenceModel(BaseSettingsModel):
"""Review BG color is used for whole scene review and for thumbnails."""
# TODO Use alpha color
review_bg: ColorRGBA_uint8 = SettingsField(
(255, 255, 255, 1.0),
review_bg: ColorRGB_uint8 = SettingsField(
(255, 255, 255),
title="Review BG color")
@ -100,7 +100,7 @@ DEFAULT_PUBLISH_SETTINGS = {
"ignore_render_pass_transparency": False
},
"ExtractSequence": {
"review_bg": [255, 255, 255, 1.0]
"review_bg": [255, 255, 255]
},
"ValidateProjectSettings": {
"enabled": True,

View file

@ -1 +1 @@
__version__ = "0.1.1"
__version__ = "0.1.2"