diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-25 07:10:35 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-25 07:10:35 +0400 |
commit | ade7a000fd480ccc86c3706e5871302bd40851fa (patch) | |
tree | 28a82d44d2ee32b63f363ef3b8d4026380957a16 /source/blender | |
parent | 95b8a64889b31bdbb50c02e4c5825001c8a6432b (diff) |
hide text overlays when 'Only Render' option is enabled.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 52 |
2 files changed, 29 insertions, 28 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index be81c70f261..719ae7357b4 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -234,9 +234,8 @@ struct bContextDataResult { static void *ctx_wm_python_context_get(const bContext *C, const char *member, void *fall_through) { #ifdef WITH_PYTHON - bContextDataResult result; - - if (C && CTX_py_dict_get(C)) { + if (UNLIKELY(C && CTX_py_dict_get(C))) { + bContextDataResult result; memset(&result, 0, sizeof(bContextDataResult)); BPY_context_member_get((bContext *)C, member, &result); if (result.ptr.data) diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index b7cde89bf4d..18598a134af 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -3144,8 +3144,6 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha View3D *v3d = CTX_wm_view3d(C); RegionView3D *rv3d = CTX_wm_region_view3d(C); - Object *ob; - if (rv3d->persp == RV3D_CAMOB) { drawviewborder(scene, ar, v3d); } @@ -3162,44 +3160,48 @@ static void view3d_main_area_draw_info(const bContext *C, ARegion *ar, const cha } if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { + Object *ob; + /* draw grease-pencil stuff - needed to get paint-buffer shown too (since it's 2D) */ // if (v3d->flag2 & V3D_DISPGP) draw_gpencil_view3d(scene, v3d, ar, 0); drawcursor(scene, ar, v3d); + + if (U.uiflag & USER_SHOW_ROTVIEWICON) + draw_view_axis(rv3d); + else + draw_view_icon(rv3d); + + ob = OBACT; + if (U.uiflag & USER_DRAWVIEWINFO) + draw_selected_name(scene, ob); } - - if (U.uiflag & USER_SHOW_ROTVIEWICON) - draw_view_axis(rv3d); - else - draw_view_icon(rv3d); - - ob = OBACT; - if (U.uiflag & USER_DRAWVIEWINFO) - draw_selected_name(scene, ob); if (rv3d->render_engine) { view3d_main_area_draw_engine_info(rv3d, ar); return; } - if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) { - draw_viewport_fps(scene, ar); - } - else if (U.uiflag & USER_SHOW_VIEWPORTNAME) { - draw_viewport_name(ar, v3d); - } + if ((v3d->flag2 & V3D_RENDER_OVERRIDE) == 0) { + if ((U.uiflag & USER_SHOW_FPS) && ED_screen_animation_playing(wm)) { + draw_viewport_fps(scene, ar); + } + else if (U.uiflag & USER_SHOW_VIEWPORTNAME) { + draw_viewport_name(ar, v3d); + } - if (grid_unit) { /* draw below the viewport name */ - char numstr[32] = ""; + if (grid_unit) { /* draw below the viewport name */ + char numstr[32] = ""; - UI_ThemeColor(TH_TEXT_HI); - if (v3d->grid != 1.0f) { - BLI_snprintf(numstr, sizeof(numstr), "%s x %.4g", grid_unit, v3d->grid); - } + UI_ThemeColor(TH_TEXT_HI); + if (v3d->grid != 1.0f) { + BLI_snprintf(numstr, sizeof(numstr), "%s x %.4g", grid_unit, v3d->grid); + } - BLF_draw_default_ascii(22, ar->winy - (USER_SHOW_VIEWPORTNAME ? 40 : 20), 0.0f, - numstr[0] ? numstr : grid_unit, sizeof(numstr)); + BLF_draw_default_ascii(22, ar->winy - (USER_SHOW_VIEWPORTNAME ? 40 : 20), 0.0f, + numstr[0] ? numstr : grid_unit, sizeof(numstr)); + } } } |