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:
authorJulian Eisel <eiseljulian@gmail.com>2016-12-16 04:35:36 +0300
committerJulian Eisel <eiseljulian@gmail.com>2016-12-16 04:49:53 +0300
commit4df75e536a0847cf5e5f567f92f1391f1f72c211 (patch)
tree675d07ca71955c9bb9f9bd0e8da965d3a91eb6bf /source/blender/editors/space_view3d/view3d_edit.c
parent524ab96245211bb722b82e197ac75bba6bd10e69 (diff)
Make Shift+LMB on transform manipulator configurable
It's now possible to change the shortcut that enables planar transformation with the transform manipulators (shift+LMB on axis). This actually fixes the workaround added in rB20681f49801fd. Thing is that we needed to allow using the manipulators, even if a modifier key is held so things like snapping work right away. That's why normal LMB behavior uses KM_ANY. However, event handling would always execute the KM_ANY keymap handler because it's iterated over first. Simply solved this by registering the KM_SHIFT keymap item first, so it has priority over the KM_ANY one.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_edit.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 080f205b530..eb4d1b3819b 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -4782,13 +4782,10 @@ static int manipulator_invoke(bContext *C, wmOperator *op, const wmEvent *event)
if (!(v3d->twflag & V3D_USE_MANIPULATOR)) return OPERATOR_PASS_THROUGH;
if (!(v3d->twflag & V3D_DRAW_MANIPULATOR)) return OPERATOR_PASS_THROUGH;
- /* only no modifier or shift */
- if (event->keymodifier != 0 && event->keymodifier != KM_SHIFT) return OPERATOR_PASS_THROUGH;
-
/* note; otherwise opengl won't work */
view3d_operator_needs_opengl(C);
- if (0 == BIF_do_manipulator(C, event, op))
+ if (BIF_do_manipulator(C, event, op) == 0)
return OPERATOR_PASS_THROUGH;
return OPERATOR_FINISHED;
@@ -4809,6 +4806,9 @@ void VIEW3D_OT_manipulator(wmOperatorType *ot)
/* properties to pass to transform */
Transform_Properties(ot, P_CONSTRAINT);
+
+ RNA_def_boolean(ot->srna, "use_planar_constraint", false, "Planar Constraint", "Limit the transformation to the "
+ "two axes that have not been clicked (translate/scale only)");
}
static int enable_manipulator_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))