Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Remove Widget on input connection #84

Open
atoav opened this issue Apr 21, 2023 · 1 comment
Open

Remove Widget on input connection #84

atoav opened this issue Apr 21, 2023 · 1 comment

Comments

@atoav
Copy link

atoav commented Apr 21, 2023

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.

@kamirr
Copy link
Contributor

kamirr commented Apr 27, 2023

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants