GraphNode

class guerilla.GraphNode

Bases: guerilla.SelectableNode, guerilla.DeletableNode

GraphNode is the base class for nodes in a GraphNode

createinput()

Create a GraphInput in the node

This method creates a new GraphInput in the node, after the last existing one. This method requires

the getinputclassname method to be implemented.

return:The created input
rtype:GraphInput
createoutput()

Create a GraphOutput in the node

This method creates a new GraphOutput in the node, after the last existing one. This method requires

the getoutputclassname method to be implemented.

return:The created output
rtype:GraphOutput
getinput(name)

Get an input by its name

Parameters:name (str) – The name of the input to get
Returns:The input with matching name
Return type:GraphInput
getinputclassname()

Return the name of the GraphInput class to use

Returns:The class name
Return type:str
getinputs()

List the node’s inputs

Returns:The array of inputs in the node
Return type:{GraphInput}
getoutput(name)

Get an output by its name

Parameters:name (str) – The name of the output to get
Returns:The output with matching name
Return type:GraphOutput
getoutputclassname()

Return the name of the GraphOutput class to use

Returns:The class name
Return type:str
getoutputs()

List the node’s outputs

Returns:The array of outputs in the node
Return type:{GraphOutput}
inputs(*args)

An iterator on node’s inputs

Available arguments:

Return type:it

or

Return type:it
isgraphparent(other)

Indicate if the other node is dependent on this node (i.e. if an output of self is directly/indirectly connected into any input of other.)

Parameters:other (GraphNode) – The other node
Return type:bool
removeinput(string)

Remove a GraphInput of the node

Parameters:string (name) – The name of the input to remove
removeoutput(string)

Remove a GraphOutput of the node

Parameters:string (name) – The name of the output to remove