Uranium
Application Framework
|
Public Member Functions | |
__init__ (self, node, translation=None, orientation=None, scale=None, shear=None, mirror=None) | |
undo (self) | |
redo (self) | |
mergeWith (self, other) | |
__repr__ (self) | |
![]() | |
None | __init__ (self) |
None | push (self) |
Protected Attributes | |
_node = node | |
_old_translation = node.getPosition() | |
_old_orientation = node.getOrientation() | |
_old_scale = node.getScale() | |
_old_shear = node.getShear() | |
_old_transformation = node.getWorldTransformation() | |
_new_translation = translation | |
_new_orientation = orientation | |
_new_scale = scale | |
_new_shear = shear | |
_new_mirror = Vector(1, 1, 1) | |
_new_transformation = Matrix() | |
![]() | |
_timestamp = time.time() | |
bool | _always_merge = False |
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. :param node: The scene node to transform. :param translation: A translation matrix to move the node with. :param orientation: An orientation matrix to rotate the node with. :param scale: A scaling matrix to resize the node with.
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. :param other: The older operation with which to merge this operation. :return: A combination of the two operations, or False if the merge failed.
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.