Fix bl_keymap_validate.py failure caused by add-on key-maps

This commit is contained in:
Campbell Barton 2023-09-13 15:09:54 +10:00
parent b1b6f73487
commit 6adc6675ad
1 changed files with 6 additions and 0 deletions

View File

@ -272,6 +272,12 @@ def main() -> None:
# Use `argparse` for full arg parsing, for now this is enough.
relaxed = "--relaxed" not in argv
# NOTE(@ideasman42): Disable add-on items as they may cause differences in the key-map.
# An alternative would be to disable all add-ons, but this is simpler.
if kc_addon := bpy.context.window_manager.keyconfigs.addon:
kc_addon.keymaps.clear()
del kc_addon
has_error = False
presets = keyconfig_preset_scan()