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@gmail.com>2019-02-18 15:23:49 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-02-18 18:52:01 +0300
commit0e3a2acbfa6998b3a1ec967f3c25f7e12e0cf8fb (patch)
treedde289c6fbe219951ae5618866b33dfcfa3325e4 /source/blender/makesrna/intern/rna_image.c
parent286c34b4abb0436fb370c8d49fd73738dabc0fcf (diff)
Fix T57457: animated image sequences not working in Eevee.
The dependency graph now handles updating image users to point to the current frame, and tags images to be refreshed on the GPU. The image editor user is still updated outside of the dependency graph. We still do not support multiple image users using a different current frame in the same image, same as 2.7. This may require adding a GPU image texture cache to keep memory usage under control. Things like rendering an animation while the viewport stays fixed at the current frame works though.
Diffstat (limited to 'source/blender/makesrna/intern/rna_image.c')
-rw-r--r--source/blender/makesrna/intern/rna_image.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index ce92ddefc8f..84001926839 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -21,6 +21,7 @@
#include <stdlib.h>
#include "DNA_image_types.h"
+#include "DNA_node_types.h"
#include "DNA_scene_types.h"
#include "BLI_utildefines.h"
@@ -66,6 +67,8 @@ static const EnumPropertyItem image_source_items[] = {
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
+#include "ED_node.h"
+
static bool rna_Image_is_stereo_3d_get(PointerRNA *ptr)
{
return BKE_image_is_stereo((Image *)ptr->data);
@@ -136,16 +139,23 @@ static void rna_Image_views_format_update(Main *bmain, Scene *scene, PointerRNA
BKE_image_release_ibuf(ima, ibuf, lock);
}
-static void rna_ImageUser_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
+static void rna_ImageUser_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
ImageUser *iuser = ptr->data;
+ ID *id = ptr->id.data;
BKE_image_user_frame_calc(iuser, scene->r.cfra);
- if (ptr->id.data) {
- /* Update material or texture for render preview. */
- DEG_id_tag_update(ptr->id.data, 0);
- DEG_id_tag_update(ptr->id.data, ID_RECALC_EDITORS);
+ if (id) {
+ if (GS(id->name) == ID_NT) {
+ /* Special update for nodetrees to find parent datablock. */
+ ED_node_tag_update_nodetree(bmain, (bNodeTree *)id, NULL);
+ }
+ else {
+ /* Update material or texture for render preview. */
+ DEG_id_tag_update(id, 0);
+ DEG_id_tag_update(id, ID_RECALC_EDITORS);
+ }
}
}