From b3c693fc5a299ed5602490eb0d857c80f61e0b02 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 29 Oct 2019 10:47:02 +0100 Subject: [PATCH 1/3] removed delete tag from plates when collecting --- pype/plugins/standalonepublisher/publish/collect_context.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/plugins/standalonepublisher/publish/collect_context.py b/pype/plugins/standalonepublisher/publish/collect_context.py index 0a41962748..43e2350be4 100644 --- a/pype/plugins/standalonepublisher/publish/collect_context.py +++ b/pype/plugins/standalonepublisher/publish/collect_context.py @@ -109,7 +109,7 @@ class CollectContextDataSAPublish(pyblish.api.ContextPlugin): if component["preview"]: instance.data["families"].append("review") instance.data["repreProfiles"] = ["h264"] - component["tags"] = ["review", "delete"] + component["tags"] = ["review"] self.log.debug("Adding review family") instance.data["representations"].append(component) From dede49f2c62162a087ba28e55446043b6c306157 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 29 Oct 2019 10:47:28 +0100 Subject: [PATCH 2/3] extract review creates mov in temp instead of stagigng dir --- pype/plugins/standalonepublisher/publish/extract_review.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pype/plugins/standalonepublisher/publish/extract_review.py b/pype/plugins/standalonepublisher/publish/extract_review.py index 4f27c119d9..1b8573d6b1 100644 --- a/pype/plugins/standalonepublisher/publish/extract_review.py +++ b/pype/plugins/standalonepublisher/publish/extract_review.py @@ -1,4 +1,5 @@ import os +import tempfile import pyblish.api from pype.vendor import clique @@ -82,9 +83,10 @@ class ExtractReviewSP(pyblish.api.InstancePlugin): full_input_path = os.path.join(staging_dir, repre["files"]) filename = repre["files"].split(".")[0] + # prepare output file repr_file = filename + "_{0}.{1}".format(name, ext) - - full_output_path = os.path.join(staging_dir, repr_file) + out_stagigng_dir = tempfile.mkdtemp(prefix="extract_review_") + full_output_path = os.path.join(out_stagigng_dir, repr_file) self.log.info("input {}".format(full_input_path)) self.log.info("output {}".format(full_output_path)) @@ -169,6 +171,7 @@ class ExtractReviewSP(pyblish.api.InstancePlugin): "name": name, "ext": ext, "files": repr_file, + "stagingDir": out_stagigng_dir, "tags": new_tags, "outputName": name, "startFrameReview": 1, From b3dca2d0ce29baf6aa66515a5fad46bdccd3bbbd Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Tue, 29 Oct 2019 15:12:37 +0100 Subject: [PATCH 3/3] fixed ftrack integration --- .../standalonepublisher/publish/extract_review.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pype/plugins/standalonepublisher/publish/extract_review.py b/pype/plugins/standalonepublisher/publish/extract_review.py index 1b8573d6b1..fbc14785a4 100644 --- a/pype/plugins/standalonepublisher/publish/extract_review.py +++ b/pype/plugins/standalonepublisher/publish/extract_review.py @@ -177,13 +177,19 @@ class ExtractReviewSP(pyblish.api.InstancePlugin): "startFrameReview": 1, "endFrameReview": video_len }) - if repre_new.get("preview"): - repre_new.pop("preview") + # cleanup thumbnail from new repre if repre_new.get("thumbnail"): repre_new.pop("thumbnail") + if "thumbnail" in repre_new["tags"]: + repre_new["tags"].remove("thumbnail") # adding representation self.log.debug("Adding: {}".format(repre_new)) + # cleanup repre from preview + if "preview" in repre: + repre.pop("preview") + if "preview" in repre["tags"]: + repre["tags"].remove("preview") new_repres.append(repre_new) for repre in instance.data["representations"]: