node_edge Module

Edge Validators

Edge Validator can be registered to Edge class using its method registerEdgeValidator().

Each validator callback takes 2 params: start_socket and end_socket. Validator also needs to return True or False. For example of validators have a look in node_edge_validators module.

Here is an example how you can register the Edge Validator callbacks:

from nodeeditor.node_edge_validators import *

Edge.registerEdgeValidator(edge_validator_debug)
Edge.registerEdgeValidator(edge_cannot_connect_two_outputs_or_two_inputs)
Edge.registerEdgeValidator(edge_cannot_connect_input_and_output_of_same_node)

Edge Class