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
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-05-17 20:46:59 +0400
committerTon Roosendaal <ton@blender.org>2013-05-17 20:46:59 +0400
commitc70a900736e28308600c5b3359070f38bc64daa6 (patch)
tree3d3226bc297414e1f4b729f330740921e48c748f /source/blender/editors/render
parentbbec4c94f9819a8f4294fb31f190b63c2d6ce641 (diff)
More work on 3d view render:
- reverted fix for bug 32537 (error report drawing after thread job didn't show) This solves very bad 3d view render updates while using transform, it was getting into an eternal feedback loop for dependencies. (jobs sending mousemoves causing jobs to end, causing mousemoves, causing etc). - The render-update code was not going over all windows, but over every screen to send signals (also the invisble ones)
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r--source/blender/editors/render/render_internal.c10
-rw-r--r--source/blender/editors/render/render_update.c21
2 files changed, 23 insertions, 8 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c
index 954fff42a37..541512a7cbb 100644
--- a/source/blender/editors/render/render_internal.c
+++ b/source/blender/editors/render/render_internal.c
@@ -47,6 +47,7 @@
#include "BKE_blender.h"
#include "BKE_context.h"
+#include "BKE_depsgraph.h"
#include "BKE_freestyle.h"
#include "BKE_global.h"
#include "BKE_image.h"
@@ -926,7 +927,6 @@ static void render_view3d_do(RenderEngine *engine, const bContext *C, int keep_d
if (CTX_wm_window(C) == NULL) {
engine->flag |= RE_ENGINE_DO_UPDATE;
-
return;
}
@@ -962,7 +962,7 @@ static void render_view3d_do(RenderEngine *engine, const bContext *C, int keep_d
/* callback for render engine , on changes */
void render_view3d(RenderEngine *engine, const bContext *C)
-{
+{
render_view3d_do(engine, C, 0);
}
@@ -986,8 +986,12 @@ static int render_view3d_changed(RenderEngine *engine, const bContext *C)
float clipsta, clipend;
bool orth;
- if (engine->update_flag == RE_ENGINE_UPDATE_MA)
+ if (engine->update_flag & RE_ENGINE_UPDATE_MA)
update |= PR_UPDATE_MATERIAL;
+
+ if (engine->update_flag & RE_ENGINE_UPDATE_OTHER)
+ update |= PR_UPDATE_MATERIAL;
+
engine->update_flag = 0;
if (engine->resolution_x != ar->winx || engine->resolution_y != ar->winy)
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index 5653d14e590..6a4d99d2535 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -41,6 +41,7 @@
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
#include "DNA_world_types.h"
+#include "DNA_windowmanager_types.h"
#include "BLI_threads.h"
#include "BLI_utildefines.h"
@@ -78,11 +79,14 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
/* viewport rendering update on data changes, happens after depsgraph
* updates if there was any change. context is set to the 3d view */
bContext *C;
- bScreen *sc;
- ScrArea *sa;
- ARegion *ar;
+ wmWindowManager *wm;
+ wmWindow *win;
static int recursive_check = FALSE;
+ /* why do this function then? :) */
+ if (updated == 0)
+ return;
+
/* don't do this render engine update if we're updating the scene from
* other threads doing e.g. rendering or baking jobs */
if (!BLI_thread_is_main())
@@ -99,8 +103,15 @@ void ED_render_scene_update(Main *bmain, Scene *scene, int updated)
CTX_data_scene_set(C, scene);
CTX_wm_manager_set(C, bmain->wm.first);
-
- for (sc = bmain->screen.first; sc; sc = sc->id.next) {
+ wm = bmain->wm.first;
+
+ for (win = wm->windows.first; win; win = win->next) {
+ bScreen *sc = win->screen;
+ ScrArea *sa;
+ ARegion *ar;
+
+ CTX_wm_window_set(C, win);
+
for (sa = sc->areabase.first; sa; sa = sa->next) {
if (sa->spacetype != SPACE_VIEW3D)
continue;