UI: keep navigation gizmos visible during modal operators
Hiding viewport navigation gizmos caused the UI to "flicker" unnecessarily, the axis could also be useful as a reference. Resolves T73684
This commit is contained in:
@@ -310,7 +310,7 @@ static bool edbm_bevel_init(bContext *C, wmOperator *op, const bool is_modal)
|
||||
|
||||
if (v3d) {
|
||||
opdata->gizmo_flag = v3d->gizmo_flag;
|
||||
v3d->gizmo_flag = V3D_GIZMO_HIDE;
|
||||
v3d->gizmo_flag |= V3D_GIZMO_HIDE_DEFAULT_MODAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ static int mesh_bisect_invoke(bContext *C, wmOperator *op, const wmEvent *event)
|
||||
/* Misc other vars. */
|
||||
G.moving = G_TRANSFORM_EDIT;
|
||||
opdata->gizmo_flag = v3d->gizmo_flag;
|
||||
v3d->gizmo_flag = V3D_GIZMO_HIDE;
|
||||
v3d->gizmo_flag |= V3D_GIZMO_HIDE_DEFAULT_MODAL;
|
||||
|
||||
/* Initialize modal callout. */
|
||||
ED_workspace_status_text(C, TIP_("LMB: Click and drag to draw cut line"));
|
||||
|
||||
@@ -191,7 +191,7 @@ static bool edbm_inset_init(bContext *C, wmOperator *op, const bool is_modal)
|
||||
G.moving = G_TRANSFORM_EDIT;
|
||||
if (v3d) {
|
||||
opdata->gizmo_flag = v3d->gizmo_flag;
|
||||
v3d->gizmo_flag = V3D_GIZMO_HIDE;
|
||||
v3d->gizmo_flag |= V3D_GIZMO_HIDE_DEFAULT_MODAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
|
||||
/* turn gizmo off during transform */
|
||||
if (t->flag & T_MODAL) {
|
||||
t->gizmo_flag = v3d->gizmo_flag;
|
||||
v3d->gizmo_flag = V3D_GIZMO_HIDE;
|
||||
v3d->gizmo_flag |= V3D_GIZMO_HIDE_DEFAULT_MODAL;
|
||||
}
|
||||
|
||||
if (t->scene->toolsettings->transform_flag & SCE_XFORM_AXIS_ALIGN) {
|
||||
|
||||
@@ -610,6 +610,14 @@ enum {
|
||||
V3D_GIZMO_HIDE_TOOL = (1 << 3),
|
||||
};
|
||||
|
||||
/**
|
||||
* Hide these gizmos when modal operators are active,
|
||||
* the intention is to hide all gizmos except for navigation since from a user-perspective
|
||||
* these are closer to UI-level interface elements. Hiding them makes the UI flicker, also,
|
||||
* the 3D view-axis can be useful to see during interactions.
|
||||
*/
|
||||
#define V3D_GIZMO_HIDE_DEFAULT_MODAL (V3D_GIZMO_HIDE_CONTEXT | V3D_GIZMO_HIDE_TOOL)
|
||||
|
||||
/** #View3d.gizmo_show_object */
|
||||
enum {
|
||||
V3D_GIZMO_SHOW_OBJECT_TRANSLATE = (1 << 0),
|
||||
|
||||
Reference in New Issue
Block a user