Collections: Exclude From ViewLayer toggle will leave the object in multiple modes (e.g. unable to set as active object) #77073

Closed
opened 2020-05-26 06:42:00 +02:00 by Ryan Inch · 20 comments
Member

Blender Version
Broken: version: 2.83 (sub 17), branch: master, commit date: 2020-05-25 17:35, hash: 39aa122a0e
Worked: Never

Short description of error
Setting a mesh to either texture paint or particle edit mode (when the mesh is an emitter) and then excluding and including the collection prevents the object from being set as active, and so further interaction with the object is not possible.

Exact steps for others to reproduce the error

  • Set the default cube to texture paint mode or create a particle system (leave it as an emitter) and set to particle edit mode.
  • Toggle exclude collection from view layer.
  • Toggle exclude collection from view layer again to turn it back on.
  • Click on the default cube.
  • The default cube can no longer be set as active or interacted with.

Workaround
Set the active object as you would normally do (e.g., click on the camera) then save and re-open the file.

**Blender Version** Broken: version: 2.83 (sub 17), branch: master, commit date: 2020-05-25 17:35, hash: `39aa122a0e` Worked: Never **Short description of error** Setting a mesh to either texture paint or particle edit mode (when the mesh is an emitter) and then excluding and including the collection prevents the object from being set as active, and so further interaction with the object is not possible. **Exact steps for others to reproduce the error** * Set the default cube to texture paint mode or create a particle system (leave it as an emitter) and set to particle edit mode. * Toggle exclude collection from view layer. * Toggle exclude collection from view layer again to turn it back on. * Click on the default cube. * The default cube can no longer be set as active or interacted with. **Workaround** Set the active object as you would normally do (e.g., click on the camera) then save and re-open the file.
Author
Member

Added subscriber: @Imaginer

Added subscriber: @Imaginer
Author
Member

This seems like a somewhat serious issue, so I'm tagging with 2.83. I hope this is alright.

This is also potentially related to #72490 and #77074

This seems like a somewhat serious issue, so I'm tagging with 2.83. I hope this is alright. This is also potentially related to #72490 and #77074
Member

Added subscribers: @dfelinto, @brecht, @lichtwerk

Added subscribers: @dfelinto, @brecht, @lichtwerk
Member

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

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

