Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-09-01 16:38:28 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-09-01 16:38:37 +0300
commit8170c92ed41f749ae3c5e8434fb3e55d7577c6df (patch)
treeba5db598b62d4e58ff554766e515cceda5a03b5f
parent26d5c24f0aad85d137f7e465858877d80c0d6a36 (diff)
Fix constrain plane masking shift event
This prevented transformation with a precision modifier.
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/blender_default.py2
-rw-r--r--release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py2
-rw-r--r--source/blender/editors/transform/transform.c17
-rw-r--r--source/blender/editors/transform/transform.h1
4 files changed, 3 insertions, 19 deletions
diff --git a/release/scripts/presets/keyconfig/keymap_data/blender_default.py b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
index 051f52daa5a..3132c8d1aa8 100644
--- a/release/scripts/presets/keyconfig/keymap_data/blender_default.py
+++ b/release/scripts/presets/keyconfig/keymap_data/blender_default.py
@@ -4994,8 +4994,6 @@ def km_transform_modal_map(_params):
("AUTOIK_CHAIN_LEN_DOWN", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True}, None),
("INSERTOFS_TOGGLE_DIR", {"type": 'T', "value": 'PRESS', "repeat": False}, None),
("AUTOCONSTRAIN", {"type": 'MIDDLEMOUSE', "value": 'PRESS', "repeat": False}, None),
- ("CONSTRAINPLANE", {"type": 'LEFT_SHIFT', "value": 'PRESS', "repeat": False}, None),
- ("CONSTRAINPLANE", {"type": 'RIGHT_SHIFT', "value": 'PRESS', "repeat": False}, None),
])
return keymap
diff --git a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
index 36742b4df7a..ef85b45d41a 100644
--- a/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
+++ b/release/scripts/presets/keyconfig/keymap_data/industry_compatible_data.py
@@ -3936,8 +3936,6 @@ def km_transform_modal_map(_params):
("AUTOIK_CHAIN_LEN_DOWN", {"type": 'WHEELUPMOUSE', "value": 'PRESS', "shift": True}, None),
("INSERTOFS_TOGGLE_DIR", {"type": 'T', "value": 'PRESS'}, None),
("AUTOCONSTRAIN", {"type": 'MIDDLEMOUSE', "value": 'PRESS'}, None),
- ("CONSTRAINPLANE", {"type": 'LEFT_SHIFT', "value": 'PRESS', "repeat": False}, None),
- ("CONSTRAINPLANE", {"type": 'RIGHT_SHIFT', "value": 'PRESS', "repeat": False}, None),
])
return keymap
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index 421a8e2d43e..68d8c46d1dd 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -688,11 +688,6 @@ wmKeyMap *transform_modal_keymap(wmKeyConfig *keyconf)
0,
"Automatically detects one direction for constraint",
""},
- {TFM_MODAL_CONSTRAINTPLANE,
- "CONSTRAINPLANE",
- 0,
- "modifier that enables the plane type constraint",
- ""},
{0, NULL, 0, NULL, NULL},
};
@@ -713,10 +708,6 @@ wmKeyMap *transform_modal_keymap(wmKeyConfig *keyconf)
* WM_modalkeymap_add_item(keymap, EVT_RKEY, KM_PRESS, KM_ANY, 0, TFM_MODAL_ROTATE);
* WM_modalkeymap_add_item(keymap, EVT_SKEY, KM_PRESS, KM_ANY, 0, TFM_MODAL_RESIZE);
* WM_modalkeymap_add_item(keymap, MIDDLEMOUSE, KM_PRESS, KM_ANY, 0, TFM_MODAL_AUTOCONSTRAINT);
- * WM_modalkeymap_add_item(
- * keymap, EVT_LEFTSHIFTKEY, KM_PRESS, KM_ANY, 0, TFM_MODAL_CONSTRAINTPLANE);
- * WM_modalkeymap_add_item(
- * keymap, EVT_RIGHTSHIFTKEY, KM_PRESS, KM_ANY, 0, TFM_MODAL_CONSTRAINTPLANE);
* \endcode
*/
@@ -981,6 +972,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
break;
case TFM_MODAL_PLANE_X:
if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) {
+ t->modifiers |= MOD_CONSTRAINT_PLANE;
transform_event_xyz_constraint(t, EVT_XKEY, true);
t->redraw |= TREDRAW_HARD;
handled = true;
@@ -988,6 +980,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
break;
case TFM_MODAL_PLANE_Y:
if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) {
+ t->modifiers |= MOD_CONSTRAINT_PLANE;
transform_event_xyz_constraint(t, EVT_YKEY, true);
t->redraw |= TREDRAW_HARD;
handled = true;
@@ -995,6 +988,7 @@ int transformEvent(TransInfo *t, const wmEvent *event)
break;
case TFM_MODAL_PLANE_Z:
if ((t->flag & (T_NO_CONSTRAINT | T_2D_EDIT)) == 0) {
+ t->modifiers |= MOD_CONSTRAINT_PLANE;
transform_event_xyz_constraint(t, EVT_ZKEY, true);
t->redraw |= TREDRAW_HARD;
handled = true;
@@ -1116,11 +1110,6 @@ int transformEvent(TransInfo *t, const wmEvent *event)
handled = true;
}
break;
- case TFM_MODAL_CONSTRAINTPLANE:
- t->modifiers |= MOD_CONSTRAINT_PLANE;
- t->redraw |= TREDRAW_HARD;
- handled = true;
- break;
/* Those two are only handled in transform's own handler, see T44634! */
case TFM_MODAL_EDGESLIDE_UP:
case TFM_MODAL_EDGESLIDE_DOWN:
diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h
index 9618e0d1bb9..1eaebeff64f 100644
--- a/source/blender/editors/transform/transform.h
+++ b/source/blender/editors/transform/transform.h
@@ -577,7 +577,6 @@ enum {
TFM_MODAL_INSERTOFS_TOGGLE_DIR = 27,
TFM_MODAL_AUTOCONSTRAINT = 28,
- TFM_MODAL_CONSTRAINTPLANE = 29,
};
bool initTransform(struct bContext *C,