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:
Diffstat (limited to 'source/blender/editors/object/object_group.c')
-rw-r--r--source/blender/editors/object/object_group.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index ba609bd9bb3..b0a6c6471a2 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -60,6 +60,7 @@
static int objects_add_active_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
Object *ob= OBACT;
Group *group;
@@ -70,7 +71,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
/* linking to same group requires its own loop so we can avoid
looking up the active objects groups each time */
- for(group= G.main->group.first; group; group=group->id.next) {
+ for(group= bmain->group.first; group; group=group->id.next) {
if(object_in_group(ob, group)) {
/* Assign groups to selected objects */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
@@ -83,7 +84,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
if(!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
- DAG_scene_sort(scene);
+ DAG_scene_sort(bmain, scene);
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;
@@ -106,6 +107,7 @@ void GROUP_OT_objects_add_active(wmOperatorType *ot)
static int objects_remove_active_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
Object *ob= OBACT;
Group *group;
@@ -116,7 +118,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
/* linking to same group requires its own loop so we can avoid
looking up the active objects groups each time */
- for(group= G.main->group.first; group; group=group->id.next) {
+ for(group= bmain->group.first; group; group=group->id.next) {
if(object_in_group(ob, group)) {
/* Assign groups to selected objects */
CTX_DATA_BEGIN(C, Base*, base, selected_editable_bases) {
@@ -129,7 +131,7 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
if(!ok) BKE_report(op->reports, RPT_ERROR, "Active Object contains no groups");
- DAG_scene_sort(scene);
+ DAG_scene_sort(bmain, scene);
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;
@@ -152,6 +154,7 @@ void GROUP_OT_objects_remove_active(wmOperatorType *ot)
static int group_objects_remove_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
Group *group= NULL;
@@ -162,7 +165,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_scene_sort(scene);
+ DAG_scene_sort(bmain, scene);
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;
@@ -185,6 +188,7 @@ void GROUP_OT_objects_remove(wmOperatorType *ot)
static int group_create_exec(bContext *C, wmOperator *op)
{
+ Main *bmain= CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
Group *group= NULL;
char name[32]; /* id name */
@@ -198,7 +202,7 @@ static int group_create_exec(bContext *C, wmOperator *op)
}
CTX_DATA_END;
- DAG_scene_sort(scene);
+ DAG_scene_sort(bmain, scene);
WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
return OPERATOR_FINISHED;