Can confirm.
This one (same as #77074) has been around for some time though, and considering how late we are in the release cycle, I'll remove 2.83 as a tag.

Not exactly sure which module is responsible for collection-related bugs? (for the time being, I'll put this on the UI desk)

CC @brecht
CC @dfelinto

Can confirm. This one (same as #77074) has been around for some time though, and considering how late we are in the release cycle, I'll remove 2.83 as a tag. Not exactly sure which module is responsible for collection-related bugs? (for the time being, I'll put this on the UI desk) CC @brecht CC @dfelinto
Philipp Oeser changed title from Unable to set mesh as active object after excluding collection in texture paint and particle edit mode to Collections: Exclude From ViewLayer toggle will leave the object in multiple modes (e.g. unable to set as active object) 2020-05-26 11:48:48 +02:00
Member

Switching to High prio (since getting into this mode-limbo is pretty hard to recover from -- not sure if there is any tbh)

Switching to High prio (since getting into this mode-limbo is pretty hard to recover from -- not sure if there is any tbh)
Author
Member

Actually I just found a couple of ways to recover from this. You can reset the active object using the python console, save and reopen the blend file, or (the easiest way) you can just click the green mesh data icon for the object in the outliner which sends you to the object's edit mode and from there everything works again.

I noticed during my testing that grease pencil objects are also affected, but not as strongly. When toggling exclude collection with a grease pencil object not in object mode it causes the selection outline not to display and, when it was in vertex paint mode, it's drawn as if it's still in vertex paint even though it's now in object mode. The outliner recovery method from above fixes the drawing.

Actually I just found a couple of ways to recover from this. You can reset the active object using the python console, save and reopen the blend file, or (the easiest way) you can just click the green mesh data icon for the object in the outliner which sends you to the object's edit mode and from there everything works again. I noticed during my testing that grease pencil objects are also affected, but not as strongly. When toggling exclude collection with a grease pencil object not in object mode it causes the selection outline not to display and, when it was in vertex paint mode, it's drawn as if it's still in vertex paint even though it's now in object mode. The outliner recovery method from above fixes the drawing.

The workaround is simpler actually: you can set the active object as you would normally do (e.g., click on the camera) then saving and re-opening the file and things work. Which also means priority is a bit lower.

The workaround is simpler actually: you can set the active object as you would normally do (e.g., click on the camera) then saving and re-opening the file and things work. Which also means priority is a bit lower.

Added subscriber: @ideasman42

Added subscriber: @ideasman42

The issue is that the object is still stuck with mode 'TEXTURE_PAINT' even though it is no longer the active object. The same happens for 'EDIT', yet this one doesn't stop the object from being selected again to be active.

For the records, if using python to set the object as active it works. bpy.context.view_layer.objects.active = bpy.data.objects['Cube'].

So the issue is with the outliner / viewport "set to active" code.

@ideasman42 just to refresh my mind, we are ok with objects lingering in modes that are not object mode, right? If I remember correctly at some point we gave up on their syncing, moving the sanity check elsewhere.

The issue is that the object is still stuck with mode 'TEXTURE_PAINT' even though it is no longer the active object. The same happens for 'EDIT', yet this one doesn't stop the object from being selected again to be active. For the records, if using python to set the object as active it works. `bpy.context.view_layer.objects.active = bpy.data.objects['Cube']`. So the issue is with the outliner / viewport "set to active" code. @ideasman42 just to refresh my mind, we are ok with objects lingering in modes that are not object mode, right? If I remember correctly at some point we gave up on their syncing, moving the sanity check elsewhere.

Added subscriber: @natecraddock

Added subscriber: @natecraddock

Campbell said that indeed we can't make strong assumptions about this, there is only the editing option not to change modes when selecting.

@Zachman can you look at this issue? It should be straightforward, but, but it has to be done well to work for both the outliner AND the viewport.

Campbell said that indeed we can't make strong assumptions about this, there is only the editing option not to change modes when selecting. @Zachman can you look at this issue? It should be straightforward, but, but it has to be done well to work for both the outliner AND the viewport.
Author
Member

@dfelinto Sorry, my last post wasn't clear. There's an easier way to recover from this than saving and re-opening the blend file, just click the data icon that's beside the object in the outliner (the green triangle in the default blender theme). This takes you to edit mode and then you can switch back to object mode and everything will be fine.

@dfelinto Sorry, my last post wasn't clear. There's an easier way to recover from this than saving and re-opening the blend file, just click the data icon that's beside the object in the outliner (the green triangle in the default blender theme). This takes you to edit mode and then you can switch back to object mode and everything will be fine.
Nathan Craddock self-assigned this 2020-05-30 01:58:48 +02:00

Added subscriber: @xiwei

Added subscriber: @xiwei

Hello, is this task unassigned? I would like to try it out since it's in #good_first_issue

Hello, is this task unassigned? I would like to try it out since it's in #good_first_issue

Hey @xiwei, it's been assigned (to me) and there is a revision awaiting review already (D7886: Fix #77073: Objects cannot be activated after collection exclude), sorry about that! You can find the information about task assignment in the right column next to the task description, and the revisions are listed below the description.

Hey @xiwei, it's been assigned (to me) and there is a revision awaiting review already ([D7886: Fix #77073: Objects cannot be activated after collection exclude](https://archive.blender.org/developer/D7886)), sorry about that! You can find the information about task assignment in the right column next to the task description, and the revisions are listed below the description.

@Zachman Don't worry still thx. imma just give a look to your commit :)

@Zachman Don't worry still thx. imma just give a look to your commit :)

This issue was referenced by 30395a491f

This issue was referenced by 30395a491f5aa0764b57cb8b715740152d61fdcc

Changed status from 'Confirmed' to: 'Resolved'

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

@Zachman, @ideasman42, Thanks for the fix.

@Zachman, @ideasman42, Thanks for the fix.
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
7 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#77073
No description provided.