ToolPlugin

Inheritance diagram of rumba.ToolPlugin
class ToolPlugin

A Tool node plug-in.

A tool node can be used to modify the document using viewport interactions.

Methods

__init__

activate()

deactivate()

get_help(tool)

type tool

unicode

get_status(tool)

type tool

unicode

manipulates()

rtype

bool

node()

Returns the Node interface for this object.

on_add_to_document()

Callback called when the node is added to the document.

on_delete(arg1)

Prepare the node to be deleted.

on_first_init(arg1)

Perform the one shot initialization tasks for this node.

on_input_connection(arg1, arg2, arg3)

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

on_input_disconnection(arg1, arg2)

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

on_key_press(key, modifiers)

Called when a key is pressed while the tool is active.

on_key_release(key, modifiers)

Called when a key is released while the tool is active.

on_mouse_move(camera, interaction)

type camera

CameraContext

on_mouse_press(camera, interaction)

type camera

CameraContext

on_mouse_release(camera, interaction)

type camera

CameraContext

on_output_connection(arg1, arg2, arg3)

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

on_output_disconnection(arg1, arg2)

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

on_remove_from_document()

Callback called when the node is removed from the document.

override_selection()

rtype

bool

relationship(set)

Return the node relationships.

selection_path()

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

track_mouse()

rtype

bool

__init__()
activate() None
deactivate() None
get_help(tool: unicode) Array
Return type

Array

get_status(tool: unicode) Array
Return type

Array

manipulates() bool
Return type

bool

node() Node

Returns the Node interface for this object.

Return type

Node

on_add_to_document() None

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 restores deleted nodes. This callback is called after a Redo operation which create new nodes.

on_delete(arg1: bool) None

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.

on_first_init(arg1: bool) None

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(arg1: Plug, arg2: Plug, arg3: bool) None

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

on_input_disconnection(arg1: Plug, arg2: Plug) None

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_key_press(key: int32_t, modifiers: int32_t) bool

Called when a key is pressed while the tool is active.

Returns true if the key event is accepted. The key code is a Qt::Key enum.

Return type

bool

on_key_release(key: int32_t, modifiers: int32_t) bool

Called when a key is released while the tool is active.

Returns true if the key event is accepted. The key code is a Qt::Key enum.

Return type

bool

on_mouse_move(camera: CameraContext, interaction: InteractionContext) None
on_mouse_press(camera: CameraContext, interaction: InteractionContext) None
on_mouse_release(camera: CameraContext, interaction: InteractionContext) None
on_output_connection(arg1: Plug, arg2: Plug, arg3: bool) None

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(arg1: Plug, arg2: Plug) None

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() None

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.

override_selection() bool
Return type

bool

relationship(set: NodeSet) None

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.

selection_path() unicode

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.

Return type

unicode

track_mouse() bool
Return type

bool