Repository navigation
Conversation
- RMB add node - RMB on hamburger in node -> popup menu. Add only delete for now Fix: CTRL-F search without also trigger focus (F).
Add "rename" to menu.
- Bypass imgui node editor F key invocation which is always triggered regardless of modifiers. This is the main source of the bug.
- Disable hamburger on read-only nodes and disallow rename / delete on any read-only graphs.
- Extract out node width computation utility for us bye hamburger as well as previous pin placement.
…ed up pin layouts.
Disable RMB add popup on readonly graphs
| const float BASE_UI_FONT_SIZE = 18.0f; | ||
| const float BASE_PIN_ICON_SIZE = 18.0f; | ||
| const float MIN_PIN_ICON_SIZE = 18.0f; | ||
| const float HDR_TEXT_INDENT = 4.0f; |
There was a problem hiding this comment.
Global header indent
| _layoutPending(false), | ||
| _needsNavigation(false), | ||
| _delete(false), | ||
| _nodeMenuToOpen(-1), |
There was a problem hiding this comment.
Track node menu popup and deletion info if delete chosen
|
|
||
| void Graph::drawNodeMenu(UiNodePtr node) | ||
| { | ||
| const float buttonSize = computeHamburgerSize(); |
There was a problem hiding this comment.
Node menu icon : "hamburger"
|
|
||
| float Graph::computeNodeContentWidth(UiNodePtr node) | ||
| { | ||
| // Compute the node's content width (widest of the title row, shown |
There was a problem hiding this comment.
Utilitly to compute max text width for node
| ImColor(ImColor(85, 85, 85, 255)), 0.f); | ||
| ImGui::Indent(hdrTextIndent); | ||
| ImGui::Text("%s", node->getName().c_str()); | ||
| ImGui::TextUnformatted(node->getName().c_str()); |
There was a problem hiding this comment.
Extend title with node menu icon.
| addPinPopup(); | ||
| readOnlyPopup(); | ||
| ImGui::PopStyleVar(); | ||
| _nodeMenuRects.clear(); |
| _popup = true; | ||
| } | ||
| } | ||
| deleteNodeById(id); |
There was a problem hiding this comment.
Uses common delete node logic.
| // this frame and restore them immediately after. | ||
| if ((io2.KeyCtrl || io2.KeySuper) && ImGui::IsKeyPressed(ImGuiKey_F)) | ||
| { | ||
| ed::EnableShortcuts(false); |
There was a problem hiding this comment.
This was very tricky to fix since you need to superscede the imgui node editor logic which always assumes F key (regardless of modifier) is pressed. Reulsint in CMD/CTRL-F always kicking off "focus on node" logic.
|
|
||
| // Options | ||
| bool _saveNodePositions; | ||
| std::vector<ImVec4> _nodeMenuRects; |
There was a problem hiding this comment.
Used to track node menu location (hamburger) for hover hilighting
| // Create editor config and context. | ||
| ed::Config config; | ||
| config.SettingsFile = nullptr; | ||
| config.DragButtonIndex = 0; |
There was a problem hiding this comment.
Set mapping of mouse buttons.
|
@lfl-eholthouser, @jstone-lucasfilm : if you have some time could you take a look at this PR. It addresses a few issues but naturally not all but maybe useful to allow building on further for upcoming dev days. Thanks. |
|
Thanks for this proposal, @kwokcb! The rename consolidation and the Ctrl+F fix both look like clear improvements, and I'd be glad to see them merged soon. The new On the mouse remap, I'd suggest we reconsider before merging. The PR moves panning to the middle button to avoid a conflict with a right-click menu, but ImGui Node Editor already resolves that conflict for us: its
If the hamburger feature is included in the current PR, I'd expect it to respond to a left click, matching the convention for that control. The MacOS scaling change in A few smaller notes:
Given the above, one option would be to split the rename and Ctrl+F work into a PR we can merge right away, with the context menu work following on the editor's native API. Does that approach sound good to you? |
|
The keyboard and mouse interaction is tricky and quite hard to get correct. Fixing f key at same time is less complicated. Keeping current main mappings sounds reasonable, if possible. Mac change can be pulled out. I can remove I won't have time currently to do work on this. Maybe better to unassigned me. I will post on Slack if anyone wants to complete this pr for dev days. |
|
Found a few cycles to restore default mapping and make hamburger be on LMB. |
|
This changelist updates the runner images used in GitHub CI, moving away from the MacOS 14 and Ubuntu 22.04 environments ahead of their retirement in GitHub Actions, and replacing remaining uses of `ubuntu-latest` with explicit image versions. The following specific changes are included: - Move the oldest MacOS build from `macos-14` with Xcode 15.4 to `macos-15` with Xcode 16.0, as the MacOS 14 environment will be retired on November 2nd, 2026. - Move the oldest Linux builds from `ubuntu-22.04` to `ubuntu-24.04`, as the Ubuntu 22.04 environment will be retired on April 17th, 2027. - Replace `ubuntu-latest` with `ubuntu-26.04` in the JavaScript and release signing jobs, and move the Python SDist job to `ubuntu-26.04`. - Upgrade Playwright from 1.60 to 1.64, for compatibility with Ubuntu 26.04. - Raise the minimum Node version for JavaScript builds from 18 to 20.9, matching the requirements of current dependencies.
…on#3110) This adds `windows-11-arm` to the `Python Wheels` matrix so CI builds and tests native `win_arm64` wheels for Windows on Arm, using the existing cibuildwheel setup (`CIBW_ARCHS: auto64` resolves to ARM64 on that runner). GitHub's hosted `windows-11-arm` runners are free for public repositories. Changes (`.github/workflows/main.yml`, `wheels` job only): - Add `windows-11-arm` to the `os` matrix. - Exclude Python 3.9 and 3.10 on `windows-11-arm`: `actions/setup-python` has no ARM64 builds for them (`The version '3.9' with architecture 'arm64' was not found for Windows Enterprise.`, same for 3.10). - Name the ARM64 wheel artifacts `MaterialX_Python_Wheel_Windows_ARM64_3_<minor>` so they don't collide with the x64 Windows artifacts. Existing artifact names are unchanged. No source changes were needed.
…undation#3113) This changelist moves the nightly build into a separate `nightly` workflow in GitHub CI, which calls `main` as a reusable workflow with an `extended` input. Scheduled workflows are disabled by default in forks of a public repository, so forks no longer produce an empty nightly run each day with all jobs skipped. Fork maintainers who wish to run the nightly build may enable the `nightly` workflow in the Actions tab of their fork.
Updates
Update #3037.
Fixes #3032.
Add "Add node" :
RMBon backgroundAdd "hamburger" control :
LMBbrings up context senstive menu.Fix so that focus (
F) does not occur when usingCTRL-F(search)Notes:
(1) Rename is in-menu to avoid constant renaming causing "flashing" in UI and slow re-render on every keystroke.
(2) the remapping of pan should make it more consistent with DCCs / Web based editors and can handle 2-button mice / touch interfaces.
Implementation
Some refactoring for code reuse as much as possible for shared actions between keyboard vs mouse actions.
Results