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

Public Member Functions

 __init__ (self, node, mirror, mirror_around_center=False)
 undo (self)
 redo (self)
 mergeWith (self, other)
 __repr__ (self)
Public Member Functions inherited from UM.Operations.Operation.Operation
None __init__ (self)
None push (self)

Protected Attributes

 _node = node
 _old_transformation = node.getLocalTransformation()
#Move the centre to the origin if we want to mirror around the centre instead of the origin. _mirror_around_center = mirror_around_center
 _mirror = mirror
Protected Attributes inherited from UM.Operations.Operation.Operation
 _timestamp = time.time()
bool _always_merge = False

Detailed Description

Operation that mirrors a scene node.

This operation needs to store the node that was mirrored and the
transformation matrix that performs the mirror operation itself.
Furthermore, it allows mirroring around the center of the node's bounding
box, or just around the coordinate system origin.

Constructor & Destructor Documentation

◆ __init__()

UM.Operations.MirrorOperation.MirrorOperation.__init__ ( self,
node,
mirror,
mirror_around_center = False )
Initialises the operation.

:param node: The node to mirror.
:param mirror: A transformation matrix that mirrors the object. This
    should only define values on the diagonal of the matrix, and only the
    values 1 or -1.
:param mirror_around_center: Whether to mirror the object around its own
    centre (True) or around the axis origin (False).

Member Function Documentation

◆ __repr__()

UM.Operations.MirrorOperation.MirrorOperation.__repr__ ( self)
Gives a programmer-readable representation of this operation.

:return: A programmer-readable representation of this operation.

◆ mergeWith()

UM.Operations.MirrorOperation.MirrorOperation.mergeWith ( self,
other )
Merge this operation with another.

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 operation to merge this operation with.
:return: A combination of the two operations.

Reimplemented from UM.Operations.Operation.Operation.

◆ redo()

UM.Operations.MirrorOperation.MirrorOperation.redo ( self)
Re-apply the operation after undoing it.

Reimplemented from UM.Operations.Operation.Operation.

◆ undo()

UM.Operations.MirrorOperation.MirrorOperation.undo ( self)
Undo the operation.

Reimplemented from UM.Operations.Operation.Operation.


The documentation for this class was generated from the following file:
  • UM/Operations/MirrorOperation.py