Keymaps saved in previous versions of Blender (before 4.0) are not compatible with 4.0 alpha #109698

Closed
opened 2023-07-04 15:56:23 +02:00 by Marius Eugen Mihai · 2 comments

System Information
Operating system: Windows-10-10.0.19045-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.68

Blender Version
Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-07-04 00:46, hash: 4f6ce6850023
Worked: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: c7fc78b81ecb

Short description of error
Keymaps saved in Blender 3.6.0 don't seem compatible with 4.0 alpha.

Exact steps for others to reproduce the error
Open Blender 3.6.0 stable release and open the Edit>Preferences menu. Go to the Keymap tab and choose a key configuration from the drop-down list (I used the "Industry Compatible" one for this test). Export the key configuration to a file using the export button (I renamed it for easy identification when importing).
Just to make sure it's working, reimport the configuration in Blender 3.6.0. Everything works as expected.

Open Blender 4.0 alpha and navigate to the same Keymap tab in the preferences window. Click the "Import" button and import the key configuration exported from Blender 3.6.0. Blender will throw and error.

I also tried copying a key config saved in a previous version of Blender, which works fine on any recent version (3.4, 3.5, 3.6) inside the "blender root folder\4.0\scripts\presets\keyconfig" folder and selecting it from the drop-down in the preferences window, and that also threw an error.

I don't know if this is just a temporary issue, perhaps due to a change in the way Blender 4 will handle the keymap presets, but I thought I'd mention it, in case it's unintentional. I'm sure being able to import their custom keymaps is important to many users.

Thanks!

**System Information** Operating system: Windows-10-10.0.19045-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 531.68 **Blender Version** Broken: version: 4.0.0 Alpha, branch: main, commit date: 2023-07-04 00:46, hash: `4f6ce6850023` Worked: 3.6.0, branch: blender-v3.6-release, commit date: 2023-06-27 08:08, hash: `c7fc78b81ecb` **Short description of error** Keymaps saved in Blender 3.6.0 don't seem compatible with 4.0 alpha. **Exact steps for others to reproduce the error** Open Blender 3.6.0 stable release and open the Edit>Preferences menu. Go to the Keymap tab and choose a key configuration from the drop-down list (I used the "Industry Compatible" one for this test). Export the key configuration to a file using the export button (I renamed it for easy identification when importing). Just to make sure it's working, reimport the configuration in Blender 3.6.0. Everything works as expected. Open Blender 4.0 alpha and navigate to the same Keymap tab in the preferences window. Click the "Import" button and import the key configuration exported from Blender 3.6.0. Blender will throw and error. I also tried copying a key config saved in a previous version of Blender, which works fine on any recent version (3.4, 3.5, 3.6) inside the "blender root folder\4.0\scripts\presets\keyconfig" folder and selecting it from the drop-down in the preferences window, and that also threw an error. I don't know if this is just a temporary issue, perhaps due to a change in the way Blender 4 will handle the keymap presets, but I thought I'd mention it, in case it's unintentional. I'm sure being able to import their custom keymaps is important to many users. Thanks!
Marius Eugen Mihai added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2023-07-04 15:56:24 +02:00

I can confirm the problem.

Traceback (most recent call last):
  File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bpy\utils\__init__.py", line 678, in keyconfig_set
    execfile(filepath)
  File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bpy\utils\__init__.py", line 106, in execfile
    mod_spec.loader.exec_module(mod)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\Users\Germano Cavalcante\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\presets\keyconfig\Industry_Compatible_3_6.py", line 12783, in <module>
    keyconfig_import_from_data(
  File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bl_keymap_utils\io.py", line 290, in keyconfig_import_from_data
    keyconfig_init_from_data(kc, keyconfig_data)
  File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bl_keymap_utils\io.py", line 276, in keyconfig_init_from_data
    keymap_init_from_data(km, km_items, is_modal=km_args.get("modal", False))
  File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bl_keymap_utils\io.py", line 251, in keymap_init_from_data
    for (kmi_idname, kmi_args, kmi_data) in km_items:
ValueError: too many values to unpack (expected 3)

Maybe some versioning is missing?
It appears to be a regression.
I will bisect...

I can confirm the problem. ``` Traceback (most recent call last): File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bpy\utils\__init__.py", line 678, in keyconfig_set execfile(filepath) File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bpy\utils\__init__.py", line 106, in execfile mod_spec.loader.exec_module(mod) File "<frozen importlib._bootstrap_external>", line 883, in exec_module File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed File "C:\Users\Germano Cavalcante\AppData\Roaming\Blender Foundation\Blender\4.0\scripts\presets\keyconfig\Industry_Compatible_3_6.py", line 12783, in <module> keyconfig_import_from_data( File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bl_keymap_utils\io.py", line 290, in keyconfig_import_from_data keyconfig_init_from_data(kc, keyconfig_data) File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bl_keymap_utils\io.py", line 276, in keyconfig_init_from_data keymap_init_from_data(km, km_items, is_modal=km_args.get("modal", False)) File "D:\BlenderDev\x64-Debug\bin\Debug\4.0\scripts\modules\bl_keymap_utils\io.py", line 251, in keymap_init_from_data for (kmi_idname, kmi_args, kmi_data) in km_items: ValueError: too many values to unpack (expected 3) ``` Maybe some versioning is missing? It appears to be a regression. I will bisect...

I forgot to put Fix #109698: in the commit, but this problem was fixed by 1a44120d71.

Please test again with the next daily build.

Thanks for the report.

I forgot to put `Fix #109698:` in the commit, but this problem was fixed by 1a44120d71. Please test again with the next daily build. Thanks for the report.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-07-05 01:23:13 +02:00
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#109698
No description provided.