diff options
Diffstat (limited to 'source/blender/editors/render/render_update.c')
-rw-r--r-- | source/blender/editors/render/render_update.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c index 4e02ff77a31..74bb4c570e6 100644 --- a/source/blender/editors/render/render_update.c +++ b/source/blender/editors/render/render_update.c @@ -48,12 +48,14 @@ #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" #include "BKE_paint.h" #include "BKE_scene.h" +#include "GPU_lamp.h" #include "GPU_material.h" #include "GPU_buffers.h" @@ -64,6 +66,8 @@ #include "ED_render.h" #include "ED_view3d.h" +#include "WM_api.h" + #include "render_intern.h" // own include extern Material defmaterial; @@ -102,7 +106,7 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated) wm = bmain->wm.first; for (win = wm->windows.first; win; win = win->next) { - bScreen *sc = win->screen; + bScreen *sc = WM_window_get_active_screen(win); ScrArea *sa; ARegion *ar; @@ -378,6 +382,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; @@ -386,8 +391,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) { @@ -474,6 +482,9 @@ static void world_changed(Main *bmain, World *wo) /* icons */ BKE_icon_changed(BKE_icon_id_ensure(&wo->id)); + + /* XXX temporary flag waiting for depsgraph proper tagging */ + wo->update_flag = 1; /* glsl */ for (ma = bmain->mat.first; ma; ma = ma->id.next) @@ -572,6 +583,6 @@ void ED_render_internal_init(void) RenderEngineType *ret = RE_engines_find(RE_engine_id_BLENDER_RENDER); ret->view_update = render_view3d_update; - ret->view_draw = render_view3d_draw; + ret->render_to_view = render_view3d_draw; } |