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

Public Member Functions

 __init__ (self, node)
 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()
Protected Attributes inherited from UM.Operations.Operation.Operation
 _timestamp = time.time()
bool _always_merge = False

Detailed Description

An operation that moves a scene node down to 0 on the y-axis.

Constructor & Destructor Documentation

◆ __init__()

UM.Operations.GravityOperation.GravityOperation.__init__ ( self,
node )
Initialises this GravityOperation.

:param node: The node to translate.

Member Function Documentation

◆ __repr__()

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

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

◆ mergeWith()

UM.Operations.GravityOperation.GravityOperation.mergeWith ( self,
other )
Merges this operation with another gravity 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 gravity operation to merge this operation with.

Reimplemented from UM.Operations.Operation.Operation.

◆ redo()

UM.Operations.GravityOperation.GravityOperation.redo ( self)
(Re-)Applies the gravity operation.

Reimplemented from UM.Operations.Operation.Operation.

◆ undo()

UM.Operations.GravityOperation.GravityOperation.undo ( self)
Undoes the gravity operation, restoring the old transformation.

Reimplemented from UM.Operations.Operation.Operation.


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