fix image_changed() doing unneccessary texture updates when texture wasnt
authorPhilipp Oeser <info@graphics-engineer.com>
Fri, 3 May 2019 09:18:32 +0000 (11:18 +0200)
committerPhilipp Oeser <info@graphics-engineer.com>
Fri, 3 May 2019 13:53:19 +0000 (15:53 +0200)
using an image

Reviewers: brecht

Differential Revision: https://developer.blender.org/D4789

source/blender/editors/render/render_update.c

index 3f3f98bc6e5c389d80a3a4f1365d478d591228d0..55353039b24c88c953b0595dc833d197ec7e1329 100644 (file)
@@ -265,7 +265,7 @@ static void image_changed(Main *bmain, Image *ima)
 
   /* textures */
   for (tex = bmain->textures.first; tex; tex = tex->id.next) {
-    if (tex->ima == ima) {
+    if (tex->type == TEX_IMAGE && tex->ima == ima) {
       texture_changed(bmain, tex);
     }
   }