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>2017-12-19 04:31:40 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-12-19 04:49:02 +0300
commit5df597171bb9065952436027f5a1a271368e51ff (patch)
treee4c4c46e9e07334fd05a675bfbae15a539a0e558 /source/blender/editors/space_view3d
parent12bc63a0fee0bf88595ffc823ad00beb22c32b7a (diff)
Manipulator: Support click only manipulator's
Makes the 3D view navigation widget easier to use: dragging anywhere in the rotation region now rotates without having to avoid the XYZ axis hotspots which only activate on a single click. Logic for drag detection is complicated by manipulators reliance on keeping the modal operator running. Currently this is wrapped in an ifdef, we may want to implement it differently later.
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_navigate.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_manipulator_navigate_type.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_navigate.c b/source/blender/editors/space_view3d/view3d_manipulator_navigate.c
index b7a62c3e60f..bcc067b8fc1 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_navigate.c
@@ -163,6 +163,9 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmManipulatorG
PointerRNA *ptr = WM_manipulator_operator_set(mpr, mapping[part_index], ot_viewnumpad, NULL);
RNA_enum_set(ptr, "type", RV3D_VIEW_FRONT + part_index);
}
+
+ /* When dragging an axis, use this instead. */
+ mpr->drag_part = 0;
}
mgroup->customdata = navgroup;
diff --git a/source/blender/editors/space_view3d/view3d_manipulator_navigate_type.c b/source/blender/editors/space_view3d/view3d_manipulator_navigate_type.c
index b520f239ef5..aac13339b6b 100644
--- a/source/blender/editors/space_view3d/view3d_manipulator_navigate_type.c
+++ b/source/blender/editors/space_view3d/view3d_manipulator_navigate_type.c
@@ -96,7 +96,7 @@ static void axis_geom_draw(
};
qsort(&axis_order, ARRAY_SIZE(axis_order), sizeof(axis_order[0]), BLI_sortutil_cmp_float);
- const float scale_axis = 0.33f;
+ const float scale_axis = 0.25f;
static const float axis_highlight[4] = {1, 1, 1, 1};
static const float axis_black[4] = {0, 0, 0, 1};
static float axis_color[3][4];