Node Input Funcs

class lwsdk.LWNodeInputFuncs(self)

Bases: object

Proxy of C++ PCore::LWNodeInputFuncs class

 byIndex(NodeID nodeID, int index) → NodeInputID

Get an input by it's index number. The index number of the first input is 1.

 check(NodeInputID inputID) → int

Check if this inputID has a connection.

 connectedOutput(NodeInputID inputID) → NodeOutputID

Returns the inputID to which this input is connected.

 create(NodeID nodeID, ConnectionType type, char name, PyObject function, PyObject data) → NodeInputID

Create a new input for the node. function should be a reference to a Python function or class method designated to handle the node's callback event. data may be any instance-specific data that will be passed to the callback, or None.

The IHandlerFuncs::inst_acquire() callback would be an appropriate location to make calls to this method (with corresponding usage of the IHandlerFuncs::inst_release() callback).

 createCustom(NodeID nodeID, ConnectionType type, char name, NodeInputEvent event, LWID vendorID, LWID typeID) → NodeInputID

Creates a custom connection type. Input parameters are the same as LWNodeInputFuncs::create(), but with the addition of vendor and type IDs. The IDs should be generated using the lwsdk.LWID_() function.

 destroy(NodeInputID nodeID)

Destroy an input from the node.

Be sure you call this to release Python resources, or your script instance will not be released from the Python interpreter's memory when it terminates. The IHandlerFuncs::inst_release() callback is an ideal place for dealing with this.

 disconnect(NodeInputID nodeID)

Disconnect an output from this input.

 evaluate_integer(NodeInputID inputID, LWNodalAccess access, int default_value) → int, int

This is a Python-only method that evaluates an integer input. The method returns a Python sequence with the integer result value in the first element, and the evaluated integer value (either from the input, or from the provided default_value) in the second.

 evaluate_scalar(NodeInputID inputID, LWNodalAccess access, double default_value) → int, double

This is a Python-only method that evaluates a scalar input. The method returns a Python sequence with the integer result value in the first element, and the evaluated double value (either from the input, or from the provided default_value) in the second.

 evaluate_vector(NodeInputID inputID, LWNodalAccess access, Vector default_value) → int, Vector

This is a Python-only method that evaluates a vector input (3 double values). The method returns a Python sequence with the integer result value in the first element, and the evaluated vector value (either from the input, or from the provided default_value) in the second.

This method should be used when evaluating either of the lwsdk.NOT_VECTOR or lwsdk.NOT_COLOR input types, as they are identical in terms of data types and sizes.

 first(NodeID nodeID) → NodeInputID

Get the first input from a node.

 getIndex(NodeInputID nodeID) → int

Get the index number of the input. If the input doesn't belong to this node, returns 0. The index number of the first input is 1.

 name(NodeInputID inputID) → char

Returns the name of the input.

 next(NodeInputID inputID) → NodeInputID

Get the next input that follows arg1.

 node(NodeInputID inputID) → NodeID

Returns the node to which this input belongs.

 numInputs(NodeID nodeID) → int

Get the number of inputs for this node.

 previous(NodeInputID inputID) → NodeInputID

Get the input that precedes inputID.

rename(self, NodeInputID arg1, char arg2)
type(self, NodeInputID arg1) → ConnectionType
typeID(self, NodeInputID arg1) → LWID
vendorID(self, NodeInputID arg1) → LWID

Previous topic

Node Drawing Funcs

Next topic

Node Output Funcs

This Page