Proposal to change behavior when the active object is hidden #85532

Closed
opened 2021-02-11 01:10:40 +01:00 by Campbell Barton · 8 comments

There are currently multiple bugs/inconsistencies when the active object can be hidden while being edited.

The 3D views "active_object" checks visibility, returning NULL when when it's hidden. This has the result of showing the 3D view as being in object-mode when the active object is hidden.

There is an exception to this rule - edit-mode always returns the active object, ignoring the hidden state.

As far as I know, this is mostly a result of incremental tweaks & fixes, not a design decision.


Current Issues

The logic to always be in object-mode with a hidden active object isn't working properly.

  • When the collection is hidden, the object can be sculpted onto, but when the object is hidden it can't be.
  • The tool system currently follows the active object, ignoring it's hidden state.
  • #83013 (Crash when using annotation tool on object hidden in sculpt mode). Note, fixing this isn't so complicated, it's just an example of the current behavior being error prone.

Possible Solutions

Fix the current behavior:

Fully support object mode behavior when the active object in a mode is hidden.

  • Take into account the hidden state of the collection.
  • Make the tool system respect the active-objects hidden state, refreshing the tool system on visibility changes.
  • Make transform logic use contexts active object.

Ignore visibility flag when editing:

While I'm not so keen on this, adding for completeness.
We could ignore the visibility option when the active object isn't in object mode.

Extend the edit-mode exception:

Extend the edit-mode exception to all object editing modes.

  • When in object-mode, use the visibility state, otherwise always treat the object as visible (P1956).
This means you won't be able to enter sculpt mode on a hidden object (same as edit-mode), but you will still be able to exit.
  • Any operators that cause problems when activated on an invisible object - can warn/error on activation.

Suggested Solution

In most cases fixing the current behavior is reasonable, however this further complicates code in a way that doesn't help users.

This is a corner case that shouldn't crash or fail entirely, but I don't think we should be spending development time to support these corner cases.

For example, if we treat collection visibility the same as object visibility, we would need to support scenes with an animated collection-visibility properly updating cursors/gizmos etc... since it would be effectively animating the object's mode.

If we choose not to support this corner-case, we have the current situation where visibility sometimes changes the object mode, other times not.

I'd suggest we extend the edit-mode exception, or at least opt for a change that keeps behavior straightforward / simple.

There are currently multiple bugs/inconsistencies when the active object can be hidden while being edited. The 3D views "active_object" checks visibility, returning NULL when when it's hidden. This has the result of showing the 3D view as being in object-mode when the active object is hidden. There is an exception to this rule - edit-mode always returns the active object, ignoring the hidden state. As far as I know, this is mostly a result of incremental tweaks & fixes, not a design decision. ----- ## Current Issues The logic to always be in object-mode with a hidden active object isn't working properly. - When the collection is hidden, the object can be sculpted onto, but when the object is hidden it can't be. - The tool system currently follows the active object, ignoring it's hidden state. - #83013 (Crash when using annotation tool on object hidden in sculpt mode). Note, fixing this isn't so complicated, it's just an example of the current behavior being error prone. ## Possible Solutions **Fix the current behavior:** Fully support object mode behavior when the active object in a mode is hidden. - Take into account the hidden state of the collection. - Make the tool system respect the active-objects hidden state, refreshing the tool system on visibility changes. - Make transform logic use contexts active object. **Ignore visibility flag when editing:** While I'm not so keen on this, adding for completeness. We could ignore the visibility option when the active object isn't in object mode. **Extend the edit-mode exception:** Extend the edit-mode exception to all object editing modes. - When in object-mode, use the visibility state, otherwise always treat the object as visible ([P1956](https://archive.blender.org/developer/P1956.txt)). ``` This means you won't be able to enter sculpt mode on a hidden object (same as edit-mode), but you will still be able to exit. ``` - Any operators that cause problems when activated on an invisible object - can warn/error on activation. ## Suggested Solution In most cases fixing the current behavior is reasonable, however this further complicates code in a way that doesn't help users. This is a corner case that shouldn't crash or fail entirely, but I don't think we should be spending development time to support these corner cases. For example, if we treat collection visibility the same as object visibility, we would need to support scenes with an animated collection-visibility properly updating cursors/gizmos etc... since it would be effectively animating the object's mode. If we choose not to support this corner-case, we have the current situation where visibility sometimes changes the object mode, other times not. I'd suggest we extend the edit-mode exception, or at least opt for a change that keeps behavior straightforward / simple.
Campbell Barton self-assigned this 2021-02-11 01:10:40 +01:00
Author
Owner

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

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

Added subscribers: @ideasman42, @brecht, @mont29

Added subscribers: @ideasman42, @brecht, @mont29
Author
Owner

Added subscriber: @DanielBystedt

Added subscriber: @DanielBystedt

I'd suggest we extend the edit-mode exception

Fine with me.

> I'd suggest we extend the edit-mode exception Fine with me.

In #85532#1110535, @brecht wrote:

I'd suggest we extend the edit-mode exception

Fine with me.

Same for me, looks like the most reasonable solution.

> In #85532#1110535, @brecht wrote: >> I'd suggest we extend the edit-mode exception > > Fine with me. Same for me, looks like the most reasonable solution.
Member

I'd suggest we extend the edit-mode exception, or at least opt for a change that keeps behavior straightforward / simple.

I agree with what Campbell is suggesting

> I'd suggest we extend the edit-mode exception, or at least opt for a change that keeps behavior straightforward / simple. I agree with what Campbell is suggesting
Author
Owner

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Author
Owner

Thanks for checking on this, committed c10ad8e9ea.

Thanks for checking on this, committed c10ad8e9ea.
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#85532
No description provided.