imgui-node-editor icon indicating copy to clipboard operation
imgui-node-editor copied to clipboard

HasAnyLinks use

Open SadE54 opened this issue 4 years ago • 1 comments

Hi, I tried to use HasAnyLinks function in my code but whiteout getting the correct behavior : the state never changes whatever a pin is linked or not. Is there a specific context to be able to use tis function ? Does it have to be used between begin/end of the editor part ?

SadE54 avatar Nov 18 '21 09:11 SadE54

HasAnyLinks work after you commit all links for this frame via Link.

ed::Begin() invalidate all links and marks them as 'dead'. Calling Link will revive it and keep alive until the end of the frame. HasAnyLinks will return true only for live links.

It is safe to call HasAnyLinks after calling ed::End.

thedmd avatar Nov 18 '21 09:11 thedmd