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-06-14 10:40:52 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-14 10:46:11 +0300
commitba2c10c1f70977398ee8019d3aab7005b865ab2e (patch)
treecc47ca8f8f7fd9a6d9bdc4aeb3e6010a4a8eb91a /source/blender/editors/transform
parent22ac20a70505ed50eaedb72f7fa073f49bf5f002 (diff)
3D View: increase size of view aligned rotation
Minor changes based on user feedback. - View aligned rotation manipulator overlapped too often with axis aligned widgets. Increase size (matching 2.79) - Offset arrow-heads when combining rotate & translate, don't draw the stem since it overlaps with scale.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r--source/blender/editors/transform/transform_manipulator_3d.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_manipulator_3d.c b/source/blender/editors/transform/transform_manipulator_3d.c
index a62125935b1..9d3ea2ab156 100644
--- a/source/blender/editors/transform/transform_manipulator_3d.c
+++ b/source/blender/editors/transform/transform_manipulator_3d.c
@@ -1320,6 +1320,14 @@ static void WIDGETGROUP_manipulator_setup(const bContext *C, wmManipulatorGroup
case MAN_AXIS_SCALE_X:
case MAN_AXIS_SCALE_Y:
case MAN_AXIS_SCALE_Z:
+ if (axis_idx >= MAN_AXIS_RANGE_TRANS_START && axis_idx < MAN_AXIS_RANGE_TRANS_END) {
+ int draw_options = 0;
+ if ((man->twtype & (V3D_MANIP_ROTATE | V3D_MANIP_SCALE)) == 0) {
+ draw_options |= ED_MANIPULATOR_ARROW_DRAW_FLAG_STEM;
+ }
+ RNA_enum_set(axis->ptr, "draw_options", draw_options);
+ }
+
WM_manipulator_set_line_width(axis, MANIPULATOR_AXIS_LINE_WIDTH);
break;
case MAN_AXIS_ROT_X:
@@ -1353,6 +1361,7 @@ static void WIDGETGROUP_manipulator_setup(const bContext *C, wmManipulatorGroup
}
else if (axis_idx == MAN_AXIS_ROT_C) {
WM_manipulator_set_flag(axis, WM_MANIPULATOR_DRAW_VALUE, true);
+ WM_manipulator_set_scale(axis, 1.2f);
}
else {
WM_manipulator_set_scale(axis, 0.2f);
@@ -1452,6 +1461,13 @@ static void WIDGETGROUP_manipulator_refresh(const bContext *C, wmManipulatorGrou
WM_manipulator_set_matrix_rotation_from_z_axis(axis, rv3d->twmat[aidx_norm]);
RNA_float_set(axis->ptr, "length", len);
+
+ if (axis_idx >= MAN_AXIS_RANGE_TRANS_START && axis_idx < MAN_AXIS_RANGE_TRANS_END) {
+ if (man->twtype & V3D_MANIP_ROTATE) {
+ /* Avoid rotate and translate arrows overlap. */
+ start_co[2] += 0.215f;
+ }
+ }
WM_manipulator_set_matrix_offset_location(axis, start_co);
WM_manipulator_set_flag(axis, WM_MANIPULATOR_DRAW_OFFSET_SCALE, true);
break;