I have a question about PySide2 undo/redo in Maya. I read a discussions
about using undoInfo Maya command but what if my GUI has to interact with
many methods? How can I create an undo/redo for all of them at once instead
of doing:
def method1():
cmds.undoInfo(openChunk=True)
# my code
#
cmds.undoInfo(closeChunk=True)
# or even
def method2():
try
cmds.undoInfo(openChunk=True)
# my code
#
except:
pass
finally:
cmds.undoInfo(closeChunk=True)
def method3():
cmds.undoInfo(openChunk=True)
# my code
#
cmds.undoInfo(closeChunk=True)
I want this:
cmds.undoInfo(openChunk=True)
def method1()
def method2()
def method3()
cmds.undoInfo(closeChunk=True)
Knowing that each method is connected to a button on the GUI
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/15e4aa30-72d1-4122-b1ee-d40b9c63d068n%40googlegroups.com.