Add Primitive tool initial snap does not work with custom keymap #86888

Closed
opened 2021-03-24 11:51:40 +01:00 by Ludvik Koutny · 10 comments
Contributor

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.92

Blender Version
Broken: version: 2.92.0, branch: master (modified), commit date: 2021-02-24 16:25, hash: 02948a2cab
Worked: (newest version of Blender that worked as expected)

Short description of error
When using custom keymap, it is impossible to snap using Add Primitive tool at the start of primitive creation. This is not an issue of the customized keymap due to following reasons:
1, The Tweak Left Any action is properly defined in the Add Primitive tool context, so it should always override any bindings above in the hierarchy. It is also set up identically to the default keymap:
image.png
2,
Even after manually disabling all the Tweak Left Any bindings above in the 3D view hierarchy, the snapping still doesn't work.

Apparently, somewhere, something in the Add Primitive tool is hardcoded to only work with they default keymap layout.

Exact steps for others to reproduce the error
1, In a Blender installation with default settings, import this keymap: SimpleKeymap.py
2, Enter Add Primitive (Cube) tool
3, Hold down Ctrl key and hover around the default cube
Result: Snap circle doesn't show, indicating initial snapping does not work. This happens despite the fact that the Add Primitive Tool context keymap is set up identically to the default, stock one:
image.png
Expected: Snap circle shows, indicating snapping works.

