Skip to content
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

Graph Editor: Walk to connected nodes via hotkeys #2025

Open
lfl-eholthouser opened this issue Sep 25, 2024 · 4 comments
Open

Graph Editor: Walk to connected nodes via hotkeys #2025

lfl-eholthouser opened this issue Sep 25, 2024 · 4 comments

Comments

@lfl-eholthouser
Copy link
Contributor

lfl-eholthouser commented Sep 25, 2024

With large node graphs and overlapping links it can be difficult to quickly determine which nodes are actually connected. I think the ability to find connected nodes based off a selected link would be beneficial. With a link selected clicking the right arrow key could select the downstream node while the left arrow key could select the upstream node. This could also be expanded to include the ability to walk the entire node graph though it would need to be a specific patter for nodes that have multiple output connections.

@jstone-lucasfilm jstone-lucasfilm changed the title Find connected nodes from selected links in Graph Editor Graph Editor: Walk to connected nodes via hotkeys Sep 25, 2024
@jstone-lucasfilm
Copy link
Member

Just noting here that Camille Ramseur from Adobe plans to take a look at this issue for Dev Days 2024, and we'll assign the task to her once we have her GitHub ID.

@camilleramseur
Copy link

Thanks Jonathan. I'm having trouble using my Adobe GitHub account to log in here so I'm just going to use my personal account. I was told it was ok.

@camilleramseur
Copy link

I don't think I will have this finished by the end of dev days but I would still like to work on this if possible. I'm still new to MaterialX. Do you have any recommendations on how to go about and start this? I was looking in source/MaterialXGraphEditor and was trying to find the keyboard shortcuts mentioned here to see the cod and patterns that were done previous here: https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/DeveloperGuide/GraphEditor.md

It looks like I might potentially have to me do this in the graph.cpp file ? Any advice is appreciated.

@lfl-eholthouser
Copy link
Contributor Author

lfl-eholthouser commented Sep 28, 2024

Hi @camilleramseur ! I think working in the graph.cpp makes sense. Some of the different keyboard shortcuts can be found here:

// Buttons for loading and saving a .mtlx

Then here is the hotkey for focusing on a node
const bool open_search = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && ImGui::IsKeyDown(ImGuiKey_F) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl);
.

I think starting with something like the above, checking if a link is selected and then a right or left arrow key has been released. Is that has been clicked then selecting that node and navigating to that selection.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants