From bb5d48eae1b207cdff19c774636ddc13fdcf5f25 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Thu, 7 Dec 2023 16:48:43 +0100 Subject: [PATCH] Refactor code to skip instance creation for new assets - Removed the check for `newAssetPublishing` in `CollectResourcesPath.process()` - This change allows instances to be processed even if they are creating new assets --- openpype/plugins/publish/collect_resources_path.py | 5 ----- openpype/plugins/publish/extract_otio_audio_tracks.py | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/openpype/plugins/publish/collect_resources_path.py b/openpype/plugins/publish/collect_resources_path.py index a7f12bdfdb..0f29fec054 100644 --- a/openpype/plugins/publish/collect_resources_path.py +++ b/openpype/plugins/publish/collect_resources_path.py @@ -68,11 +68,6 @@ class CollectResourcesPath(pyblish.api.InstancePlugin): ] def process(self, instance): - # editorial would fail since they might not be in database yet - new_asset_publishing = instance.data.get("newAssetPublishing") - if new_asset_publishing: - self.log.debug("Instance is creating new asset. Skipping.") - return anatomy = instance.context.data["anatomy"] diff --git a/openpype/plugins/publish/extract_otio_audio_tracks.py b/openpype/plugins/publish/extract_otio_audio_tracks.py index 4b73321f02..d5ab1d6032 100644 --- a/openpype/plugins/publish/extract_otio_audio_tracks.py +++ b/openpype/plugins/publish/extract_otio_audio_tracks.py @@ -319,6 +319,7 @@ class ExtractOtioAudioTracks(pyblish.api.ContextPlugin): Returns: str: temp fpath """ + name = name.replace("/", "_") return os.path.normpath( tempfile.mktemp( prefix="pyblish_tmp_{}_".format(name),