diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-05-31 19:17:16 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-05-31 20:02:26 +0300 |
commit | d0258abdd7db5aee66da78008df897d8f444b987 (patch) | |
tree | 31677457c0365f554fd99211d5d9c145199d4402 /source/blender/blenloader | |
parent | 3f23299403d4f20fa5c8ef799bde940d0c291228 (diff) |
Fix Outliner: New collections are hidden
Users could change the master collection flags, but they should not.
That would not effectively affect the master collection objects
(depsgraph flag evaluation ignores master collection flags).
However we use the layer collection flags of the parent collection when creating
a new child collection.
We *could* solve this differently by creating a new RNA type for the
master collection (and layer collection) and hook this with rna refine.
But this patch seems to work well enough and it is simpler.
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4981
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 1f543a92c04..c4436cc8128 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -3505,5 +3505,13 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) { /* Versioning code until next subversion bump goes here. */ + + for (Scene *scene = bmain->scenes.first; scene; scene = scene->id.next) { + if (scene->master_collection != NULL) { + scene->master_collection->flag &= ~(COLLECTION_RESTRICT_VIEWPORT | + COLLECTION_RESTRICT_SELECT | + COLLECTION_RESTRICT_RENDER); + } + } } } |