Merge branch 'develop' into enhancement/maya_template_add_assign_look_placeholder

This commit is contained in:
Libor Batek 2024-06-05 09:15:24 +02:00 committed by GitHub
commit a842472cd7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
137 changed files with 122 additions and 94 deletions

View file

@ -54,6 +54,7 @@ MOVED_ADDON_MILESTONE_VERSIONS = {
"clockify": VersionInfo(0, 2, 0),
"flame": VersionInfo(0, 2, 0),
"fusion": VersionInfo(0, 2, 0),
"hiero": VersionInfo(0, 2, 0),
"max": VersionInfo(0, 2, 0),
"photoshop": VersionInfo(0, 2, 0),
"traypublisher": VersionInfo(0, 2, 0),

View file

@ -1,10 +0,0 @@
from .addon import (
HIERO_ROOT_DIR,
HieroAddon,
)
__all__ = (
"HIERO_ROOT_DIR",
"HieroAddon",
)

View file

@ -172,12 +172,30 @@ class VersionItem:
def __gt__(self, other):
if not isinstance(other, VersionItem):
return False
if (
other.version == self.version
and self.is_hero
):
# Make sure hero versions are positive
version = abs(self.version)
other_version = abs(other.version)
# Hero version is greater than non-hero
if version == other_version:
return self.is_hero
return version > other_version
def __lt__(self, other):
if not isinstance(other, VersionItem):
return True
return other.version < self.version
# Make sure hero versions are positive
version = abs(self.version)
other_version = abs(other.version)
# Non-hero version is lesser than hero
if version == other_version:
return not self.is_hero
return version < other_version
def __ge__(self, other):
return self.__eq__(other) or self.__gt__(other)
def __le__(self, other):
return self.__eq__(other) or self.__lt__(other)
def to_data(self):
return {

View file

@ -199,7 +199,9 @@ class ProductsModel(QtGui.QStandardItemModel):
product_item = self._product_items_by_id.get(product_id)
if product_item is None:
return None
return list(product_item.version_items.values())
product_items = list(product_item.version_items.values())
product_items.sort(reverse=True)
return product_items
if role == QtCore.Qt.EditRole:
return None

View file

@ -80,11 +80,11 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
exclude = [
"client/ayon_core/hosts/unreal/integration/*",
"client/ayon_core/hosts/aftereffects/api/extension/js/libs/*",
"client/ayon_core/hosts/hiero/api/startup/*",
"client/ayon_core/modules/deadline/repository/custom/plugins/CelAction/*",
"client/ayon_core/modules/deadline/repository/custom/plugins/HarmonyAYON/*",
"client/ayon_core/modules/click_wrap.py",
"client/ayon_core/scripts/slates/__init__.py"
"client/ayon_core/scripts/slates/__init__.py",
"server_addon/hiero/client/ayon_hiero/api/startup/*"
]
[tool.ruff.lint.per-file-ignores]

View file

@ -0,0 +1,13 @@
from .version import __version__
from .addon import (
HIERO_ADDON_ROOT,
HieroAddon,
)
__all__ = (
"__version__",
"HIERO_ADDON_ROOT",
"HieroAddon",
)

View file

@ -2,17 +2,20 @@ import os
import platform
from ayon_core.addon import AYONAddon, IHostAddon
HIERO_ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
from .version import __version__
HIERO_ADDON_ROOT = os.path.dirname(os.path.abspath(__file__))
class HieroAddon(AYONAddon, IHostAddon):
name = "hiero"
version = __version__
host_name = "hiero"
def add_implementation_envs(self, env, _app):
# Add requirements to HIERO_PLUGIN_PATH
new_hiero_paths = [
os.path.join(HIERO_ROOT_DIR, "api", "startup")
os.path.join(HIERO_ADDON_ROOT, "api", "startup")
]
old_hiero_path = env.get("HIERO_PLUGIN_PATH") or ""
for path in old_hiero_path.split(os.pathsep):
@ -36,7 +39,7 @@ class HieroAddon(AYONAddon, IHostAddon):
python_path_parts = []
if python_path:
python_path_parts = python_path.split(os.pathsep)
vendor_path = os.path.join(HIERO_ROOT_DIR, "vendor")
vendor_path = os.path.join(HIERO_ADDON_ROOT, "vendor")
python_path_parts.insert(0, vendor_path)
env["PYTHONPATH"] = os.pathsep.join(python_path_parts)

View file

@ -453,19 +453,19 @@ def get_track_openpype_data(track, container_name=None):
)
@deprecated("ayon_core.hosts.hiero.api.lib.get_trackitem_openpype_tag")
@deprecated("ayon_hiero.api.lib.get_trackitem_openpype_tag")
def get_track_item_pype_tag(track_item):
# backward compatibility alias
return get_trackitem_openpype_tag(track_item)
@deprecated("ayon_core.hosts.hiero.api.lib.set_trackitem_openpype_tag")
@deprecated("ayon_hiero.api.lib.set_trackitem_openpype_tag")
def set_track_item_pype_tag(track_item, data=None):
# backward compatibility alias
return set_trackitem_openpype_tag(track_item, data)
@deprecated("ayon_core.hosts.hiero.api.lib.get_trackitem_openpype_data")
@deprecated("ayon_hiero.api.lib.get_trackitem_openpype_data")
def get_track_item_pype_data(track_item):
# backward compatibility alias
return get_trackitem_openpype_data(track_item)
@ -802,7 +802,7 @@ class PublishAction(QtWidgets.QAction):
#
# '''
# import hiero.core
# from ayon_core.hosts.nuke.api.lib import (
# from ayon_nuke.api.lib import (
# BuildWorkfile,
# imprint
# )

View file

@ -6,7 +6,9 @@ import os
import contextlib
from collections import OrderedDict
import hiero
from pyblish import api as pyblish
from ayon_core.lib import Logger
from ayon_core.pipeline import (
schema,
@ -18,15 +20,14 @@ from ayon_core.pipeline import (
AYON_CONTAINER_ID,
)
from ayon_core.tools.utils import host_tools
from ayon_hiero import HIERO_ADDON_ROOT
from . import lib, menu, events
import hiero
log = Logger.get_logger(__name__)
# plugin paths
API_DIR = os.path.dirname(os.path.abspath(__file__))
HOST_DIR = os.path.dirname(API_DIR)
PLUGINS_DIR = os.path.join(HOST_DIR, "plugins")
PLUGINS_DIR = os.path.join(HIERO_ADDON_ROOT, "plugins")
PUBLISH_PATH = os.path.join(PLUGINS_DIR, "publish").replace("\\", "/")
LOAD_PATH = os.path.join(PLUGINS_DIR, "load").replace("\\", "/")
CREATE_PATH = os.path.join(PLUGINS_DIR, "create").replace("\\", "/")
@ -308,9 +309,9 @@ def reload_config():
import importlib
for module in (
"ayon_core.hosts.hiero.lib",
"ayon_core.hosts.hiero.menu",
"ayon_core.hosts.hiero.tags"
"ayon_hiero.lib",
"ayon_hiero.menu",
"ayon_hiero.tags"
):
log.info("Reloading module: {}...".format(module))
try:
@ -328,7 +329,7 @@ def on_pyblish_instance_toggled(instance, old_value, new_value):
log.info("instance toggle: {}, old_value: {}, new_value:{} ".format(
instance, old_value, new_value))
from ayon_core.hosts.hiero.api import (
from ayon_hiero.api import (
get_trackitem_openpype_tag,
set_publish_attribute
)

View file

@ -550,7 +550,8 @@ class ClipLoader:
log.debug("__ self.timeline_out: {}".format(self.timeline_out))
# check if slate is included
slate_on = "slate" in self.context["version"]["data"]["families"]
slate_on = "slate" in self.context["version"]["data"].get(
"families", [])
log.debug("__ slate_on: {}".format(slate_on))
# if slate is on then remove the slate frame from beginning
@ -600,7 +601,7 @@ class Creator(LegacyCreator):
def __init__(self, *args, **kwargs):
super(Creator, self).__init__(*args, **kwargs)
import ayon_core.hosts.hiero.api as phiero
import ayon_hiero.api as phiero
self.presets = get_current_project_settings()[
"hiero"]["create"].get(self.__class__.__name__, {})

View file

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.4 KiB

Before After
Before After

View file

@ -2,11 +2,11 @@ import traceback
# activate hiero from pype
from ayon_core.pipeline import install_host
import ayon_core.hosts.hiero.api as phiero
import ayon_hiero.api as phiero
install_host(phiero)
try:
__import__("ayon_core.hosts.hiero.api")
__import__("ayon_hiero.api")
__import__("pyblish")
except ImportError as e:
@ -15,5 +15,5 @@ except ImportError as e:
else:
# Setup integration
import ayon_core.hosts.hiero.api as phiero
import ayon_hiero.api as phiero
phiero.lib.setup()

View file

@ -8,7 +8,7 @@ import hiero.core
from hiero.core import util
import opentimelineio as otio
from ayon_core.hosts.hiero.api.otio import hiero_export
from ayon_hiero.api.otio import hiero_export
class OTIOExportTask(hiero.core.TaskBase):

View file

@ -22,7 +22,7 @@ except ImportError:
FormLayout = QFormLayout # lint:ok
from ayon_core.hosts.hiero.api.otio import hiero_export
from ayon_hiero.api.otio import hiero_export
class OTIOExportUI(hiero.ui.TaskUIBase):
def __init__(self, preset):

View file

@ -9,7 +9,7 @@ import hiero.core
import PySide2.QtWidgets as qw
from ayon_core.hosts.hiero.api.otio.hiero_import import load_otio
from ayon_hiero.api.otio.hiero_import import load_otio
class OTIOProjectSelect(qw.QDialog):

View file

@ -1,6 +1,6 @@
from copy import deepcopy
import ayon_core.hosts.hiero.api as phiero
# from ayon_core.hosts.hiero.api import plugin, lib
import ayon_hiero.api as phiero
# from ayon_hiero.api import plugin, lib
# reload(lib)
# reload(plugin)
# reload(phiero)

View file

@ -5,7 +5,7 @@ from ayon_core.lib.transcoding import (
VIDEO_EXTENSIONS,
IMAGE_EXTENSIONS
)
import ayon_core.hosts.hiero.api as phiero
import ayon_hiero.api as phiero
class LoadClip(phiero.SequenceLoader):

View file

@ -7,7 +7,7 @@ from ayon_core.pipeline import (
load,
get_representation_path,
)
from ayon_core.hosts.hiero import api as phiero
from ayon_hiero import api as phiero
from ayon_core.lib import Logger

View file

@ -9,6 +9,7 @@ class CollectClipEffects(pyblish.api.InstancePlugin):
order = pyblish.api.CollectorOrder - 0.078
label = "Collect Clip Effects Instances"
families = ["clip"]
settings_category = "hiero"
effect_categories = []

View file

@ -1,4 +1,3 @@
# from ayon_core import plugins
import os
import json
import pyblish.api

View file

@ -3,8 +3,8 @@ import pyblish
from ayon_core.pipeline import AYON_INSTANCE_ID, AVALON_INSTANCE_ID
from ayon_core.pipeline.editorial import is_overlapping_otio_ranges
from ayon_core.hosts.hiero import api as phiero
from ayon_core.hosts.hiero.api.otio import hiero_export
from ayon_hiero import api as phiero
from ayon_hiero.api.otio import hiero_export
import hiero
# # developer reload modules

View file

@ -7,7 +7,7 @@ from qtpy.QtGui import QPixmap
import hiero.ui
from ayon_core.hosts.hiero.api.otio import hiero_export
from ayon_hiero.api.otio import hiero_export
class PrecollectWorkfile(pyblish.api.ContextPlugin):

View file

@ -1,7 +1,7 @@
from pyblish import api
import hiero
import math
from ayon_core.hosts.hiero.api.otio.hiero_export import create_otio_time_range
from ayon_hiero.api.otio.hiero_export import create_otio_time_range
class PrecollectRetime(api.InstancePlugin):
"""Calculate Retiming of selected track items."""

Some files were not shown because too many files have changed in this diff Show more