Commit: ebfea8c2bb004f461ee186138e3ce25027296788
Author: Alexander Gavrilov
Date:   Sun Dec 2 14:57:38 2018 +0300
Branches: blender2.8
https://developer.blender.org/rBebfea8c2bb004f461ee186138e3ce25027296788

Fix texture previews not updating when parameters are changed.

Maybe there is a more correct way, but this works for now.

===================================================================

M       source/blender/makesrna/intern/rna_image.c
M       source/blender/makesrna/intern/rna_texture.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_image.c 
b/source/blender/makesrna/intern/rna_image.c
index 9d3699e220e..e09e86bbfb3 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -96,6 +96,7 @@ static void rna_Image_source_set(PointerRNA *ptr, int value)
                BLI_assert(BKE_id_is_in_global_main(&ima->id));
                BKE_image_signal(G_MAIN, ima, NULL, IMA_SIGNAL_SRC_CHANGE);
                DEG_id_tag_update(&ima->id, 0);
+               DEG_id_tag_update(&ima->id, DEG_TAG_EDITORS_UPDATE);
        }
 }
 
@@ -105,6 +106,7 @@ static void rna_Image_reload_update(Main *bmain, Scene 
*UNUSED(scene), PointerRN
        BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_RELOAD);
        WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id);
        DEG_id_tag_update(&ima->id, 0);
+       DEG_id_tag_update(&ima->id, DEG_TAG_EDITORS_UPDATE);
 }
 
 static void rna_Image_generated_update(Main *bmain, Scene *UNUSED(scene), 
PointerRNA *ptr)
@@ -118,6 +120,7 @@ static void rna_Image_colormanage_update(Main *bmain, Scene 
*UNUSED(scene), Poin
        Image *ima = ptr->id.data;
        BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_COLORMANAGE);
        DEG_id_tag_update(&ima->id, 0);
+       DEG_id_tag_update(&ima->id, DEG_TAG_EDITORS_UPDATE);
        WM_main_add_notifier(NC_IMAGE | ND_DISPLAY, &ima->id);
        WM_main_add_notifier(NC_IMAGE | NA_EDITED, &ima->id);
 }
@@ -148,6 +151,7 @@ static void rna_ImageUser_update(Main *UNUSED(bmain), Scene 
*scene, PointerRNA *
        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, DEG_TAG_EDITORS_UPDATE);
        }
 }
 
diff --git a/source/blender/makesrna/intern/rna_texture.c 
b/source/blender/makesrna/intern/rna_texture.c
index e9ef4bf7a8c..753870335ff 100644
--- a/source/blender/makesrna/intern/rna_texture.c
+++ b/source/blender/makesrna/intern/rna_texture.c
@@ -163,6 +163,7 @@ static void rna_Texture_update(Main *bmain, Scene 
*UNUSED(scene), PointerRNA *pt
                Tex *tex = ptr->id.data;
 
                DEG_id_tag_update(&tex->id, 0);
+               DEG_id_tag_update(&tex->id, DEG_TAG_EDITORS_UPDATE);
                WM_main_add_notifier(NC_TEXTURE, tex);
                WM_main_add_notifier(NC_MATERIAL | ND_SHADING_DRAW, NULL);
        }
@@ -190,6 +191,7 @@ static void rna_Texture_nodes_update(Main *UNUSED(bmain), 
Scene *UNUSED(scene),
        Tex *tex = ptr->id.data;
 
        DEG_id_tag_update(&tex->id, 0);
+       DEG_id_tag_update(&tex->id, DEG_TAG_EDITORS_UPDATE);
        WM_main_add_notifier(NC_TEXTURE | ND_NODES, tex);
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to