mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
namespace resolved, fixed name in creator
This commit is contained in:
parent
ac6b2c271e
commit
8731c4f507
3 changed files with 4 additions and 11 deletions
|
|
@ -9,7 +9,7 @@ class CreateAnimation(avalon.maya.Creator):
|
||||||
|
|
||||||
name = "animationDefault"
|
name = "animationDefault"
|
||||||
label = "Animation"
|
label = "Animation"
|
||||||
family = "colorbleed.anim"
|
family = "colorbleed.animation"
|
||||||
|
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
super(CreateAnimation, self).__init__(*args, **kwargs)
|
super(CreateAnimation, self).__init__(*args, **kwargs)
|
||||||
|
|
@ -32,5 +32,4 @@ class CreateAnimation(avalon.maya.Creator):
|
||||||
# frame range.
|
# frame range.
|
||||||
data["visibleOnly"] = False
|
data["visibleOnly"] = False
|
||||||
|
|
||||||
self.data = data
|
self.data = data
|
||||||
self.options["abbreviation"] = self.abbreviation
|
|
||||||
|
|
@ -23,10 +23,7 @@ class AbcLoader(api.Loader):
|
||||||
# Create unique namespace for the cameras
|
# Create unique namespace for the cameras
|
||||||
|
|
||||||
# Get name from asset being loaded
|
# Get name from asset being loaded
|
||||||
assetname = "{}_".format(name.split("_")[0])
|
namespace = "{name}_abc".format(name=name)
|
||||||
namespace = maya.unique_namespace(assetname,
|
|
||||||
format="%03d",
|
|
||||||
suffix="_abc")
|
|
||||||
nodes = cmds.file(self.fname,
|
nodes = cmds.file(self.fname,
|
||||||
namespace=namespace,
|
namespace=namespace,
|
||||||
sharedReferenceFile=False,
|
sharedReferenceFile=False,
|
||||||
|
|
@ -51,8 +48,6 @@ class CurvesLoader(api.Loader):
|
||||||
icon = "question"
|
icon = "question"
|
||||||
|
|
||||||
def process(self, name, namespace, context, data):
|
def process(self, name, namespace, context, data):
|
||||||
from maya import cmds
|
|
||||||
from avalon import maya
|
|
||||||
|
|
||||||
cmds.loadPlugin("atomImportExport.mll", quiet=True)
|
cmds.loadPlugin("atomImportExport.mll", quiet=True)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ class RigLoader(api.Loader):
|
||||||
|
|
||||||
def process(self, name, namespace, context, data):
|
def process(self, name, namespace, context, data):
|
||||||
|
|
||||||
assert "_" in name, "Naming convention not followed"
|
|
||||||
assetname = "{}_".format(context["asset"]["name"])
|
assetname = "{}_".format(context["asset"]["name"])
|
||||||
unique_namespace = maya.unique_namespace(assetname, format="%03d")
|
unique_namespace = maya.unique_namespace(assetname, format="%03d")
|
||||||
nodes = cmds.file(self.fname,
|
nodes = cmds.file(self.fname,
|
||||||
|
|
@ -62,8 +61,8 @@ class RigLoader(api.Loader):
|
||||||
else:
|
else:
|
||||||
asset = "{}".format(asset_name)
|
asset = "{}".format(asset_name)
|
||||||
|
|
||||||
|
cmds.select([output, controls], noExpand=True)
|
||||||
with maya.maintained_selection():
|
with maya.maintained_selection():
|
||||||
cmds.select([output, controls], noExpand=True)
|
|
||||||
|
|
||||||
# TODO(marcus): Hardcoding the family here, better separate this.
|
# TODO(marcus): Hardcoding the family here, better separate this.
|
||||||
dependencies = [context["representation"]["_id"]]
|
dependencies = [context["representation"]["_id"]]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue