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-11-15 06:11:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-11-15 06:11:08 +0300
commit8c7727946c5bbf5119cd82c3ae08dcb65ab8076e (patch)
tree97c5191b44b29ab3e6bc44d471dfdff27b3a0ab6 /source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
parentb3d84853ac5f90e0f54a19ee088ce67c7bd47ec7 (diff)
Gizmo: tweak navigation drawing for axis views
Axis aligned views now show both small/large handles, this makes it possible to well if the view is in front or behind.
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
index ae5ce27cd8d..356f671345a 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
@@ -292,8 +292,8 @@ static void axis_geom_draw(
bool ok = true;
- /* skip view align axis */
- if ((axis_align == axis) && (gz->matrix_offset[axis][2] > 0.0f) == is_pos) {
+ /* Skip view align axis when selecting (allows to switch to opposite side). */
+ if (select && ((axis_align == axis) && (gz->matrix_offset[axis][2] > 0.0f) == is_pos)) {
ok = false;
}
if (ok) {
@@ -313,7 +313,7 @@ static void axis_geom_draw(
* This is a detail so primary axes show as dominant.
*/
const bool is_pos_color = (
- ((axis_order[axis_index].depth > (axis_depth_bias * (is_pos ? -1 : 1))) == (axis_align != axis)));
+ axis_order[axis_index].depth > (axis_depth_bias * (is_pos ? -1 : 1)));
if (select == false) {
@@ -355,7 +355,7 @@ static void axis_geom_draw(
{
GPU_matrix_push();
GPU_matrix_translate_3fv(v_final);
- GPU_matrix_scale_1f(show_axis_char ? AXIS_HANDLE_SIZE_FG : AXIS_HANDLE_SIZE_BG);
+ GPU_matrix_scale_1f(is_pos ? AXIS_HANDLE_SIZE_FG : AXIS_HANDLE_SIZE_BG);
GPUBatch *sphere = GPU_batch_preset_sphere(0);
GPU_batch_program_set_builtin(sphere, GPU_SHADER_3D_UNIFORM_COLOR);