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>2012-12-17 16:03:31 +0400
committerTon Roosendaal <ton@blender.org>2012-12-17 16:03:31 +0400
commitb61958c80db5ea206a9d425ed78a2238779b3d96 (patch)
tree4bb92e1b4d305b82ae5f725be23663831314073b /source/blender/editors/object
parent734b4f60c1865d88d375b7c5b2003edc8c2291fa (diff)
Bugfix 33560
Setup: 2 windows, 2 scenes, shared objects and groups. Errors: - editing in 1 window, didn't correctly update shared stuff in the other (like child - parent relations) - deleting group members in 1 scene, could crash the other. Fixes: - On load, only a depsgraph was created for the "active" scene. Now it makes depsgraphs for all visible scenes. - "DAG ID flushes" were only working on active scenes too, they now take the other visible into account as well. - Delete object - notifier was only sent to the active scene. All in all it's a real depsgraph fix (for once!) :) Using multi-window and multi-scene setups now is more useful.
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r--source/blender/editors/object/object_add.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index ac1dd2464f8..b21b77e4e34 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -936,6 +936,8 @@ static int object_delete_exec(bContext *C, wmOperator *op)
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
+ wmWindowManager *wm = CTX_wm_manager(C);
+ wmWindow *win;
const short use_global = RNA_boolean_get(op->ptr, "use_global");
if (CTX_data_edit_object(C))
@@ -967,12 +969,22 @@ static int object_delete_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_scene_sort(bmain, scene);
+ /* delete has to handle all open scenes */
+ flag_listbase_ids(&bmain->scene, LIB_DOIT, 1);
+ for (win = wm->windows.first; win; win = win->next) {
+ scene = win->screen->scene;
+
+ if (scene->id.flag & LIB_DOIT) {
+ scene->id.flag &= ~LIB_DOIT;
+
+ DAG_scene_sort(bmain, scene);
+
+ WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
+ WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene);
+ }
+ }
DAG_ids_flush_update(bmain, 0);
- WM_event_add_notifier(C, NC_SCENE | ND_OB_ACTIVE, scene);
- WM_event_add_notifier(C, NC_SCENE | ND_LAYER_CONTENT, scene);
-
return OPERATOR_FINISHED;
}