Fix #102317: Any action triggers expansion of all ViewLayers #104862

Merged
Pratik Borhade merged 2 commits from PratikPB2123/blender:Fix-T102317-view-layer-expand into blender-v3.5-release 2023-03-10 16:37:16 +01:00
Member

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

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
Pratik Borhade requested review from Pablo Vazquez 2023-02-17 11:44:07 +01:00
Pratik Borhade requested review from Dalai Felinto 2023-02-17 11:44:08 +01:00
Member

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:

  • When re-opening the .blend file, even if it was saved with all collapsed.
  • When splitting the Outliner editor in half, or into a new window.

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:

  • Let clicking on a ViewLayer switch to it.
  • Do not auto-expand everything when the Outliner changes (keep its elements' expand status).
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](/attachments/9bf65650-a745-44e2-8caa-d0581a8d99f8) This makes me think that the issue is elsewhere. The Outliner auto expands everything: * When re-opening the .blend file, even if it was saved with all collapsed. * When splitting the Outliner editor in half, or into a new window. However, it does not happen when switching ViewLayers from the top-right dropdown, as seen [on this video]([viewlayer_switching.mp4](/attachments/5351cbf9-0b9d-4a77-93e3-3b7e4baa0ba7)). So perhaps the fix for this bug would be: * Let clicking on a ViewLayer switch to it. * Do not auto-expand everything when the Outliner changes (keep its elements' expand status).
Brecht Van Lommel added this to the User Interface project 2023-02-20 10:41:14 +01:00
Member

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?

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?
Author
Member

@pablovazquez hi, yes, this is on my list for this week. (for last 2 weeks I was busy with exams/preparation)

@pablovazquez hi, yes, this is on my list for this week. (for last 2 weeks I was busy with exams/preparation)
Author
Member

Let clicking on a ViewLayer switch to it.

@pablovazquez hi, last commit will fix this issue.

Outliner auto expands everything: When splitting the Outliner editor in half, or into a new window.

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)

This makes me think that the issue is elsewhere.

Tree building happens in that function for "view layer" display mode, so I think making some changes there will fix the auto-expanding.

> Let clicking on a ViewLayer switch to it. @pablovazquez hi, last commit will fix this issue. > Outliner auto expands everything: When splitting the Outliner editor in half, or into a new window. 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](https://projects.blender.org/blender/blender/issues/102317#issuecomment-93271)) > This makes me think that the issue is elsewhere. Tree building happens in that function for "view layer" display mode, so I think making some changes there will fix the auto-expanding.
Pablo Vazquez approved these changes 2023-03-07 16:11:45 +01:00
Pablo Vazquez left a comment
Member

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?)

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?)
Dalai Felinto refused to review 2023-03-09 14:31:44 +01:00

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 )

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 )
Brecht Van Lommel requested review from Harley Acheson 2023-03-10 13:19:58 +01:00
Brecht Van Lommel requested review from Julian Eisel 2023-03-10 13:19:58 +01:00
Julian Eisel approved these changes 2023-03-10 14:46:03 +01:00
Julian Eisel left a comment
Member

Changes look correct. Thanks!

Changes look correct. Thanks!
Pratik Borhade changed target branch from main to blender-v3.5-release 2023-03-10 16:27:35 +01:00
Pratik Borhade force-pushed Fix-T102317-view-layer-expand from 3d2a1a658e to d61f03cadc 2023-03-10 16:35:47 +01:00 Compare
Pratik Borhade merged commit c2fdbcca3c into blender-v3.5-release 2023-03-10 16:37:16 +01:00
Pratik Borhade deleted branch Fix-T102317-view-layer-expand 2023-03-10 16:37:19 +01:00
Member

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?

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?
Member

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).

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).
Harley Acheson approved these changes 2023-03-11 01:57:08 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
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
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#104862
No description provided.