Uranium
Application Framework
|
Operation that translates, rotates and scales a node all at once. More...
Public Member Functions | |
__init__ (self, node, translation=None, orientation=None, scale=None, shear=None, mirror=None) | |
Creates the transform operation. | |
undo (self) | |
Undoes the transformation, restoring the node to the old state. | |
redo (self) | |
Re-applies the transformation after it has been undone. | |
mergeWith (self, other) | |
Merges this operation with another TransformOperation. | |
__repr__ (self) | |
Returns a programmer-readable representation of this operation. | |
LOG_MATRIX (self, str_matrix_name, matrix) | |
LOG_QUATERNION (self, str_quaternion_name, quaternion) | |
LOG_VECTOR (self, str_vector_name, vector) | |
![]() | |
__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_translation | |
_old_orientation | |
_old_scale | |
_old_shear | |
_old_transformation | |
_new_translation | |
_new_orientation | |
_new_scale | |
_new_shear | |
_new_mirror | |
_new_transformation | |
![]() | |
_timestamp | |
_always_merge | |
Operation that translates, rotates and scales a node all at once.
UM.Operations.SetTransformOperation.SetTransformOperation.__init__ | ( | self, | |
node, | |||
translation = None , |
|||
orientation = None , |
|||
scale = None , |
|||
shear = None , |
|||
mirror = None |
|||
) |
Creates the transform operation.
Careful! No real input checking is done by this function. If you'd provide other transformations than respectively translation, orientation and scale in place for the translation, orientation and scale matrices, it could get confused.
node | The scene node to transform. |
translation | A translation matrix to move the node with. |
orientation | An orientation matrix to rotate the node with. |
scale | A scaling matrix to resize the node with. |
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.SetTransformOperation.SetTransformOperation.__repr__ | ( | self | ) |
Returns a programmer-readable representation of this operation.
A programmer-readable representation of this operation.
UM.Operations.SetTransformOperation.SetTransformOperation.mergeWith | ( | self, | |
other | |||
) |
Merges this operation with another TransformOperation.
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 operation with which to merge this operation. |
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.SetTransformOperation.SetTransformOperation.redo | ( | self | ) |
Re-applies the transformation after it has been undone.
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.SetTransformOperation.SetTransformOperation.undo | ( | self | ) |
Undoes the transformation, restoring the node to the old state.
Reimplemented from UM.Operations.Operation.Operation.