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:
authorCampbell Barton <ideasman42@gmail.com>2012-04-28 19:42:27 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-04-28 19:42:27 +0400
commite2c453b5f9d3a0a26333b6585f07ebf9e3a24819 (patch)
tree837b0b4f8756f9b0dec4b8bae1891e21cd230227 /source/blender/editors/object/object_group.c
parentef054e165cad35715a5b2388aac3db68a65ea275 (diff)
style cleanup: editors / mesh & object
Diffstat (limited to 'source/blender/editors/object/object_group.c')
-rw-r--r--source/blender/editors/object/object_group.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 97367b2e340..702671d8d9b 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -61,9 +61,9 @@
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;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = OBACT;
Group *group;
int ok = 0, cycle = 0;
@@ -72,10 +72,10 @@ 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= bmain->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) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
if (base->object->dup_group != group)
add_to_group(group, base->object, scene, base);
else
@@ -91,7 +91,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
BKE_report(op->reports, RPT_WARNING, "Skipped some groups because of cycle detected");
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -108,14 +108,14 @@ void GROUP_OT_objects_add_active(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
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;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = OBACT;
Group *group;
int ok = 0;
@@ -124,10 +124,10 @@ 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= bmain->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) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
rem_from_group(group, base->object, scene, base);
ok = 1;
}
@@ -138,7 +138,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(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -155,16 +155,16 @@ void GROUP_OT_objects_remove_active(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- Main *bmain= CTX_data_main(C);
- Scene *scene= CTX_data_scene(C);
- Group *group= NULL;
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Group *group = NULL;
- CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
group = NULL;
while ((group = find_group(base->object, group)))
rem_from_group(group, base->object, scene, base);
@@ -172,7 +172,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *UNUSED(op))
CTX_DATA_END;
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -189,27 +189,27 @@ void GROUP_OT_objects_remove(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
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[MAX_ID_NAME-2]; /* id name */
+ Main *bmain = CTX_data_main(C);
+ Scene *scene = CTX_data_scene(C);
+ Group *group = NULL;
+ char name[MAX_ID_NAME - 2]; /* id name */
RNA_string_get(op->ptr, "name", name);
- group= add_group(name);
+ group = add_group(name);
- CTX_DATA_BEGIN (C, Base*, base, selected_editable_bases) {
+ CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases) {
add_to_group(group, base->object, scene, base);
}
CTX_DATA_END;
DAG_scene_sort(bmain, scene);
- WM_event_add_notifier(C, NC_GROUP|NA_EDITED, NULL);
+ WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
return OPERATOR_FINISHED;
}
@@ -226,26 +226,26 @@ void GROUP_OT_create(wmOperatorType *ot)
ot->poll = ED_operator_objectmode;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
- RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME-2, "Name", "Name of the new group");
+ RNA_def_string(ot->srna, "name", "Group", MAX_ID_NAME - 2, "Name", "Name of the new group");
}
/****************** properties window operators *********************/
static int group_add_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
Group *group;
if (ob == NULL)
return OPERATOR_CANCELLED;
- group= add_group("Group");
+ group = add_group("Group");
add_to_group(group, ob, scene, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -261,21 +261,21 @@ void OBJECT_OT_group_add(wmOperatorType *ot)
ot->exec = group_add_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
static int group_link_exec(bContext *C, wmOperator *op)
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
- Group *group= BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
+ Group *group = BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
if (ELEM(NULL, ob, group))
return OPERATOR_CANCELLED;
add_to_group(group, ob, scene, NULL);
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -294,26 +294,26 @@ void OBJECT_OT_group_link(wmOperatorType *ot)
ot->invoke = WM_enum_search_invoke;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
/* properties */
- prop= RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
+ prop = RNA_def_enum(ot->srna, "group", DummyRNA_NULL_items, 0, "Group", "");
RNA_def_enum_funcs(prop, RNA_group_local_itemf);
ot->prop = prop;
}
static int group_remove_exec(bContext *C, wmOperator *UNUSED(op))
{
- Scene *scene= CTX_data_scene(C);
- Object *ob= ED_object_context(C);
- Group *group= CTX_data_pointer_get_type(C, "group", &RNA_Group).data;
+ Scene *scene = CTX_data_scene(C);
+ Object *ob = ED_object_context(C);
+ Group *group = CTX_data_pointer_get_type(C, "group", &RNA_Group).data;
if (!ob || !group)
return OPERATOR_CANCELLED;
rem_from_group(group, ob, scene, NULL); /* base will be used if found */
- WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
+ WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
return OPERATOR_FINISHED;
}
@@ -328,6 +328,6 @@ void OBJECT_OT_group_remove(wmOperatorType *ot)
ot->exec = group_remove_exec;
/* flags */
- ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
+ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}