Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Operations.SetTransformOperation.SetTransformOperation Class Reference
Inheritance diagram for UM.Operations.SetTransformOperation.SetTransformOperation:
UM.Operations.Operation.Operation

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)
 
- Public Member Functions inherited from UM.Operations.Operation.Operation
None push (self)
 

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
 
- Protected Attributes inherited from UM.Operations.Operation.Operation
 _timestamp
 
 _always_merge
 

Detailed Description

Operation that translates, rotates and scales a node all at once.

Constructor & Destructor Documentation

◆ __init__()

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.

Reimplemented from UM.Operations.Operation.Operation.

Member Function Documentation

◆ __repr__()

UM.Operations.SetTransformOperation.SetTransformOperation.__repr__ ( self)
Returns a programmer-readable representation of this operation.

A programmer-readable representation of this operation.

◆ mergeWith()

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.

◆ redo()

UM.Operations.SetTransformOperation.SetTransformOperation.redo ( self)
Re-applies the transformation after it has been undone.

Reimplemented from UM.Operations.Operation.Operation.

◆ undo()

UM.Operations.SetTransformOperation.SetTransformOperation.undo ( self)
Undoes the transformation, restoring the node to the old state.

Reimplemented from UM.Operations.Operation.Operation.


The documentation for this class was generated from the following file: