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
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')
-rw-r--r--source/blender/blenkernel/BKE_group.h23
-rw-r--r--source/blender/blenkernel/intern/anim.c6
-rw-r--r--source/blender/blenkernel/intern/group.c51
-rw-r--r--source/blender/blenkernel/intern/object.c8
-rw-r--r--source/blender/blenkernel/intern/particle.c2
-rw-r--r--source/blender/blenkernel/intern/scene.c4
-rw-r--r--source/blender/blenloader/intern/readfile.c2
-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
-rw-r--r--source/blender/makesrna/intern/rna_group.c4
-rw-r--r--source/blender/makesrna/intern/rna_main_api.c2
-rw-r--r--source/blender/makesrna/intern/rna_object.c4
17 files changed, 79 insertions, 77 deletions
diff --git a/source/blender/blenkernel/BKE_group.h b/source/blender/blenkernel/BKE_group.h
index 8c36a73a088..0f36b7a8cfc 100644
--- a/source/blender/blenkernel/BKE_group.h
+++ b/source/blender/blenkernel/BKE_group.h
@@ -41,18 +41,17 @@ struct Object;
struct bAction;
struct Scene;
-void BKE_group_free(struct Group *group);
-void BKE_group_unlink(struct Group *group);
-struct Group *add_group(struct Main *bmain, const char *name);
+void BKE_group_free(struct Group *group);
+void BKE_group_unlink(struct Group *group);
+struct Group *BKE_group_add(struct Main *bmain, const char *name);
struct Group *BKE_group_copy(struct Group *group);
-int add_to_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
-int rem_from_group(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
-struct Group *find_group(struct Object *ob, struct Group *group);
-int object_in_group(struct Object *ob, struct Group *group);
-int group_is_animated(struct Object *parent, struct Group *group);
+bool BKE_group_object_add(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
+bool BKE_group_object_unlink(struct Group *group, struct Object *ob, struct Scene *scene, struct Base *base);
+struct Group *BKE_group_object_find(struct Group *group, struct Object *ob);
+bool BKE_group_object_exists(struct Group *group, struct Object *ob);
+bool BKE_group_is_animated(struct Group *group, struct Object *parent);
-void group_tag_recalc(struct Group *group);
-void group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
-
-#endif
+void BKE_group_tag_recalc(struct Group *group);
+void BKE_group_handle_recalc_and_update(struct Scene *scene, struct Object *parent, struct Group *group);
+#endif /* __BKE_GROUP_H__ */
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index ad791852253..18550903757 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -766,10 +766,10 @@ static void group_duplilist(ListBase *lb, Scene *scene, Object *ob, int persiste
if (flag & DUPLILIST_DO_UPDATE) {
/* note: update is optional because we don't always need object
* transformations to be correct. Also fixes bug [#29616]. */
- group_handle_recalc_and_update(scene, ob, group);
+ BKE_group_handle_recalc_and_update(scene, ob, group);
}
- if (group_is_animated(ob, group))
+ if (BKE_group_is_animated(group, ob))
flag |= DUPLILIST_ANIMATED;
for (go = group->gobject.first, id = 0; go; go = go->next, id++) {
@@ -1331,7 +1331,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p
/* gather list of objects or single object */
if (part->ren_as == PART_DRAW_GR) {
if (flag & DUPLILIST_DO_UPDATE) {
- group_handle_recalc_and_update(scene, par, part->dup_group);
+ BKE_group_handle_recalc_and_update(scene, par, part->dup_group);
}
if (part->draw & PART_DRAW_COUNT_GR) {
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 639d256a067..b5dac71858b 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -94,7 +94,9 @@ void BKE_group_unlink(Group *group)
/* ensure objects are not in this group */
for (; base; base = base->next) {
- if (rem_from_group(group, base->object, sce, base) && find_group(base->object, NULL) == NULL) {
+ if (BKE_group_object_unlink(group, base->object, sce, base) &&
+ BKE_group_object_find(NULL, base->object) == NULL)
+ {
base->object->flag &= ~OB_FROMGROUP;
base->flag &= ~OB_FROMGROUP;
}
@@ -127,7 +129,7 @@ void BKE_group_unlink(Group *group)
group->id.us = 0;
}
-Group *add_group(Main *bmain, const char *name)
+Group *BKE_group_add(Main *bmain, const char *name)
{
Group *group;
@@ -147,7 +149,7 @@ Group *BKE_group_copy(Group *group)
}
/* external */
-static int add_to_group_internal(Group *group, Object *ob)
+static int group_object_add_internal(Group *group, Object *ob)
{
GroupObject *go;
@@ -168,9 +170,9 @@ static int add_to_group_internal(Group *group, Object *ob)
return TRUE;
}
-int add_to_group(Group *group, Object *object, Scene *scene, Base *base)
+bool BKE_group_object_add(Group *group, Object *object, Scene *scene, Base *base)
{
- if (add_to_group_internal(group, object)) {
+ if (group_object_add_internal(group, object)) {
if ((object->flag & OB_FROMGROUP) == 0) {
if (scene && base == NULL)
@@ -181,15 +183,15 @@ int add_to_group(Group *group, Object *object, Scene *scene, Base *base)
if (base)
base->flag |= OB_FROMGROUP;
}
- return 1;
+ return true;
}
else {
- return 0;
+ return false;
}
}
/* also used for (ob == NULL) */
-static int rem_from_group_internal(Group *group, Object *ob)
+static int group_object_unlink_internal(Group *group, Object *ob)
{
GroupObject *go, *gon;
int removed = 0;
@@ -209,11 +211,11 @@ static int rem_from_group_internal(Group *group, Object *ob)
return removed;
}
-int rem_from_group(Group *group, Object *object, Scene *scene, Base *base)
+bool BKE_group_object_unlink(Group *group, Object *object, Scene *scene, Base *base)
{
- if (rem_from_group_internal(group, object)) {
+ if (group_object_unlink_internal(group, object)) {
/* object can be NULL */
- if (object && find_group(object, NULL) == NULL) {
+ if (object && BKE_group_object_find(NULL, object) == NULL) {
if (scene && base == NULL)
base = BKE_scene_base_find(scene, object);
@@ -222,23 +224,24 @@ int rem_from_group(Group *group, Object *object, Scene *scene, Base *base)
if (base)
base->flag &= ~OB_FROMGROUP;
}
- return 1;
+ return true;
}
else {
- return 0;
+ return false;
}
}
-int object_in_group(Object *ob, Group *group)
+bool BKE_group_object_exists(Group *group, Object *ob)
{
if (group == NULL || ob == NULL) {
- return FALSE;
+ return false;
+ }
+ else {
+ return (BLI_findptr(&group->gobject, ob, offsetof(GroupObject, ob)) != NULL);
}
-
- return (BLI_findptr(&group->gobject, ob, offsetof(GroupObject, ob)) != NULL);
}
-Group *find_group(Object *ob, Group *group)
+Group *BKE_group_object_find(Group *group, Object *ob)
{
if (group)
group = group->id.next;
@@ -246,14 +249,14 @@ Group *find_group(Object *ob, Group *group)
group = G.main->group.first;
while (group) {
- if (object_in_group(ob, group))
+ if (BKE_group_object_exists(group, ob))
return group;
group = group->id.next;
}
return NULL;
}
-void group_tag_recalc(Group *group)
+void BKE_group_tag_recalc(Group *group)
{
GroupObject *go;
@@ -265,7 +268,7 @@ void group_tag_recalc(Group *group)
}
}
-int group_is_animated(Object *UNUSED(parent), Group *group)
+bool BKE_group_is_animated(Group *group, Object *UNUSED(parent))
{
GroupObject *go;
@@ -276,9 +279,9 @@ int group_is_animated(Object *UNUSED(parent), Group *group)
for (go = group->gobject.first; go; go = go->next)
if (go->ob && go->ob->proxy)
- return 1;
+ return true;
- return 0;
+ return false;
}
#if 0 // add back when timeoffset & animsys work again
@@ -327,7 +330,7 @@ static void group_replaces_nla(Object *parent, Object *target, char mode)
* you can draw everything, leaves tags in objects to signal it needs further updating */
/* note: does not work for derivedmesh and render... it recreates all again in convertblender.c */
-void group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group *group)
+void BKE_group_handle_recalc_and_update(Scene *scene, Object *UNUSED(parent), Group *group)
{
GroupObject *go;
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 8d3e92975fe..c2e3d7496e9 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -760,7 +760,7 @@ void BKE_object_unlink(Object *ob)
/* groups */
group = bmain->group.first;
while (group) {
- rem_from_group(group, ob, NULL, NULL);
+ BKE_group_object_unlink(group, ob, NULL, NULL);
group = group->id.next;
}
@@ -3392,7 +3392,7 @@ struct LinkNode *BKE_object_groups(Object *ob)
{
LinkNode *group_linknode = NULL;
Group *group = NULL;
- while ((group = find_group(ob, group))) {
+ while ((group = BKE_group_object_find(group, ob))) {
BLI_linklist_prepend(&group_linknode, group);
}
@@ -3409,7 +3409,7 @@ void BKE_object_groups_clear(Scene *scene, Base *base, Object *object)
base = BKE_scene_base_find(scene, object);
}
- while ((group = find_group(base->object, group))) {
- rem_from_group(group, object, scene, base);
+ while ((group = BKE_group_object_find(group, base->object))) {
+ BKE_group_object_unlink(group, object, scene, base);
}
}
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index d9dabf24ba0..4e78ab52499 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -314,7 +314,7 @@ void psys_check_group_weights(ParticleSettings *part)
/* first remove all weights that don't have an object in the group */
dw = part->dupliweights.first;
while (dw) {
- if (!object_in_group(dw->ob, part->dup_group)) {
+ if (!BKE_group_object_exists(part->dup_group, dw->ob)) {
tdw = dw->next;
BLI_freelinkN(&part->dupliweights, dw);
dw = tdw;
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 0b6d641ca48..56e48d8f6eb 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1079,7 +1079,7 @@ static void scene_depsgraph_hack(Scene *scene, Scene *scene_parent)
if (go->ob)
go->ob->recalc |= recalc;
}
- group_handle_recalc_and_update(scene_parent, ob, ob->dup_group);
+ BKE_group_handle_recalc_and_update(scene_parent, ob, ob->dup_group);
}
}
}
@@ -1122,7 +1122,7 @@ static void scene_update_tagged_recursive(Main *bmain, Scene *scene, Scene *scen
BKE_object_handle_update_ex(scene_parent, ob, scene->rigidbody_world);
if (ob->dup_group && (ob->transflag & OB_DUPLIGROUP))
- group_handle_recalc_and_update(scene_parent, ob, ob->dup_group);
+ BKE_group_handle_recalc_and_update(scene_parent, ob, ob->dup_group);
/* always update layer, so that animating layers works (joshua july 2010) */
/* XXX commented out, this has depsgraph issues anyway - and this breaks setting scenes
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index fd79f6c8512..dc17f3c33e3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -6535,7 +6535,7 @@ static void lib_link_group(FileData *fd, Main *main)
}
}
if (add_us) group->id.us++;
- rem_from_group(group, NULL, NULL, NULL); /* removes NULL entries */
+ BKE_group_object_unlink(group, NULL, NULL, NULL); /* removes NULL entries */
}
}
}
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);
}
diff --git a/source/blender/makesrna/intern/rna_group.c b/source/blender/makesrna/intern/rna_group.c
index 1ac59f9caed..45bb5c613d5 100644
--- a/source/blender/makesrna/intern/rna_group.c
+++ b/source/blender/makesrna/intern/rna_group.c
@@ -54,7 +54,7 @@ static PointerRNA rna_Group_objects_get(CollectionPropertyIterator *iter)
static void rna_Group_objects_link(Group *group, bContext *C, ReportList *reports, Object *object)
{
- if (!add_to_group(group, object, CTX_data_scene(C), NULL)) {
+ if (!BKE_group_object_add(group, object, CTX_data_scene(C), NULL)) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' already in group '%s'", object->id.name + 2, group->id.name + 2);
return;
}
@@ -64,7 +64,7 @@ static void rna_Group_objects_link(Group *group, bContext *C, ReportList *report
static void rna_Group_objects_unlink(Group *group, bContext *C, ReportList *reports, Object *object)
{
- if (!rem_from_group(group, object, CTX_data_scene(C), NULL)) {
+ if (!BKE_group_object_unlink(group, object, CTX_data_scene(C), NULL)) {
BKE_reportf(reports, RPT_ERROR, "Object '%s' not in group '%s'", object->id.name + 2, group->id.name + 2);
return;
}
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index a79fa1aaed4..3f07ecfc5d6 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -680,7 +680,7 @@ static void rna_Main_worlds_remove(Main *bmain, ReportList *reports, PointerRNA
static Group *rna_Main_groups_new(Main *bmain, const char *name)
{
- return add_group(bmain, name);
+ return BKE_group_add(bmain, name);
}
static void rna_Main_groups_remove(Main *bmain, PointerRNA *group_ptr)
{
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 594b86f000c..0c01d03888d 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -43,7 +43,7 @@
#include "BKE_paint.h"
#include "BKE_tessmesh.h"
-#include "BKE_group.h" /* needed for object_in_group() */
+#include "BKE_group.h" /* needed for BKE_group_object_exists() */
#include "RNA_access.h"
#include "RNA_define.h"
@@ -520,7 +520,7 @@ static void rna_Object_dup_group_set(PointerRNA *ptr, PointerRNA value)
/* must not let this be set if the object belongs in this group already,
* thus causing a cycle/infinite-recursion leading to crashes on load [#25298]
*/
- if (object_in_group(ob, grp) == 0)
+ if (BKE_group_object_exists(grp, ob) == 0)
ob->dup_group = grp;
else
BKE_report(NULL, RPT_ERROR,