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

Public Member Functions

None __init__ (self, SceneNode node, Optional[SceneNode] parent)
None undo (self)
None redo (self)
Public Member Functions inherited from UM.Operations.Operation.Operation
None __init__ (self)
 mergeWith (self, other)
None push (self)

Protected Attributes

 _node = node
 _parent = parent
bool _selected = False
Protected Attributes inherited from UM.Operations.Operation.Operation
 _timestamp = time.time()
bool _always_merge = False

Detailed Description

Operation that adds a new node to the scene.

Constructor & Destructor Documentation

◆ __init__()

None UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation.__init__ ( self,
SceneNode node,
Optional[SceneNode] parent )
Creates the scene node operation.

This saves the node and its parent to be able to search for the node to
remove the node if we want to undo, and to be able to re-do the adding
of the node.

:param node: The node to add to the scene.
:param parent: The parent of the new node.

Member Function Documentation

◆ redo()

None UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation.redo ( self)
Re-applies this operation after it has been undone.

Reimplemented from UM.Operations.Operation.Operation.

◆ undo()

None UM.Operations.AddSceneNodeOperation.AddSceneNodeOperation.undo ( self)
Reverses the operation of adding a scene node.

This removes the scene node again.

Reimplemented from UM.Operations.Operation.Operation.


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