**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: GeForce GTX 1080 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 461.92 **Blender Version** Broken: version: 2.92.0, branch: master (modified), commit date: 2021-02-24 16:25, hash: `02948a2cab` Worked: (newest version of Blender that worked as expected) **Short description of error** When using custom keymap, it is impossible to snap using Add Primitive tool at the start of primitive creation. This is not an issue of the customized keymap due to following reasons: 1, The Tweak Left Any action is properly defined in the Add Primitive tool context, so it should always override any bindings above in the hierarchy. It is also set up identically to the default keymap: ![image.png](https://archive.blender.org/developer/F9906925/image.png) 2, Even after manually disabling all the Tweak Left Any bindings above in the 3D view hierarchy, the snapping still doesn't work. Apparently, somewhere, something in the Add Primitive tool is hardcoded to only work with they default keymap layout. **Exact steps for others to reproduce the error** 1, In a Blender installation with default settings, import this keymap: [SimpleKeymap.py](https://archive.blender.org/developer/F9906929/SimpleKeymap.py) 2, Enter Add Primitive (Cube) tool 3, Hold down Ctrl key and hover around the default cube Result: Snap circle doesn't show, indicating initial snapping does not work. This happens despite the fact that the Add Primitive Tool context keymap is set up identically to the default, stock one: ![image.png](https://archive.blender.org/developer/F9906932/image.png) Expected: Snap circle shows, indicating snapping works.
Author
Contributor

Added subscriber: @Rawalanche

Added subscriber: @Rawalanche
Member

Added subscriber: @filedescriptor

Added subscriber: @filedescriptor
Member

I took a look at this, but don't fully understand what is going on. In my testing, I couldn't change the default keymap at all. Changing the snap on/off to another key would still toggle with Left Ctrl. But looking at the code, everything seemed fine to me. I will come back to this again later.

I took a look at this, but don't fully understand what is going on. In my testing, I couldn't change the default keymap at all. Changing the snap on/off to another key would still toggle with Left Ctrl. But looking at the code, everything seemed fine to me. I will come back to this again later.

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Needs Triage' to: 'Archived'

Changed status from 'Needs Triage' to: 'Archived'

Well, this setting changes the value of gizmo_tweak in "Generic Gizmo" (which is used by some gizmo):

("Generic Gizmo",
  {"space_type": 'EMPTY', "region_type": 'WINDOW'},
  {"items":
   [("gizmogroup.gizmo_tweak", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
    ],
   },
  ),

So with the new confirmation, Ctrl + click does not activate the tool operator, so there is no reason to show the gizmo since it has no more effect.

Well, this setting changes the value of `gizmo_tweak` in "Generic Gizmo" (which is used by some gizmo): ``` ("Generic Gizmo", {"space_type": 'EMPTY', "region_type": 'WINDOW'}, {"items": [("gizmogroup.gizmo_tweak", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None), ], }, ), ``` So with the new confirmation, `Ctrl + click` does not activate the tool operator, so there is no reason to show the gizmo since it has no more effect.
Author
Contributor

In #86888#1146534, @mano-wii wrote:
Well, this setting changes the value of gizmo_tweak in "Generic Gizmo" (which is used by some gizmo):

("Generic Gizmo",
  {"space_type": 'EMPTY', "region_type": 'WINDOW'},
  {"items":
   [("gizmogroup.gizmo_tweak", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None),
    ],
   },
  ),

So with the new confirmation, Ctrl + click does not activate the tool operator, so there is no reason to show the gizmo since it has no more effect.

  1. Can you tell me where I can find the Generic Gizmo section in the brutally bloated keymap list? I can only find it using search, but it's impossible to find the actual category it resides in through the user interface.

  2. Even after disabling all the generic gizmo related bindings the snap still does not work, so please reopen this task and verify that removing the binding actually solves the bug:
    image.png

  3. Blender's default keymap has generic gizmo also bound on left mouse and the primitive tool snap works there, so it's definitely not the root cause of the issue:
    image.png

> In #86888#1146534, @mano-wii wrote: > Well, this setting changes the value of `gizmo_tweak` in "Generic Gizmo" (which is used by some gizmo): > ``` > ("Generic Gizmo", > {"space_type": 'EMPTY', "region_type": 'WINDOW'}, > {"items": > [("gizmogroup.gizmo_tweak", {"type": 'LEFTMOUSE', "value": 'PRESS'}, None), > ], > }, > ), > ``` > So with the new confirmation, `Ctrl + click` does not activate the tool operator, so there is no reason to show the gizmo since it has no more effect. 1. Can you tell me where I can find the Generic Gizmo section in the brutally bloated keymap list? I can only find it using search, but it's impossible to find the actual category it resides in through the user interface. 2. Even after disabling all the generic gizmo related bindings the snap still does not work, so please reopen this task and verify that removing the binding actually solves the bug: ![image.png](https://archive.blender.org/developer/F9933751/image.png) 3. Blender's default keymap has generic gizmo also bound on left mouse and the primitive tool snap works there, so it's definitely not the root cause of the issue: ![image.png](https://archive.blender.org/developer/F9933756/image.png)

Activate Any, so it doesn't matter if a modifier (Ctrl, Alt, Shift ...) is pressed or not. So the gizmo can be activated with click and any key modifier.
image.png

Disabling is worse.

Activate Any, so it doesn't matter if a modifier (Ctrl, Alt, Shift ...) is pressed or not. So the gizmo can be activated with click and **any** key modifier. ![image.png](https://archive.blender.org/developer/F9933753/image.png) Disabling is worse.
Author
Contributor

In #86888#1146553, @mano-wii wrote:
Activate Any, so it doesn't matter if a modifier (Ctrl, Alt, Shift ...) is pressed or not. So the gizmo can be activated with click and any key modifier.
image.png

Disabling is worse.

Hi,

you still have not answered my question about where can I find the "Generic GIzmo" category within the UI tree:
image.png

Also, this is probably still a bug because this was not updated for existing keymap user has migrated from previous Blender version. There is no reason that should not happen.

So ultimately this ends up with a buggy situation where the existing keymaps are corrupted, and the user can not easily find a solution to the problem through the user interface.

> In #86888#1146553, @mano-wii wrote: > Activate Any, so it doesn't matter if a modifier (Ctrl, Alt, Shift ...) is pressed or not. So the gizmo can be activated with click and **any** key modifier. > ![image.png](https://archive.blender.org/developer/F9933753/image.png) > > Disabling is worse. Hi, you still have not answered my question about where can I find the "Generic GIzmo" category within the UI tree: ![image.png](https://archive.blender.org/developer/F9934292/image.png) Also, this is probably still a bug because this was not updated for existing keymap user has migrated from previous Blender version. There is no reason that should not happen. So ultimately this ends up with a buggy situation where the existing keymaps are corrupted, and the user can not easily find a solution to the problem through the user interface.

I understand that the keymap system needs many improvements.
But not finding a keymap and losing settings when importing old keymaps are different problems and therefore must be reported separately.

I'm not sure about the other one, but not finding a keymap has already been reported in #84510 (Keymap manager - Missing entries for node tools).

I understand that the keymap system needs many improvements. But not finding a keymap and losing settings when importing old keymaps are different problems and therefore must be reported separately. I'm not sure about the other one, but not finding a keymap has already been reported in #84510 (Keymap manager - Missing entries for node tools).
Sign in to join this conversation.
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
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#86888
No description provided.