Editor API
UnigineEditor public API
Editor::CreateNodesAction Class Reference

This class is used to represent any user's action creating nodes. More...

#include <Actions.h>

Inheritance diagram for Editor::CreateNodesAction:
Editor::Action

Public Member Functions

 CreateNodesAction (const Unigine::NodePtr &node)
 Creates a new create action for the specified node. More...
 
 CreateNodesAction (const Unigine::Vector< Unigine::NodePtr > &nodes)
 Creates a new create action for the specified node. More...
 
 ~CreateNodesAction () override
 
void apply () override
 Applies the create nodes action. More...
 
void undo () override
 Reverts the create nodes action. More...
 
void redo () override
 Redoes the previously undone create nodes action (reverses the undo method). More...
 
Unigine::Vector< Unigine::NodePtr > getNodes () const
 
- Public Member Functions inherited from Editor::Action
 Action ()
 
virtual ~Action ()
 
virtual bool validate ()
 This method allows action to do some internal cleanup. Return value indicates whether the action is still sane. Whenever it returns false asset system will delete invalid action for good. More...
 
virtual bool modifiesWorld () const
 Indicates whether the action brings any changes to the scene. Actions like selection, for example, change nothing and shouldn't set world‘s "dirty state". For such actions this method would return 'false’. More...
 

Detailed Description

This class is used to represent any user's action creating nodes.

Constructor & Destructor Documentation

◆ CreateNodesAction() [1/2]

Editor::CreateNodesAction::CreateNodesAction ( const Unigine::NodePtr &  node)
explicit

Creates a new create action for the specified node.

Parameters
nodeNode to be created.

◆ CreateNodesAction() [2/2]

Editor::CreateNodesAction::CreateNodesAction ( const Unigine::Vector< Unigine::NodePtr > &  nodes)
explicit

Creates a new create action for the specified node.

Parameters
nodesNodes to be created.

◆ ~CreateNodesAction()

Editor::CreateNodesAction::~CreateNodesAction ( )
override

Member Function Documentation

◆ apply()

void Editor::CreateNodesAction::apply ( )
overridevirtual

Applies the create nodes action.

Implements Editor::Action.

◆ getNodes()

Unigine::Vector<Unigine::NodePtr> Editor::CreateNodesAction::getNodes ( ) const

◆ redo()

void Editor::CreateNodesAction::redo ( )
overridevirtual

Redoes the previously undone create nodes action (reverses the undo method).

Implements Editor::Action.

◆ undo()

void Editor::CreateNodesAction::undo ( )
overridevirtual

Reverts the create nodes action.

Implements Editor::Action.