Fix: GPv3: Add missing keymaps #128705

Merged
Falk David merged 2 commits from nickberckley/blender:gp-keymap into blender-v4.3-release 2024-10-15 11:36:11 +02:00
Contributor

Adds missing keymaps in Grease Pencil modes. Two menus are also added which are needed to be called by keymaps to match GPv2.

Paint Mode

Keymap Operator
Shift I Insert Blank Keyframe
Alt I Delete Animation (menu)
Shift Delete Delete Active Keyframes (all layers)
Shift Ctrl M Merge Layers

Edit Mode

Keymap Operator
Shift I Insert Blank Keyframe
Alt I Delete Animation (menu)
Shift Ctrl M Merge Layers
Shift Q Edit Lines (overlay toggle)
Shift Alt Q Edit Lines Multi-Frame (overlay toggle)
Shift G Vertex Groups

Sculpt Mode

Keymap Operator
I Animation (menu)
Shift I Insert Blank Keyframe
Alt I Delete Animation (menu)
Shift Delete Delete Active Keyframes (all layers)
Shift Ctrl M Merge Layers
Shift Q Edit Lines (overlay toggle)
Shift Alt Q Edit Lines Multi-Frame (overlay toggle)
Y Active Layer
U Active Material
Ctrl C Copy Strokes
Ctrl V Paste Strokes
Shift Ctrl V Paste Strokes (back)
Shift Alt A Automasking (menu)

Weight Paint and Vertex Paint Modes

Keymap Operator
I Animation (menu)
Shift I Insert Blank Keyframe
Alt I Delete Animation (menu)
Shift Delete Delete Active Keyframes (all layers)
Shift Ctrl M Merge Layers
Shift Q Edit Lines (overlay toggle)
Shift Alt Q Edit Lines Multi-Frame (overlay toggle)
Y Active Layer

Issues:

  • There is no grease_pencil.select operator, it uses view3d operator and that causes some issues. For example, L keymap in GPv2 selects linked strokes under mouse cursor. In GPv3 same shortcut selects strokes of selected points (grease_pencil.select_linked), which should technically be on Ctrl L to match rest of the Blender. Regular LMB box-select in edit mode also can't select curve handle points in most cases (while B box select can). This can not be solved by keymaps alone and requires either separate operator for grease pencil selection, or adding properties to current selection operator.
  • Shift G operator in edit mode for selecting similar executes operator right away, instead of poping up operator menu, like it does in GPv2. I'm not sure if there's something missing in operator code, or here. Suggestions welcomed, but if it's operator issue I'll leave that alone here.

Questions for reviewers:

  • In Weight Paint mode there are selection shortcuts that I can't make sense of, or trigger at all. Does anyone know how they got here, and if they're needed?
    image
  • There are keymaps for hiding layers (H, Alt H, Shift H) in draw mode and weight paint mode. Are they needed in sculpt and vertex paint modes too? Seems weird to have them only in those two modes
Adds missing keymaps in Grease Pencil modes. Two menus are also added which are needed to be called by keymaps to match GPv2. **Paint Mode** | Keymap | Operator | | -------- | -------- | | Shift I | Insert Blank Keyframe | | Alt I | Delete Animation (menu) | | Shift Delete | Delete Active Keyframes (all layers) | | Shift Ctrl M | Merge Layers | **Edit Mode** | Keymap | Operator | | -------- | -------- | | Shift I | Insert Blank Keyframe | | Alt I | Delete Animation (menu) | | Shift Ctrl M | Merge Layers | | Shift Q | Edit Lines (overlay toggle) | | Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) | | Shift G | Vertex Groups | **Sculpt Mode** | Keymap | Operator | | -------- | -------- | | I | Animation (menu) | | Shift I | Insert Blank Keyframe | | Alt I | Delete Animation (menu) | | Shift Delete | Delete Active Keyframes (all layers) | | Shift Ctrl M | Merge Layers | | Shift Q | Edit Lines (overlay toggle) | | Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) | | Y | Active Layer | | U | Active Material | | Ctrl C | Copy Strokes | | Ctrl V | Paste Strokes | | Shift Ctrl V | Paste Strokes (back) | | Shift Alt A | Automasking (menu) | **Weight Paint and Vertex Paint Modes** | Keymap | Operator | | -------- | -------- | | I | Animation (menu) | | Shift I | Insert Blank Keyframe | | Alt I | Delete Animation (menu) | | Shift Delete | Delete Active Keyframes (all layers) | | Shift Ctrl M | Merge Layers | | Shift Q | Edit Lines (overlay toggle) | | Shift Alt Q | Edit Lines Multi-Frame (overlay toggle) | | Y | Active Layer | --- Issues: - There is no `grease_pencil.select` operator, it uses `view3d` operator and that causes some issues. For example, `L` keymap in GPv2 selects linked strokes under mouse cursor. In GPv3 same shortcut selects strokes of selected points (`grease_pencil.select_linked`), which should technically be on `Ctrl L` to match rest of the Blender. Regular LMB box-select in edit mode also can't select curve handle points in most cases (while `B` box select can). This can not be solved by keymaps alone and requires either separate operator for grease pencil selection, or adding properties to current selection operator. - `Shift G` operator in edit mode for selecting similar executes operator right away, instead of poping up operator menu, like it does in GPv2. I'm not sure if there's something missing in operator code, or here. Suggestions welcomed, but if it's operator issue I'll leave that alone here. --- Questions for reviewers: - In Weight Paint mode there are selection shortcuts that I can't make sense of, or trigger at all. Does anyone know how they got here, and if they're needed? <img width="541" alt="image" src="attachments/d06bfbf1-26e6-484b-8cbf-fb7c4d243819"> - There are keymaps for hiding layers (H, Alt H, Shift H) in draw mode and weight paint mode. Are they needed in sculpt and vertex paint modes too? Seems weird to have them only in those two modes
Nika Kutsniashvili added 1 commit 2024-10-07 18:01:15 +02:00
Nika Kutsniashvili changed title from Fix: GPv3: Add missing keymaps to WIP: Fix: GPv3: Add missing keymaps 2024-10-07 18:01:28 +02:00
Nika Kutsniashvili requested review from Matias Mendiola 2024-10-07 18:23:27 +02:00
Nika Kutsniashvili requested review from Falk David 2024-10-07 18:23:27 +02:00
Nika Kutsniashvili changed title from WIP: Fix: GPv3: Add missing keymaps to Fix: GPv3: Add missing keymaps 2024-10-07 18:23:33 +02:00
Member

