mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
added conversion function
This commit is contained in:
parent
5ede9cb091
commit
ca8b776ce1
1 changed files with 18 additions and 0 deletions
|
|
@ -1,8 +1,26 @@
|
||||||
|
import re
|
||||||
import copy
|
import copy
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from .publish_plugins import DEFAULT_PUBLISH_VALUES
|
from .publish_plugins import DEFAULT_PUBLISH_VALUES
|
||||||
|
|
||||||
|
PRODUCT_NAME_REPL_REGEX = re.compile(r"[^<>{}\[\]a-zA-Z0-9_.]")
|
||||||
|
|
||||||
|
|
||||||
|
def _convert_imageio_configs_1_6_5(overrides):
|
||||||
|
product_name_profiles = (
|
||||||
|
overrides
|
||||||
|
.get("tools", {})
|
||||||
|
.get("creator", {})
|
||||||
|
.get("product_name_profiles")
|
||||||
|
)
|
||||||
|
if isinstance(product_name_profiles, list):
|
||||||
|
for item in product_name_profiles:
|
||||||
|
# Remove unsupported product name characters
|
||||||
|
template = item.get("template")
|
||||||
|
if isinstance(template, str):
|
||||||
|
item["template"] = PRODUCT_NAME_REPL_REGEX.sub("", template)
|
||||||
|
|
||||||
|
|
||||||
def _convert_imageio_configs_0_4_5(overrides):
|
def _convert_imageio_configs_0_4_5(overrides):
|
||||||
"""Imageio config settings did change to profiles since 0.4.5."""
|
"""Imageio config settings did change to profiles since 0.4.5."""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue