Remove redundant OrderedDict() since it's implemented in avalon core

This commit is contained in:
Roy Nieterau 2018-10-18 22:37:52 +02:00
parent d5a8bafeae
commit 3224208a6b
5 changed files with 12 additions and 33 deletions

View file

@ -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
self.data["visibleOnly"] = False

View file

@ -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

View file

@ -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()

View file

@ -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):

View file

@ -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)