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:
Diffstat (limited to 'source/blender/blenkernel/intern/group.c')
-rw-r--r--source/blender/blenkernel/intern/group.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c
index 3f68339be11..a44eb1df9fe 100644
--- a/source/blender/blenkernel/intern/group.c
+++ b/source/blender/blenkernel/intern/group.c
@@ -73,9 +73,8 @@ void BKE_group_free(Group *group)
}
}
-void BKE_group_unlink(Group *group)
+void BKE_group_unlink(Main *bmain, Group *group)
{
- Main *bmain = G.main;
Material *ma;
Object *ob;
Scene *sce;
@@ -183,6 +182,7 @@ static bool group_object_add_internal(Group *group, Object *ob)
BLI_addtail(&group->gobject, go);
go->ob = ob;
+ id_us_ensure_real(&go->ob->id);
return true;
}
@@ -232,12 +232,12 @@ static bool group_object_cyclic_check_internal(Object *object, Group *group)
{
if (object->dup_group) {
Group *dup_group = object->dup_group;
- if ((dup_group->id.flag & LIB_DOIT) == 0) {
+ if ((dup_group->id.tag & LIB_TAG_DOIT) == 0) {
/* Cycle already exists in groups, let's prevent further crappyness */
return true;
}
/* flag the object to identify cyclic dependencies in further dupli groups */
- dup_group->id.flag &= ~LIB_DOIT;
+ dup_group->id.tag &= ~LIB_TAG_DOIT;
if (dup_group == group)
return true;
@@ -251,7 +251,7 @@ static bool group_object_cyclic_check_internal(Object *object, Group *group)
}
/* un-flag the object, it's allowed to have the same group multiple times in parallel */
- dup_group->id.flag |= LIB_DOIT;
+ dup_group->id.tag |= LIB_TAG_DOIT;
}
return false;
@@ -260,7 +260,7 @@ static bool group_object_cyclic_check_internal(Object *object, Group *group)
bool BKE_group_object_cyclic_check(Main *bmain, Object *object, Group *group)
{
/* first flag all groups */
- BKE_main_id_tag_listbase(&bmain->group, true);
+ BKE_main_id_tag_listbase(&bmain->group, LIB_TAG_DOIT, true);
return group_object_cyclic_check_internal(object, group);
}