mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +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")
|
item["family"] = item.pop("product_type")
|
||||||
|
|
||||||
shot_add_tasks = ayon_editorial_simple["shot_add_tasks"]
|
shot_add_tasks = ayon_editorial_simple["shot_add_tasks"]
|
||||||
|
|
||||||
|
# TODO: backward compatibility and remove in future
|
||||||
if isinstance(shot_add_tasks, dict):
|
if isinstance(shot_add_tasks, dict):
|
||||||
shot_add_tasks = []
|
shot_add_tasks = []
|
||||||
|
|
||||||
|
# aggregate shot_add_tasks items
|
||||||
new_shot_add_tasks = {
|
new_shot_add_tasks = {
|
||||||
item["name"]: item["task_type"]
|
item["name"]: {"type": item["task_type"]}
|
||||||
for item in shot_add_tasks
|
for item in shot_add_tasks
|
||||||
}
|
}
|
||||||
ayon_editorial_simple["shot_add_tasks"] = new_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):
|
class ClipNameTokenizerItem(BaseSettingsModel):
|
||||||
_layout = "expanded"
|
_layout = "expanded"
|
||||||
# TODO was 'dict-modifiable', is list of dicts now, must be fixed in code
|
name: str = Field("", title="Tokenizer name")
|
||||||
name: str = Field("#TODO", title="Tokenizer name")
|
|
||||||
regex: str = Field("", title="Tokenizer regex")
|
regex: str = Field("", title="Tokenizer regex")
|
||||||
|
|
||||||
|
|
||||||
class ShotAddTasksItem(BaseSettingsModel):
|
class ShotAddTasksItem(BaseSettingsModel):
|
||||||
_layout = "expanded"
|
_layout = "expanded"
|
||||||
# TODO was 'dict-modifiable', is list of dicts now, must be fixed in code
|
|
||||||
name: str = Field('', title="Key")
|
name: str = Field('', title="Key")
|
||||||
task_type: list[str] = Field(
|
task_type: str = Field(
|
||||||
title="Task type",
|
title="Task type",
|
||||||
default_factory=list,
|
enum_resolver=task_types_enum
|
||||||
enum_resolver=task_types_enum)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ShotRenameSubmodel(BaseSettingsModel):
|
class ShotRenameSubmodel(BaseSettingsModel):
|
||||||
|
|
@ -54,7 +52,7 @@ class TokenToParentConvertorItem(BaseSettingsModel):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
class ShotHierchySubmodel(BaseSettingsModel):
|
class ShotHierarchySubmodel(BaseSettingsModel):
|
||||||
enabled: bool = True
|
enabled: bool = True
|
||||||
parents_path: str = Field(
|
parents_path: str = Field(
|
||||||
"",
|
"",
|
||||||
|
|
@ -102,9 +100,9 @@ class EditorialSimpleCreatorPlugin(BaseSettingsModel):
|
||||||
title="Shot Rename",
|
title="Shot Rename",
|
||||||
default_factory=ShotRenameSubmodel
|
default_factory=ShotRenameSubmodel
|
||||||
)
|
)
|
||||||
shot_hierarchy: ShotHierchySubmodel = Field(
|
shot_hierarchy: ShotHierarchySubmodel = Field(
|
||||||
title="Shot Hierarchy",
|
title="Shot Hierarchy",
|
||||||
default_factory=ShotHierchySubmodel
|
default_factory=ShotHierarchySubmodel
|
||||||
)
|
)
|
||||||
shot_add_tasks: list[ShotAddTasksItem] = Field(
|
shot_add_tasks: list[ShotAddTasksItem] = Field(
|
||||||
title="Add tasks to shot",
|
title="Add tasks to shot",
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
"""Package declaring addon version."""
|
"""Package declaring addon version."""
|
||||||
__version__ = "0.1.2"
|
__version__ = "0.1.3"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue