Keymap: Imported (from previous Blender version) hotkeys resetting after restarting Blender #116778

Open
opened 2024-01-04 11:43:52 +01:00 by CybranM · 4 comments

System Information
Operating system: Windows 10 Home 64-bit (10.0, Build 19045)
Graphics card: RTX 3080

Blender Version
Broken: 4.0.2 (Tested with 4.1 and issue still present)
Worked: 3.6.7 (Tested it just now)

Short description of error
After "Import Existing Settings" from Blender 3.4.1 when starting Blender 4.0.2 and restarting the loaded hotkeys (for addons specifically) are partially reset. From what I can tell its not all addon hotkeys being reset but I don't know if there's a pattern to it or random, seems to be the same each time at least.

I installed Blender 3.6.7 now to test it and loading previous settings works as expected (loading from 3.4.1 to 3.6.7)

Exact steps for others to reproduce the error
The attached video shows me opening Blender 4.0.2 without any settings, loading previous settings from 3.4.1, showing hotkeys and then restarting and then the hotkeys have been reset.

  1. Install an older version of Blender (I've have tested 3.4.1 and 3.6.7)
  2. Set a few custom hotkeys for addons (KeKit and Machin3Tools in my case)
  3. Install Blender 4.0.2
  4. Start Blender 4.0.2 and load previous settings from 3.4.1
  5. Look at keymap (for me they're correct and working at this step)
  6. Restart Blender 4.0.2
  7. Look at keymap (hotkeys are now incorrect)
**System Information** Operating system: Windows 10 Home 64-bit (10.0, Build 19045) Graphics card: RTX 3080 **Blender Version** Broken: 4.0.2 (Tested with 4.1 and issue still present) Worked: 3.6.7 (Tested it just now) **Short description of error** After "Import Existing Settings" from Blender 3.4.1 when starting Blender 4.0.2 and restarting the loaded hotkeys (for addons specifically) are partially reset. From what I can tell its not _all_ addon hotkeys being reset but I don't know if there's a pattern to it or random, seems to be the same each time at least. I installed Blender 3.6.7 now to test it and loading previous settings works as expected (loading from 3.4.1 to 3.6.7) **Exact steps for others to reproduce the error** The attached video shows me opening Blender 4.0.2 without any settings, loading previous settings from 3.4.1, showing hotkeys and then restarting and then the hotkeys have been reset. 1. Install an older version of Blender (I've have tested 3.4.1 and 3.6.7) 2. Set a few custom hotkeys for addons (KeKit and Machin3Tools in my case) 3. Install Blender 4.0.2 4. Start Blender 4.0.2 and load previous settings from 3.4.1 5. Look at keymap (for me they're correct and working at this step) 6. Restart Blender 4.0.2 7. Look at keymap (hotkeys are now incorrect)
CybranM added the
Priority
Normal
Status
Needs Triage
Type
Report
labels 2024-01-04 11:43:53 +01:00
Iliya Katushenock added the
Interest
User Interface
label 2024-01-04 12:47:48 +01:00

Addons often add hotkeys as soon as they are enabled.
The configuration of these hotkeys is not expected to be saved together with the Blender keymap, (as they would be broken if the addon is removed).
This is why many addons place these settings in the addon's own configuration panel.

But even so, if a user customizes the hotkey of an addon operator, it should in fact be imported along with the keymap.

The steps do not mention editing the keymap.
Did you edit the hotkeys of these operators? If not, this appears to be a problem with the addons.

Addons often add hotkeys as soon as they are enabled. The configuration of these hotkeys is not expected to be saved together with the Blender keymap, (as they would be broken if the addon is removed). This is why many addons place these settings in the addon's own configuration panel. But even so, if a user customizes the hotkey of an addon operator, it should in fact be imported along with the keymap. The steps do not mention editing the keymap. Did you edit the hotkeys of these operators? If not, this appears to be a problem with the addons.
Germano Cavalcante added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2024-01-04 20:41:44 +01:00
Author

These are custom hotkeys yes, and it works as expected in 3.6.7 where it imports (and keeps) the custom hotkeys even after restart

These are custom hotkeys yes, and it works as expected in 3.6.7 where it imports (and keeps) the custom hotkeys even after restart

This appears to be a problem with addons.
I can confirm the same issue when importing a custom keymap from the Mesh: Snap Utilities Line addon.
It appears that the custom keymap is adding instead of replacing the addon's original keymap items.

Mesh: Snap Utilities Line registers the keymap using this code:
mesh_snap_utilities_line/__init__.py#L117-L121

Could it be an error to change keyconfigs.default and keyconfigs.addon?
Even though I created the code for this addon, I'm not familiar enough with keymaps to know what to do here.

@ideasman42, can you shed some light here?

This appears to be a problem with addons. I can confirm the same issue when importing a custom keymap from the `Mesh: Snap Utilities Line` addon. It appears that the custom keymap is adding instead of replacing the addon's original keymap items. `Mesh: Snap Utilities Line` registers the keymap using this code: [`mesh_snap_utilities_line/__init__.py#L117-L121`](https://projects.blender.org/blender/blender-addons/src/branch/main/mesh_snap_utilities_line/__init__.py#L117-L121) Could it be an error to change `keyconfigs.default` and `keyconfigs.addon`? Even though I created the code for this addon, I'm not familiar enough with keymaps to know what to do here. @ideasman42, can you shed some light here?
Germano Cavalcante added
Status
Needs Info from Developers
and removed
Status
Needs Information from User
labels 2024-02-28 15:48:38 +01:00
Author

Downloaded Blender 4.1 to test and the bug still happens, not very surprising I suppose.
I also tested exporting (manually from the keymap preferences) the hotkeys from 3.4.1 and importing them into 4.1 but the issue occurs regardless.

Downloaded Blender 4.1 to test and the bug still happens, not very surprising I suppose. I also tested exporting (manually from the keymap preferences) the hotkeys from 3.4.1 and importing them into 4.1 but the issue occurs regardless.
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
2 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#116778
No description provided.