Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-03-02 09:29:27 +0300
committerCampbell Barton <campbell@blender.org>2022-03-02 09:29:27 +0300
commit7e4c0313283304bd8f020eaedb94b35e75b50068 (patch)
tree53ba58f3d21cee70756b2f803f508e4d254b746f /tests
parent4986f718482b061082936f1f6aa13929741093a2 (diff)
Cleanup: remove all tweak events from key-map presets
Diffstat (limited to 'tests')
-rw-r--r--tests/python/bl_keymap_validate.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/python/bl_keymap_validate.py b/tests/python/bl_keymap_validate.py
index 7bd40ce97e7..1743893dc8a 100644
--- a/tests/python/bl_keymap_validate.py
+++ b/tests/python/bl_keymap_validate.py
@@ -63,6 +63,12 @@ PRESET_PREFS = {
),
}
+# Don't report duplicates for these presets.
+ALLOW_DUPLICATES = {
+ # This key-map manipulates the default key-map, making it difficult to avoid duplicates entirely.
+ "Industry_Compatible"
+}
+
# -----------------------------------------------------------------------------
# Generic Utilities
@@ -271,7 +277,6 @@ def main() -> None:
presets = keyconfig_preset_scan()
for filepath in presets:
name_only = os.path.splitext(os.path.basename(filepath))[0]
-
for config in PRESET_PREFS.get(name_only, ((),)):
name_only_with_config = name_only + keyconfig_config_as_filename_component(config)
print("KeyMap Validate:", name_only_with_config, end=" ... ")
@@ -307,7 +312,10 @@ def main() -> None:
# Perform an additional sanity check:
# That there are no identical key-map items.
- error_text_duplicates = keyconfig_report_duplicates(data_orig)
+ if name_only not in ALLOW_DUPLICATES:
+ error_text_duplicates = keyconfig_report_duplicates(data_orig)
+ else:
+ error_text_duplicates = ""
if error_text_consistency or error_text_duplicates:
print("FAILED!")