Merge branch 'develop' into bugfix/ocio_hook_task_less_context

This commit is contained in:
Jakub Ježek 2025-06-06 16:03:57 +02:00 committed by GitHub
commit 072684efcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 662 additions and 29 deletions

View file

@ -35,6 +35,7 @@ body:
label: Version
description: What version are you running? Look to AYON Tray
options:
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.0

View file

@ -1,11 +1,14 @@
# -*- coding: utf-8 -*-
"""Cleanup leftover files from publish."""
import os
import shutil
import pyblish.api
import re
import shutil
import tempfile
import pyblish.api
from ayon_core.lib import is_in_tests
from ayon_core.pipeline import PublishError
class CleanUp(pyblish.api.InstancePlugin):
@ -48,17 +51,15 @@ class CleanUp(pyblish.api.InstancePlugin):
if is_in_tests():
# let automatic test process clean up temporary data
return
# Get the errored instances
failed = []
# If instance has errors, do not clean up
for result in instance.context.data["results"]:
if (result["error"] is not None and result["instance"] is not None
and result["instance"] not in failed):
failed.append(result["instance"])
assert instance not in failed, (
"Result of '{}' instance were not success".format(
instance.data["name"]
)
)
if result["error"] is not None and result["instance"] is instance:
raise PublishError(
"Result of '{}' instance were not success".format(
instance.data["name"]
)
)
_skip_cleanup_filepaths = instance.context.data.get(
"skipCleanupFilepaths"
@ -71,10 +72,17 @@ class CleanUp(pyblish.api.InstancePlugin):
self.log.debug("Cleaning renders new...")
self.clean_renders(instance, skip_cleanup_filepaths)
if [ef for ef in self.exclude_families
if instance.data["productType"] in ef]:
# TODO: Figure out whether this could be refactored to just a
# product_type in self.exclude_families check.
product_type = instance.data["productType"]
if any(
product_type in exclude_family
for exclude_family in self.exclude_families
):
self.log.debug(
"Skipping cleanup for instance because product "
f"type is excluded from cleanup: {product_type}")
return
import tempfile
temp_root = tempfile.gettempdir()
staging_dir = instance.data.get("stagingDir", None)

View file

@ -5,12 +5,32 @@ CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
def get_font_filepath(
font_name: Optional[str] = "MaterialSymbolsOutlined"
font_name: Optional[str] = "MaterialSymbolsOutlined-Regular"
) -> str:
return os.path.join(CURRENT_DIR, f"{font_name}.ttf")
def get_mapping_filepath(
font_name: Optional[str] = "MaterialSymbolsOutlined"
font_name: Optional[str] = "MaterialSymbolsOutlined-Regular"
) -> str:
return os.path.join(CURRENT_DIR, f"{font_name}.json")
def regenerate_mapping():
"""Regenerate the MaterialSymbolsOutlined.json file, assuming
MaterialSymbolsOutlined.codepoints and the TrueType font file have been
updated to support the new symbols.
"""
import json
jfile = get_mapping_filepath()
cpfile = jfile.replace(".json", ".codepoints")
with open(cpfile, "r") as cpf:
codepoints = cpf.read()
mapping = {}
for cp in codepoints.splitlines():
name, code = cp.split()
mapping[name] = int(f"0x{code}", 16)
with open(jfile, "w") as jf:
json.dump(mapping, jf, indent=4)

View file

@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""Package declaring AYON addon 'core' version."""
__version__ = "1.3.1+dev"
__version__ = "1.3.2+dev"

View file

@ -1,6 +1,6 @@
name = "core"
title = "Core"
version = "1.3.1+dev"
version = "1.3.2+dev"
client_dir = "ayon_core"

View file

@ -5,7 +5,7 @@
[tool.poetry]
name = "ayon-core"
version = "1.3.1+dev"
version = "1.3.2+dev"
description = ""
authors = ["Ynput Team <team@ynput.io>"]
readme = "README.md"