From 4ce33fda6e1ff5fae4e328a4ae751cdd5e459d75 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Wed, 28 Jun 2017 18:15:21 +0200 Subject: [PATCH] Fix pointcache creator and refactor lib.OrderedDict import --- colorbleed/plugins/maya/create/colorbleed_animation.py | 3 ++- colorbleed/plugins/maya/create/colorbleed_camera.py | 3 ++- colorbleed/plugins/maya/create/colorbleed_layout.py | 3 ++- colorbleed/plugins/maya/create/colorbleed_look.py | 3 ++- colorbleed/plugins/maya/create/colorbleed_pointcache.py | 4 +++- colorbleed/plugins/maya/create/colorbleed_yetifur.py | 3 ++- 6 files changed, 13 insertions(+), 6 deletions(-) diff --git a/colorbleed/plugins/maya/create/colorbleed_animation.py b/colorbleed/plugins/maya/create/colorbleed_animation.py index d7a008ec10..2030042a01 100644 --- a/colorbleed/plugins/maya/create/colorbleed_animation.py +++ b/colorbleed/plugins/maya/create/colorbleed_animation.py @@ -1,3 +1,4 @@ +from collections import OrderedDict import avalon.maya from colorbleed.maya import lib @@ -13,7 +14,7 @@ class CreateAnimation(avalon.maya.Creator): super(CreateAnimation, self).__init__(*args, **kwargs) # create an ordered dict with the existing data first - data = lib.OrderedDict(**self.data) + data = OrderedDict(**self.data) # get basic animation data : start / end / handles / steps for key, value in lib.collect_animation_data().items(): diff --git a/colorbleed/plugins/maya/create/colorbleed_camera.py b/colorbleed/plugins/maya/create/colorbleed_camera.py index 41864503d8..749945caf3 100644 --- a/colorbleed/plugins/maya/create/colorbleed_camera.py +++ b/colorbleed/plugins/maya/create/colorbleed_camera.py @@ -1,3 +1,4 @@ +from collections import OrderedDict import avalon.maya from colorbleed.maya import lib @@ -13,7 +14,7 @@ class CreateCamera(avalon.maya.Creator): super(CreateCamera, self).__init__(*args, **kwargs) # get basic animation data : start / end / handles / steps - data = lib.OrderedDict(**self.data) + data = OrderedDict(**self.data) animation_data = lib.collect_animation_data() for key, value in animation_data.items(): data[key] = value diff --git a/colorbleed/plugins/maya/create/colorbleed_layout.py b/colorbleed/plugins/maya/create/colorbleed_layout.py index 24855bc178..2731ee8542 100644 --- a/colorbleed/plugins/maya/create/colorbleed_layout.py +++ b/colorbleed/plugins/maya/create/colorbleed_layout.py @@ -1,3 +1,4 @@ +from collections import OrderedDict import avalon.maya from colorbleed.maya import lib @@ -13,7 +14,7 @@ class CreateLayout(avalon.maya.Creator): super(CreateLayout, self).__init__(*args, **kwargs) # create an ordered dict with the existing data first - data = lib.OrderedDict(**self.data) + data = OrderedDict(**self.data) # get basic animation data : start / end / handles / steps for key, value in lib.collect_animation_data().items(): diff --git a/colorbleed/plugins/maya/create/colorbleed_look.py b/colorbleed/plugins/maya/create/colorbleed_look.py index b93673b523..557647edc0 100644 --- a/colorbleed/plugins/maya/create/colorbleed_look.py +++ b/colorbleed/plugins/maya/create/colorbleed_look.py @@ -1,3 +1,4 @@ +from collections import OrderedDict import avalon.maya from colorbleed.maya import lib @@ -12,7 +13,7 @@ class CreateLook(avalon.maya.Creator): def __init__(self, *args, **kwargs): super(CreateLook, self).__init__(*args, **kwargs) - data = lib.OrderedDict(**self.data) + data = OrderedDict(**self.data) data["renderlayer"] = lib.get_current_renderlayer() self.data = data diff --git a/colorbleed/plugins/maya/create/colorbleed_pointcache.py b/colorbleed/plugins/maya/create/colorbleed_pointcache.py index fb9af66b1c..4b59d0cc59 100644 --- a/colorbleed/plugins/maya/create/colorbleed_pointcache.py +++ b/colorbleed/plugins/maya/create/colorbleed_pointcache.py @@ -15,12 +15,14 @@ class CreatePointCache(avalon.maya.Creator): def __init__(self, *args, **kwargs): super(CreatePointCache, self).__init__(*args, **kwargs) + # create an ordered dict with the existing data first + data = OrderedDict(**self.data) + # get scene values as defaults start = cmds.playbackOptions(query=True, animationStartTime=True) end = cmds.playbackOptions(query=True, animationEndTime=True) # build attributes - attributes = OrderedDict() attributes["startFrame"] = start attributes["endFrame"] = end attributes["handles"] = 1 diff --git a/colorbleed/plugins/maya/create/colorbleed_yetifur.py b/colorbleed/plugins/maya/create/colorbleed_yetifur.py index 5a4b483a30..ffd0d2c31d 100644 --- a/colorbleed/plugins/maya/create/colorbleed_yetifur.py +++ b/colorbleed/plugins/maya/create/colorbleed_yetifur.py @@ -1,3 +1,4 @@ +from collections import OrderedDict import avalon.maya from colorbleed.maya import lib @@ -13,7 +14,7 @@ class CreateYetiFur(avalon.maya.Creator): super(CreateYetiFur, self).__init__(*args, **kwargs) # get scene values as defaults - data = lib.OrderedDict(**self.data) + data = OrderedDict(**self.data) animation_data = lib.collect_animation_data() for key, value in animation_data.items(): data[key] = value