I think for the select similar issue adding WM_menu_invoke as the invoke would be the right fix.

I think for the select similar issue adding `WM_menu_invoke` as the invoke would be the right fix.
Falk David approved these changes 2024-10-07 18:46:17 +02:00
Falk David left a comment
Member

Looks good to me overall. I agree that some of this could be refactored. E.g. we could have a km_grease_pencil_keyframes keymap that would be used in the modes that need the insert_blank_frame, delete_frame etc. But that's a cleanup for later.

Looks good to me overall. I agree that some of this could be refactored. E.g. we could have a `km_grease_pencil_keyframes` keymap that would be used in the modes that need the `insert_blank_frame`, `delete_frame` etc. But that's a cleanup for later.
@ -3871,2 +3892,4 @@
op_menu("GREASE_PENCIL_MT_move_to_layer", {"type": 'M', "value": 'PRESS'}),
# Merge Down
("grease_pencil.layer_merge", {"type": 'M', "value": 'PRESS', "ctrl": True, "shift": True}, None),
Member

Would be good to specify the mode here so that we're sure it uses the DOWN option.

Would be good to specify the `mode` here so that we're sure it uses the `DOWN` option.
filedescriptor marked this conversation as resolved
Member

In Weight Paint mode there are selection shortcuts that I can't make sense of, or trigger at all. Does anyone know how they got here, and if they're needed?

I believe they are needed to select bones in pose mode. This might be broken atm.

> In Weight Paint mode there are selection shortcuts that I can't make sense of, or trigger at all. Does anyone know how they got here, and if they're needed? I believe they are needed to select bones in pose mode. This might be broken atm.
Member

There are keymaps for hiding layers (H, Alt H, Shift H) in draw mode and weight paint mode. Are they needed in sculpt and vertex paint modes too? Seems weird to have them only in those two modes

@mendio Can probably answer this one better than I can, but I would guess these should be also added in the other modes.

> There are keymaps for hiding layers (H, Alt H, Shift H) in draw mode and weight paint mode. Are they needed in sculpt and vertex paint modes too? Seems weird to have them only in those two modes @mendio Can probably answer this one better than I can, but I would guess these should be also added in the other modes.
Nika Kutsniashvili added 1 commit 2024-10-08 20:06:57 +02:00
Iliya Katushenock added this to the Module: Grease Pencil project 2024-10-13 14:39:27 +02:00
Falk David merged commit f909bf2b13 into blender-v4.3-release 2024-10-15 11:36:11 +02:00
Nika Kutsniashvili deleted branch gp-keymap 2024-10-15 11:41:54 +02:00

There are keymaps for hiding layers (H, Alt H, Shift H) in draw mode and weight paint mode. Are they needed in sculpt and vertex paint modes too? Seems weird to have them only in those two modes

@mendio Can probably answer this one better than I can, but I would guess these should be also added in the other modes.

Yes, I think it would be nice for consistency if all modes shared the same shortcuts for hide/show layers

> > There are keymaps for hiding layers (H, Alt H, Shift H) in draw mode and weight paint mode. Are they needed in sculpt and vertex paint modes too? Seems weird to have them only in those two modes > > @mendio Can probably answer this one better than I can, but I would guess these should be also added in the other modes. Yes, I think it would be nice for consistency if all modes shared the same shortcuts for hide/show layers
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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 Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#128705
No description provided.