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>2008-02-03 22:03:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2008-02-03 22:03:18 +0300
commita9518afc67d1350b2bdf369dd5be891956ddb5f1 (patch)
tree67d3ab1747062436cc7d7b555f02c47a8df7b7bd /source/blender/blenkernel/intern/group.c
parent7e7f5628c3c5b8105122c06426d9d870c17fb771 (diff)
feature request from peach, remove selected objects from 1 group.
Also made rem_from_group return if it removed the object which save some looping. Added a node in the blender help message that background mode dosnt load the .B.blend file as a bug was reported recently because of this.
Diffstat (limited to 'source/blender/blenkernel/intern/group.c')
-rw-r--r--source/blender/blenkernel/intern/group.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index a85f0f52ad2..706bdf1245c 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -134,11 +134,11 @@ void add_to_group(Group *group, Object *ob)
}
/* also used for ob==NULL */
-void rem_from_group(Group *group, Object *ob)
+int rem_from_group(Group *group, Object *ob)
{
GroupObject *go, *gon;
-
- if(group==NULL) return;
+ int removed = 0;
+ if(group==NULL) return 0;
go= group->gobject.first;
while(go) {
@@ -146,9 +146,12 @@ void rem_from_group(Group *group, Object *ob)
if(go->ob==ob) {
BLI_remlink(&group->gobject, go);
free_group_object(go);
+ removed = 1;
+ /* should break here since an object being in a group twice cant happen? */
}
go= gon;
}
+ return removed;
}
int object_in_group(Object *ob, Group *group)