-
Notifications
You must be signed in to change notification settings - Fork 302
Closed
Description
Once a constrain has been added only ports of that type specified will be allowed a pipe connection.
from the docs of the titular function.
I have (these are snips):
class SimulationNode(BaseSimulatorNode):
def __init__(self):
...
self.out_simulation = self.add_output('sim', color=PortType.SIMULATION.color())
...and
class SimulatorNode(BaseSimulatorNode):
def __init__(self):
self.in_simulation = self.add_input('sim', display_name=False, color=PortType.SIMULATION.color())
self.in_simulation.add_accept_port_type(port_name='sim',
port_type=PortTypeEnum.OUT.value,
node_type='simulator.SimulationNode')My assumption is now, that my SimulationNode.out_simulation is the only port type that can connect to the SimulatorNode.in_simulation.
This is however, not the case, and everything is still accepted by SimulatorNode.in_simulation.
NodeGraphQt.Port.add_reject_port_type() does work in line with expectations, but its unfeasible to start rejecting every possible port except a particular port.
Is this a bug, or did I do something wrong?
jchanvfx
Metadata
Metadata
Assignees
Labels
No labels