[Bf-blender-cvs] [70bcb0c01c1] blender2.8: 3D View: tweaks to navigation gizmo
Campbell Barton
noreply at git.blender.org
Thu Aug 16 04:44:57 CEST 2018
Commit: 70bcb0c01c185dde6b73358561eb175bc5c3650d
Author: Campbell Barton
Date: Thu Aug 16 12:47:24 2018 +1000
Branches: blender2.8
https://developer.blender.org/rB70bcb0c01c185dde6b73358561eb175bc5c3650d
3D View: tweaks to navigation gizmo
- Only show axis backdrop when hovering.
- Move closer to the screen corner.
===================================================================
M source/blender/editors/space_view3d/view3d_gizmo_navigate.c
M source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
index 5778f85a99c..a234aa03482 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate.c
@@ -51,7 +51,7 @@
* \{ */
/* Offset from screen edge. */
-#define GIZMO_OFFSET_FAC 1.5f
+#define GIZMO_OFFSET_FAC 1.2f
/* Size of main icon. */
#define GIZMO_SIZE 80
/* Factor for size of smaller button. */
@@ -204,8 +204,16 @@ static void WIDGETGROUP_navigate_setup(const bContext *UNUSED(C), wmGizmoGroup *
navgroup->gz_array[i] = WM_gizmo_new(info->gizmo, gzgroup, NULL);
wmGizmo *gz = navgroup->gz_array[i];
gz->flag |= WM_GIZMO_GRAB_CURSOR | WM_GIZMO_DRAW_MODAL;
- gz->color[3] = 0.2f;
- gz->color_hi[3] = 0.4f;
+
+ if (i == MPR_ROTATE) {
+ gz->color[3] = 0.0f;
+ gz->color_hi[3] = 0.1f;
+ }
+ else {
+ gz->color[3] = 0.2f;
+ gz->color_hi[3] = 0.4f;
+ }
+
/* may be overwritten later */
gz->scale_basis = (GIZMO_SIZE * GIZMO_MINI_FAC) / 2;
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 5a4f910955e..b68ed61e06c 100644
--- a/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
+++ b/source/blender/editors/space_view3d/view3d_gizmo_navigate_type.c
@@ -218,7 +218,7 @@ static void axis_geom_draw(const wmGizmo *gz, const float color[4], const bool U
if ((draw_center_done == false) && (axis_order[axis_index].depth > -0.01f)) {
/* Circle defining active area (revert back to 2D space). */
- {
+ if (color[3] != 0.0f) {
GPU_matrix_pop();
immUniformColor4fv(color);
imm_draw_circle_fill_3d(pos_id, 0, 0, 1.0f, DIAL_RESOLUTION);
More information about the Bf-blender-cvs
mailing list