Outliner: any action triggers expansion of all ViewLayers #102317

Closed
opened 2022-11-07 01:21:38 +01:00 by Pablo Vazquez · 14 comments
Member

System Information
Operating system: Linux-6.0.5-200.fc36.x86_64-x86_64-with-glibc2.35 64 Bits
Graphics card: Quadro RTX 4000 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 520.56.06

Blender Version
Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-11-03 18:41, hash: 9dfc134c9d
Worked: I don't think it ever worked

Short description of error
As seen on the attached video, when the All View Layers filter is enabled, performing any action (such as clicking on a ViewLayer name) triggers the expansion of all the View Layers.

I think the behavior should follow that of other items, such as Collections, so clicking on the View Layer name only selects it, doesn't expand it.

The video also shows a different bug I noticed (around 0:10), but I made a separate report for that: #102357.

Exact steps for others to reproduce the error

  • Create multiple View Layers
  • In the Outliner, enable the filter All View Layers
  • Collapse all view layers
  • Select one view layer
    #102317.blend
    {F13862779, size=full}
**System Information** Operating system: Linux-6.0.5-200.fc36.x86_64-x86_64-with-glibc2.35 64 Bits Graphics card: Quadro RTX 4000 with Max-Q Design/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 520.56.06 **Blender Version** Broken: version: 3.5.0 Alpha, branch: master, commit date: 2022-11-03 18:41, hash: `9dfc134c9d` Worked: I don't think it ever worked **Short description of error** As seen on the attached video, when the `All View Layers` filter is enabled, performing any action (such as clicking on a ViewLayer name) triggers the expansion of all the View Layers. I think the behavior should follow that of other items, such as Collections, so clicking on the View Layer name only selects it, doesn't expand it. The video also shows a different bug I noticed (around 0:10), but I made a separate report for that: #102357. **Exact steps for others to reproduce the error** * Create multiple View Layers * In the Outliner, enable the filter `All View Layers` * Collapse all view layers * Select one view layer [#102317.blend](https://archive.blender.org/developer/F13863214/T102317.blend) {[F13862779](https://archive.blender.org/developer/F13862779/sr-2022-11-07_01.07.31.mp4), size=full}
Author
Member

Added subscriber: @pablovazquez

Added subscriber: @pablovazquez

#103340 was marked as duplicate of this issue

#103340 was marked as duplicate of this issue
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Another bug I noticed is shown in the video (around 0:10)

@pablovazquez hi, I'm unable to reproduce this. Did you try it with factory settings?

> Another bug I noticed is shown in the video (around 0:10) @pablovazquez hi, I'm unable to reproduce this. Did you try it with factory settings?
Author
Member

In #102317#1441619, @PratikPB2123 wrote:

Another bug I noticed is shown in the video (around 0:10)

@pablovazquez hi, I'm unable to reproduce this. Did you try it with factory settings?

Yes, it also happens in factory settings. I made a new report, since it's a separate issue than this one: #102357

> In #102317#1441619, @PratikPB2123 wrote: >> Another bug I noticed is shown in the video (around 0:10) > @pablovazquez hi, I'm unable to reproduce this. Did you try it with factory settings? Yes, it also happens in factory settings. I made a new report, since it's a separate issue than this one: #102357
Member

@pablovazquez hi, yes, can redo the other bug sometimes.
Regarding this report: its not necessary to select view layer. Any operation that will call outliner update will expand view layer
For example, invoke box select in outliner, delete/hide cube in attached file, change outliner filter, etc.

@pablovazquez hi, yes, can redo the other bug sometimes. Regarding this report: its not necessary to select view layer. Any operation that will call `outliner update` will expand view layer For example, invoke box select in outliner, delete/hide cube in attached file, change outliner filter, etc.
Author
Member

@PratikPB2123 good catch! Indeed any action in the outliner triggers the expansion of all ViewLayers. I'll adjust the task title.

@PratikPB2123 good catch! Indeed any action in the outliner triggers the expansion of all ViewLayers. I'll adjust the task title.
Pablo Vazquez changed title from Outliner: Clicking on a ViewLayer expands all of them to Outliner: any action triggers expansion of all ViewLayers 2022-11-10 14:49:16 +01:00
Dalai Felinto was assigned by Pablo Vazquez 2022-11-10 17:15:55 +01:00
Author
Member

Talked with Dalai and he will look into it since he worked in this area before.

Talked with Dalai and he will look into it since he worked in this area before.
Member

I'll give a try to fix this.
AFAICS we're expanding viewlayers without any condition.
https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc$83

    &space_outliner_, &tree, scene, nullptr, TSE_R_LAYER, 0);
TREESTORE(&te_view_layer)->flag &= ~TSE_CLOSED;
te_view_layer.name = view_layer->name;
te_view_layer.directdata = view_layer;

Approach could be wrong.

I'll give a try to fix this. AFAICS we're expanding viewlayers without any condition. https://developer.blender.org/diffusion/B/browse/master/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc$83 ``` TreeElement &te_view_layer = *outliner_add_element( ``` &space_outliner_, &tree, scene, nullptr, TSE_R_LAYER, 0); TREESTORE(&te_view_layer)->flag &= ~TSE_CLOSED; te_view_layer.name = view_layer->name; te_view_layer.directdata = view_layer; ``` ``` - - - Approach could be wrong.
Member

Something like this should do it. Will check again. @dfelinto , can I claim the task or you've a fix already?

diff --git a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
index 66c1fa34914..824371ea11d 100644
--- a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
+++ b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc
@@ -80,7 +80,9 @@ 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;
+      if (!TREESTORE(&te_view_layer)->used) {
+        TREESTORE(&te_view_layer)->flag &= ~TSE_CLOSED;
+      }
       te_view_layer.name = view_layer->name;
       te_view_layer.directdata = view_layer;

@@ -113,8 +115,10 @@ void TreeDisplayViewLayer::add_view_layer(Scene &scene, ListBase &tree, TreeElem
     TreeElement &ten = *outliner_add_element(
         &space_outliner_, &tree, &scene, parent, TSE_VIEW_COLLECTION_BASE, 0);
     ten.name = IFACE_("Scene Collection");
-    TREESTORE(&ten)->flag &= ~TSE_CLOSED;
-
+    if (!TREESTORE(&ten)->used) {
+      TREESTORE(&ten)->flag &= ~TSE_CLOSED;
+    }
+
     /* First layer collection is for master collection, don't show it. */
     LayerCollection *lc = static_cast<LayerCollection *>(view_layer_->layer_collections.first);
     if (lc == nullptr) {
(END)```
Something like this should do it. Will check again. @dfelinto , can I claim the task or you've a fix already? ```lines=10 diff --git a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc index 66c1fa34914..824371ea11d 100644 --- a/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc +++ b/source/blender/editors/space_outliner/tree/tree_display_view_layer.cc @@ -80,7 +80,9 @@ 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; + if (!TREESTORE(&te_view_layer)->used) { + TREESTORE(&te_view_layer)->flag &= ~TSE_CLOSED; + } te_view_layer.name = view_layer->name; te_view_layer.directdata = view_layer; @@ -113,8 +115,10 @@ void TreeDisplayViewLayer::add_view_layer(Scene &scene, ListBase &tree, TreeElem TreeElement &ten = *outliner_add_element( &space_outliner_, &tree, &scene, parent, TSE_VIEW_COLLECTION_BASE, 0); ten.name = IFACE_("Scene Collection"); - TREESTORE(&ten)->flag &= ~TSE_CLOSED; - + if (!TREESTORE(&ten)->used) { + TREESTORE(&ten)->flag &= ~TSE_CLOSED; + } + /* First layer collection is for master collection, don't show it. */ LayerCollection *lc = static_cast<LayerCollection *>(view_layer_->layer_collections.first); if (lc == nullptr) { (END)```

@PratikPB2123 please go ahead

@PratikPB2123 please go ahead
Dalai Felinto removed their assignment 2022-11-28 13:54:32 +01:00
Pratik Borhade was assigned by Dalai Felinto 2022-11-28 13:54:32 +01:00

Added subscriber: @dfelinto

Added subscriber: @dfelinto
Member

Added subscriber: @SteffenD

Added subscriber: @SteffenD
Philipp Oeser removed the
Interest
User Interface
label 2023-02-10 09:21:30 +01:00
Blender Bot added
Status
Resolved
and removed
Status
Confirmed
labels 2023-03-10 16:37:19 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#102317
No description provided.