mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 12:54:40 +01:00
ayon settings: trypublisher editorial add task model conversion
This commit is contained in:
parent
4bafde2641
commit
c6d81edc34
3 changed files with 13 additions and 11 deletions
|
|
@ -1021,10 +1021,14 @@ def _convert_traypublisher_project_settings(ayon_settings, output):
|
|||
item["family"] = item.pop("product_type")
|
||||
|
||||
shot_add_tasks = ayon_editorial_simple["shot_add_tasks"]
|
||||
|
||||
# TODO: backward compatibility and remove in future
|
||||
if isinstance(shot_add_tasks, dict):
|
||||
shot_add_tasks = []
|
||||
|
||||
# aggregate shot_add_tasks items
|
||||
new_shot_add_tasks = {
|
||||
item["name"]: item["task_type"]
|
||||
item["name"]: {"type": item["task_type"]}
|
||||
for item in shot_add_tasks
|
||||
}
|
||||
ayon_editorial_simple["shot_add_tasks"] = new_shot_add_tasks
|
||||
|
|
|
|||
|
|
@ -5,19 +5,17 @@ from ayon_server.settings import BaseSettingsModel, task_types_enum
|
|||
|
||||
class ClipNameTokenizerItem(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
# TODO was 'dict-modifiable', is list of dicts now, must be fixed in code
|
||||
name: str = Field("#TODO", title="Tokenizer name")
|
||||
name: str = Field("", title="Tokenizer name")
|
||||
regex: str = Field("", title="Tokenizer regex")
|
||||
|
||||
|
||||
class ShotAddTasksItem(BaseSettingsModel):
|
||||
_layout = "expanded"
|
||||
# TODO was 'dict-modifiable', is list of dicts now, must be fixed in code
|
||||
name: str = Field('', title="Key")
|
||||
task_type: list[str] = Field(
|
||||
task_type: str = Field(
|
||||
title="Task type",
|
||||
default_factory=list,
|
||||
enum_resolver=task_types_enum)
|
||||
enum_resolver=task_types_enum
|
||||
)
|
||||
|
||||
|
||||
class ShotRenameSubmodel(BaseSettingsModel):
|
||||
|
|
@ -54,7 +52,7 @@ class TokenToParentConvertorItem(BaseSettingsModel):
|
|||
)
|
||||
|
||||
|
||||
class ShotHierchySubmodel(BaseSettingsModel):
|
||||
class ShotHierarchySubmodel(BaseSettingsModel):
|
||||
enabled: bool = True
|
||||
parents_path: str = Field(
|
||||
"",
|
||||
|
|
@ -102,9 +100,9 @@ class EditorialSimpleCreatorPlugin(BaseSettingsModel):
|
|||
title="Shot Rename",
|
||||
default_factory=ShotRenameSubmodel
|
||||
)
|
||||
shot_hierarchy: ShotHierchySubmodel = Field(
|
||||
shot_hierarchy: ShotHierarchySubmodel = Field(
|
||||
title="Shot Hierarchy",
|
||||
default_factory=ShotHierchySubmodel
|
||||
default_factory=ShotHierarchySubmodel
|
||||
)
|
||||
shot_add_tasks: list[ShotAddTasksItem] = Field(
|
||||
title="Add tasks to shot",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
"""Package declaring addon version."""
|
||||
__version__ = "0.1.2"
|
||||
__version__ = "0.1.3"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue