Commit: 0048a18b13a0cf8dc6793bf3025289795be16cd7
Author: Julian Eisel
Date:   Fri Dec 4 11:25:07 2020 +0100
Branches: asset-browser
https://developer.blender.org/rB0048a18b13a0cf8dc6793bf3025289795be16cd7

Fix "Make Asset" failing for collections in the Outliner

All ID types but collections have a `TreeStoreElem.type` of 0, but 
collections...
AFAIK to avoid compatilibity breaking changes back in 2.8.

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

M       source/blender/editors/space_outliner/outliner_context.c

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

diff --git a/source/blender/editors/space_outliner/outliner_context.c 
b/source/blender/editors/space_outliner/outliner_context.c
index d6b467f0c86..760fa8e4604 100644
--- a/source/blender/editors/space_outliner/outliner_context.c
+++ b/source/blender/editors/space_outliner/outliner_context.c
@@ -36,7 +36,7 @@ static void outliner_context_selected_ids_recursive(const 
ListBase *subtree,
 {
   LISTBASE_FOREACH (const TreeElement *, te, subtree) {
     const TreeStoreElem *tse = TREESTORE(te);
-    if ((tse->flag & TSE_SELECTED) && (tse->type == 0)) {
+    if ((tse->flag & TSE_SELECTED) && (ELEM(tse->type, 0, 
TSE_LAYER_COLLECTION))) {
       CTX_data_id_list_add(result, tse->id);
     }
     outliner_context_selected_ids_recursive(&te->subtree, result);

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to