Fix: Show modal keymap for operators called inside macros #108027
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#108027
Loading…
Reference in New Issue
No description provided.
Delete Branch "lone_noel/blender:macro-operator-modal-shortcuts"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Display the modal keymap in the status bar for modal operators that
are called within macros. Most notably, this means the keymap for the
the transform operator is now displayed, when it's called as part of
the duplicate, extrude, or loopcut operator or when moving nodes.
Since the macro operator itself does not have a modal keymap, the
status bar would always use the fallback. This is fixed by explicitly
checking for the currently running operator inside a macro.
Additionally this PR also adjust the header text displayed while
transforming nodes so it's not too redundant.
Comparison
This works great!
What is the etiquette when there are multiple reviewers? Is this good to go or should I wait until @ideasman42 had a chance to take a look?
Sorry I should have mentioned that. For this one we really should treat Campbell as a blocking reviewer.
The code changes in
WM_window_modal_keymap_status_draw
make sense.I mostly have questions about the header status text changes. But please just take these as questions as your changes are probably great.
I understand the removal of the keymap string from "Toggle auto-offset direction" as that is shown on the status bar. We have keymaps on the status bar and status in the header.
But then "Toggle auto-attach" is removed from the header. Shouldn't that be similarly changed to show the current status of it? These two things look similar but are treated differently. I realize the current status of that is shown on the status bar, so is that a different problem in that some keymap toggle statuses are shown there and others not?
That's actually a good question. To me it's mostly a difference in how these two toggles work and are indicated otherwise.
The auto attachment is always active and only deactivated while pressing
alt
.So the state (off) and the action (pressing the key) are coupled unambiguously. Additionally the node attchment is telegraphed by highlighting the link so it's obvious when the attachment is off, eliminating the need for an additional indicator, I guess,
For the direction on the other hand pressing
T
actually toggles between left and right (you need to release and press again to toggle back).Currently the effects of this can only be seen after confirming the transform of nodes, so without an indicator the behavior wouldn't be predictable. Ideally there would be a better visual indicator directly in the node editor for this, rather than just this text in the header...
That it actually says "Node Attachment (Off)" is a bit of an implementation quirk of these "toggle while pressed" actions (like Node Attachment or Snap Invert).
They use two modal keymap items to do this: one to turn the property on and one to turn it off.
In this case the modal keymap has the "Node Attachment" item that is set to be triggered when
Alt
is released and the "Node Attachment (Off)" item that is triggered whenAlt
is pressed.Events on release don't seem to be shown in the status bar so that's why only "Node Attachment (Off)" one is shown, which also matches the state it toggles.
@lone_noel
Thanks for the detailed explanation. I mostly wanted to make sure it was thought through, and you certainly have.