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.
This commit is contained in:
@@ -20,15 +20,15 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
||||
items=(
|
||||
('LEFT', "Left",
|
||||
"Use left mouse button for selection. "
|
||||
"The standard behavior that works well for all input devices"),
|
||||
"The standard behavior that works well for mouse, trackpad and tablet devices"),
|
||||
('RIGHT', "Right",
|
||||
"Use right mouse button for selection."
|
||||
"For efficiently working with keyboard and mouse"),
|
||||
"Use right mouse button for selection, and left mouse button for actions. "
|
||||
"This works well primarily for keyboard and mouse devices"),
|
||||
),
|
||||
description=(
|
||||
"Mouse button used for selection"
|
||||
),
|
||||
default='RIGHT',
|
||||
default='LEFT',
|
||||
update=update_fn,
|
||||
)
|
||||
spacebar_action: EnumProperty(
|
||||
|
||||
@@ -19,10 +19,10 @@ class Prefs(bpy.types.KeyConfigPreferences):
|
||||
items=(
|
||||
('LEFT', "Left",
|
||||
"Use left mouse button for selection. "
|
||||
"Standard behavior that works well for all input devices"),
|
||||
"The standard behavior that works well for mouse, trackpad and tablet devices"),
|
||||
('RIGHT', "Right",
|
||||
"Use right mouse button for selection."
|
||||
"For efficiently working with keyboard and mouse"),
|
||||
"Use right mouse button for selection, and left mouse button for actions. "
|
||||
"This works well primarily for keyboard and mouse devices"),
|
||||
),
|
||||
description=(
|
||||
"Mouse button used for selection"
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
* and keep comment above the defines.
|
||||
* Use STRINGIFY() rather than defining with quotes */
|
||||
#define BLENDER_VERSION 280
|
||||
#define BLENDER_SUBVERSION 34
|
||||
#define BLENDER_SUBVERSION 35
|
||||
/* Several breakages with 280, e.g. collections vs layers */
|
||||
#define BLENDER_MINVERSION 280
|
||||
#define BLENDER_MINSUBVERSION 0
|
||||
|
||||
@@ -50,6 +50,8 @@ struct wmKeyConfigPrefType_Runtime *BKE_keyconfig_pref_type_find(const char *idn
|
||||
void BKE_keyconfig_pref_type_add(struct wmKeyConfigPrefType_Runtime *kpt_rt);
|
||||
void BKE_keyconfig_pref_type_remove(const struct wmKeyConfigPrefType_Runtime *kpt_rt);
|
||||
|
||||
void BKE_keyconfig_pref_set_select_mouse(struct UserDef *userdef, int value, bool override);
|
||||
|
||||
void BKE_keyconfig_pref_type_init(void);
|
||||
void BKE_keyconfig_pref_type_free(void);
|
||||
|
||||
|
||||
@@ -120,4 +120,18 @@ void BKE_keyconfig_pref_type_free(void)
|
||||
global_keyconfigpreftype_hash = NULL;
|
||||
}
|
||||
|
||||
/* Set select mouse, for versioning code. */
|
||||
void BKE_keyconfig_pref_set_select_mouse(UserDef *userdef, int value, bool override)
|
||||
{
|
||||
wmKeyConfigPref *kpt = BKE_keyconfig_pref_ensure(userdef, WM_KEYCONFIG_STR_DEFAULT);
|
||||
IDProperty *idprop = IDP_GetPropertyFromGroup(kpt->prop, "select_mouse");
|
||||
if (!idprop) {
|
||||
IDPropertyTemplate tmp = { .i = value };
|
||||
IDP_AddToGroup(kpt->prop, IDP_New(IDP_INT, &tmp, "select_mouse"));
|
||||
}
|
||||
else if (override) {
|
||||
IDP_Int(idprop) = value;
|
||||
}
|
||||
}
|
||||
|
||||
/** \} */
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user