diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-13 19:35:36 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2012-01-13 19:35:36 +0400 |
commit | cb145fad0111824fa9c5fa8b8e7c937df7650bd5 (patch) | |
tree | 160257b2272f5266a468253f16a85f6d2136fdd3 /source/blender/editors/render | |
parent | 2cde9bb99c902d996fa8ab287719e16525a889fd (diff) |
Fix #29878: running bpy.ops.render.opengl() from console not starting new line
or printing output.
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_opengl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c index 90e988c030a..08e373940de 100644 --- a/source/blender/editors/render/render_opengl.c +++ b/source/blender/editors/render/render_opengl.c @@ -83,6 +83,9 @@ typedef struct OGLRender { RegionView3D *rv3d; ARegion *ar; + ScrArea *prevsa; + ARegion *prevar; + short obcenter_dia_back; /* temp overwrite */ Image *ima; @@ -250,6 +253,8 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) { /* new render clears all callbacks */ Scene *scene= CTX_data_scene(C); + ScrArea *prevsa= CTX_wm_area(C); + ARegion *prevar= CTX_wm_region(C); RenderResult *rr; GPUOffScreen *ofs; OGLRender *oglrender; @@ -318,6 +323,9 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op) oglrender->obcenter_dia_back = U.obcenter_dia; U.obcenter_dia = 0; + oglrender->prevsa= prevsa; + oglrender->prevar= prevar; + if(is_view_context) { oglrender->v3d= CTX_wm_view3d(C); oglrender->ar= CTX_wm_region(C); @@ -381,6 +389,9 @@ static void screen_opengl_render_end(bContext *C, OGLRender *oglrender) oglrender->scene->customdata_mask_modal= 0; + CTX_wm_area_set(C, oglrender->prevsa); + CTX_wm_region_set(C, oglrender->prevar); + MEM_freeN(oglrender); } |