From 5da5e1201419b9fbce30ea0261137df868f88f95 Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 24 Jul 2019 23:25:14 +0100 Subject: [PATCH 1/7] Start/End frame can be floats. Enforce integer. --- pype/plugins/nuke/load/load_sequence.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pype/plugins/nuke/load/load_sequence.py b/pype/plugins/nuke/load/load_sequence.py index 9dd83de064..c5d8513146 100644 --- a/pype/plugins/nuke/load/load_sequence.py +++ b/pype/plugins/nuke/load/load_sequence.py @@ -130,10 +130,10 @@ class LoadSequence(api.Loader): r["colorspace"].setValue(str(colorspace)) loader_shift(r, first, relative=True) - r["origfirst"].setValue(first) - r["first"].setValue(first) - r["origlast"].setValue(last) - r["last"].setValue(last) + r["origfirst"].setValue(int(first)) + r["first"].setValue(int(first)) + r["origlast"].setValue(int(last)) + r["last"].setValue(int(last)) # add additional metadata from the version to imprint to Avalon knob add_keys = ["startFrame", "endFrame", "handles", From 2a174ef69d8c2d32bb14db12eb27ec1d50e32f2c Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 24 Jul 2019 23:25:52 +0100 Subject: [PATCH 2/7] Handles can be non-existent, in which case they are 0. --- pype/plugins/nuke/load/load_sequence.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pype/plugins/nuke/load/load_sequence.py b/pype/plugins/nuke/load/load_sequence.py index c5d8513146..fd733f7c87 100644 --- a/pype/plugins/nuke/load/load_sequence.py +++ b/pype/plugins/nuke/load/load_sequence.py @@ -94,9 +94,9 @@ class LoadSequence(api.Loader): first = version_data.get("startFrame", None) last = version_data.get("endFrame", None) - handles = version_data.get("handles", None) - handle_start = version_data.get("handleStart", None) - handle_end = version_data.get("handleEnd", None) + handles = version_data.get("handles", 0) + handle_start = version_data.get("handleStart", 0) + handle_end = version_data.get("handleEnd", 0) # fix handle start and end if none are available if not handle_start and not handle_end: From 61d78192a4a92c3ca842cb2e7fb92e981bb67f5b Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 24 Jul 2019 23:29:16 +0100 Subject: [PATCH 3/7] Submit which write node to render on Deadline. --- pype/plugins/nuke/publish/submit_nuke_deadline.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pype/plugins/nuke/publish/submit_nuke_deadline.py b/pype/plugins/nuke/publish/submit_nuke_deadline.py index 3d854f66e9..fb5d0fea75 100644 --- a/pype/plugins/nuke/publish/submit_nuke_deadline.py +++ b/pype/plugins/nuke/publish/submit_nuke_deadline.py @@ -100,6 +100,9 @@ class NukeSubmitDeadline(pyblish.api.InstancePlugin): # Resolve relative references "ProjectPath": workspace, + + # Only the specific write node is rendered. + "WriteNode": instance[0].name() }, # Mandatory for Deadline, may be empty From 460c601e1a64e15db4581e8110b0fb06172daa8a Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 24 Jul 2019 23:36:12 +0100 Subject: [PATCH 4/7] Padding can get confused when there are other files present. Validate against source collection. --- pype/plugins/global/publish/integrate_new.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pype/plugins/global/publish/integrate_new.py b/pype/plugins/global/publish/integrate_new.py index 2d04c3ec1a..0d077ca65e 100644 --- a/pype/plugins/global/publish/integrate_new.py +++ b/pype/plugins/global/publish/integrate_new.py @@ -276,9 +276,11 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): src_head = src_collection.format("{head}") src_tail = src_collection.format("{tail}") - # fix dst_padding - padd_len = len(files[0].replace(src_head, "").replace(src_tail, "")) + valid_files = [x for x in files if src_collection.match(x)] + padd_len = len( + valid_files[0].replace(src_head, "").replace(src_tail, "") + ) src_padding_exp = "%0{}d".format(padd_len) test_dest_files = list() From 5cf11dd64aab79790c4a0bec6df5e55387dcfb1c Mon Sep 17 00:00:00 2001 From: Toke Jepsen Date: Wed, 24 Jul 2019 23:38:34 +0100 Subject: [PATCH 5/7] Log output from ffmpeg process. --- pype/plugins/global/publish/extract_review.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pype/plugins/global/publish/extract_review.py b/pype/plugins/global/publish/extract_review.py index 3a764b19c3..1b66b4e9d2 100644 --- a/pype/plugins/global/publish/extract_review.py +++ b/pype/plugins/global/publish/extract_review.py @@ -136,12 +136,21 @@ class ExtractReview(pyblish.api.InstancePlugin): # run subprocess self.log.debug("{}".format(subprcs_cmd)) - sub_proc = subprocess.Popen(subprcs_cmd) - sub_proc.wait() + sub_proc = subprocess.Popen( + subprcs_cmd, + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + stdin=subprocess.PIPE, + cwd=os.path.dirname(output_args[-1]) + ) + + output = sub_proc.communicate()[0] if not os.path.isfile(full_output_path): - raise FileExistsError( - "Quicktime wasn't created succesfully") + raise ValueError( + "Quicktime wasn't created succesfully: " + "{}".format(output) + ) # create representation data repre_new.update({ From cffd0c498c92ef0fc00782304bdf29fdf084a7f4 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 26 Jul 2019 11:03:55 +0200 Subject: [PATCH 6/7] (hotfix) event sync to avalon wont crash if 'keys' key is in entity and is set to None --- pype/ftrack/events/event_sync_to_avalon.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pype/ftrack/events/event_sync_to_avalon.py b/pype/ftrack/events/event_sync_to_avalon.py index f6b2b48a1f..e647d9f940 100644 --- a/pype/ftrack/events/event_sync_to_avalon.py +++ b/pype/ftrack/events/event_sync_to_avalon.py @@ -16,7 +16,7 @@ class Sync_to_Avalon(BaseEvent): # If mongo_id textfield has changed: RETURN! # - infinite loop for ent in event['data']['entities']: - if 'keys' in ent: + if ent.get('keys') is not None: if ca_mongoid in ent['keys']: return From eea84c9e7a1b0a055dbd8689b91c0dd31b5c0e5b Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 26 Jul 2019 11:05:37 +0200 Subject: [PATCH 7/7] (hotfix) missing application config toml file is more specifically logged --- pype/ftrack/lib/avalon_sync.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/pype/ftrack/lib/avalon_sync.py b/pype/ftrack/lib/avalon_sync.py index 4eaf28eae4..94de0172af 100644 --- a/pype/ftrack/lib/avalon_sync.py +++ b/pype/ftrack/lib/avalon_sync.py @@ -507,11 +507,17 @@ def get_project_apps(entity): apps = [] for app in entity['custom_attributes']['applications']: try: - app_config = {} - app_config['name'] = app - app_config['label'] = toml.load(avalon.lib.which_app(app))['label'] + toml_path = avalon.lib.which_app(app) + if not toml_path: + log.warning(( + 'Missing config file for application "{}"' + ).format(app)) + continue - apps.append(app_config) + apps.append({ + 'name': app, + 'label': toml.load(toml_path)['label'] + }) except Exception as e: log.warning('Error with application {0} - {1}'.format(app, e))