Fix #130579: Un-isolating collection fails in presence of linked-collection
Visibility of linked collection cannot be changed after4e907829d3ande494a44024. This results in failing "un-isolate" collection. To resolve that, treat linked/overridden collections as isolated by returning true in `outliner_collection_is_isolated()`. Pull Request: https://projects.blender.org/blender/blender/pulls/130604
This commit is contained in:
committed by
Pratik Borhade
parent
8dc8e48e9a
commit
f181262634
@@ -433,7 +433,7 @@ static bool outliner_collection_is_isolated(Scene *scene,
|
||||
const LayerCollection *layer_collection_cmp,
|
||||
const Collection *collection_cmp,
|
||||
const bool value_cmp,
|
||||
const PropertyRNA *layer_or_collection_prop,
|
||||
PropertyRNA *layer_or_collection_prop,
|
||||
LayerCollection *layer_collection,
|
||||
Collection *collection)
|
||||
{
|
||||
@@ -444,6 +444,12 @@ static bool outliner_collection_is_isolated(Scene *scene,
|
||||
const Collection *collection_ensure_cmp = collection_cmp ? collection_cmp :
|
||||
layer_collection_cmp->collection;
|
||||
|
||||
/* Exclude linked collections, otherwise toggling property won't reset the visibility for
|
||||
* editable collections, see: #130579. */
|
||||
if (layer_or_collection_prop && !RNA_property_editable(&ptr, layer_or_collection_prop)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (collection_ensure->flag & COLLECTION_IS_MASTER) {
|
||||
}
|
||||
else if (collection_ensure == collection_ensure_cmp) {
|
||||
|
||||
Reference in New Issue
Block a user