Uranium
Application Framework
|
An operation that moves a scene node. More...
Public Member Functions | |
__init__ (self, node, translation, set_position=False) | |
Initialises this TranslateOperation. | |
undo (self) | |
Undoes the translate operation, restoring the old transformation. | |
redo (self) | |
Re-applies the translate operation. | |
mergeWith (self, other) | |
Merges this operation with another translate operation. | |
__repr__ (self) | |
Returns a programmer-readable representation of this operation. | |
![]() | |
__init__ (self) | |
undo (self) | |
Undo the operation. | |
redo (self) | |
Redo the operation. | |
mergeWith (self, other) | |
Perform operation merging. | |
push (self) | |
Push the operation onto the stack. | |
Protected Attributes | |
_node | |
_old_transformation | |
_translation | |
_set_position | |
![]() | |
_timestamp | |
_always_merge | |
An operation that moves a scene node.
This has nothing to do with languages. It is a linear transformation on geometry.
UM.Operations.TranslateOperation.TranslateOperation.__init__ | ( | self, | |
node, | |||
translation, | |||
set_position = False |
|||
) |
Initialises this TranslateOperation.
node | The node to translate. |
translation | A translation matrix to transform the node by. |
set_position | Whether to change the position (True) or add the positions, making a relative move (False). |
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.TranslateOperation.TranslateOperation.__repr__ | ( | self | ) |
Returns a programmer-readable representation of this operation.
UM.Operations.TranslateOperation.TranslateOperation.mergeWith | ( | self, | |
other | |||
) |
Merges this operation with another translate operation.
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 older translate operation to merge this operation with. |
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.TranslateOperation.TranslateOperation.redo | ( | self | ) |
Re-applies the translate operation.
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.TranslateOperation.TranslateOperation.undo | ( | self | ) |
Undoes the translate operation, restoring the old transformation.
Reimplemented from UM.Operations.Operation.Operation.