mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Nuke: failing multiple thumbnails integration (#5741)
* OP-7031 - fix thumbnail outputName This handles situation when ExtractReviewDataMov has multiple outputs for which are thumbnails created. This would cause an issue in integrate if thumbnail repre should be integrated. * thumbnail name the same as output name - added `delete` tag so it is not integrated - adding output preset name to thumb name if multiple bake streams - adding thumbnails to explicit cleanup paths - thumbnail file name inherited from representation name * hound * comment for py compatibility of unicode * Update openpype/hosts/nuke/plugins/publish/extract_thumbnail.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> * thumbnail path key should be `thumbnailPath` * Updates to nuke automatic test Default changed to NOT integrating thumbnail representation. * Update openpype/hosts/nuke/plugins/publish/extract_thumbnail.py Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com> * OP-7031 - updated check for thumbnail representation To allow use this plugin as 'name' might not contain only 'thumbnail' for multiple outputs. * Remove possibility of double _ * Implement possibility of multiple thumbnails This could happen if there are multiple output as in Nuke's ExtractREviewMov --------- Co-authored-by: Jakub Jezek <jakubjezek001@gmail.com> Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
parent
135f2a9e57
commit
df431b665c
3 changed files with 45 additions and 29 deletions
|
|
@ -29,13 +29,12 @@ class PreIntegrateThumbnails(pyblish.api.InstancePlugin):
|
|||
if not repres:
|
||||
return
|
||||
|
||||
thumbnail_repre = None
|
||||
thumbnail_repres = []
|
||||
for repre in repres:
|
||||
if repre["name"] == "thumbnail":
|
||||
thumbnail_repre = repre
|
||||
break
|
||||
if "thumbnail" in repre.get("tags", []):
|
||||
thumbnail_repres.append(repre)
|
||||
|
||||
if not thumbnail_repre:
|
||||
if not thumbnail_repres:
|
||||
return
|
||||
|
||||
family = instance.data["family"]
|
||||
|
|
@ -60,14 +59,15 @@ class PreIntegrateThumbnails(pyblish.api.InstancePlugin):
|
|||
if not found_profile:
|
||||
return
|
||||
|
||||
thumbnail_repre.setdefault("tags", [])
|
||||
for thumbnail_repre in thumbnail_repres:
|
||||
thumbnail_repre.setdefault("tags", [])
|
||||
|
||||
if not found_profile["integrate_thumbnail"]:
|
||||
if "delete" not in thumbnail_repre["tags"]:
|
||||
thumbnail_repre["tags"].append("delete")
|
||||
else:
|
||||
if "delete" in thumbnail_repre["tags"]:
|
||||
thumbnail_repre["tags"].remove("delete")
|
||||
if not found_profile["integrate_thumbnail"]:
|
||||
if "delete" not in thumbnail_repre["tags"]:
|
||||
thumbnail_repre["tags"].append("delete")
|
||||
else:
|
||||
if "delete" in thumbnail_repre["tags"]:
|
||||
thumbnail_repre["tags"].remove("delete")
|
||||
|
||||
self.log.debug(
|
||||
"Thumbnail repre tags {}".format(thumbnail_repre["tags"]))
|
||||
self.log.debug(
|
||||
"Thumbnail repre tags {}".format(thumbnail_repre["tags"]))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue