[Bf-blender-cvs] [34daf527f3a] master: Cleanup: rename RENDER_OVERRIDE -> HIDE_OVERLAYS
Campbell Barton
noreply at git.blender.org
Tue Mar 5 08:29:45 CET 2019
Commit: 34daf527f3a0f6b64f8f11972088b4567e937699
Author: Campbell Barton
Date: Tue Mar 5 15:09:25 2019 +1100
Branches: master
https://developer.blender.org/rB34daf527f3a0f6b64f8f11972088b4567e937699
Cleanup: rename RENDER_OVERRIDE -> HIDE_OVERLAYS
Match the UI naming (changed since 2.7x).
===================================================================
M source/blender/blenloader/intern/versioning_250.c
M source/blender/draw/engines/eevee/eevee_private.h
M source/blender/draw/engines/gpencil/gpencil_draw_utils.c
M source/blender/draw/engines/gpencil/gpencil_engine.c
M source/blender/draw/intern/draw_manager.c
M source/blender/draw/intern/draw_view.c
M source/blender/draw/modes/object_mode.c
M source/blender/draw/modes/overlay_mode.c
M source/blender/draw/modes/pose_mode.c
M source/blender/editors/gpencil/annotate_draw.c
M source/blender/editors/gpencil/drawgpencil.c
M source/blender/editors/mesh/editmesh_polybuild.c
M source/blender/editors/object/object_transform.c
M source/blender/editors/space_view3d/space_view3d.c
M source/blender/editors/space_view3d/view3d_draw.c
M source/blender/editors/space_view3d/view3d_draw_legacy.c
M source/blender/editors/space_view3d/view3d_gizmo_armature.c
M source/blender/editors/space_view3d/view3d_gizmo_camera.c
M source/blender/editors/space_view3d/view3d_gizmo_empty.c
M source/blender/editors/space_view3d/view3d_gizmo_forcefield.c
M source/blender/editors/space_view3d/view3d_gizmo_light.c
M source/blender/editors/space_view3d/view3d_gizmo_navigate.c
M source/blender/editors/space_view3d/view3d_gizmo_ruler.c
M source/blender/editors/transform/transform.c
M source/blender/makesdna/DNA_view3d_types.h
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c
index 12495f5da18..4e64b8d0925 100644
--- a/source/blender/blenloader/intern/versioning_250.c
+++ b/source/blender/blenloader/intern/versioning_250.c
@@ -1395,9 +1395,9 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
if (bmain->versionfile <= 251) { /* 2.5.1 had no subversions */
bScreen *sc;
- /* Blender 2.5.2 - subversion 0 introduced a new setting: V3D_RENDER_OVERRIDE.
+ /* Blender 2.5.2 - subversion 0 introduced a new setting: V3D_HIDE_OVERLAYS.
* This bit was used in the past for V3D_TRANSFORM_SNAP, which is now deprecated.
- * Here we clear it for old files so they don't come in with V3D_RENDER_OVERRIDE set,
+ * Here we clear it for old files so they don't come in with V3D_HIDE_OVERLAYS set,
* which would cause cameras, lights, etc to become invisible */
for (sc = bmain->screen.first; sc; sc = sc->id.next) {
ScrArea *sa;
@@ -1406,7 +1406,7 @@ void blo_do_versions_250(FileData *fd, Library *lib, Main *bmain)
for (sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_VIEW3D) {
View3D *v3d = (View3D *)sl;
- v3d->flag2 &= ~V3D_RENDER_OVERRIDE;
+ v3d->flag2 &= ~V3D_HIDE_OVERLAYS;
}
}
}
diff --git a/source/blender/draw/engines/eevee/eevee_private.h b/source/blender/draw/engines/eevee/eevee_private.h
index 0d168bb2793..07485167fe3 100644
--- a/source/blender/draw/engines/eevee/eevee_private.h
+++ b/source/blender/draw/engines/eevee/eevee_private.h
@@ -110,7 +110,7 @@ extern struct DrawEngineType draw_engine_eevee_type;
} \
} ((void)0)
-#define OVERLAY_ENABLED(v3d) ((v3d) && (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0)
+#define OVERLAY_ENABLED(v3d) ((v3d) && (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0)
#define LOOK_DEV_MODE_ENABLED(v3d) ((v3d) && (v3d->shading.type == OB_MATERIAL))
#define LOOK_DEV_OVERLAY_ENABLED(v3d) (LOOK_DEV_MODE_ENABLED(v3d) && OVERLAY_ENABLED(v3d) && (v3d->overlay.flag & V3D_OVERLAY_LOOK_DEV))
#define USE_SCENE_LIGHT(v3d) ((!v3d) || (!LOOK_DEV_MODE_ENABLED(v3d)) || ((LOOK_DEV_MODE_ENABLED(v3d) && (v3d->shading.flag & V3D_SHADING_SCENE_LIGHTS))))
diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
index e77f570b7bd..24bb2c9dd14 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c
@@ -77,7 +77,7 @@ static void gpencil_calc_vertex(
const DRWContextState *draw_ctx = DRW_context_state_get();
const bool main_onion = draw_ctx->v3d != NULL ? (draw_ctx->v3d->gp_flag & V3D_GP_SHOW_ONION_SKIN) : true;
const bool playing = stl->storage->is_playing;
- const bool overlay = draw_ctx->v3d != NULL ? (bool)((draw_ctx->v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
+ const bool overlay = draw_ctx->v3d != NULL ? (bool)((draw_ctx->v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) : true;
const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) &&
overlay && main_onion && DRW_gpencil_onion_active(gpd) && !playing;
@@ -865,7 +865,7 @@ static void gpencil_add_editpoints_vertexdata(
if (cache->is_dirty) {
if ((obact == ob) &&
- ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
(v3d->gp_flag & V3D_GP_SHOW_EDIT_LINES))
{
/* line of the original stroke */
@@ -1340,7 +1340,7 @@ void DRW_gpencil_populate_buffer_strokes(GPENCIL_e_data *e_data, void *vedata, T
GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl;
const DRWContextState *draw_ctx = DRW_context_state_get();
View3D *v3d = draw_ctx->v3d;
- const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
+ const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) : true;
Brush *brush = BKE_paint_brush(&ts->gp_paint->paint);
bGPdata *gpd_eval = ob->data;
/* need the original to avoid cow overhead while drawing */
@@ -1734,7 +1734,7 @@ void DRW_gpencil_populate_datablock(
const bool main_onion = v3d != NULL ? (v3d->gp_flag & V3D_GP_SHOW_ONION_SKIN) : true;
const bool do_onion = (bool)((gpd->flag & GP_DATA_STROKE_WEIGHTMODE) == 0) &&
main_onion && DRW_gpencil_onion_active(gpd);
- const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
+ const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) : true;
const bool time_remap = BKE_gpencil_has_time_modifiers(ob);
float opacity;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c
index b7d03900eb1..8348436bb42 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.c
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.c
@@ -620,7 +620,7 @@ void GPENCIL_cache_populate(void *vedata, Object *ob)
/* grid */
if ((v3d) &&
- ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
(v3d->gp_flag & V3D_GP_SHOW_GRID) &&
(ob->type == OB_GPENCIL) && (ob == draw_ctx->obact))
{
@@ -828,7 +828,7 @@ void GPENCIL_draw_scene(void *ved)
const bool is_render = stl->storage->is_render;
bGPdata *gpd_act = (obact) && (obact->type == OB_GPENCIL) ? (bGPdata *)obact->data : NULL;
const bool is_edit = GPENCIL_ANY_EDIT_MODE(gpd_act);
- const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) : true;
+ const bool overlay = v3d != NULL ? (bool)((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) : true;
/* if the draw is for select, do a basic drawing and return */
if (DRW_state_is_select()) {
@@ -840,7 +840,7 @@ void GPENCIL_draw_scene(void *ved)
/* paper pass to display a comfortable area to draw over complex scenes with geometry */
if ((!is_render) && (obact) && (obact->type == OB_GPENCIL)) {
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ if (((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
(v3d->gp_flag & V3D_GP_SHOW_PAPER))
{
DRW_draw_pass(psl->paper_pass);
@@ -863,7 +863,7 @@ void GPENCIL_draw_scene(void *ved)
/* grid pass */
if ((!is_render) && (obact) && (obact->type == OB_GPENCIL)) {
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ if (((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
(v3d->gp_flag & V3D_GP_SHOW_GRID))
{
DRW_draw_pass(psl->grid_pass);
@@ -1017,7 +1017,7 @@ void GPENCIL_draw_scene(void *ved)
}
/* grid pass */
if ((!is_render) && (obact) && (obact->type == OB_GPENCIL)) {
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ if (((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
(v3d->gp_flag & V3D_GP_SHOW_GRID))
{
DRW_draw_pass(psl->grid_pass);
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index e07ab26d122..c678fd974f3 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -1417,7 +1417,7 @@ void DRW_draw_view(const bContext *C)
/* Reset before using it. */
drw_state_prepare_clean_for_draw(&DST);
DST.options.draw_text = (
- (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0 &&
+ (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0 &&
(v3d->overlay.flag & V3D_OVERLAY_HIDE_TEXT) != 0);
DRW_draw_render_loop_ex(depsgraph, engine_type, ar, v3d, viewport, C);
}
@@ -1437,7 +1437,7 @@ void DRW_draw_render_loop_ex(
Scene *scene = DEG_get_evaluated_scene(depsgraph);
ViewLayer *view_layer = DEG_get_evaluated_view_layer(depsgraph);
RegionView3D *rv3d = ar->regiondata;
- bool do_annotations = (((v3d->flag2 & V3D_SHOW_ANNOTATION) != 0) && ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0));
+ bool do_annotations = (((v3d->flag2 & V3D_SHOW_ANNOTATION) != 0) && ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0));
DST.draw_ctx.evil_C = evil_C;
DST.viewport = viewport;
@@ -1572,7 +1572,7 @@ void DRW_draw_render_loop_ex(
if (DST.draw_ctx.evil_C) {
/* needed so gizmo isn't obscured */
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ if (((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
((v3d->gizmo_flag & V3D_GIZMO_HIDE) == 0))
{
glDisable(GL_DEPTH_TEST);
@@ -1583,7 +1583,7 @@ void DRW_draw_render_loop_ex(
/* annotations - temporary drawing buffer (screenspace) */
/* XXX: Or should we use a proper draw/overlay engine for this case? */
- if (((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) &&
+ if (((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) &&
(do_annotations))
{
glDisable(GL_DEPTH_TEST);
@@ -1592,7 +1592,7 @@ void DRW_draw_render_loop_ex(
glEnable(GL_DEPTH_TEST);
}
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
+ if ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) {
/* Draw 2D after region info so we can draw on top of the camera passepartout overlay.
* 'DRW_draw_region_info' sets the projection in pixel-space. */
glDisable(GL_DEPTH_TEST);
@@ -2065,7 +2065,7 @@ void DRW_draw_select_loop(
}
}
if (v3d->overlay.flag & V3D_OVERLAY_BONE_SELECT) {
- if (!(v3d->flag2 & V3D_RENDER_OVERRIDE)) {
+ if (!(v3d->flag2 & V3D_HIDE_OVERLAYS)) {
/* Note: don't use "BKE_object_pose_armature_get" here, it breaks selection. */
Object *obpose = OBPOSE_FROM_OBACT(obact);
if (obpose) {
@@ -2487,7 +2487,7 @@ bool DRW_state_draw_support(void)
View3D *v3d = DST.draw_ctx.v3d;
return (DRW_state_is_scene_render() == false) &&
(v3d != NULL) &&
- ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0);
+ ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0);
}
/**
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 9bc4e7e8470..cde63e7408b 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -154,7 +154,7 @@ GPUBatch *DRW_draw_background_clipping_batch_from_rv3d(const RegionView3D *rv3d)
static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, ViewLayer *view_layer)
{
View3D *v3d = draw_ctx->v3d;
- if ((v3d->flag2 & V3D_RENDER_OVERRIDE) || (v3d->overlay.flag & V3D_OVERLAY_HIDE_CURSOR)) {
+ if ((v3d->flag2 & V3D_HIDE_OVERL
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list