diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-08 17:16:49 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-08 23:39:01 +0300 |
commit | 206c94fea98d44ed9667607638c455c7c0e63822 (patch) | |
tree | ddc1f6f30c18d10674daaeeaee6b465550447709 /source/blender/editors/space_outliner | |
parent | 670e6cab4319b94c96c6a61cb76199f1054b935a (diff) |
Farewell Scene->base
While getting rid of Scene->base we got the following fixes:
* Fix "Convert To" operator
* Fix "NLA allowing to selected objects that are not selectable
* Fix scene.objects (readonly, no option to link/unlink)
Note: Collada needs to use the context SceneLayer for adding objects
however I added a placeholder, so Collada maintainers can fix this
properly.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/space_outliner.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c index 346e567dd8d..229d999eb9e 100644 --- a/source/blender/editors/space_outliner/space_outliner.c +++ b/source/blender/editors/space_outliner/space_outliner.c @@ -39,6 +39,7 @@ #include "BLI_mempool.h" #include "BKE_context.h" +#include "BKE_layer.h" #include "BKE_screen.h" #include "BKE_scene.h" #include "BKE_outliner_treehash.h" @@ -122,8 +123,17 @@ static int outliner_parent_drop_poll(bContext *C, wmDrag *drag, const wmEvent *e * element for object it means that all displayed objects belong to * active scene and parenting them is allowed (sergey) */ - if (!scene || BKE_scene_base_find(scene, (Object *)id)) { + if (!scene) { return 1; + } else { + for (SceneLayer *scene_layer = scene->render_layers.first; + scene_layer; + scene_layer = scene_layer->next) + { + if (BKE_scene_layer_base_find(scene_layer, (Object *)id)) { + return 1; + } + } } } else if (ELEM(tselem->type, TSE_LAYER_COLLECTION, TSE_SCENE_COLLECTION)) { |