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-07-18 13:45:50 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-07-18 13:45:50 +0400
commit88fddb3cc34e0e1fe8da6f038f2ed377684b2ea9 (patch)
treebd21d5b828797d4988fbc5dfcc53c528fcd4d0d9 /source/blender/editors/object/object_group.c
parente204d67cc79f2a7851611a4558ad95bb1b624859 (diff)
make links now allows groups - this means you can make objects have matching groups to the active more easily.
Diffstat (limited to 'source/blender/editors/object/object_group.c')
-rw-r--r--source/blender/editors/object/object_group.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_group.c b/source/blender/editors/object/object_group.c
index 3b9d54d76d6..e86a62f0dca 100644
--- a/source/blender/editors/object/object_group.c
+++ b/source/blender/editors/object/object_group.c
@@ -44,6 +44,7 @@
#include "BKE_group.h"
#include "BKE_main.h"
#include "BKE_report.h"
+#include "BKE_object.h"
#include "ED_screen.h"
#include "ED_object.h"
@@ -113,7 +114,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
int group_object_index = RNA_enum_get(op->ptr, "group");
- int cycle = FALSE;
+ int is_cycle = FALSE;
if (ob) {
Group *group = group_object_active_find_index(ob, group_object_index);
@@ -127,7 +128,7 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
add_to_group(group, base->object, scene, base);
}
else {
- cycle = TRUE;
+ is_cycle = TRUE;
}
}
CTX_DATA_END;
@@ -139,8 +140,9 @@ static int objects_add_active_exec(bContext *C, wmOperator *op)
}
}
- if (cycle)
+ if (is_cycle) {
BKE_report(op->reports, RPT_WARNING, "Skipped some groups because of cycle detected");
+ }
return OPERATOR_CANCELLED;
}
@@ -220,13 +222,10 @@ static int group_objects_remove_all_exec(bContext *C, wmOperator *UNUSED(op))
{
Main *bmain = CTX_data_main(C);
Scene *scene = CTX_data_scene(C);
- Group *group = NULL;
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);
+ BKE_object_groups_clear(scene, base, base->object);
}
CTX_DATA_END;