[Bf-blender-cvs] [94feea22e6e] temp-unified-collections: Fixes for collections unification:

Brecht Van Lommel noreply at git.blender.org
Wed May 16 12:26:33 CEST 2018


Commit: 94feea22e6ecc1a45dfc578606cad454507f6ab2
Author: Brecht Van Lommel
Date:   Wed May 16 11:35:46 2018 +0200
Branches: temp-unified-collections
https://developer.blender.org/rB94feea22e6ecc1a45dfc578606cad454507f6ab2

Fixes for collections unification:

* Fix various crashes due to bug in latest versioning code
* Fix outliner restrict button column clipping

===================================================================

M	source/blender/blenloader/intern/versioning_280.c
M	source/blender/editors/space_outliner/outliner_intern.h

===================================================================

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)



More information about the Bf-blender-cvs mailing list