Package mrv :: Package maya :: Module undo :: Class GenericOperation
[hide private]
[frames] | no frames]

Class GenericOperation

source code

object --+    
         |    
 Operation --+
             |
            GenericOperation

Simple oeration allowing to use a generic doit and untoit call to be accessed using the operation interface.

In other words: If you do not want to derive from operation just because you would like to have your own custom ( but simple) do it and undo it methods, you would just use this all-in-one operation

Instance Methods [hide private]
 
__init__(self)
intiialize our variables
source code
 
setDoitCmd(self, func, *args, **kwargs)
Add the doit call to our instance
source code
 
setUndoitCmd(self, func, *args, **kwargs)
Add the undoit call to our instance
source code
 
doIt(self)
Execute the doit command
source code
 
undoIt(self)
Execute undoit if doit did not fail
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
intiialize our variables
Overrides: object.__init__

doIt(self)

source code 
Execute the doit command
Returns:
result of the doit command
Overrides: Operation.doIt

undoIt(self)

source code 
Execute undoit if doit did not fail
Overrides: Operation.undoIt