From 9ea9e344a2e147e1681a291795f3352ea71cb5af Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 20 Sep 2024 12:28:34 +0200 Subject: [PATCH 1/9] Log the filepath it invalidated for clearer log --- client/ayon_core/plugins/publish/integrate.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/plugins/publish/integrate.py b/client/ayon_core/plugins/publish/integrate.py index d3f6c04333..e8fe09bab7 100644 --- a/client/ayon_core/plugins/publish/integrate.py +++ b/client/ayon_core/plugins/publish/integrate.py @@ -509,8 +509,11 @@ class IntegrateAsset(pyblish.api.InstancePlugin): if not is_sequence_representation: files = [files] - if any(os.path.isabs(fname) for fname in files): - raise KnownPublishError("Given file names contain full paths") + for fname in files: + if os.path.isabs(fname): + raise KnownPublishError( + f"Representation file names contains full paths: {fname}" + ) if not is_sequence_representation: return From 50428f1528a241176da08092eceeef746e8b4359 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Mon, 23 Sep 2024 13:55:09 +0200 Subject: [PATCH 2/9] Fix delivering UDIMs using {udim} in delivery template --- client/ayon_core/lib/path_tools.py | 5 ++++- client/ayon_core/plugins/load/delivery.py | 18 +++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/client/ayon_core/lib/path_tools.py b/client/ayon_core/lib/path_tools.py index a65f0f8e13..5c81fbfebf 100644 --- a/client/ayon_core/lib/path_tools.py +++ b/client/ayon_core/lib/path_tools.py @@ -81,7 +81,10 @@ def collect_frames(files): dict: {'/folder/product_v001.0001.png': '0001', ....} """ - patterns = [clique.PATTERNS["frames"]] + # clique.PATTERNS["frames"] supports only `.1001.exr` not `_1001.exr` so + # we use a customized pattern. + pattern = "[_.](?P(?P0*)\\d+)\\.\\D+\\d?$" + patterns = [pattern] collections, remainder = clique.assemble( files, minimum_items=1, patterns=patterns) diff --git a/client/ayon_core/plugins/load/delivery.py b/client/ayon_core/plugins/load/delivery.py index c7954a18b2..449d4f0554 100644 --- a/client/ayon_core/plugins/load/delivery.py +++ b/client/ayon_core/plugins/load/delivery.py @@ -231,6 +231,11 @@ class DeliveryOptionsDialog(QtWidgets.QDialog): self.log ] + # TODO: This will currently incorrectly detect 'resources' + # that are published along with the publish, because those should + # not adhere to the template directly but are ingested in a + # customized way. For example, maya look textures or any publish + # that directly adds files into `instance.data["transfers"]`. if repre.get("files"): src_paths = [] for repre_file in repre["files"]: @@ -263,7 +268,18 @@ class DeliveryOptionsDialog(QtWidgets.QDialog): frame = dst_frame if frame is not None: - anatomy_data["frame"] = frame + if repre["context"].get("frame"): + anatomy_data["frame"] = frame + elif repre["context"].get("udim"): + anatomy_data["udim"] = frame + else: + # Fallback + self.log.warning( + "Representation context has no frame or udim" + " data. Supplying sequence frame to '{frame}'" + " formatting data." + ) + anatomy_data["frame"] = frame new_report_items, uploaded = deliver_single_file(*args) report_items.update(new_report_items) self._update_progress(uploaded) From 166ac0a5f75821e9331c0cdb57169fafc7af38d3 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 25 Sep 2024 23:57:12 +0200 Subject: [PATCH 3/9] Add cinema4d to OCIO prelaunch hook --- client/ayon_core/hooks/pre_ocio_hook.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/hooks/pre_ocio_hook.py b/client/ayon_core/hooks/pre_ocio_hook.py index 6c30b267bc..7406aa42cf 100644 --- a/client/ayon_core/hooks/pre_ocio_hook.py +++ b/client/ayon_core/hooks/pre_ocio_hook.py @@ -19,7 +19,8 @@ class OCIOEnvHook(PreLaunchHook): "nuke", "hiero", "resolve", - "openrv" + "openrv", + "cinema4d" } launch_types = set() From f9b962d233639067436e21bab54c9f4a5b1a6817 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 26 Sep 2024 00:07:26 +0200 Subject: [PATCH 4/9] Add `cinema4d` to `HOST_WORKFILE_EXTENSIONS` constants --- client/ayon_core/pipeline/constants.py | 1 + 1 file changed, 1 insertion(+) diff --git a/client/ayon_core/pipeline/constants.py b/client/ayon_core/pipeline/constants.py index 7a08cbb3aa..88cddc6e1a 100644 --- a/client/ayon_core/pipeline/constants.py +++ b/client/ayon_core/pipeline/constants.py @@ -9,6 +9,7 @@ AVALON_INSTANCE_ID = "pyblish.avalon.instance" HOST_WORKFILE_EXTENSIONS = { "blender": [".blend"], "celaction": [".scn"], + "cinema4d": [".c4d"], "tvpaint": [".tvpp"], "fusion": [".comp"], "harmony": [".zip"], From ceea08636bb9f951246c408b79fb51dfcd0f4e0e Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 26 Sep 2024 17:06:34 +0200 Subject: [PATCH 5/9] Add validate file saved for Cinema4D --- client/ayon_core/plugins/publish/validate_file_saved.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/ayon_core/plugins/publish/validate_file_saved.py b/client/ayon_core/plugins/publish/validate_file_saved.py index d132ba8d3a..f52998cef3 100644 --- a/client/ayon_core/plugins/publish/validate_file_saved.py +++ b/client/ayon_core/plugins/publish/validate_file_saved.py @@ -36,7 +36,8 @@ class ValidateCurrentSaveFile(pyblish.api.ContextPlugin): label = "Validate File Saved" order = pyblish.api.ValidatorOrder - 0.1 - hosts = ["fusion", "houdini", "max", "maya", "nuke", "substancepainter"] + hosts = ["fusion", "houdini", "max", "maya", "nuke", "substancepainter", + "cinema4d"] actions = [SaveByVersionUpAction, ShowWorkfilesAction] def process(self, context): From f17529b0510704d29e1ae83c784f553e71060e22 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 27 Sep 2024 13:05:31 +0200 Subject: [PATCH 6/9] Make Publisher UI raised to the front when clicking `AYON > Create...` or `AYON > Publish...` in host integrations if it was already opened. --- client/ayon_core/tools/utils/host_tools.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/ayon_core/tools/utils/host_tools.py b/client/ayon_core/tools/utils/host_tools.py index 1eff746b9e..3cddb69eae 100644 --- a/client/ayon_core/tools/utils/host_tools.py +++ b/client/ayon_core/tools/utils/host_tools.py @@ -252,6 +252,9 @@ class HostToolsHelper: if tab: window.set_current_tab(tab) window.make_sure_is_visible() + window.raise_() + window.activateWindow() + window.showNormal() def get_tool_by_name(self, tool_name, parent=None, *args, **kwargs): """Show tool by it's name. From 28d30bc4ba7d9cbc95e5cde311db963d36645e66 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 30 Sep 2024 14:11:11 +0200 Subject: [PATCH 7/9] added release trigger action --- .github/workflows/release_trigger.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/release_trigger.yml diff --git a/.github/workflows/release_trigger.yml b/.github/workflows/release_trigger.yml new file mode 100644 index 0000000000..01a3b3a682 --- /dev/null +++ b/.github/workflows/release_trigger.yml @@ -0,0 +1,12 @@ +name: 🚀 Release Trigger + +on: + workflow_dispatch: + +jobs: + call-release-trigger: + uses: ynput/ops-repo-automation/.github/workflows/release_trigger.yml@main + secrets: + token: ${{ secrets.YNPUT_BOT_TOKEN }} + email: ${{ secrets.CI_EMAIL }} + user: ${{ secrets.CI_USER }} From 3712152cb7d5d45abad425d97e235b234f93d797 Mon Sep 17 00:00:00 2001 From: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> Date: Mon, 30 Sep 2024 16:52:48 +0200 Subject: [PATCH 8/9] removed 'HOST_WORKFILE_EXTENSIONS' --- client/ayon_core/pipeline/__init__.py | 2 -- client/ayon_core/pipeline/constants.py | 18 ------------------ 2 files changed, 20 deletions(-) diff --git a/client/ayon_core/pipeline/__init__.py b/client/ayon_core/pipeline/__init__.py index 4fcea60d5e..8e89029e7b 100644 --- a/client/ayon_core/pipeline/__init__.py +++ b/client/ayon_core/pipeline/__init__.py @@ -3,7 +3,6 @@ from .constants import ( AVALON_INSTANCE_ID, AYON_CONTAINER_ID, AYON_INSTANCE_ID, - HOST_WORKFILE_EXTENSIONS, ) from .anatomy import Anatomy @@ -114,7 +113,6 @@ __all__ = ( "AVALON_INSTANCE_ID", "AYON_CONTAINER_ID", "AYON_INSTANCE_ID", - "HOST_WORKFILE_EXTENSIONS", # --- Anatomy --- "Anatomy", diff --git a/client/ayon_core/pipeline/constants.py b/client/ayon_core/pipeline/constants.py index 88cddc6e1a..e6156b3138 100644 --- a/client/ayon_core/pipeline/constants.py +++ b/client/ayon_core/pipeline/constants.py @@ -4,21 +4,3 @@ AYON_INSTANCE_ID = "ayon.create.instance" # Backwards compatibility AVALON_CONTAINER_ID = "pyblish.avalon.container" AVALON_INSTANCE_ID = "pyblish.avalon.instance" - -# TODO get extensions from host implementations -HOST_WORKFILE_EXTENSIONS = { - "blender": [".blend"], - "celaction": [".scn"], - "cinema4d": [".c4d"], - "tvpaint": [".tvpp"], - "fusion": [".comp"], - "harmony": [".zip"], - "houdini": [".hip", ".hiplc", ".hipnc"], - "maya": [".ma", ".mb"], - "nuke": [".nk"], - "hiero": [".hrox"], - "photoshop": [".psd", ".psb"], - "premiere": [".prproj"], - "resolve": [".drp"], - "aftereffects": [".aep"] -} From d667f21625bdd043a3642fad5f36e7f0b6357ec0 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 1 Oct 2024 10:15:23 +0200 Subject: [PATCH 9/9] Move logic to `make_sure_is_visible` --- client/ayon_core/tools/publisher/window.py | 5 ++++- client/ayon_core/tools/utils/host_tools.py | 3 --- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/ayon_core/tools/publisher/window.py b/client/ayon_core/tools/publisher/window.py index a8ca605ecb..434c2ca602 100644 --- a/client/ayon_core/tools/publisher/window.py +++ b/client/ayon_core/tools/publisher/window.py @@ -439,10 +439,13 @@ class PublisherWindow(QtWidgets.QDialog): def make_sure_is_visible(self): if self._window_is_visible: self.setWindowState(QtCore.Qt.WindowActive) - else: self.show() + self.raise_() + self.activateWindow() + self.showNormal() + def showEvent(self, event): self._window_is_visible = True super().showEvent(event) diff --git a/client/ayon_core/tools/utils/host_tools.py b/client/ayon_core/tools/utils/host_tools.py index 3cddb69eae..1eff746b9e 100644 --- a/client/ayon_core/tools/utils/host_tools.py +++ b/client/ayon_core/tools/utils/host_tools.py @@ -252,9 +252,6 @@ class HostToolsHelper: if tab: window.set_current_tab(tab) window.make_sure_is_visible() - window.raise_() - window.activateWindow() - window.showNormal() def get_tool_by_name(self, tool_name, parent=None, *args, **kwargs): """Show tool by it's name.