namespace resolved, fixed name in creator

This commit is contained in:
aardschok 2017-08-04 17:40:44 +02:00
parent ac6b2c271e
commit 8731c4f507
3 changed files with 4 additions and 11 deletions

View file

@ -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
self.data = data

View file

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

View file

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