diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-03-30 12:18:57 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-03-30 12:25:53 +0300 |
commit | 35b731c9c8bdd996e9f418763f107a2e8e98516d (patch) | |
tree | af1dfeda74693aae40f962958ef61d8c195ad691 /source/blender/editors/render/render_update.c | |
parent | f4d597efffcb129614988f081d7f239ec1733642 (diff) |
Prevent crash on weight paint
Weight painting is still wrong, but it doesn't crash any more.
Diffstat (limited to 'source/blender/editors/render/render_update.c')
-rw-r--r-- | source/blender/editors/render/render_update.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index f11a8177bf8..899b9e0ece7 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -48,6 +48,7 @@ #include "BKE_context.h" #include "BKE_DerivedMesh.h" #include "BKE_icons.h" +#include "BKE_layer.h" #include "BKE_main.h" #include "BKE_material.h" #include "BKE_node.h" @@ -374,6 +375,7 @@ static void texture_changed(Main *bmain, Tex *tex) Lamp *la; World *wo; Scene *scene; + SceneLayer *sl; Object *ob; bNode *node; bool texture_draw = false; @@ -382,8 +384,11 @@ static void texture_changed(Main *bmain, Tex *tex) BKE_icon_changed(BKE_icon_id_ensure(&tex->id)); /* paint overlays */ - for (scene = bmain->scene.first; scene; scene = scene->id.next) - BKE_paint_invalidate_overlay_tex(scene, tex); + for (scene = bmain->scene.first; scene; scene = scene->id.next) { + for (sl = scene->render_layers.first; sl; sl = sl->next) { + BKE_paint_invalidate_overlay_tex(scene, sl, tex); + } + } /* find materials */ for (ma = bmain->mat.first; ma; ma = ma->id.next) { |