-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to render nodes over top of links. #56
Comments
Hi @jonathan2222 ! It should be doable, just requires some trickery with the draw channels. I'll see what I can do once I make some progress on one of the previous issues 👍 If you're itching to try it out, I think the following change inside the diff --git a/imnodes.cpp b/imnodes.cpp
index 286abc6..6535738 100644
--- a/imnodes.cpp
+++ b/imnodes.cpp
@@ -2107,7 +2107,7 @@ void EndNodeEditor()
object_pool_update(editor.pins);
draw_list_sort_channels_by_depth(editor.node_depth_order);
- draw_list_merge_channels();
+ g.canvas_draw_list->ChannelsSetCurrent(0);
for (int link_idx = 0; link_idx < editor.links.pool.size(); ++link_idx)
{
@@ -2117,6 +2117,8 @@ void EndNodeEditor()
}
}
+ g.canvas_draw_list->ChannelsMerge();
+
// After the links have been rendered, the link pool can be updated as well.
object_pool_update(editor.links); I'm going to have to do some more testing on my end though and clean up the code a bit! |
Hi @Nelarius! Thank you for the fast reply! That change inside the |
@jonathan2222 I pushed the change in 8ecdd39. Added some additional logic to inhibit link interaction when overlapped with a node. 🙂 |
When rendering a complex node graph, the links will often be in the way of editing the nodes. If there was an option to render the links under everything else it would fix many problems I am having when changing node attributes.
I know this might be too hard to implement because of the immediate nature of imgui.
The text was updated successfully, but these errors were encountered: