[Bf-blender-cvs] [860adf13ed7] vr_scene_inspection: Cleanup: Rename gizmo-group-type flag for continuous redraws
Julian Eisel
noreply at git.blender.org
Mon Mar 16 21:23:51 CET 2020
Commit: 860adf13ed7675fdf57819b92fcc7e60daa6f1de
Author: Julian Eisel
Date: Mon Mar 16 21:23:27 2020 +0100
Branches: vr_scene_inspection
https://developer.blender.org/rB860adf13ed7675fdf57819b92fcc7e60daa6f1de
Cleanup: Rename gizmo-group-type flag for continuous redraws
===================================================================
M source/blender/makesrna/intern/rna_wm_gizmo.c
M source/blender/windowmanager/gizmo/WM_gizmo_types.h
M source/blender/windowmanager/intern/wm_draw.c
===================================================================
diff --git a/source/blender/makesrna/intern/rna_wm_gizmo.c b/source/blender/makesrna/intern/rna_wm_gizmo.c
index 4c278fb3f63..47d793382a7 100644
--- a/source/blender/makesrna/intern/rna_wm_gizmo.c
+++ b/source/blender/makesrna/intern/rna_wm_gizmo.c
@@ -1376,12 +1376,12 @@ static void rna_def_gizmogroup(BlenderRNA *brna)
0,
"Tool Init",
"Postpone running until tool operator run (when used with a tool)"},
- {WM_GIZMOGROUPTYPE_CONTINUOUS_REDRAW,
- "CONTINUOUS_REDRAW",
+ {WM_GIZMOGROUPTYPE_VR_REDRAWS,
+ "VR_REDRAWS",
0,
- "Continuous Redraw",
- "Force the group to be redrawn all the time (may have significantly negative impact on "
- "performance)"},
+ "VR Redraws",
+ "The gizmos are made for use with virtual reality sessions and require special redraw "
+ "management"},
{0, NULL, 0, NULL, NULL},
};
prop = RNA_def_property(srna, "bl_options", PROP_ENUM, PROP_NONE);
diff --git a/source/blender/windowmanager/gizmo/WM_gizmo_types.h b/source/blender/windowmanager/gizmo/WM_gizmo_types.h
index f51dc61f538..04311b9c070 100644
--- a/source/blender/windowmanager/gizmo/WM_gizmo_types.h
+++ b/source/blender/windowmanager/gizmo/WM_gizmo_types.h
@@ -140,7 +140,12 @@ typedef enum eWM_GizmoFlagGroupTypeFlag {
*/
WM_GIZMOGROUPTYPE_DELAY_REFRESH_FOR_TWEAK = (1 << 8),
- WM_GIZMOGROUPTYPE_CONTINUOUS_REDRAW = (1 << 9),
+ /**
+ * Cause continuous redraws, i.e. set the region redraw flag on every main loop itertion. This
+ * should really be avoided by using proper region redraw tagging, notifiers and the message-bus,
+ * however for VR it's sometimes needed.
+ */
+ WM_GIZMOGROUPTYPE_VR_REDRAWS = (1 << 9),
} eWM_GizmoFlagGroupTypeFlag;
/**
diff --git a/source/blender/windowmanager/intern/wm_draw.c b/source/blender/windowmanager/intern/wm_draw.c
index 4a33765f500..a0e8374a46a 100644
--- a/source/blender/windowmanager/intern/wm_draw.c
+++ b/source/blender/windowmanager/intern/wm_draw.c
@@ -199,7 +199,7 @@ static void wm_region_test_gizmo_do_draw(bContext *C,
wmGizmoMap *gzmap = region->gizmo_map;
for (wmGizmoGroup *gzgroup = WM_gizmomap_group_list(gzmap)->first; gzgroup;
gzgroup = gzgroup->next) {
- if (tag_redraw && (gzgroup->type->flag & WM_GIZMOGROUPTYPE_CONTINUOUS_REDRAW)) {
+ if (tag_redraw && (gzgroup->type->flag & WM_GIZMOGROUPTYPE_VR_REDRAWS)) {
ScrArea *ctx_sa = CTX_wm_area(C);
ARegion *ctx_ar = CTX_wm_region(C);
More information about the Bf-blender-cvs
mailing list