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>2013-04-03 15:28:42 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-04-03 15:28:42 +0400
commitd407aeecc7f2d45422ff14aea88276edf244aa7a (patch)
treefeda0dbc8cf2959e71e2660849ecd88f7e764fcc /source/blender/editors
parentefa4c5be4bb11604e211f8eb26eee9d54ca09cb4 (diff)
code cleanup: use more (blender) conventional naming for group functions.
also change dump_rna2xml.py to dump bpy.data by default.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/animation/anim_filter.c2
-rw-r--r--source/blender/editors/object/object_add.c4
-rw-r--r--source/blender/editors/object/object_group.c24
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/object/object_select.c6
-rw-r--r--source/blender/editors/physics/rigidbody_constraint.c6
-rw-r--r--source/blender/editors/physics/rigidbody_object.c6
7 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/editors/animation/anim_filter.c b/source/blender/editors/animation/anim_filter.c
index 7416c559522..a40f9f50852 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -2259,7 +2259,7 @@ static size_t animdata_filter_dopesheet(bAnimContext *ac, ListBase *anim_data, b
* - used to ease the process of doing multiple-character choreographies
*/
if (ads->filterflag & ADS_FILTER_ONLYOBGROUP) {
- if (object_in_group(ob, ads->filter_grp) == 0)
+ if (BKE_group_object_exists(ads->filter_grp, ob) == 0)
continue;
}
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index b33c7212f0e..d63a964c26a 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1786,8 +1786,8 @@ static Base *object_add_duplicate_internal(Main *bmain, Scene *scene, Base *base
if ((basen->flag & OB_FROMGROUP) || ob->rigidbody_object || ob->rigidbody_constraint) {
Group *group;
for (group = bmain->group.first; group; group = group->id.next) {
- if (object_in_group(ob, group))
- add_to_group(group, obn, scene, basen);
+ if (BKE_group_object_exists(group, ob))
+ BKE_group_object_add(group, obn, scene, basen);
}
}
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 3112bb21091..8afd3049b84 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -78,7 +78,7 @@ static EnumPropertyItem *group_object_active_itemf(bContext *C, PointerRNA *UNUS
Group *group = NULL;
int i = 0;
- while ((group = find_group(ob, group))) {
+ while ((group = BKE_group_object_find(group, ob))) {
item_tmp.identifier = item_tmp.name = group->id.name + 2;
/* item_tmp.icon = ICON_ARMATURE_DATA; */
item_tmp.value = i;
@@ -98,7 +98,7 @@ static Group *group_object_active_find_index(Object *ob, const int group_object_
{
Group *group = NULL;
int i = 0;
- while ((group = find_group(ob, group))) {
+ while ((group = BKE_group_object_find(group, ob))) {
if (i == group_object_index) {
break;
}
@@ -125,7 +125,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
if (base->object->dup_group != group) {
- add_to_group(group, base->object, scene, base);
+ BKE_group_object_add(group, base->object, scene, base);
}
else {
is_cycle = TRUE;
@@ -184,11 +184,11 @@ static int objects_remove_active_exec(bContext *C, wmOperator *op)
* looking up the active objects groups each time */
for (group = bmain->group.first; group; group = group->id.next) {
- if (object_in_group(ob, group)) {
+ if (BKE_group_object_exists(group, ob)) {
/* Assign groups to selected objects */
CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
- rem_from_group(group, base->object, scene, base);
+ BKE_group_object_unlink(group, base->object, scene, base);
ok = 1;
}
CTX_DATA_END;
@@ -265,7 +265,7 @@ static int group_objects_remove_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, Base *, base, selected_editable_bases)
{
- rem_from_group(group, base->object, scene, base);
+ BKE_group_object_unlink(group, base->object, scene, base);
}
CTX_DATA_END;
@@ -311,11 +311,11 @@ static int group_create_exec(bContext *C, wmOperator *op)
RNA_string_get(op->ptr, "name", name);
- group = add_group(bmain, name);
+ group = BKE_group_add(bmain, name);
CTX_DATA_BEGIN (C, Base *, base, selected_bases)
{
- add_to_group(group, base->object, scene, base);
+ BKE_group_object_add(group, base->object, scene, base);
}
CTX_DATA_END;
@@ -354,8 +354,8 @@ static int group_add_exec(bContext *C, wmOperator *UNUSED(op))
if (ob == NULL)
return OPERATOR_CANCELLED;
- group = add_group(bmain, "Group");
- add_to_group(group, ob, scene, NULL);
+ group = BKE_group_add(bmain, "Group");
+ BKE_group_object_add(group, ob, scene, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
@@ -386,7 +386,7 @@ static int group_link_exec(bContext *C, wmOperator *op)
if (ELEM(NULL, ob, group))
return OPERATOR_CANCELLED;
- add_to_group(group, ob, scene, NULL);
+ BKE_group_object_add(group, ob, scene, NULL);
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
@@ -425,7 +425,7 @@ static int group_remove_exec(bContext *C, wmOperator *UNUSED(op))
if (!ob || !group)
return OPERATOR_CANCELLED;
- rem_from_group(group, ob, scene, NULL); /* base will be used if found */
+ BKE_group_object_unlink(group, ob, scene, NULL); /* base will be used if found */
WM_event_add_notifier(C, NC_OBJECT | ND_DRAW, ob);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index 34a6d359f6b..cdc920ba3ec 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1486,7 +1486,7 @@ static int make_links_data_exec(bContext *C, wmOperator *op)
/* now add in the groups from the link nodes */
for (group_node = ob_groups; group_node; group_node = group_node->next) {
if (ob_dst->dup_group != group_node->link) {
- add_to_group(group_node->link, ob_dst, scene, base_dst);
+ BKE_group_object_add(group_node->link, ob_dst, scene, base_dst);
}
else {
is_cycle = TRUE;
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index b7303b2af51..974dc3acef9 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -586,7 +586,7 @@ static short select_grouped_group(bContext *C, Object *ob) /* Select objects in
uiLayout *layout;
for (group = CTX_data_main(C)->group.first; group && group_count < GROUP_MENU_MAX; group = group->id.next) {
- if (object_in_group(ob, group)) {
+ if (BKE_group_object_exists(group, ob)) {
ob_groups[group_count] = group;
group_count++;
}
@@ -598,7 +598,7 @@ static short select_grouped_group(bContext *C, Object *ob) /* Select objects in
group = ob_groups[0];
CTX_DATA_BEGIN (C, Base *, base, visible_bases)
{
- if (!(base->flag & SELECT) && object_in_group(base->object, group)) {
+ if (!(base->flag & SELECT) && BKE_group_object_exists(group, base->object)) {
ED_base_object_select(base, BA_SELECT);
changed = 1;
}
@@ -1040,7 +1040,7 @@ static int object_select_same_group_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN (C, Base *, base, visible_bases)
{
- if (!(base->flag & SELECT) && object_in_group(base->object, group))
+ if (!(base->flag & SELECT) && BKE_group_object_exists(group, base->object))
ED_base_object_select(base, BA_SELECT);
}
CTX_DATA_END;
diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c
index b3f92d3de46..d38ffa491e2 100644
--- a/source/blender/editors/physics/rigidbody_constraint.c
+++ b/source/blender/editors/physics/rigidbody_constraint.c
@@ -88,14 +88,14 @@ void ED_rigidbody_con_add(wmOperator *op, Scene *scene, Object *ob, int type)
}
/* create constraint group if it doesn't already exits */
if (rbw->constraints == NULL) {
- rbw->constraints = add_group(G.main, "RigidBodyConstraints");
+ rbw->constraints = BKE_group_add(G.main, "RigidBodyConstraints");
}
/* make rigidbody constraint settings */
ob->rigidbody_constraint = BKE_rigidbody_create_constraint(scene, ob, type);
ob->rigidbody_constraint->flag |= RBC_FLAG_NEEDS_VALIDATE;
/* add constraint to rigid body constraint group */
- add_to_group(rbw->constraints, ob, scene, NULL);
+ BKE_group_object_add(rbw->constraints, ob, scene, NULL);
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
@@ -106,7 +106,7 @@ void ED_rigidbody_con_remove(Scene *scene, Object *ob)
BKE_rigidbody_remove_constraint(scene, ob);
if (rbw)
- rem_from_group(rbw->constraints, ob, scene, NULL);
+ BKE_group_object_unlink(rbw->constraints, ob, scene, NULL);
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index 9c03c6173a5..9f981256a31 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -111,7 +111,7 @@ void ED_rigidbody_ob_add(wmOperator *op, Scene *scene, Object *ob, int type)
scene->rigidbody_world = rbw;
}
if (rbw->group == NULL) {
- rbw->group = add_group(G.main, "RigidBodyWorld");
+ rbw->group = BKE_group_add(G.main, "RigidBodyWorld");
}
/* make rigidbody object settings */
@@ -122,7 +122,7 @@ void ED_rigidbody_ob_add(wmOperator *op, Scene *scene, Object *ob, int type)
ob->rigidbody_object->flag |= RBO_FLAG_NEEDS_VALIDATE;
/* add object to rigid body group */
- add_to_group(rbw->group, ob, scene, NULL);
+ BKE_group_object_add(rbw->group, ob, scene, NULL);
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}
@@ -133,7 +133,7 @@ void ED_rigidbody_ob_remove(Scene *scene, Object *ob)
BKE_rigidbody_remove_object(scene, ob);
if (rbw)
- rem_from_group(rbw->group, ob, scene, NULL);
+ BKE_group_object_unlink(rbw->group, ob, scene, NULL);
DAG_id_tag_update(&ob->id, OB_RECALC_OB);
}