diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-04-03 15:28:42 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-04-03 15:28:42 +0400 |
commit | d407aeecc7f2d45422ff14aea88276edf244aa7a (patch) | |
tree | feda0dbc8cf2959e71e2660849ecd88f7e764fcc /source/blender/editors/object | |
parent | efa4c5be4bb11604e211f8eb26eee9d54ca09cb4 (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/object')
-rw-r--r-- | source/blender/editors/object/object_add.c | 4 | ||||
-rw-r--r-- | source/blender/editors/object/object_group.c | 24 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 2 | ||||
-rw-r--r-- | source/blender/editors/object/object_select.c | 6 |
4 files changed, 18 insertions, 18 deletions
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; |