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
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/render/render_shading.c16
-rw-r--r--source/blender/editors/space_buttons/space_buttons.c1
-rw-r--r--source/blender/makesrna/intern/rna_image.c3
3 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index 870eea74464..efd579735e0 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -196,6 +196,19 @@ static void world_changed(Main *bmain, World *wo)
GPU_material_free(ma);
}
+static void image_changed(Main *bmain, Image *ima)
+{
+ Tex *tex;
+
+ /* icons */
+ BKE_icon_changed(BKE_icon_getid(&ima->id));
+
+ /* textures */
+ for(tex=bmain->tex.first; tex; tex=tex->id.next)
+ if(tex->ima == ima)
+ texture_changed(bmain, tex);
+}
+
void ED_render_id_flush_update(Main *bmain, ID *id)
{
if(!id)
@@ -214,6 +227,9 @@ void ED_render_id_flush_update(Main *bmain, ID *id)
case ID_LA:
lamp_changed(bmain, (Lamp*)id);
break;
+ case ID_IM:
+ image_changed(bmain, (Image*)id);
+ break;
default:
break;
}
diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c
index 352f5131903..06a574d2e83 100644
--- a/source/blender/editors/space_buttons/space_buttons.c
+++ b/source/blender/editors/space_buttons/space_buttons.c
@@ -341,6 +341,7 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn)
sbuts->preview= 1;
break;
case NC_TEXTURE:
+ case NC_IMAGE:
ED_area_tag_redraw(sa);
sbuts->preview= 1;
break;
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)