Fix #102317: Any action triggers expansion of all ViewLayers
Don't expand view layer elements if element is previously used This is similar as done for other display mode (eg. scene, library override) Pass view_layer ID instead of scene as argument in `outliner_add_element` Old Differential Revision: https://archive.blender.org/developer/D16661 Pull Request: https://projects.blender.org/blender/blender/pulls/104862
This commit is contained in:
@@ -219,7 +219,7 @@ void outliner_item_mode_toggle(bContext *C,
|
||||
static void tree_element_viewlayer_activate(bContext *C, TreeElement *te)
|
||||
{
|
||||
/* paranoia check */
|
||||
if (te->idcode != ID_SCE) {
|
||||
if (te->store_elem->type != TSE_R_LAYER) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,8 +79,14 @@ ListBase TreeDisplayViewLayer::buildTree(const TreeSourceData &source_data)
|
||||
}
|
||||
else {
|
||||
TreeElement &te_view_layer = *outliner_add_element(
|
||||
&space_outliner_, &tree, scene, nullptr, TSE_R_LAYER, 0);
|
||||
TREESTORE(&te_view_layer)->flag &= ~TSE_CLOSED;
|
||||
&space_outliner_, &tree, view_layer, nullptr, TSE_R_LAYER, 0);
|
||||
|
||||
TreeStoreElem *tselem = TREESTORE(&te_view_layer);
|
||||
|
||||
if (!tselem->used) {
|
||||
tselem->flag &= ~TSE_CLOSED;
|
||||
}
|
||||
|
||||
te_view_layer.name = view_layer->name;
|
||||
te_view_layer.directdata = view_layer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user