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
This commit is contained in:
Jakub Jezek 2023-12-07 16:48:43 +01:00
parent e64f030a08
commit bb5d48eae1
No known key found for this signature in database
GPG key ID: 730D7C02726179A7
2 changed files with 1 additions and 5 deletions

View file

@ -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"]

View file

@ -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),