Uranium
Application Framework
 All Classes Namespaces Files Functions Variables Pages
UM.Operations.LayFlatOperation.LayFlatOperation Class Reference

Operation that lays a mesh flat on the scene. More...

Inheritance diagram for UM.Operations.LayFlatOperation.LayFlatOperation:
UM.Operations.Operation.Operation

Public Member Functions

def __init__
 Creates the operation. More...
 
def process
 Computes some orientation to hopefully lay the object flat. More...
 
def undo
 Undoes this lay flat operation. More...
 
def redo
 Re-does this lay flat operation. More...
 
def mergeWith
 Merge this lay flat operation with another lay flat operation. More...
 
def __repr__
 Makes a programmer-readable representation of this operation. More...
 
- Public Member Functions inherited from UM.Operations.Operation.Operation
def __init__
 
def undo
 Undo the operation. More...
 
def redo
 Redo the operation. More...
 
def mergeWith
 Perform operation merging. More...
 
def push
 Push the operation onto the stack. More...
 

Static Public Attributes

tuple progress = Signal()
 Signal that indicates that the progress meter has changed. More...
 

Detailed Description

Operation that lays a mesh flat on the scene.

Constructor & Destructor Documentation

def UM.Operations.LayFlatOperation.LayFlatOperation.__init__ (   self,
  node,
  orientation = None 
)

Creates the operation.

An optional orientation may be added if the answer of this lay flat operation is already known. This may occur if two lay flat operations are combined.

Parameters
nodeThe scene node to apply the operation on.
orientationA pre-calculated result orientation.

Member Function Documentation

def UM.Operations.LayFlatOperation.LayFlatOperation.__repr__ (   self)

Makes a programmer-readable representation of this operation.

def UM.Operations.LayFlatOperation.LayFlatOperation.mergeWith (   self,
  other 
)

Merge this lay flat operation with another lay flat operation.

If multiple lay flat operations are executed in sequence, the user needs to press undo only once to undo them all.

You should ONLY merge a lay flat operation with an older operation. It is NOT symmetric.

Parameters
otherThe lay flat operation to merge this operation with. The specified operation must be an older operation than this operation.
Returns
True if the merge was successful, or False otherwise.
def UM.Operations.LayFlatOperation.LayFlatOperation.process (   self)

Computes some orientation to hopefully lay the object flat.

No promises! This algorithm finds the lowest three vertices and lays them flat. This is a rather naive heuristic, but fast and practical.

def UM.Operations.LayFlatOperation.LayFlatOperation.redo (   self)

Re-does this lay flat operation.

def UM.Operations.LayFlatOperation.LayFlatOperation.undo (   self)

Undoes this lay flat operation.

Member Data Documentation

tuple UM.Operations.LayFlatOperation.LayFlatOperation.progress = Signal()
static

Signal that indicates that the progress meter has changed.


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