diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-27 18:09:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-11-28 13:36:13 +0300 |
commit | edbf15d3c044e719749b4874275c72b42838b00f (patch) | |
tree | 5fa404ffaf5c7c6ed0bdef2ccb625e1853b89352 /source/blender/blenloader | |
parent | 9c8d31520db6c675d05bdf41d21c89701088d99e (diff) |
Defaults: left click select is now the default.
A few reasons motivating this change:
* It works well for all devices: mouse, trackpad, and tablet pens.
* For beginners or users coming from other software, it's easier to get
started and avoids an initial stumbling block.
* Many users in 2.7 (about half?) were already using left click select, so
combined with the above advantages it makes for a practical default.
Note that we continue to support right click select, as many experienced
Blender users (and developers) see efficiency advantages in this approach.
The option to switch is in the first time setup splash screen, and in the
user preferences.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 4 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_userdef.c | 17 |
2 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index 953fb36bdc7..f9f9905be3c 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -44,6 +44,7 @@ #include "BKE_brush.h" #include "BKE_colortools.h" +#include "BKE_keyconfig.h" #include "BKE_layer.h" #include "BKE_library.h" #include "BKE_main.h" @@ -87,6 +88,9 @@ void BLO_update_defaults_userpref_blend(void) /* Only enable tooltips translation by default, without actually enabling translation itself, for now. */ U.transopts = USER_TR_TOOLTIPS; U.memcachelimit = 4096; + + /* Default to left click select. */ + BKE_keyconfig_pref_set_select_mouse(&U, 0, true); } /** diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 8f90711e41e..a65520c35fa 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -402,19 +402,20 @@ void BLO_version_defaults_userpref_blend(Main *bmain, UserDef *userdef) } } - if (!USER_VERSION_ATLEAST(280, 32)) { - if ((userdef->flag & USER_LMOUSESELECT) ) { - userdef->flag &= ~USER_LMOUSESELECT; - wmKeyConfigPref *kpt = BKE_keyconfig_pref_ensure(userdef, WM_KEYCONFIG_STR_DEFAULT); - IDP_AddToGroup(kpt->prop, IDP_New(IDP_INT, &(IDPropertyTemplate){ .i = 0, }, "select_mouse")); - } - } - if (!USER_VERSION_ATLEAST(280, 33)) { /* Enable GLTF addon by default. */ BKE_addon_ensure(&userdef->addons, "io_scene_gltf2"); } + if (!USER_VERSION_ATLEAST(280, 35)) { + /* Preserve RMB select setting after moving to Python and changing default value. */ + if (USER_VERSION_ATLEAST(280, 32) || !(userdef->flag & USER_LMOUSESELECT)) { + BKE_keyconfig_pref_set_select_mouse(userdef, 1, false); + } + + userdef->flag &= ~USER_LMOUSESELECT; + } + /** * Include next version bump. */ |