change 'tasks' and 'hosts' to full attr names

This commit is contained in:
Jakub Trllo 2025-11-12 17:24:02 +01:00
parent ca8b776ce1
commit 2f893574f4
2 changed files with 29 additions and 22 deletions

View file

@ -21,6 +21,13 @@ def _convert_imageio_configs_1_6_5(overrides):
if isinstance(template, str):
item["template"] = PRODUCT_NAME_REPL_REGEX.sub("", template)
for new_key, old_key in (
("host_names", "hosts"),
("task_names", "tasks"),
):
if old_key in item:
item[new_key] = item.get(old_key)
def _convert_imageio_configs_0_4_5(overrides):
"""Imageio config settings did change to profiles since 0.4.5."""

View file

@ -27,13 +27,13 @@ class ProductNameProfile(BaseSettingsModel):
product_types: list[str] = SettingsField(
default_factory=list, title="Product types"
)
hosts: list[str] = SettingsField(default_factory=list, title="Hosts")
host_names: list[str] = SettingsField(default_factory=list, title="Host names")
task_types: list[str] = SettingsField(
default_factory=list,
title="Task types",
enum_resolver=task_types_enum
)
tasks: list[str] = SettingsField(default_factory=list, title="Task names")
task_names: list[str] = SettingsField(default_factory=list, title="Task names")
template: str = SettingsField("", title="Template", regex=r"^[<>{}\[\]a-zA-Z0-9_.]+$")
@ -433,27 +433,27 @@ DEFAULT_TOOLS_VALUES = {
"product_name_profiles": [
{
"product_types": [],
"hosts": [],
"host_names": [],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "{product[type]}{variant}"
},
{
"product_types": [
"workfile"
],
"hosts": [],
"host_names": [],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "{product[type]}{Task[name]}"
},
{
"product_types": [
"render"
],
"hosts": [],
"host_names": [],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "{product[type]}{Task[name]}{Variant}<_{Aov}>"
},
{
@ -461,11 +461,11 @@ DEFAULT_TOOLS_VALUES = {
"renderLayer",
"renderPass"
],
"hosts": [
"host_names": [
"tvpaint"
],
"task_types": [],
"tasks": [],
"task_names": [],
"template": (
"{product[type]}{Task[name]}_{Renderlayer}_{Renderpass}"
)
@ -475,65 +475,65 @@ DEFAULT_TOOLS_VALUES = {
"review",
"workfile"
],
"hosts": [
"host_names": [
"aftereffects",
"tvpaint"
],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "{product[type]}{Task[name]}"
},
{
"product_types": ["render"],
"hosts": [
"host_names": [
"aftereffects"
],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "{product[type]}{Task[name]}{Composition}{Variant}"
},
{
"product_types": [
"staticMesh"
],
"hosts": [
"host_names": [
"maya"
],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "S_{folder[name]}{variant}"
},
{
"product_types": [
"skeletalMesh"
],
"hosts": [
"host_names": [
"maya"
],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "SK_{folder[name]}{variant}"
},
{
"product_types": [
"hda"
],
"hosts": [
"host_names": [
"houdini"
],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "{folder[name]}_{variant}"
},
{
"product_types": [
"textureSet"
],
"hosts": [
"host_names": [
"substancedesigner"
],
"task_types": [],
"tasks": [],
"task_names": [],
"template": "T_{folder[name]}{variant}"
}
],