Fix #102317: Any action triggers expansion of all ViewLayers #104862
No reviewers
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
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
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#104862
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "PratikPB2123/blender:Fix-T102317-view-layer-expand"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
Hi Pratik, thanks for working on this.
The behavior of not expanding seems to work correctly now, but I also noticed that selecting the ViewLayer does not change the active ViewLayer, like it used to.
Attached video showing ViewLayer not switching on click
This makes me think that the issue is elsewhere.
The Outliner auto expands everything:
However, it does not happen when switching ViewLayers from the top-right dropdown, as seen on this video.
So perhaps the fix for this bug would be:
Hi @PratikPB2123, do you think you will have time to have a look at this (based on the feedback on my last comment) for 3.5?
@pablovazquez hi, yes, this is on my list for this week. (for last 2 weeks I was busy with exams/preparation)
@pablovazquez hi, last commit will fix this issue.
This issue is not particular to view-layer though. Perhaps a separate patch is needed to fix this globally?
Also, auto-expand happens due to other operations too (as said in the report)
Tree building happens in that function for "view layer" display mode, so I think making some changes there will fix the auto-expanding.
Fantastic! Just tested it and it works as expected.
@dfelinto can better judge the code, but from a user point of view, this is fixed (is this small enough for 3.5 too?)
I'm not the best person to look at the code (I could, but I haven't been doing much coding lately). @PratikPB2123 have someone from the UI team to look at it (e..g, @Harley )
Changes look correct. Thanks!
3d2a1a658e
tod61f03cadc
Seems to work quite nicely, but I might not quite understand something.
The original task, https://archive.blender.org/developer/maniphest/0102/0102317/index.html, showed that clicking on the View name would expand all views. That part seems fixed nicely, so clicking a view name just selects it.
But the change where you remove TSE_CLOSED in buildTree doesn't seem to affect that. As in I can comment out that change (shown as lines 84-89) and everything continues to work just as well. The only difference is that with your change the View lists start off initially expanded, while without it they are initially closed. Is that your intention?
Before the change the collapsed state would always be overridden when rebuilding the tree. After it it will only be set when the tree-element is new (e.g. not read from a file either).