diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-02-13 13:16:07 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-02-13 13:16:23 +0300 |
commit | 4e641517874c63dc483c4a0153e5c3890deb48d1 (patch) | |
tree | 0e724bca616793750af739b26b6df5359ce6e107 /source/blender/editors/space_outliner/outliner_select.c | |
parent | 8a92277a317459a591a7898c5d7927584d1c9718 (diff) |
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)
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 9 |
1 files changed, 4 insertions, 5 deletions
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; } |