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:
authorCampbell Barton <ideasman42@gmail.com>2018-10-16 13:52:30 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-10-16 14:06:23 +0300
commit5b9ab20fe4447152ff12284a9a149f92a34af9a7 (patch)
tree22e37560c8df043254123e21bcb4b5571aa2118a /source/blender/editors/transform/transform_ops.c
parent345175082b1387270988f0d61fd43f09bbcf6afd (diff)
Transform: axis support for shear tool
Diffstat (limited to 'source/blender/editors/transform/transform_ops.c')
-rw-r--r--source/blender/editors/transform/transform_ops.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 3e6e1f85002..9d928027882 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -552,6 +552,14 @@ void Transform_Properties(struct wmOperatorType *ot, int flags)
RNA_def_property_ui_text(prop, "Axis", "The axis around which the transformation occurs");
}
+ if (flags & P_AXIS_ORTHO) {
+ prop = RNA_def_property(ot->srna, "axis_ortho", PROP_FLOAT, PROP_DIRECTION);
+ RNA_def_property_array(prop, 3);
+ /* Make this not hidden when there's a nice axis selection widget */
+ RNA_def_property_flag(prop, PROP_HIDDEN);
+ RNA_def_property_ui_text(prop, "Axis", "The orthogonal axis around which the transformation occurs");
+ }
+
if (flags & P_CONSTRAINT) {
RNA_def_boolean_vector(ot->srna, "constraint_axis", 3, NULL, "Constraint Axis", "");
prop = RNA_def_property(ot->srna, "constraint_orientation", PROP_ENUM, PROP_NONE);
@@ -834,8 +842,7 @@ static void TRANSFORM_OT_shear(struct wmOperatorType *ot)
WM_operatortype_props_advanced_begin(ot);
- Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT);
- // XXX Shear axis?
+ Transform_Properties(ot, P_PROPORTIONAL | P_MIRROR | P_SNAP | P_GPENCIL_EDIT | P_AXIS | P_AXIS_ORTHO);
}
static void TRANSFORM_OT_push_pull(struct wmOperatorType *ot)