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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-01 16:47:49 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-08-01 16:47:49 +0400
commit5fa7d1c1b4e7bde1d173caa60af0e273c86b6f0b (patch)
tree186a794aef722993c7067a657b4d007c62dd669b /source/blender/editors/space_outliner
parentc34f831757e0985b7523b6e5bbfadd7dd6a2c161 (diff)
2.5: code changes to reduce the usage of G.main and pass it along
or get it from the context instead.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r--source/blender/editors/space_outliner/outliner.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner.c b/source/blender/editors/space_outliner/outliner.c
index 3cdc2437c45..ad04e28ee4a 100644
--- a/source/blender/editors/space_outliner/outliner.c
+++ b/source/blender/editors/space_outliner/outliner.c
@@ -3186,7 +3186,7 @@ static void object_delete_cb(bContext *C, Scene *scene, TreeElement *te, TreeSto
if(scene->obedit==base->object)
ED_object_exit_editmode(C, EM_FREEDATA|EM_FREEUNDO|EM_WAITCURSOR|EM_DO_UNDO);
- ED_base_object_free_and_unlink(scene, base);
+ ED_base_object_free_and_unlink(CTX_data_main(C), scene, base);
te->directdata= NULL;
tselem->id= NULL;
}
@@ -3337,7 +3337,7 @@ void outliner_del(bContext *C, Scene *scene, ARegion *ar, SpaceOops *soops)
;// del_seq();
else {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_delete_cb);
- DAG_scene_sort(scene);
+ DAG_scene_sort(CTX_data_main(C), scene);
ED_undo_push(C, "Delete Objects");
}
}
@@ -3356,6 +3356,7 @@ static EnumPropertyItem prop_object_op_types[] = {
static int outliner_object_operation_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
SpaceOops *soops= CTX_wm_space_outliner(C);
int event;
@@ -3382,7 +3383,7 @@ static int outliner_object_operation_exec(bContext *C, wmOperator *op)
}
else if(event==4) {
outliner_do_object_operation(C, scene, soops, &soops->tree, object_delete_cb);
- DAG_scene_sort(scene);
+ DAG_scene_sort(bmain, scene);
str= "Delete Objects";
}
else if(event==5) { /* disabled, see above (ton) */