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:
authorDalai Felinto <dfelinto@gmail.com>2019-03-13 01:55:33 +0300
committerDalai Felinto <dfelinto@gmail.com>2019-03-15 22:09:32 +0300
commit713010bd7795c539c1c18afc3df9f25ab8ba6c12 (patch)
tree00a02d1383b0e01fb6f81e7242ed3285dfe215f4 /source/blender/blenkernel/intern/object.c
parentfcffbe1d1b31ed518b7a710c09d5fda389d8182e (diff)
Fix T62313 - No way to remove object from master collection in 3d view
This introduces a new iterator, FOREACH_COLLECTION, that unlike the FOREACH_SCENE_COLLECTION it iterates over all the Blender file collections, including the scene master collection, as well the database ones (bmain). Reviewers: brecht
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 02b6f64a7c7..f7a719726b9 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3944,21 +3944,21 @@ LinkNode *BKE_object_relational_superset(struct ViewLayer *view_layer, eObjectSe
/**
* return all groups this object is apart of, caller must free.
*/
-struct LinkNode *BKE_object_groups(Main *bmain, Object *ob)
+struct LinkNode *BKE_object_groups(Main *bmain, Scene *scene, Object *ob)
{
LinkNode *collection_linknode = NULL;
Collection *collection = NULL;
- while ((collection = BKE_collection_object_find(bmain, collection, ob))) {
+ while ((collection = BKE_collection_object_find(bmain, scene, collection, ob))) {
BLI_linklist_prepend(&collection_linknode, collection);
}
return collection_linknode;
}
-void BKE_object_groups_clear(Main *bmain, Object *ob)
+void BKE_object_groups_clear(Main *bmain, Scene *scene, Object *ob)
{
Collection *collection = NULL;
- while ((collection = BKE_collection_object_find(bmain, collection, ob))) {
+ while ((collection = BKE_collection_object_find(bmain, scene, collection, ob))) {
BKE_collection_object_remove(bmain, collection, ob, false);
DEG_id_tag_update(&collection->id, ID_RECALC_COPY_ON_WRITE);
}