Uranium
Application Framework
|
Public Member Functions | |
__init__ (self, node, scale, set_scale=False, add_scale=False, relative_scale=False, scale_around_point=Vector(0, 0, 0), snap=False) | |
undo (self) | |
redo (self) | |
mergeWith (self, other) | |
__repr__ (self) | |
![]() | |
None | __init__ (self) |
None | push (self) |
Protected Attributes | |
_node = node | |
_old_transformation = node.getLocalTransformation() | |
#Simply change the scale. | _set_scale = set_scale |
#Add to the current scale. | _add_scale = add_scale |
#Scale relatively to the current scale. | _relative_scale = relative_scale |
_scale_around_point = scale_around_point | |
_snap = snap | |
_scale = scale | |
float | _min_scale = 0.01 |
![]() | |
_timestamp = time.time() | |
bool | _always_merge = False |
Operation that scales a scene node, uniformly or non-uniformly.
UM.Operations.ScaleOperation.ScaleOperation.__init__ | ( | self, | |
node, | |||
scale, | |||
set_scale = False, | |||
add_scale = False, | |||
relative_scale = False, | |||
scale_around_point = Vector(0, 0, 0), | |||
snap = False ) |
Initialises the scale operation. :param node: The scene node to scale. :param scale: A matrix to scale the node with. This matrix should only be non-zero on the diagonal. :param set_scale: Whether to simply replace the old scale with the new one (True) or modify the old scale (False). :param add_scale: Whether to add to the old scale (True) or multiply with it (False). :param relative_scale: Whether to multiply the scale relative to the current scale (True) or simply multiply it with a constant (False). :param scale_around_point: All coordinates are moved away from or towards this point. :param snap: Whether to use snap scaling (True) or not (False).
UM.Operations.ScaleOperation.ScaleOperation.__repr__ | ( | self | ) |
Returns a programmer-readable representation of this operation. :return: A programmer-readable representation of this operation.
UM.Operations.ScaleOperation.ScaleOperation.mergeWith | ( | self, | |
other ) |
Merge this operation with another scale 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. :param other: The older scale operation to merge this operation with. :return: A new operation that performs both scale operations.
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.ScaleOperation.ScaleOperation.redo | ( | self | ) |
Redo the scale operation.
Reimplemented from UM.Operations.Operation.Operation.
UM.Operations.ScaleOperation.ScaleOperation.undo | ( | self | ) |
Undo the scale operation.
Reimplemented from UM.Operations.Operation.Operation.