Skip to content

MaterialX Graph Editor : Fix keyboard input for graph#3012

Open
kwokcb wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
kwokcb:graph_editor_focus_fix
Open

MaterialX Graph Editor : Fix keyboard input for graph#3012
kwokcb wants to merge 1 commit into
AcademySoftwareFoundation:mainfrom
kwokcb:graph_editor_focus_fix

Conversation

@kwokcb

@kwokcb kwokcb commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Issue

Fixes: #3010

  • Graph area parenting was added without updating existing event logic.

Fixes

  • Consider child widgets, and add logic for current / active widget focus checking.
  • Add firewall checks to make sure that property editor (another child) and menu (at root) events are filtered properly.
  • Copy / Paste had state handling issues so also fixed this.

Testing

  • All key input tested manually

- Parenting was added without updaring event logic.
- Add firewall checks to make sure that property editor and menu events are not considered.
- All keyinput tested manually.
@kwokcb kwokcb changed the title Fix keyboard input for graph MaterialX Graph Editor : Fix keyboard input for graph Jul 23, 2026
ImGuiIO& guiIO = ImGui::GetIO();
if (guiIO.KeyCtrl && !_fileDialogSave.isOpened() && !_fileDialog.isOpened() && !_fileDialogGeom.isOpened())
if (guiIO.KeyCtrl &&
!guiIO.WantTextInput &&

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WantTextInput() added in various places to avoid text input / graph hotkey collisions. Used along with focus tests.

{
const bool open_search = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) && ImGui::IsKeyDown(ImGuiKey_F) && ImGui::IsKeyDown(ImGuiKey_LeftCtrl);
const ImGuiIO& io = ImGui::GetIO();
const bool open_search = ImGui::IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows) &&

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must consider children since graph editor and property editor are now children not directly at root.

// Keep ctrl-click state frame-local; stale true blocks connection copy in paste.
_ctrlClick = io2.KeyCtrl && io2.MouseDown[0];

const bool graphShortcutContext =

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Robust hotkey filtering checking for graphing area.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MaterialX Graph Editor Node Deletion is Broken

1 participant