Rumba C++ SDK
maquina::NodePlugin Class Reference

Derive this class to create your own Node type. More...

#include <NodePlugin.h>

Inheritance diagram for maquina::NodePlugin:
maquina::BaseLayer maquina::ManipulatorPlugin maquina::RenderablePlugin maquina::ToolPlugin maquina::AnimLayer maquina::BrushPlugin maquina::DeformLayer maquina::BrushSculptPlugin

Public Member Functions

 NodePlugin (Node *node)
 
virtual ~NodePlugin ()
 
virtual void on_first_init (bool)
 Perform the one shot initialization tasks for this node. More...
 
virtual void on_delete (bool)
 Prepare the node to be deleted. More...
 
virtual void on_add_to_document ()
 Callback called when the node is added to the document. More...
 
virtual void on_remove_from_document ()
 Callback called when the node is removed from the document. More...
 
virtual void on_input_connection (const Plug &, const Plug &, bool)
 Callback called when an a connection has been done between an output plug and a plug of this node as input. More...
 
virtual void on_output_connection (const Plug &, const Plug &, bool)
 Callback called when an a connection has been done between a plug of this node as output and an input plug. More...
 
virtual void on_input_disconnection (const Plug &, const Plug &)
 Callback called when an a connection has been broken between an output plug and a plug of this node as input. More...
 
virtual void on_output_disconnection (const Plug &, const Plug &)
 Callback called when an a connection has been broken between a plug of this node as output and an input plug. More...
 
virtual void relationship (NodeSet &set) const
 Return the node relationships. More...
 
virtual std::shared_ptr< NodeDelegatenode_delegate () const
 Return a node delegate for this node. More...
 
Node node () const
 Returns the Node interface for this object. More...
 
virtual std::string selection_path () const
 Returns the node delegate path to use to select that node. More...
 

Detailed Description

Derive this class to create your own Node type.

Constructor & Destructor Documentation

◆ NodePlugin()

maquina::NodePlugin::NodePlugin ( Node node)
inline

◆ ~NodePlugin()

virtual maquina::NodePlugin::~NodePlugin ( )
inlinevirtual

Member Function Documentation

◆ node()

Node maquina::NodePlugin::node ( ) const
inline

Returns the Node interface for this object.

◆ node_delegate()

virtual std::shared_ptr<NodeDelegate> maquina::NodePlugin::node_delegate ( ) const
virtual

Return a node delegate for this node.

This method is called by the host. Return nullptr if the default implementation should be used.

Reimplemented in maquina::ManipulatorPlugin.

◆ on_add_to_document()

virtual void maquina::NodePlugin::on_add_to_document ( )
inlinevirtual

Callback called when the node is added to the document.

Let the node perform some operations, like creating internal nodes and connections, when the node is added to the document. This callback is called at the end of a document modification on every new document nodes. This callback is called after an Undo operation which restaures deleted nodes. This callback is called after a Redo operation which create new nodes.

Reimplemented in maquina::AnimLayer, and maquina::BaseLayer.

◆ on_delete()

virtual void maquina::NodePlugin::on_delete ( bool  )
inlinevirtual

Prepare the node to be deleted.

Let the node perform some operations (like delete other nodes) before being deleted. This callback is called before the node is removed from its parent or disconnected.

Reimplemented in maquina::AnimLayer, maquina::DeformLayer, and maquina::BaseLayer.

◆ on_first_init()

virtual void maquina::NodePlugin::on_first_init ( bool  )
inlinevirtual

Perform the one shot initialization tasks for this node.

This callback is called after the first time the node is created and added to the workspace.

◆ on_input_connection()

virtual void maquina::NodePlugin::on_input_connection ( const Plug ,
const Plug ,
bool   
)
inlinevirtual

Callback called when an a connection has been done between an output plug and a plug of this node as input.

Let the node perform some operations, like creating internal connections. This callback is called after every connections between two plugs

Reimplemented in maquina::BaseLayer.

◆ on_input_disconnection()

virtual void maquina::NodePlugin::on_input_disconnection ( const Plug ,
const Plug  
)
inlinevirtual

Callback called when an a connection has been broken between an output plug and a plug of this node as input.

Let the node perform some operations, like removing internal connections. This callback is called after every disconnections between two plugs

◆ on_output_connection()

virtual void maquina::NodePlugin::on_output_connection ( const Plug ,
const Plug ,
bool   
)
inlinevirtual

Callback called when an a connection has been done between a plug of this node as output and an input plug.

Let the node perform some operations, like creating internal connections. This callback is called after every connections between two plugs

◆ on_output_disconnection()

virtual void maquina::NodePlugin::on_output_disconnection ( const Plug ,
const Plug  
)
inlinevirtual

Callback called when an a connection has been broken between a plug of this node as output and an input plug.

Let the node perform some operations, like removing internal connections. This callback is called after every disconnections between two plugs

◆ on_remove_from_document()

virtual void maquina::NodePlugin::on_remove_from_document ( )
inlinevirtual

Callback called when the node is removed from the document.

Let the node perform some operations, like deleting internal nodes and connections, when the node is removed from the document. This callback is called at the beginning of the Delete operation, before the node is actually deleted or disconnected. This callback is called after an Undo operation which delete created nodes. This callback is called after a Redo operation which delete nodes.

Reimplemented in maquina::AnimLayer, and maquina::BaseLayer.

◆ relationship()

virtual void maquina::NodePlugin::relationship ( NodeSet set) const
virtual

Return the node relationships.

The relationship nodes will be highlighted with a specific color when this node is selected This method must be implemented by the plug-in.

Reimplemented in maquina::AnimLayer, and maquina::BaseLayer.

◆ selection_path()

virtual std::string maquina::NodePlugin::selection_path ( ) const
virtual

Returns the node delegate path to use to select that node.

The default implementation returns the node's NodeDelegate path. Overrides that method to select another node when the user click that type of node by returning the NodeDelegate path of the node you actually want to select.


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