Uranium
Application Framework
|
Operation that mirrors a scene node. More...
Public Member Functions | |
def | __init__ (self, node, mirror, mirror_around_center=False) |
Initialises the operation. More... | |
def | undo (self) |
Undo the operation. More... | |
def | redo (self) |
Re-apply the operation after undoing it. More... | |
def | mergeWith (self, other) |
Merge this operation with another. More... | |
def | __repr__ (self) |
Gives a programmer-readable representation of this operation. More... | |
![]() | |
def | __init__ (self) |
def | undo (self) |
Undo the operation. More... | |
def | redo (self) |
Redo the operation. More... | |
def | mergeWith (self, other) |
Perform operation merging. More... | |
def | push (self) |
Push the operation onto the stack. More... | |
Operation that mirrors a scene node.
This operation needs to store the node that was mirrored and the transformation matrix that performs the mirror operation itself. Furthermore, it allows mirroring around the center of the node's bounding box, or just around the coordinate system origin.
def UM.Operations.MirrorOperation.MirrorOperation.__init__ | ( | self, | |
node, | |||
mirror, | |||
mirror_around_center = False |
|||
) |
Initialises the operation.
node | The node to mirror. |
mirror | A transformation matrix that mirrors the object. This should only define values on the diagonal of the matrix, and only the values 1 or -1. |
mirror_around_center | Whether to mirror the object around its own centre (True) or around the axis origin (False). |
def UM.Operations.MirrorOperation.MirrorOperation.__repr__ | ( | self | ) |
Gives a programmer-readable representation of this operation.
def UM.Operations.MirrorOperation.MirrorOperation.mergeWith | ( | self, | |
other | |||
) |
Merge this operation with another.
This prevents the user from having to undo multiple operations if they were not his operations.
You should ONLY merge this operation with an older operation. It is NOT symmetric.
other | The operation to merge this operation with. |
def UM.Operations.MirrorOperation.MirrorOperation.redo | ( | self | ) |
Re-apply the operation after undoing it.
def UM.Operations.MirrorOperation.MirrorOperation.undo | ( | self | ) |
Undo the operation.