Fix T50542: Wrong metadata frame when using OpenGL render

This commit is contained in:
Sergey Sharybin 2017-02-15 17:09:49 +01:00
parent 3e628eefa9
commit 13d31b1604
Notes: blender-bot 2023-02-14 07:15:25 +01:00
Referenced by issue #50542, Frame metadata incorrect when running opengl render in console for pngs (and probably other file formats)
1 changed files with 4 additions and 4 deletions

View File

@ -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,