setzer22 / egui_node_graph

Build your node graph applications in Rust, using egui
MIT License
735 stars 138 forks source link

Remove Widget on input connection #84

Open atoav opened 1 year ago

atoav commented 1 year ago

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:

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.

kamirr commented 1 year ago

I don't understand your exact concern, widgets already only render for disconnected inputs. image image

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.