From fadf3a111a964409c722229d7d48fa08562280c1 Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Fri, 27 Jan 2023 00:46:22 +0100 Subject: [PATCH] Maya: Refactor Create Rig to new publisher --- .../hosts/maya/plugins/create/create_rig.py | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/openpype/hosts/maya/plugins/create/create_rig.py b/openpype/hosts/maya/plugins/create/create_rig.py index 8032e5fbbd..04104cb7cb 100644 --- a/openpype/hosts/maya/plugins/create/create_rig.py +++ b/openpype/hosts/maya/plugins/create/create_rig.py @@ -1,25 +1,25 @@ from maya import cmds -from openpype.hosts.maya.api import ( - lib, - plugin -) +from openpype.hosts.maya.api import plugin -class CreateRig(plugin.Creator): +class CreateRig(plugin.MayaCreator): """Artist-friendly rig with controls to direct motion""" - name = "rigDefault" + identifier = "io.openpype.creators.maya.rig" label = "Rig" family = "rig" icon = "wheelchair" - def process(self): + def create(self, subset_name, instance_data, pre_create_data): - with lib.undo_chunk(): - instance = super(CreateRig, self).process() + instance = super(CreateRig, self).create(subset_name, + instance_data, + pre_create_data) - self.log.info("Creating Rig instance set up ...") - controls = cmds.sets(name="controls_SET", empty=True) - pointcache = cmds.sets(name="out_SET", empty=True) - cmds.sets([controls, pointcache], forceElement=instance) + instance_node = instance.get("instance_node") + + self.log.info("Creating Rig instance set up ...") + controls = cmds.sets(name="controls_SET", empty=True) + pointcache = cmds.sets(name="out_SET", empty=True) + cmds.sets([controls, pointcache], forceElement=instance_node)