From bc277d5ad27a6e470e4aa0b8565a2ecd2497d666 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 16 Jul 2019 18:49:45 +0200 Subject: [PATCH 1/5] fix(nks): distributing handles didnt respect individual clip with tag, renaming collect_tag_types to *_main --- pype/plugins/nukestudio/publish/collect_handles.py | 2 +- .../publish/{collect_tag_types.py => collect_tag_main.py} | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) rename pype/plugins/nukestudio/publish/{collect_tag_types.py => collect_tag_main.py} (86%) diff --git a/pype/plugins/nukestudio/publish/collect_handles.py b/pype/plugins/nukestudio/publish/collect_handles.py index 104a60d02c..03652989b8 100644 --- a/pype/plugins/nukestudio/publish/collect_handles.py +++ b/pype/plugins/nukestudio/publish/collect_handles.py @@ -41,7 +41,7 @@ class CollectClipHandles(api.ContextPlugin): }) for instance in filtered_instances: - if not instance.data.get("main") or not instance.data.get("handleTag"): + if not instance.data.get("main") and not instance.data.get("handleTag"): self.log.debug("Synchronize handles on: `{}`".format( instance.data["name"])) name = instance.data["asset"] diff --git a/pype/plugins/nukestudio/publish/collect_tag_types.py b/pype/plugins/nukestudio/publish/collect_tag_main.py similarity index 86% rename from pype/plugins/nukestudio/publish/collect_tag_types.py rename to pype/plugins/nukestudio/publish/collect_tag_main.py index fad9e54735..36d9b95554 100644 --- a/pype/plugins/nukestudio/publish/collect_tag_types.py +++ b/pype/plugins/nukestudio/publish/collect_tag_main.py @@ -5,7 +5,7 @@ class CollectClipTagTypes(api.InstancePlugin): """Collect Types from Tags of selected track items.""" order = api.CollectorOrder + 0.012 - label = "Collect Plate Type from Tag" + label = "Collect main flag" hosts = ["nukestudio"] families = ['clip'] @@ -25,7 +25,8 @@ class CollectClipTagTypes(api.InstancePlugin): t_subset.capitalize()) if "plateMain" in subset_name: - instance.data["main"] = True + if not instance.data.get("main"): + instance.data["main"] = True self.log.info("`plateMain` found in instance.name: `{}`".format( instance.data["name"])) return From b07bf3d20f4e5340f90132f1c12f96b70cefcd1c Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Tue, 16 Jul 2019 18:50:35 +0200 Subject: [PATCH 2/5] fix(global): debug print after loop --- pype/plugins/global/publish/integrate_new.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pype/plugins/global/publish/integrate_new.py b/pype/plugins/global/publish/integrate_new.py index e70657eef9..1b6c203343 100644 --- a/pype/plugins/global/publish/integrate_new.py +++ b/pype/plugins/global/publish/integrate_new.py @@ -286,8 +286,9 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): os.path.normpath( anatomy_filled[template_name]["path"]) ) - self.log.debug( - "test_dest_files: {}".format(str(test_dest_files))) + + self.log.debug( + "test_dest_files: {}".format(str(test_dest_files))) dst_collections, remainder = clique.assemble(test_dest_files) dst_collection = dst_collections[0] From 37a4a4af3d6657e21072ba781d412f109eace60b Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Wed, 17 Jul 2019 10:21:39 +0200 Subject: [PATCH 3/5] fix(pype): supporting search for version with `.v001` --- pype/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/templates.py b/pype/templates.py index 7d12801a00..0bc5fc9d99 100644 --- a/pype/templates.py +++ b/pype/templates.py @@ -85,7 +85,7 @@ def get_version_from_path(file): v: version number in string ('001') """ - pattern = re.compile(r"_v([0-9]*)") + pattern = re.compile(r"[\.\_]v([0-9]*)") try: v = pattern.findall(file)[0] return v From 460abbd74e6fa75bb29a6c67386b8e829cd03832 Mon Sep 17 00:00:00 2001 From: jezschaj Date: Wed, 17 Jul 2019 11:34:08 +0200 Subject: [PATCH 4/5] fix(nuke): get version with dot --- pype/templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/templates.py b/pype/templates.py index 7d12801a00..596bf8d661 100644 --- a/pype/templates.py +++ b/pype/templates.py @@ -85,7 +85,7 @@ def get_version_from_path(file): v: version number in string ('001') """ - pattern = re.compile(r"_v([0-9]*)") + pattern = re.compile(r"[\._]v([0-9]*)") try: v = pattern.findall(file)[0] return v From 615afe938267ccc9ac263b2650cc9902e9451a59 Mon Sep 17 00:00:00 2001 From: jezschaj Date: Wed, 17 Jul 2019 14:44:23 +0200 Subject: [PATCH 5/5] fix(glob): burnin and review didn't work properly --- pype/plugins/global/publish/extract_burnin.py | 5 ++++- pype/plugins/global/publish/extract_review.py | 12 ++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pype/plugins/global/publish/extract_burnin.py b/pype/plugins/global/publish/extract_burnin.py index b2956e330e..425db087d3 100644 --- a/pype/plugins/global/publish/extract_burnin.py +++ b/pype/plugins/global/publish/extract_burnin.py @@ -62,13 +62,16 @@ class ExtractBurnin(pype.api.Extractor): "scripts", "otio_burnin.py") - self.log.debug("__ scriptpath: {}".format(scriptpath)) + self.log.debug("Burnin scriptpath: {}".format(scriptpath)) try: p = subprocess.Popen( [os.getenv("PYPE_PYTHON_EXE"), scriptpath, json_data] ) p.wait() + if not os.path.isfile(full_burnin_path): + self.log.error( + "Burnin file wasn't created succesfully") except Exception as e: raise RuntimeError("Burnin script didn't work: `{}`".format(e)) diff --git a/pype/plugins/global/publish/extract_review.py b/pype/plugins/global/publish/extract_review.py index af6d59d798..98013c518a 100644 --- a/pype/plugins/global/publish/extract_review.py +++ b/pype/plugins/global/publish/extract_review.py @@ -48,6 +48,10 @@ class ExtractReview(pyblish.api.InstancePlugin): staging_dir = repre["stagingDir"] for name, profile in output_profiles.items(): + ext = profile.get("ext", None) + if not ext: + ext = "mov" + self.log.warning("`ext` attribute not in output profile. Setting to default ext: `mov`") if "mov" not in repre['ext']: # get output presets and loop them collections, remainder = clique.assemble( @@ -66,9 +70,9 @@ class ExtractReview(pyblish.api.InstancePlugin): staging_dir, repre["files"]) filename = repre["files"].split(".")[0] - mov_file = filename + "_{0}.{1}".format(name, "mov") + repr_file = filename + "_{0}.{1}".format(name, ext) - full_output_path = os.path.join(staging_dir, mov_file) + full_output_path = os.path.join(staging_dir, repr_file) self.log.info("input {}".format(full_input_path)) self.log.info("output {}".format(full_output_path)) @@ -130,8 +134,8 @@ class ExtractReview(pyblish.api.InstancePlugin): # create representation data repre_new.update({ 'name': name, - 'ext': 'mov', - 'files': mov_file, + 'ext': ext, + 'files': repr_file, "tags": new_tags, "outputName": name })