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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-23 02:17:07 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-05-23 02:17:07 +0400
commit6bc2d572350c4bb86d81118813dd0fded7cd17e6 (patch)
tree2ef5263a732bff8d7c820bc9af42aa624941a7bc /source/blender/blenkernel/intern/scene.c
parent3f8a146a1e44e4903b0a99608106b5a911bd4166 (diff)
Fix #35449: image sequences to drive e.g. particle length or used in modifiers
were no properly updating when rendering animations. The render engine was only updating the image user current frame on images used by material textures. Now moved the function that updates all from the editors to blenkernel level and do it on all frame changes.
Diffstat (limited to 'source/blender/blenkernel/intern/scene.c')
-rw-r--r--source/blender/blenkernel/intern/scene.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index e93c32ddf64..76727987355 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -70,6 +70,7 @@
#include "BKE_global.h"
#include "BKE_group.h"
#include "BKE_idprop.h"
+#include "BKE_image.h"
#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mask.h"
@@ -1236,6 +1237,14 @@ void BKE_scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
{
float ctime = BKE_scene_frame_get(sce);
Scene *sce_iter;
+
+ /* keep this first */
+ BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_PRE);
+ BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
+
+ /* update animated image textures for particles, modifiers, gpu, etc,
+ * call this at the start so modifiers with textures don't lag 1 frame */
+ BKE_image_update_frame(bmain, sce->r.cfra);
/* rebuild rigid body worlds before doing the actual frame update
* this needs to be done on start frame but animation playback usually starts one frame later
@@ -1243,10 +1252,6 @@ void BKE_scene_update_for_newframe(Main *bmain, Scene *sce, unsigned int lay)
*/
scene_rebuild_rbw_recursive(sce, ctime);
- /* keep this first */
- BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_FRAME_CHANGE_PRE);
- BLI_callback_exec(bmain, &sce->id, BLI_CB_EVT_SCENE_UPDATE_PRE);
-
sound_set_cfra(sce->r.cfra);
/* clear animation overrides */