Keymaps: replace select / action mouse system

For Blender builtin configurations the option to choose the select mouse remains
and is now also in the splash screen. It works by changing the keymap dynamically
in the script, rather than using special events.

The system of automatic switching of events was not flexible enough to deal with
side effects that require further keymap changes, so it is now under more manual
control in the script.

This breaks compatibility for some scripts and exported key configurations.
These can be fixed by replacing SELECTMOUSE, ACTIONMOUSE, EVT_TWEAK_S and
EVT_TWEAK_A with appropriate LEFTMOUSE, RIGHTMOUSE, EVT_TWEAK_L and
EVT_TWEAK_R events.

Other than that, there should be no functional changes.
This commit is contained in:
Brecht Van Lommel
2018-11-16 08:28:58 +11:00
committed by Campbell Barton
parent 8ecc51e87f
commit 088be7eb2f
20 changed files with 326 additions and 279 deletions

View File

@@ -500,6 +500,8 @@ def keyconfig_import_from_data(name, keyconfig_data):
km = kc.keymaps.new(km_name, **km_args)
keymap_items_from_data(km, km_content["items"], is_modal=km_args.get("modal", False))
return kc
def keyconfig_module_from_preset(name, preset_reference_filename=None):
import os