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:
authorLuca Rood <dev@lucarood.com>2017-04-21 15:28:23 +0300
committerLuca Rood <dev@lucarood.com>2017-04-24 17:09:04 +0300
commit913e9350a56dc384d76a4b1cce36300764c35011 (patch)
treed9639d9f1334314f2f50e3a3747f841a06a3b093 /source/blender/editors/space_outliner/outliner_tools.c
parent2010dbe8a59e80775219fb5162f3c2f5dfd24e04 (diff)
Convert BaseLegacy to Base (part)
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_tools.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_tools.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 34879c09583..7afd4e28602 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -513,22 +513,25 @@ static void singleuser_world_cb(
}
static void group_linkobs2scene_cb(
- bContext *UNUSED(C), ReportList *UNUSED(reports), Scene *scene, TreeElement *UNUSED(te),
+ bContext *C, ReportList *UNUSED(reports), Scene *scene, TreeElement *UNUSED(te),
TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
{
+ SceneLayer *sl = CTX_data_scene_layer(C);
+ SceneCollection *sc = CTX_data_scene_collection(C);
Group *group = (Group *)tselem->id;
GroupObject *gob;
- BaseLegacy *base;
+ Base *base;
for (gob = group->gobject.first; gob; gob = gob->next) {
- base = BKE_scene_base_find(scene, gob->ob);
+ base = BKE_scene_layer_base_find(sl, gob->ob);
if (!base) {
/* link to scene */
- base = BKE_scene_base_add(scene, gob->ob);
+ BKE_collection_object_add(scene, sc, gob->ob);
+ base = BKE_scene_layer_base_find(sl, gob->ob);
id_us_plus(&gob->ob->id);
}
- base->object->flag |= SELECT;
- base->flag_legacy |= SELECT;
+
+ base->flag |= BASE_SELECTED;
}
}