From 4e641517874c63dc483c4a0153e5c3890deb48d1 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Mon, 13 Feb 2017 11:16:07 +0100 Subject: Outliner: allow for renaming of collection and small touch ups in the code Note: Master Collection should not be renamable, but also, it should be marked as MasterCollection (with an icon probably) --- source/blender/editors/space_outliner/outliner_select.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_select.c') diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 1fad5f26218..38b83179e7f 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -758,13 +758,12 @@ static eOLDrawState tree_element_active_collection( bContext *C, TreeElement *te, TreeStoreElem *UNUSED(tselem), const eOLSetState set) { if (set != OL_SETSEL_NONE) { - Scene *scene = CTX_data_scene(C); - SceneLayer *slayer = BLI_findlink(&scene->render_layers, scene->active_layer); - LayerCollection *collection = te->directdata; - const int collection_index = BKE_layer_collection_findindex(slayer, collection); + SceneLayer *sl = CTX_data_scene_layer(C); + LayerCollection *lc = te->directdata; + const int collection_index = BKE_layer_collection_findindex(sl, lc); BLI_assert(collection_index >= 0); - slayer->active_collection = collection_index; + sl->active_collection = collection_index; WM_main_add_notifier(NC_SCENE | ND_LAYER, NULL); return OL_DRAWSEL_ACTIVE; } -- cgit v1.2.3