Closed Paolo-Oliverio closed 4 weeks ago
It is possible to create links, this was also visible in the old demo video. It's indeed not very well documented and I'll fix that.
auto n = INF.placeNode<DemoNode7>();
auto m = INF.placeNode<DemoNode3>();
n->inPin("Val")->createLink(m->inPin("X"));
this is a little snapshot from my testing code, I hope this helps.
One day I'll take the time and build a complete example with a bit of everything. Also as part of the to-do list of this project, there is the goal of creating helpers to export everything as some sort of JSON and the respective import helper. But I don't have the time to work on it now. So if you have to create such methods for your code consider opening a PR if you are interested.
Did the code snippet work for you? Also, how is it going with the nodes serialization and deserialization?
Code worked great , serialization is on backlog I don't think it will be an issue. I'm pretty busy at the moment with business logic so frontend is on pause. A major pain point is the issue about rendering many nodes , it shouldn't be hard to fix but I touched imgui rendering too long ago to find a quick solution.
Will be added in future example folder
Some things seems to be missing from the actual documentation like the possibility to add links programmatically to nodes. I need to serialize and deserialize nodegraphs so I need to recreate connections programmatically.
It would be great to have a more complex example that show off the entire api some kind of imgui demo but for imNodeFlow.