added new creator class for setdress

This commit is contained in:
aardschok 2017-10-09 14:46:47 +02:00
parent bf700d2b3c
commit f73f254181
5 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,9 @@
import avalon.maya
class CreateSetDress(avalon.maya.Creator):
"""THe animated objects in the scene"""
name = "setdress"
label = "Set Dress"
family = "colorbleed.setdress"

View file

@ -0,0 +1,32 @@
from avalon import api
class SetDressAlembicLoader(api.Loader):
"""Load the setdress as alembic"""
families = ["colorbleed.setdress"]
representations = ["abc"]
label = "Load Alembic"
order = -10
icon = "code-fork"
color = "orange"
def process(self, name, namespace, context, data):
import maya.cmds as cmds
from avalon import maya
namespace = maya.unique_namespace("{}_".format(name),
format="%03d",
suffix="_abc")
with maya.maintained_selection():
nodes = cmds.file(self.fname,
namespace=namespace,
reference=True,
returnNewNodes=True,
groupReference=True,
groupName="{}:{}".format(namespace, name))
self[:] = nodes