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>2021-09-14 05:49:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-09-14 05:49:36 +0300
commit917a972b56af103aee406dfffe1f42745b5ad360 (patch)
tree2a43ab308d544420675c4104588c381cd1447d1c
parent9b0b78d58fe55276b9b83cbb8a2c570cd215ed0a (diff)
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
-rw-r--r--source/blender/editors/mesh/editmesh_bevel.c2
-rw-r--r--source/blender/editors/mesh/editmesh_bisect.c2
-rw-r--r--source/blender/editors/mesh/editmesh_inset.c2
-rw-r--r--source/blender/editors/transform/transform_generics.c2
-rw-r--r--source/blender/makesdna/DNA_view3d_types.h8
5 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c
index 01736f2919a..cdbbdd820b7 100644
--- a/source/blender/editors/mesh/editmesh_bevel.c
+++ b/source/blender/editors/mesh/editmesh_bevel.c
@@ -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;
}
}
diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c
index b511a1d2c14..f525f2c2e91 100644
--- a/source/blender/editors/mesh/editmesh_bisect.c
+++ b/source/blender/editors/mesh/editmesh_bisect.c
@@ -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"));
diff --git a/source/blender/editors/mesh/editmesh_inset.c b/source/blender/editors/mesh/editmesh_inset.c
index 18f51ae9df2..159e84db4ef 100644
--- a/source/blender/editors/mesh/editmesh_inset.c
+++ b/source/blender/editors/mesh/editmesh_inset.c
@@ -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;
}
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 0dfb229191c..b7f579cc12f 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -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) {
diff --git a/source/blender/makesdna/DNA_view3d_types.h b/source/blender/makesdna/DNA_view3d_types.h
index 4d88f6f0c15..fbf087ca392 100644
--- a/source/blender/makesdna/DNA_view3d_types.h
+++ b/source/blender/makesdna/DNA_view3d_types.h
@@ -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),