From b170fe1a6f2314c149663df563f8305e5998fff8 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 4 Nov 2019 19:23:29 +0100 Subject: [PATCH 1/2] fix(global): data.path without hashes - removing hashes from data.path --- pype/plugins/global/publish/integrate_new.py | 25 +++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pype/plugins/global/publish/integrate_new.py b/pype/plugins/global/publish/integrate_new.py index a82ebdd5a6..4ef2616cda 100644 --- a/pype/plugins/global/publish/integrate_new.py +++ b/pype/plugins/global/publish/integrate_new.py @@ -314,8 +314,14 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): index_frame_start = int(repre.get("frameStart")) dst_padding_exp = src_padding_exp + dst_start_frame = None for i in src_collection.indexes: src_padding = src_padding_exp % i + + # for adding first frame into db + if not dst_start_frame: + dst_start_frame = src_padding + src_file_name = "{0}{1}{2}".format( src_head, src_padding, src_tail) @@ -326,19 +332,22 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): dst_padding = dst_padding_exp % index_frame_start index_frame_start += 1 - dst = "{0}{1}{2}".format(dst_head, dst_padding, dst_tail).replace("..", ".") + dst = "{0}{1}{2}".format( + dst_head, + dst_padding, + dst_tail).replace("..", ".") + self.log.debug("destination: `{}`".format(dst)) src = os.path.join(stagingdir, src_file_name) + self.log.debug("source: {}".format(src)) instance.data["transfers"].append([src, dst]) - repre['published_path'] = "{0}{1}{2}".format(dst_head, - dst_padding_exp, - dst_tail) - # for imagesequence version data - hashes = '#' * len(dst_padding) - dst = os.path.normpath("{0}{1}{2}".format( - dst_head, hashes, dst_tail)) + dst = "{0}{1}{2}".format( + dst_head, + dst_start_frame, + dst_tail).replace("..", ".") + repre['published_path'] = dst else: # Single file From a188d37d624009ad018c29101c76734848afbee6 Mon Sep 17 00:00:00 2001 From: Jakub Jezek Date: Mon, 4 Nov 2019 19:37:33 +0100 Subject: [PATCH 2/2] fix(gloabal): validator didn't work properly --- .../global/publish/validate_custom_ftrack_attributes.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pype/plugins/global/publish/validate_custom_ftrack_attributes.py b/pype/plugins/global/publish/validate_custom_ftrack_attributes.py index 0d0eb2a7f0..2386b359e4 100644 --- a/pype/plugins/global/publish/validate_custom_ftrack_attributes.py +++ b/pype/plugins/global/publish/validate_custom_ftrack_attributes.py @@ -46,7 +46,8 @@ class ValidateFtrackAttributes(pyblish.api.InstancePlugin): "Missing FTrack Task entity in context") host = pyblish.api.current_host() - to_check = context.data["presets"][host].get("ftrack_attributes") + to_check = context.data["presets"].get( + host, {}).get("ftrack_attributes") if not to_check: self.log.warning("ftrack_attributes preset not found") return