Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSybren A. Stüvel <sybren@blender.org>2019-09-24 16:58:58 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-09-24 16:59:06 +0300
commitf94f4e1d79f73e55ac215dd4cccc287c3611f68d (patch)
tree537e091d490fa397e1856088e3455f07668c2789 /source/blender/render
parentaea8c0102ac79b04147458ff07a0886b87396b30 (diff)
Fix T66555: Handler render init ignores output placeholders
Blender now calls render hooks before taking copy of `scene->r` in `RE_RenderAnim()`. A change to the render output filename made in the render-init hook would not be picked up by by the copy. As a result, placeholders were touched using the old name, whereas the rendered images would be saved with the new filename. Reviewers: sergey Maniphest Tasks: T66555 Differential Revision: https://developer.blender.org/D5887
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/pipeline.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index fdb90a6e91e..c3125cb72a1 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -2506,6 +2506,10 @@ void RE_RenderAnim(Render *re,
int efra,
int tfra)
{
+ /* Call hooks before taking a copy of scene->r, so user can alter the render settings prior to
+ * copying (e.g. alter the output path). */
+ render_callback_exec_id(re, re->main, &scene->id, BKE_CB_EVT_RENDER_INIT);
+
const RenderData rd = scene->r;
bMovieHandle *mh = NULL;
const int cfrao = rd.cfra;
@@ -2515,8 +2519,6 @@ void RE_RenderAnim(Render *re,
const bool is_multiview_name = ((rd.scemode & R_MULTIVIEW) != 0 &&
(rd.im_format.views_format == R_IMF_VIEWS_INDIVIDUAL));
- render_callback_exec_id(re, re->main, &scene->id, BKE_CB_EVT_RENDER_INIT);
-
/* do not fully call for each frame, it initializes & pops output window */
if (!render_initialize_from_main(re, &rd, bmain, scene, single_layer, camera_override, 0, 1)) {
return;