diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-23 16:52:35 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-05-23 16:55:13 +0300 |
commit | 4a2213dc9a15d6fbff49cde6f919f27b7fbecf89 (patch) | |
tree | bd2f7093ad3446a454f63c85ba2a800178f6ae01 /source/blender/modifiers/intern/MOD_util.c | |
parent | a455e35343a46af48dc8c8b53356c09368509591 (diff) |
Fix modifiers not using depsgraph time for texture evaluation.
Texture animation seems to be broken anyway currently, but at leat
modifier side it should now be OK.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_util.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c index c5593cd004e..4a62d17fa27 100644 --- a/source/blender/modifiers/intern/MOD_util.c +++ b/source/blender/modifiers/intern/MOD_util.c @@ -53,6 +53,9 @@ #include "BKE_modifier.h" +#include "DEG_depsgraph.h" +#include "DEG_depsgraph_query.h" + #include "MOD_util.h" #include "MOD_modifiertypes.h" @@ -60,13 +63,13 @@ #include "bmesh.h" -void modifier_init_texture(const Scene *scene, Tex *tex) +void modifier_init_texture(const Depsgraph *depsgraph, Tex *tex) { if (!tex) return; if (tex->ima && BKE_image_is_animated(tex->ima)) { - BKE_image_user_frame_calc(&tex->iuser, scene->r.cfra, 0); + BKE_image_user_frame_calc(&tex->iuser, DEG_get_ctime(depsgraph), 0); } } |