imgui-node-editor
imgui-node-editor copied to clipboard
Disabled pin
Hi,
Is there a simple way to have a temporary disabled pin ? I mean a pin without any link dropping capability ? I guess I could refuse the link creation by code , but maybe there's a cleaner way playing with internal state of the pin ?
Hi,
No, currently there is no dedicated code for that. Node editor does not track pin state and the intention was to for code built on top of node editor to track that.
There is an option to utilize BeginDisabled
, recently introduced to ImGui to help with that. In the end this may prevent QueryNewLink
from returning such pin.
Is this what you're looking for?
I saw that possibility in Imgui , I guess it should do the job 👌
Maybe this will do without changing anything in node editor for now. Of course this will be visual only and QueryNewLink
will still return such pins. On the other hand this give you an opportunity to display tooltip 'This pin is disabled because...'.