Switching object in EditMode to invisible layer locks you out of ObjectMode #40526

Closed
opened 2014-06-06 20:26:31 +02:00 by Mark · 12 comments

System Information
Debian Linux with Radeon HD 7470 graphics card

Blender Version
Broken:2.70a

Short description of error
If an object being editted is moved to a non-visible layer, the UI can no longer be switched from Edit Mode to Object Mode

Exact steps for others to reproduce the error
Take any .blend scene, even the initial cube.
Press 1 so only Layer 1 is visible
Select the cube object and TAB into Edit Mode.
In the Properties window select the Object Tab.
Within the Relations->Layers, switch the object to Layer 2, which is not visible.
You are now locked out of switching to Object Mode, either by pressing TAB or via the 2D view's object interaction pulldown.

To fix this, you must either switch the object BACK to a visible layer, or press a number key to make the object's layer visible.

  • Mark
**System Information** Debian Linux with Radeon HD 7470 graphics card **Blender Version** Broken:2.70a **Short description of error** If an object being editted is moved to a non-visible layer, the UI can no longer be switched from Edit Mode to Object Mode **Exact steps for others to reproduce the error** Take any .blend scene, even the initial cube. Press 1 so only Layer 1 is visible Select the cube object and TAB into Edit Mode. In the Properties window select the Object Tab. Within the Relations->Layers, switch the object to Layer 2, which is not visible. You are now locked out of switching to Object Mode, either by pressing TAB or via the 2D view's object interaction pulldown. To fix this, you must either switch the object BACK to a visible layer, or press a number key to make the object's layer visible. - Mark
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @cmuAdamson

Added subscriber: @cmuAdamson

#40700 was marked as duplicate of this issue

#40700 was marked as duplicate of this issue

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich

Can confirm this behavior on Linux with latest head as well (918f6a4)

Can confirm this behavior on Linux with latest head as well (918f6a4)
Member

Added subscriber: @LukasTonne

Added subscriber: @LukasTonne
Member

Confirmed.

There is a discrepancy in "object from context" functions used in the operators here:

  • The generic object.mode_set operator uses the context.active_object attribute. This attribute is defined in the View3D space by checking the active object's layers.
  • The operator's poll method, however, uses ED_object_active_context. This function retrieves the context.object attribute primarily, which is defined screen-wide without filtering by visible layers.

So while the poll method passes, the actual execution function quits early due to the filtering.

Confirmed. There is a discrepancy in "object from context" functions used in the operators here: * The generic object.mode_set operator uses the **context.active_object** attribute. This attribute is defined in the View3D space by checking the active object's layers. * The operator's `poll` method, however, uses `ED_object_active_context`. This function retrieves the **context.object** attribute primarily, which is defined screen-wide without filtering by visible layers. So while the poll method passes, the actual execution function quits early due to the filtering.
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Lukas Tönne self-assigned this 2014-06-10 12:01:16 +02:00
Member

Added subscribers: @Sergey, @ideasman42

Added subscribers: @Sergey, @ideasman42
Member

Discussed with @ideasman42 and @Sergey on IRC. There are a few potential solutions, unfortunately none of them is really feasible:

  • Use ED_object_active_context consistently throughout mode switch operators. This would be the least radical solution, but the standard way of using active object is still via context.active_object. Changing each and every ocurrence is a major undertaking and hard to prevent the same bug in the future this way.
  • Change the operator context to SCREEN instead of AREA (view3d), because then the view3d filtering of active_object by layers would not happen. Unfortunately this can have unwanted side effects, particularly for things like localview and unlocked layers.
  • Not apply layer filtering to context.active_object in general. This would have even worse side effects, although it might be the correct behavior. There is no telling what would happen in all the hundreds of other use cases ...

So for now will put this bug on the ToDo list ...
http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Editors#3D_View

Discussed with @ideasman42 and @Sergey on IRC. There are a few potential solutions, unfortunately none of them is really feasible: - Use `ED_object_active_context` consistently throughout mode switch operators. This would be the least radical solution, but the standard way of using active object is still via context.active_object. Changing each and every ocurrence is a major undertaking and hard to prevent the same bug in the future this way. - Change the operator context to *SCREEN* instead of *AREA* (view3d), because then the view3d filtering of `active_object` by layers would not happen. Unfortunately this can have unwanted side effects, particularly for things like localview and unlocked layers. - Not apply layer filtering to `context.active_object` in general. This would have even worse side effects, although it might be the correct behavior. There is no telling what would happen in all the hundreds of other use cases ... So for now will put this bug on the ToDo list ... http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Editors#3D_View

Added subscriber: @ReeceRobinson

Added subscriber: @ReeceRobinson

◀ Merged tasks: #40700.

◀ Merged tasks: #40700.
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
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#40526
No description provided.