mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 21:32:15 +01:00
PLN-25 Ensure Creator plug-ins in Maya undo in one go.
This commit is contained in:
parent
a32af24df4
commit
e8833e207e
3 changed files with 18 additions and 13 deletions
|
|
@ -1,5 +1,7 @@
|
|||
from maya import cmds
|
||||
|
||||
import colorbleed.maya.lib as lib
|
||||
|
||||
from avalon.vendor import requests
|
||||
import avalon.maya
|
||||
from avalon import api
|
||||
|
|
@ -57,6 +59,6 @@ class CreateRenderGlobals(avalon.maya.Creator):
|
|||
if exists:
|
||||
return cmds.warning("%s already exists." % exists[0])
|
||||
|
||||
super(CreateRenderGlobals, self).process()
|
||||
|
||||
cmds.setAttr("{}.machineList".format(self.name), lock=True)
|
||||
with lib.undo_chunk():
|
||||
super(CreateRenderGlobals, self).process()
|
||||
cmds.setAttr("{}.machineList".format(self.name), lock=True)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from maya import cmds
|
||||
|
||||
import colorbleed.maya.lib as lib
|
||||
import avalon.maya
|
||||
|
||||
|
||||
|
|
@ -12,10 +13,11 @@ class CreateRig(avalon.maya.Creator):
|
|||
icon = "wheelchair"
|
||||
|
||||
def process(self):
|
||||
instance = super(CreateRig, self).process()
|
||||
|
||||
self.log.info("Creating Rig instance set up ...")
|
||||
with lib.undo_chunk():
|
||||
instance = super(CreateRig, self).process()
|
||||
|
||||
controls = cmds.sets(name="controls_SET", empty=True)
|
||||
pointcache = cmds.sets(name="out_SET", empty=True)
|
||||
cmds.sets([controls, pointcache], forceElement=instance)
|
||||
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)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
from maya import cmds
|
||||
|
||||
import colorbleed.maya.lib as lib
|
||||
import avalon.maya
|
||||
|
||||
|
||||
|
|
@ -12,9 +13,9 @@ class CreateYetiRig(avalon.maya.Creator):
|
|||
|
||||
def process(self):
|
||||
|
||||
instance = super(CreateYetiRig, self).process()
|
||||
with lib.undo_chunk():
|
||||
instance = super(CreateYetiRig, self).process()
|
||||
|
||||
self.log.info("Creating Rig instance set up ...")
|
||||
|
||||
input_meshes = cmds.sets(name="input_SET", empty=True)
|
||||
cmds.sets(input_meshes, forceElement=instance)
|
||||
self.log.info("Creating Rig instance set up ...")
|
||||
input_meshes = cmds.sets(name="input_SET", empty=True)
|
||||
cmds.sets(input_meshes, forceElement=instance)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue