From dbe79c7741c35d165e8bd2b7d777ee6a9b0a0b99 Mon Sep 17 00:00:00 2001 From: Jana Mizikova Date: Wed, 30 Oct 2019 19:06:18 +0100 Subject: [PATCH] add frames to published representations --- pype/plugins/global/publish/integrate_new.py | 5 +++++ pype/plugins/maya/publish/extract_yeti_cache.py | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pype/plugins/global/publish/integrate_new.py b/pype/plugins/global/publish/integrate_new.py index ad7be306ca..6ace625743 100644 --- a/pype/plugins/global/publish/integrate_new.py +++ b/pype/plugins/global/publish/integrate_new.py @@ -305,6 +305,7 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): dst_tail = dst_collection.format("{tail}") index_frame_start = None + if repre.get("frameStart"): frame_start_padding = len(str( repre.get("frameEnd"))) @@ -391,6 +392,10 @@ class IntegrateAssetNew(pyblish.api.InstancePlugin): "representation": repre['ext'] } } + + if frame_start_padding: + representation['context']['frame'] = repre.get("frameStart") + self.log.debug("__ representation: {}".format(representation)) destination_list.append(dst) self.log.debug("__ destination_list: {}".format(destination_list)) diff --git a/pype/plugins/maya/publish/extract_yeti_cache.py b/pype/plugins/maya/publish/extract_yeti_cache.py index 8cb94021ed..7d85f396ae 100644 --- a/pype/plugins/maya/publish/extract_yeti_cache.py +++ b/pype/plugins/maya/publish/extract_yeti_cache.py @@ -73,7 +73,9 @@ class ExtractYetiCache(pype.api.Extractor): 'ext': 'fur', 'files': cache_files[0] if len(cache_files) == 1 else cache_files, 'stagingDir': dirname, - 'anatomy_template': 'publish' + 'anatomy_template': 'publish', + 'frameStart': int(start_frame), + 'frameEnd': int(end_frame) } )