egui_node_graph
egui_node_graph copied to clipboard
Remove Widget on input connection
This is less of an issue more of a question:
I tried for a while to find a way to "bind" inputs to a widget in order to emulate the behaviour in Blender's node editor. In Blender it behaves as follows:
- each Widget has a corresponding input
- if you connect something to that input, the widget is hidden and the set value ignored
- if you disconnect that input the widget is shown and the previously set value restored
I suspected the way to do this is to remove the widget when the onConnectionsChange callback fires, however I did not find a removeWidget method that I could have used to remove that widget. Any pointers are welcome.
I don't understand your exact concern, widgets already only render for disconnected inputs.

Those are screenshots from the demo app.
I have the patch for the opposite behavior (allow rendering some widget UI even if an input is connected), but I'm waiting for #85 to be merged first.