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/image.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/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 64bc4928e35..919738afe7a 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -3305,6 +3305,19 @@ void BKE_image_user_check_frame_calc(ImageUser *iuser, int cfra, int fieldnr)
}
}
+/* goes over all ImageUsers, and sets frame numbers if auto-refresh is set */
+static void image_update_frame(struct Image *UNUSED(ima), struct ImageUser *iuser, void *customdata)
+{
+ int cfra = *(int *)customdata;
+
+ BKE_image_user_check_frame_calc(iuser, cfra, 0);
+}
+
+void BKE_image_update_frame(const Main *bmain, int cfra)
+{
+ BKE_image_walk_all_users(bmain, &cfra, image_update_frame);
+}
+
void BKE_image_user_file_path(ImageUser *iuser, Image *ima, char *filepath)
{
BLI_strncpy(filepath, ima->name, FILE_MAX);