diff options
author | Ton Roosendaal <ton@blender.org> | 2011-03-25 20:11:32 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-03-25 20:11:32 +0300 |
commit | 11920f7880062c1efb68a4e141162b7ec060ca29 (patch) | |
tree | 18cb137f954fcbdab56da53c4c3fcbee041f7692 /source/blender/editors | |
parent | fb2fd884637f912a56302d331f4514ddd7b18374 (diff) |
Bugfix #26195
When rendering, during processing scene data, drawing in 3d window
is now locked. Can get extended to more areas in UI easily.
At least this solves all crashes with conflicting memory access in
render && 3d drawing. Deleting objects via operators or delete
modifiers isn't locked yet.
Also fixed: crash on quitting a renderwindow when it was rendering.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_internal.c | 9 | ||||
-rw-r--r-- | source/blender/editors/screen/area.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/space_view3d.c | 1 |
3 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index 75c98464601..a2d88cb2222 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -53,6 +53,7 @@ #include "BKE_multires.h" #include "BKE_report.h" #include "BKE_sequencer.h" +#include "BKE_screen.h" #include "WM_api.h" #include "WM_types.h" @@ -636,6 +637,13 @@ static int render_breakjob(void *rjv) return 0; } +/* runs in thread, no cursor setting here works. careful with notifiers too (malloc conflicts) */ +/* maybe need a way to get job send notifer? */ +static void render_drawlock(void *UNUSED(rjv), int lock) +{ + BKE_spacedata_draw_locks(lock); +} + /* catch esc */ static int screen_render_modal(bContext *C, wmOperator *UNUSED(op), wmEvent *event) { @@ -769,6 +777,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event) /* setup new render */ re= RE_NewRender(scene->id.name); RE_test_break_cb(re, rj, render_breakjob); + RE_draw_lock_cb(re, rj, render_drawlock); RE_display_draw_cb(re, rj, image_rect_update); RE_stats_draw_cb(re, rj, image_renderinfo_cb); RE_progress_cb(re, rj, render_progress_update); diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c index 4a54b0ab0e4..f272352c183 100644 --- a/source/blender/editors/screen/area.c +++ b/source/blender/editors/screen/area.c @@ -314,6 +314,10 @@ void ED_region_do_draw(bContext *C, ARegion *ar) ARegionType *at= ar->type; rcti winrct; + /* see BKE_spacedata_draw_locks() */ + if(at->do_lock) + return; + /* checks other overlapping regions */ region_scissor_winrct(ar, &winrct); diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index 86b15a922a8..5d75d645695 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -1087,6 +1087,7 @@ void ED_spacetype_view3d(void) art->duplicate= view3d_main_area_duplicate; art->listener= view3d_main_area_listener; art->cursor= view3d_main_area_cursor; + art->lock= 1; /* can become flag, see BKE_spacedata_draw_locks */ BLI_addhead(&st->regiontypes, art); /* regions: listview/buttons */ |