nuke: deadline not adding explicit farm representation to expected files

This commit is contained in:
Jakub Jezek 2023-11-21 17:26:58 +01:00
parent 51992419e7
commit 0f6cecb29a
No known key found for this signature in database
GPG key ID: 730D7C02726179A7

View file

@ -470,6 +470,22 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin,
dirname = os.path.dirname(path)
file = os.path.basename(path)
# since some files might be already tagged as publish_on_farm
# we need to avoid adding them to expected files since those would be
# duplicated into metadata.json file
representations = instance.data.get("representations", [])
if representations:
# check if file is not in representations with publish_on_farm tag
for repre in representations:
# is file in representations files?
if file not in repre.get("files", []):
continue
# is publish_on_farm tag set to False?
if "publish_on_farm" in repre.get("tags", []):
self.log.debug(
"Skipping expected file: {}".format(path))
return
if "#" in file:
pparts = file.split("#")
padding = "%0{}d".format(len(pparts) - 1)