diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-16 12:35:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2018-05-16 13:25:47 +0300 |
commit | 94feea22e6ecc1a45dfc578606cad454507f6ab2 (patch) | |
tree | 12883b27a1d8288b8b511a7af2d102caba34edb3 | |
parent | 4847490ae000b6469342e24acb2d62cb0f673849 (diff) |
Fixes for collections unification:
* Fix various crashes due to bug in latest versioning code
* Fix outliner restrict button column clipping
-rw-r--r-- | source/blender/blenloader/intern/versioning_280.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_outliner/outliner_intern.h | 2 |
2 files changed, 11 insertions, 9 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index eda07e608f3..db483160655 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -240,15 +240,17 @@ static void do_version_layer_collection_post(ViewLayer *view_layer, { /* Apply layer collection exclude flags. */ for (LayerCollection *lc = lb->first; lc; lc = lc->next) { - SceneCollection *sc = BLI_ghash_lookup(collection_map, lc->collection); - const bool enabled = (sc && BLI_gset_haskey(enabled_set, sc)); - const bool selectable = (sc && BLI_gset_haskey(selectable_set, sc)); + if (!(lc->collection->flag & COLLECTION_IS_MASTER)) { + SceneCollection *sc = BLI_ghash_lookup(collection_map, lc->collection); + const bool enabled = (sc && BLI_gset_haskey(enabled_set, sc)); + const bool selectable = (sc && BLI_gset_haskey(selectable_set, sc)); - if (!enabled) { - lc->flag |= LAYER_COLLECTION_EXCLUDE; - } - if (enabled && !selectable) { - lc->collection->flag |= COLLECTION_RESTRICT_SELECT; + if (!enabled) { + lc->flag |= LAYER_COLLECTION_EXCLUDE; + } + if (enabled && !selectable) { + lc->collection->flag |= COLLECTION_RESTRICT_SELECT; + } } do_version_layer_collection_post(view_layer, &lc->layer_collections, enabled_set, selectable_set, collection_map); diff --git a/source/blender/editors/space_outliner/outliner_intern.h b/source/blender/editors/space_outliner/outliner_intern.h index 2d19cd7ea64..86208dcb22d 100644 --- a/source/blender/editors/space_outliner/outliner_intern.h +++ b/source/blender/editors/space_outliner/outliner_intern.h @@ -155,7 +155,7 @@ typedef enum { #define OL_TOG_RESTRICT_VIEWX (UI_UNIT_X * 2.0f) #define OL_TOG_RESTRICT_RENDERX UI_UNIT_X -#define OL_TOGW OL_TOG_RESTRICT_VIEWX +#define OL_TOGW OL_TOG_RESTRICT_SELECTX #define OL_RNA_COLX (UI_UNIT_X * 15) #define OL_RNA_COL_SIZEX (UI_UNIT_X * 7.5f) |