Maniphest T75355

Exported key configuration set is not sorted
Closed, Resolved

Assigned To
Campbell Barton (campbellbarton)
Authored By
Roman Kornev (RomanKornev)
Apr 3 2020, 6:35 PM
Tags
  • BF Blender
Subscribers
Ankit Meel (ankitm)
Campbell Barton (campbellbarton)
Richard Antalik (ISS)
Roman Kornev (RomanKornev)

Description

System Information
Operating system: Win10 x64
Graphics card: GTX 1080Ti

Blender Version
Broken: 2.82a
Worked: (newest version of Blender that worked as expected)

Short description of error
Easy fix.
Right now, the exported key configuration set is NOT sorted. Which makes it extremely difficult to compare different key sets, because the order constantly changes.
A simple piece of code like sorted(keyconfig_data) before exporting should do the trick.
Since the order of items in that file has no effect on importing, I see no downside to this.

Exact steps for others to reproduce the error
Open any keymap
Click Export
The exported list is not alphabetically sorted by the first tuple value.

Revisions and Commits

Event Timeline

Roman Kornev (RomanKornev) created this task.Apr 3 2020, 6:35 PM
Roman Kornev (RomanKornev) added a comment.Apr 5 2020, 1:04 PM

Looking at current issues in https://developer.blender.org/T68884:

The ability to re-order key-map items.

This is important as key-map items are handled in the order listed, with some items passing on to key-map items defined afterwards.

If key-map items are handled in order without the ability to change that order in the UI, then we can't quite sort everything.
But we can sort the top-level groups like 'Window', 'Screen', '3D View' between each other, since they will never conflict, but their order is still random currently.

I've implemented the change locally, and the performance impact is non-existant on my machine, because the top-level list has only about 200 items.

Ankit Meel (ankitm) added a comment.Apr 5 2020, 1:06 PM
Roman Kornev (RomanKornev) added a comment.Apr 5 2020, 1:39 PM

Thanks! I'm still learning how to contribute.

Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).Apr 6 2020, 1:00 PM

I submitted the patch.

Campbell Barton (campbellbarton) closed this task as Resolved.Apr 6 2020, 3:42 PM
Campbell Barton (campbellbarton) claimed this task.
Campbell Barton (campbellbarton) added a subscriber: Campbell Barton (campbellbarton).

Committed D7350, closing.