[Bf-blender-cvs] [eb24c9a1e12] blender2.8: Keymap: Pose/Weight-Paint modes now co-exist

Campbell Barton noreply at git.blender.org
Wed May 30 12:58:01 CEST 2018


Commit: eb24c9a1e1246716820cd031aeb3d755d1325b24
Author: Campbell Barton
Date:   Wed May 30 12:46:33 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBeb24c9a1e1246716820cd031aeb3d755d1325b24

Keymap: Pose/Weight-Paint modes now co-exist

Use the same key for pose & weight paint mode (instead of texture paint)

This makes more sense since pose/weight paint modes
are often used in combination.

===================================================================

M	source/blender/editors/object/object_edit.c
M	source/blender/editors/object/object_ops.c

===================================================================

diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 65fe578a602..85d62c0401f 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1360,15 +1360,7 @@ static int object_mode_set_exec(bContext *C, wmOperator *op)
 	const bool toggle = RNA_boolean_get(op->ptr, "toggle");
 
 	if (use_submode) {
-		/* Apply arbitrary fallback modes, see: T55162. */
-		if (ob) {
-			if (ob->type == OB_ARMATURE) {
-				if (mode == OB_MODE_TEXTURE_PAINT) {
-					mode = OB_MODE_POSE;
-				}
-			}
-		}
-
+		/* When not changing modes use submodes, see: T55162. */
 		if (toggle == false) {
 			if (mode == restore_mode) {
 				switch (mode) {
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index d40db22d5cf..220668f8a87 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -291,13 +291,13 @@ void ED_keymap_object(wmKeyConfig *keyconf)
 	/* modes */
 	{
 		short key_mode_pair[][2] = {
-			{ACCENTGRAVEKEY, OB_MODE_OBJECT},
 			{ONEKEY, OB_MODE_OBJECT},
 			{TWOKEY, OB_MODE_EDIT},
-			{THREEKEY, OB_MODE_SCULPT},
-			{FOURKEY, OB_MODE_TEXTURE_PAINT},  /* or OB_MODE_POSE */
-			{FIVEKEY, OB_MODE_VERTEX_PAINT},
-			{SIXKEY, OB_MODE_WEIGHT_PAINT},
+			{THREEKEY, OB_MODE_POSE},
+			{THREEKEY, OB_MODE_WEIGHT_PAINT},
+			{FOURKEY, OB_MODE_VERTEX_PAINT},
+			{FIVEKEY, OB_MODE_SCULPT},
+			{SIXKEY, OB_MODE_TEXTURE_PAINT},
 			{SEVENKEY, OB_MODE_PARTICLE_EDIT},
 		};



More information about the Bf-blender-cvs mailing list