From 0e3034a18a8860194f7f9a9700bf37d987839510 Mon Sep 17 00:00:00 2001 From: wikoreman Date: Thu, 6 Sep 2018 15:09:31 +0200 Subject: [PATCH 1/2] added steps attribute --- colorbleed/plugins/maya/create/colorbleed_yeti_cache.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/colorbleed/plugins/maya/create/colorbleed_yeti_cache.py b/colorbleed/plugins/maya/create/colorbleed_yeti_cache.py index 1c390db4ba..59d37429bd 100644 --- a/colorbleed/plugins/maya/create/colorbleed_yeti_cache.py +++ b/colorbleed/plugins/maya/create/colorbleed_yeti_cache.py @@ -15,11 +15,12 @@ class CreateYetiCache(avalon.maya.Creator): def __init__(self, *args, **kwargs): super(CreateYetiCache, self).__init__(*args, **kwargs) - data = OrderedDict(self.data) + data = OrderedDict(**self.data) data["peroll"] = 0 anim_data = lib.collect_animation_data() data.update({"startFrame": anim_data["startFrame"], - "endFrame": anim_data["endFrame"]}) + "endFrame": anim_data["endFrame"], + "samples": 3}) self.data = data From 39ee722b6c3ff26f7f60c7ab025001bf8adff24c Mon Sep 17 00:00:00 2001 From: wikoreman Date: Thu, 6 Sep 2018 15:10:02 +0200 Subject: [PATCH 2/2] added support for samples --- colorbleed/plugins/maya/publish/extract_yeti_cache.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/colorbleed/plugins/maya/publish/extract_yeti_cache.py b/colorbleed/plugins/maya/publish/extract_yeti_cache.py index 479bf52813..481586374a 100644 --- a/colorbleed/plugins/maya/publish/extract_yeti_cache.py +++ b/colorbleed/plugins/maya/publish/extract_yeti_cache.py @@ -37,6 +37,13 @@ class ExtractYetiCache(colorbleed.api.Extractor): if preroll > 0: start_frame -= preroll + kwargs = {} + samples = instance.data.get("samples", 0) + if samples == 0: + kwargs.update({"sampleTimes": "0.0 1.0"}) + else: + kwargs.update({"samples": samples}) + self.log.info("Writing out cache") # Start writing the files for snap shot # will be replace by the Yeti node name @@ -44,9 +51,9 @@ class ExtractYetiCache(colorbleed.api.Extractor): cmds.pgYetiCommand(yeti_nodes, writeCache=path, range=(start_frame, end_frame), - sampleTimes="0.0 1.0", updateViewport=False, - generatePreview=False) + generatePreview=False, + **kwargs) cache_files = [x for x in os.listdir(dirname) if x.endswith(".fur")]