Node creation context
I'd like to make a graph easier to create by automatically creating and connecting a node to another, for instance for a logic 'Or' block automatically create 2 subblock 'Value' connected to each input of the 'Or' block
For that I was thinking about onAdded callback but the callback is also called when the graph is loaded which generated unwanted blocks
It would be great to have an option on onAdded(..., fromUser: boolean) or another function to handle that case
Hi @Hydhen! Interesting feature.. a similar way I was thinking about is to have a quick node creation (eg. with middle button on input slot, as seen in vvvv). This would require configuring for each slot type a default node to be created. The other way I tought would be better mixing the widgets allowing using a widget everywhere an input node is not connected. But. You are right in wanting to discriminate if a callback is from an user action or if the graph is being loaded, I had issues with other events too.
Hi @atlasan To be honest I'd be glad to contribute on this but sadly I don't have much time and I'm not used to contribute so I don't really know how to start The bright side is this repo made me develop some really cool feature on our webapp so I hope soon I'll get more time to develop with it and, doing so, contribute to the repo