Cleanup: rename RENDER_OVERRIDE -> HIDE_OVERLAYS

Match the UI naming (changed since 2.7x).
This commit is contained in:
Campbell Barton 2019-03-05 15:09:25 +11:00
parent 9d82a38d0a
commit 34daf527f3
26 changed files with 49 additions and 49 deletions

View File

@ -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;
}
}
}

View File

@ -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))))

View File

@ -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;

View File

@ -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);

View File

@ -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);
}
/**

View File

@ -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_OVERLAYS) || (v3d->overlay.flag & V3D_OVERLAY_HIDE_CURSOR)) {
return false;
}

View File

@ -3062,7 +3062,7 @@ static void OBJECT_cache_populate(void *vedata, Object *ob)
break;
case OB_ARMATURE:
{
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->overlay.flag & V3D_OVERLAY_HIDE_BONES) ||
((ob->dt < OB_WIRE) && !DRW_state_is_select()))
{

View File

@ -164,7 +164,7 @@ static void overlay_cache_init(void *vedata)
View3D *v3d = DCS->v3d;
if (v3d) {
g_data->overlay = v3d->overlay;
g_data->show_overlays = (v3d->flag2 & V3D_RENDER_OVERRIDE) == 0;
g_data->show_overlays = (v3d->flag2 & V3D_HIDE_OVERLAYS) == 0;
}
else {
memset(&g_data->overlay, 0, sizeof(g_data->overlay));

View File

@ -191,7 +191,7 @@ static void POSE_cache_populate(void *vedata, Object *ob)
* and similar functionalities. For now we handle only pose bones. */
if (ob->type == OB_ARMATURE) {
if ((draw_ctx->v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((draw_ctx->v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(draw_ctx->v3d->overlay.flag & V3D_OVERLAY_HIDE_BONES))
{
return;

View File

@ -1124,7 +1124,7 @@ void ED_gpencil_draw_view3d_annotations(
dflag |= (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_NOSTATUS);
}
if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
if (v3d->flag2 & V3D_HIDE_OVERLAYS) {
/* don't draw status text when "only render" flag is set */
dflag |= GP_DRAWDATA_NOSTATUS;
}

View File

@ -1668,7 +1668,7 @@ void ED_gpencil_draw_view3d(
dflag |= (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_NOSTATUS);
}
if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
if (v3d->flag2 & V3D_HIDE_OVERLAYS) {
/* don't draw status text when "only render" flag is set */
dflag |= GP_DRAWDATA_NOSTATUS;
}
@ -1724,7 +1724,7 @@ void ED_gpencil_draw_view3d_object(wmWindowManager *wm, Scene *scene, Depsgraph
dflag |= (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_NOSTATUS);
}
if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
if (v3d->flag2 & V3D_HIDE_OVERLAYS) {
/* don't draw status text when "only render" flag is set */
dflag |= GP_DRAWDATA_NOSTATUS;
}

View File

@ -92,7 +92,7 @@ static bool edbm_preselect_or_active(
{
ARegion *ar = CTX_wm_region(C);
const bool show_gizmo = !(
(v3d->flag2 & V3D_RENDER_OVERRIDE) ||
(v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL)));
wmGizmoMap *gzmap = show_gizmo ? ar->gizmo_map : NULL;

View File

@ -1468,7 +1468,7 @@ static int object_transform_axis_target_invoke(bContext *C, wmOperator *op, cons
#ifdef USE_RENDER_OVERRIDE
int flag2_prev = vc.v3d->flag2;
vc.v3d->flag2 |= V3D_RENDER_OVERRIDE;
vc.v3d->flag2 |= V3D_HIDE_OVERLAYS;
#endif
ED_view3d_autodist_init(vc.depsgraph, vc.ar, vc.v3d, 0);

View File

@ -1322,7 +1322,7 @@ static void space_view3d_listener(
case NC_SCENE:
switch (wmn->data) {
case ND_WORLD:
if (v3d->flag2 & V3D_RENDER_OVERRIDE)
if (v3d->flag2 & V3D_HIDE_OVERLAYS)
ED_area_tag_redraw_regiontype(sa, RGN_TYPE_WINDOW);
break;
}

View File

@ -509,7 +509,7 @@ static void drawviewborder(Scene *scene, Depsgraph *depsgraph, ARegion *ar, View
}
/* When overlays are disabled, only show camera outline & passepartout. */
if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
if (v3d->flag2 & V3D_HIDE_OVERLAYS) {
return;
}
@ -1273,7 +1273,7 @@ void view3d_draw_region_info(const bContext *C, ARegion *ar)
BLF_batch_draw_begin();
if ((U.uiflag & USER_SHOW_GIZMO_AXIS) ||
(v3d->flag2 & V3D_RENDER_OVERRIDE) ||
(v3d->flag2 & V3D_HIDE_OVERLAYS) ||
/* No need to display gizmo and this info. */
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_NAVIGATE)))
{
@ -1286,7 +1286,7 @@ void view3d_draw_region_info(const bContext *C, ARegion *ar)
int xoffset = rect.xmin + U.widget_unit;
int yoffset = rect.ymax;
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0 &&
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0 &&
(v3d->overlay.flag & V3D_OVERLAY_HIDE_TEXT) == 0)
{
if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_no_scrub(wm)) {
@ -1671,7 +1671,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf_simple(
v3d.camera = camera;
v3d.shading.type = drawtype;
v3d.flag2 = V3D_RENDER_OVERRIDE;
v3d.flag2 = V3D_HIDE_OVERLAYS;
if (draw_flags & V3D_OFSDRAW_USE_GPENCIL) {
v3d.flag2 |= V3D_SHOW_ANNOTATION;

View File

@ -734,7 +734,7 @@ void ED_view3d_draw_bgpic_test(
/* disabled - mango request, since footage /w only render is quite useful
* and this option is easy to disable all background images at once */
#if 0
if (v3d->flag2 & V3D_RENDER_OVERRIDE)
if (v3d->flag2 & V3D_HIDE_OVERLAYS)
return;
#endif

View File

@ -125,7 +125,7 @@ static void gizmo_bbone_offset_set(
static bool WIDGETGROUP_armature_spline_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
{
View3D *v3d = CTX_wm_view3d(C);
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)))
{
return false;

View File

@ -61,7 +61,7 @@ struct CameraWidgetGroup {
static bool WIDGETGROUP_camera_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
{
View3D *v3d = CTX_wm_view3d(C);
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)))
{
return false;
@ -369,7 +369,7 @@ static bool WIDGETGROUP_camera_view_poll(const bContext *C, wmGizmoGroupType *UN
}
View3D *v3d = CTX_wm_view3d(C);
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)))
{
return false;

View File

@ -106,7 +106,7 @@ static bool WIDGETGROUP_empty_image_poll(const bContext *C, wmGizmoGroupType *UN
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = CTX_wm_region_view3d(C);
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)))
{
return false;

View File

@ -49,7 +49,7 @@ static bool WIDGETGROUP_forcefield_poll(const bContext *C, wmGizmoGroupType *UNU
{
View3D *v3d = CTX_wm_view3d(C);
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)))
{
return false;

View File

@ -51,7 +51,7 @@
static bool WIDGETGROUP_light_spot_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
{
View3D *v3d = CTX_wm_view3d(C);
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_CONTEXT)))
{
return false;
@ -161,7 +161,7 @@ static void gizmo_area_light_prop_matrix_set(
static bool WIDGETGROUP_light_area_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
{
View3D *v3d = CTX_wm_view3d(C);
if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
if (v3d->flag2 & V3D_HIDE_OVERLAYS) {
return false;
}
@ -244,7 +244,7 @@ void VIEW3D_GGT_light_area(wmGizmoGroupType *gzgt)
static bool WIDGETGROUP_light_target_poll(const bContext *C, wmGizmoGroupType *UNUSED(gzgt))
{
View3D *v3d = CTX_wm_view3d(C);
if (v3d->flag2 & V3D_RENDER_OVERRIDE) {
if (v3d->flag2 & V3D_HIDE_OVERLAYS) {
return false;
}

View File

@ -121,7 +121,7 @@ static bool WIDGETGROUP_navigate_poll(const bContext *C, wmGizmoGroupType *UNUSE
{
View3D *v3d = CTX_wm_view3d(C);
if (((U.uiflag & USER_SHOW_GIZMO_AXIS) == 0) ||
(v3d->flag2 & V3D_RENDER_OVERRIDE) ||
(v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_NAVIGATE)))
{
return false;

View File

@ -1042,7 +1042,7 @@ static int view3d_ruler_add_invoke(bContext *C, wmOperator *op, const wmEvent *e
View3D *v3d = CTX_wm_view3d(C);
RegionView3D *rv3d = ar->regiondata;
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL)))
{
BKE_report(op->reports, RPT_WARNING, "Gizmos hidden in this view");
@ -1107,7 +1107,7 @@ static int view3d_ruler_remove_invoke(bContext *C, wmOperator *op, const wmEvent
ARegion *ar = CTX_wm_region(C);
View3D *v3d = CTX_wm_view3d(C);
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) ||
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) ||
(v3d->gizmo_flag & (V3D_GIZMO_HIDE | V3D_GIZMO_HIDE_TOOL)))
{
BKE_report(op->reports, RPT_WARNING, "Gizmos hidden in this view");

View File

@ -1946,7 +1946,7 @@ static bool transinfo_show_overlay(const struct bContext *C, TransInfo *t, ARegi
ScrArea *sa = CTX_wm_area(C);
if (sa->spacetype == SPACE_VIEW3D) {
View3D *v3d = sa->spacedata.first;
if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) {
if ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) {
ok = true;
}
}

View File

@ -374,7 +374,7 @@ typedef struct View3D {
(((view) >= RV3D_VIEW_FRONT) && ((view) <= RV3D_VIEW_BOTTOM))
/* View3d->flag2 (int) */
#define V3D_RENDER_OVERRIDE (1 << 2)
#define V3D_HIDE_OVERLAYS (1 << 2)
#define V3D_FLAG2_DEPRECATED_3 (1 << 3) /* cleared */
#define V3D_SHOW_ANNOTATION (1 << 4)
#define V3D_LOCK_CAMERA (1 << 5)

View File

@ -2663,7 +2663,7 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "3D View Overlay Settings", "Settings for display of overlays in the 3D viewport");
prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag2", V3D_RENDER_OVERRIDE);
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag2", V3D_HIDE_OVERLAYS);
RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like gizmos and outlines");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update");