3D View: tweaks to navigation gizmo
- Only show axis backdrop when hovering. - Move closer to the screen corner.
This commit is contained in:
parent
9a72342c6e
commit
70bcb0c01c
Notes:
blender-bot
2023-02-14 08:45:12 +01:00
Referenced by issue #54723, Viewport Manipulator Design
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue