From 3224208a6ba931e451db8d3c9e574d8dae41daec Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Thu, 18 Oct 2018 22:37:52 +0200 Subject: [PATCH] Remove redundant OrderedDict() since it's implemented in avalon core --- .../plugins/maya/create/colorbleed_animation.py | 13 ++++--------- colorbleed/plugins/maya/create/colorbleed_camera.py | 7 ++----- colorbleed/plugins/maya/create/colorbleed_look.py | 6 +----- .../plugins/maya/create/colorbleed_renderglobals.py | 6 +----- .../plugins/maya/create/colorbleed_vrayproxy.py | 13 ++++--------- 5 files changed, 12 insertions(+), 33 deletions(-) diff --git a/colorbleed/plugins/maya/create/colorbleed_animation.py b/colorbleed/plugins/maya/create/colorbleed_animation.py index b559e15ec9..6d87cb5078 100644 --- a/colorbleed/plugins/maya/create/colorbleed_animation.py +++ b/colorbleed/plugins/maya/create/colorbleed_animation.py @@ -1,5 +1,3 @@ -from collections import OrderedDict - import avalon.maya from colorbleed.maya import lib @@ -16,21 +14,18 @@ class CreateAnimation(avalon.maya.Creator): super(CreateAnimation, self).__init__(*args, **kwargs) # create an ordered dict with the existing data first - data = OrderedDict(**self.data) # get basic animation data : start / end / handles / steps for key, value in lib.collect_animation_data().items(): - data[key] = value + self.data[key] = value # Write vertex colors with the geometry. - data["writeColorSets"] = False + self.data["writeColorSets"] = False # Include only renderable visible shapes. # Skips locators and empty transforms - data["renderableOnly"] = False + self.data["renderableOnly"] = False # Include only nodes that are visible at least once during the # frame range. - data["visibleOnly"] = False - - self.data = data \ No newline at end of file + self.data["visibleOnly"] = False diff --git a/colorbleed/plugins/maya/create/colorbleed_camera.py b/colorbleed/plugins/maya/create/colorbleed_camera.py index 94c1a82225..f38d8e0d43 100644 --- a/colorbleed/plugins/maya/create/colorbleed_camera.py +++ b/colorbleed/plugins/maya/create/colorbleed_camera.py @@ -1,4 +1,3 @@ -from collections import OrderedDict import avalon.maya from colorbleed.maya import lib @@ -15,13 +14,11 @@ class CreateCamera(avalon.maya.Creator): super(CreateCamera, self).__init__(*args, **kwargs) # get basic animation data : start / end / handles / steps - data = OrderedDict(**self.data) animation_data = lib.collect_animation_data() for key, value in animation_data.items(): - data[key] = value + self.data[key] = value # Bake to world space by default, when this is False it will also # include the parent hierarchy in the baked results - data['bakeToWorldSpace'] = True + self.data['bakeToWorldSpace'] = True - self.data = data diff --git a/colorbleed/plugins/maya/create/colorbleed_look.py b/colorbleed/plugins/maya/create/colorbleed_look.py index d5c0255360..011fdd4f92 100644 --- a/colorbleed/plugins/maya/create/colorbleed_look.py +++ b/colorbleed/plugins/maya/create/colorbleed_look.py @@ -1,4 +1,3 @@ -from collections import OrderedDict import avalon.maya from colorbleed.maya import lib @@ -14,7 +13,4 @@ class CreateLook(avalon.maya.Creator): def __init__(self, *args, **kwargs): super(CreateLook, self).__init__(*args, **kwargs) - data = OrderedDict(**self.data) - data["renderlayer"] = lib.get_current_renderlayer() - - self.data = data + self.data["renderlayer"] = lib.get_current_renderlayer() diff --git a/colorbleed/plugins/maya/create/colorbleed_renderglobals.py b/colorbleed/plugins/maya/create/colorbleed_renderglobals.py index 1d12d9fe9d..7d41c72d3a 100644 --- a/colorbleed/plugins/maya/create/colorbleed_renderglobals.py +++ b/colorbleed/plugins/maya/create/colorbleed_renderglobals.py @@ -1,5 +1,3 @@ -from collections import OrderedDict - from maya import cmds from avalon.vendor import requests @@ -34,8 +32,7 @@ class CreateRenderGlobals(avalon.maya.Creator): self.data.pop("asset", None) self.data.pop("active", None) - data = OrderedDict(**self.data) - + data = self.data data["suspendPublishJob"] = False data["extendFrames"] = False data["overrideExistingFrame"] = True @@ -49,7 +46,6 @@ class CreateRenderGlobals(avalon.maya.Creator): # We add a string "-" to allow the user to not set any secondary pools data["secondaryPool"] = ["-"] + pools - self.data = data self.options = {"useSelection": False} # Force no content def process(self): diff --git a/colorbleed/plugins/maya/create/colorbleed_vrayproxy.py b/colorbleed/plugins/maya/create/colorbleed_vrayproxy.py index 85e9e71b6d..e866a1d092 100644 --- a/colorbleed/plugins/maya/create/colorbleed_vrayproxy.py +++ b/colorbleed/plugins/maya/create/colorbleed_vrayproxy.py @@ -1,5 +1,3 @@ -from collections import OrderedDict - import avalon.maya @@ -14,13 +12,10 @@ class CreateVrayProxy(avalon.maya.Creator): def __init__(self, *args, **kwargs): super(CreateVrayProxy, self).__init__(*args, **kwargs) - data = OrderedDict(**self.data) - - data["animation"] = False - data["startFrame"] = 1 - data["endFrame"] = 1 + self.data["animation"] = False + self.data["startFrame"] = 1 + self.data["endFrame"] = 1 # Write vertex colors - data["vertexColors"] = False + self.data["vertexColors"] = False - self.data.update(data)