From 8731c4f507bd6ff4df6e1e8e42f664a6d427f6a2 Mon Sep 17 00:00:00 2001 From: aardschok Date: Fri, 4 Aug 2017 17:40:44 +0200 Subject: [PATCH] namespace resolved, fixed name in creator --- colorbleed/plugins/maya/create/colorbleed_animation.py | 5 ++--- colorbleed/plugins/maya/load/load_animation.py | 7 +------ colorbleed/plugins/maya/load/load_rig.py | 3 +-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/colorbleed/plugins/maya/create/colorbleed_animation.py b/colorbleed/plugins/maya/create/colorbleed_animation.py index 1703cfe59f..68f7ec2744 100644 --- a/colorbleed/plugins/maya/create/colorbleed_animation.py +++ b/colorbleed/plugins/maya/create/colorbleed_animation.py @@ -9,7 +9,7 @@ class CreateAnimation(avalon.maya.Creator): name = "animationDefault" label = "Animation" - family = "colorbleed.anim" + family = "colorbleed.animation" def __init__(self, *args, **kwargs): super(CreateAnimation, self).__init__(*args, **kwargs) @@ -32,5 +32,4 @@ class CreateAnimation(avalon.maya.Creator): # frame range. data["visibleOnly"] = False - self.data = data - self.options["abbreviation"] = self.abbreviation \ No newline at end of file + self.data = data \ No newline at end of file diff --git a/colorbleed/plugins/maya/load/load_animation.py b/colorbleed/plugins/maya/load/load_animation.py index e48b29ef62..8f05b7ac7b 100644 --- a/colorbleed/plugins/maya/load/load_animation.py +++ b/colorbleed/plugins/maya/load/load_animation.py @@ -23,10 +23,7 @@ class AbcLoader(api.Loader): # Create unique namespace for the cameras # Get name from asset being loaded - assetname = "{}_".format(name.split("_")[0]) - namespace = maya.unique_namespace(assetname, - format="%03d", - suffix="_abc") + namespace = "{name}_abc".format(name=name) nodes = cmds.file(self.fname, namespace=namespace, sharedReferenceFile=False, @@ -51,8 +48,6 @@ class CurvesLoader(api.Loader): icon = "question" def process(self, name, namespace, context, data): - from maya import cmds - from avalon import maya cmds.loadPlugin("atomImportExport.mll", quiet=True) diff --git a/colorbleed/plugins/maya/load/load_rig.py b/colorbleed/plugins/maya/load/load_rig.py index 0dffefd84b..f314468d2c 100644 --- a/colorbleed/plugins/maya/load/load_rig.py +++ b/colorbleed/plugins/maya/load/load_rig.py @@ -22,7 +22,6 @@ class RigLoader(api.Loader): def process(self, name, namespace, context, data): - assert "_" in name, "Naming convention not followed" assetname = "{}_".format(context["asset"]["name"]) unique_namespace = maya.unique_namespace(assetname, format="%03d") nodes = cmds.file(self.fname, @@ -62,8 +61,8 @@ class RigLoader(api.Loader): else: asset = "{}".format(asset_name) + cmds.select([output, controls], noExpand=True) with maya.maintained_selection(): - cmds.select([output, controls], noExpand=True) # TODO(marcus): Hardcoding the family here, better separate this. dependencies = [context["representation"]["_id"]]