[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43358] trunk/blender/source/blender/ editors/render/render_opengl.c: Fix #29878: running bpy.ops.render.opengl() from console not starting new line

Brecht Van Lommel brechtvanlommel at pandora.be
Fri Jan 13 16:35:37 CET 2012


Revision: 43358
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43358
Author:   blendix
Date:     2012-01-13 15:35:36 +0000 (Fri, 13 Jan 2012)
Log Message:
-----------
Fix #29878: running bpy.ops.render.opengl() from console not starting new line
or printing output.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/render/render_opengl.c

Modified: trunk/blender/source/blender/editors/render/render_opengl.c
===================================================================
--- trunk/blender/source/blender/editors/render/render_opengl.c	2012-01-13 15:14:08 UTC (rev 43357)
+++ trunk/blender/source/blender/editors/render/render_opengl.c	2012-01-13 15:35:36 UTC (rev 43358)
@@ -83,6 +83,9 @@
 	RegionView3D *rv3d;
 	ARegion *ar;
 
+	ScrArea *prevsa;
+	ARegion *prevar;
+
 	short obcenter_dia_back; /* temp overwrite */
 
 	Image *ima;
@@ -250,6 +253,8 @@
 {
 	/* 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 @@
 	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 @@
 
 	oglrender->scene->customdata_mask_modal= 0;
 
+	CTX_wm_area_set(C, oglrender->prevsa);
+	CTX_wm_region_set(C, oglrender->prevar);
+
 	MEM_freeN(oglrender);
 }
 



More information about the Bf-blender-cvs mailing list