[Bf-blender-cvs] [13d31b1604] master: Fix T50542: Wrong metadata frame when using OpenGL render

Sergey Sharybin noreply at git.blender.org
Wed Feb 15 17:10:27 CET 2017


Commit: 13d31b16044f4230ba57c0896ee3cdcb739c7f26
Author: Sergey Sharybin
Date:   Wed Feb 15 17:09:49 2017 +0100
Branches: master
https://developer.blender.org/rB13d31b16044f4230ba57c0896ee3cdcb739c7f26

Fix T50542: Wrong metadata frame when using OpenGL render

===================================================================

M	source/blender/editors/render/render_opengl.c

===================================================================

diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 9097432a25..55c0714021 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -887,13 +887,13 @@ static void write_result_func(TaskPool * __restrict pool,
 	ReportList reports;
 	BKE_reports_init(&reports, oglrender->reports->flag & ~RPT_PRINT);
 	/* Do actual save logic here, depending on the file format. */
+	Scene tmp_scene = *scene;
+	tmp_scene.r.cfra = cfra;
 	if (is_movie) {
 		/* We have to construct temporary scene with proper scene->r.cfra.
 		 * This is because underlying calls do not use r.cfra but use scene
 		 * for that.
 		 */
-		Scene tmp_scene = *scene;
-		tmp_scene.r.cfra = cfra;
 		ok = RE_WriteRenderViewsMovie(&reports,
 		                              rr,
 		                              &tmp_scene,
@@ -917,8 +917,8 @@ static void write_result_func(TaskPool * __restrict pool,
 		                             true,
 		                             NULL);
 
-		BKE_render_result_stamp_info(scene, scene->camera, rr, false);
-		ok = RE_WriteRenderViewsImage(NULL, rr, scene, true, name);
+		BKE_render_result_stamp_info(&tmp_scene, tmp_scene.camera, rr, false);
+		ok = RE_WriteRenderViewsImage(NULL, rr, &tmp_scene, true, name);
 		if (!ok) {
 			BKE_reportf(&reports,
 			            RPT_ERROR,




More information about the Bf-blender-cvs mailing list