From be6d0ca63b823ea93f183e31dbda9bc2cdd6af6a Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 6 Apr 2010 16:53:48 +0000 Subject: Fix #21166: changing image file path does not update texture preview. I've made it regenerate previews and icons now for this case. Depsgraph for all datablocks could solve this much nicer.. --- source/blender/makesrna/intern/rna_image.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/makesrna/intern/rna_image.c') diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c index 7fc9673f3e5..f13bdd4ceee 100644 --- a/source/blender/makesrna/intern/rna_image.c +++ b/source/blender/makesrna/intern/rna_image.c @@ -33,6 +33,7 @@ #include "DNA_scene_types.h" #include "BKE_context.h" +#include "BKE_depsgraph.h" #include "BKE_image.h" #include "WM_types.h" @@ -78,6 +79,7 @@ static void rna_Image_source_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Image *ima= ptr->id.data; BKE_image_signal(ima, NULL, IMA_SIGNAL_SRC_CHANGE); + DAG_id_flush_update(&ima->id, 0); } static void rna_Image_fields_update(Main *bmain, Scene *scene, PointerRNA *ptr) @@ -105,6 +107,7 @@ static void rna_Image_reload_update(Main *bmain, Scene *scene, PointerRNA *ptr) { Image *ima= ptr->id.data; BKE_image_signal(ima, NULL, IMA_SIGNAL_RELOAD); + DAG_id_flush_update(&ima->id, 0); } static void rna_Image_generated_update(Main *bmain, Scene *scene, PointerRNA *ptr) -- cgit v1.2.3