diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-05 11:45:15 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-05 16:54:36 +0300 |
commit | 2094b454474de25e42cd6ec1f63ebc84f50f666a (patch) | |
tree | 91331e81b3cef843fa29dfd3883ca60f36b06b30 /source/blender/draw/intern | |
parent | 1983eea98ef73e6fe4c9bd187944d122dc1c7b07 (diff) |
3D Viewport: make shading and overlay DNA match UI names.
We should use consistent naming between the internal code and UI whenever
possible, only reason not to is file compatibility.
Diffstat (limited to 'source/blender/draw/intern')
-rw-r--r-- | source/blender/draw/intern/draw_manager.c | 11 | ||||
-rw-r--r-- | source/blender/draw/intern/draw_view.c | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c index 6a70a0202b5..7e595d7fcdd 100644 --- a/source/blender/draw/intern/draw_manager.c +++ b/source/blender/draw/intern/draw_manager.c @@ -983,7 +983,7 @@ static void drw_engines_enable_external(void) /* TODO revisit this when proper layering is implemented */ /* Gather all draw engines needed and store them in DST.enabled_engines * That also define the rendering order of engines */ -static void drw_engines_enable_from_engine(RenderEngineType *engine_type, int drawtype, int UNUSED(drawtype_lighting)) +static void drw_engines_enable_from_engine(RenderEngineType *engine_type, int drawtype) { switch (drawtype) { case OB_WIRE: @@ -1065,9 +1065,9 @@ static void drw_engines_enable_from_mode(int mode) } } -static void drw_engines_enable_from_overlays(int draw_overlays) +static void drw_engines_enable_from_overlays(int overlay_flag) { - if (draw_overlays) { + if (overlay_flag) { use_drw_engine(&draw_engine_overlay_type); } } @@ -1085,12 +1085,11 @@ static void drw_engines_enable(ViewLayer *view_layer, RenderEngineType *engine_t const int mode = CTX_data_mode_enum_ex(DST.draw_ctx.object_edit, obact, DST.draw_ctx.object_mode); View3D * v3d = DST.draw_ctx.v3d; const int drawtype = v3d->drawtype; - const int drawtype_lighting = v3d->drawtype_lighting; - drw_engines_enable_from_engine(engine_type, drawtype, drawtype_lighting); + drw_engines_enable_from_engine(engine_type, drawtype); if (DRW_state_draw_support()) { - drw_engines_enable_from_overlays(v3d->overlays); + drw_engines_enable_from_overlays(v3d->overlay.flag); drw_engines_enable_from_object_mode(); drw_engines_enable_from_mode(mode); } diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c index 5b705a311c9..be43f0d8c0c 100644 --- a/source/blender/draw/intern/draw_view.c +++ b/source/blender/draw/intern/draw_view.c @@ -615,7 +615,7 @@ static bool is_cursor_visible(const DRWContextState *draw_ctx, Scene *scene, Vie { Object *ob = OBACT(view_layer); View3D *v3d = draw_ctx->v3d; - if ((v3d->flag2 & V3D_RENDER_OVERRIDE) > 0 || (v3d->overlays & V3D_OVERLAY_HIDE_CURSOR)) { + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) > 0 || (v3d->overlay.flag & V3D_OVERLAY_HIDE_CURSOR)) { return false; } |