Selection inconsistencies when switching collections #64312

Closed
opened 2019-05-08 16:26:53 +02:00 by Paul Melis · 13 comments

System Information
Operating system: Arch Linux
Graphics card: GTX 970

Blender Version
Broken: 2.80, 036e95bb21

Short description of error

I know layers and collection aren't fully compatible, but with the new collection system it seems impossible to make a selection of objects that is maintained when switching collections with the 1,2..0 keys. The changes in selection state also seem inconsistent.

Exact steps for others to reproduce the error

See the attached scene containing 3 collections and 4 objects. The plane is in all 3 collections, the other objects only in one of the collections each.

  • With all 3 collections visible select all objects with A, then switch to collection 2 with key 2. Only the cube stays selected, even though the plane is also present in collection 2?
  • Again show all collections, select all objects, switch to collection 1. Now both the plane and the torus stay selected. Why?
  • Show all collections, deselect all objects, then select the plane. Switch to only collection 1 with key 1: the plane stays selected. Repeat the same but switching to collection 2 resp. 3. In these cases the plane does not stay selected?

All in all it would be useful if the object selection is not touched in any way when switching collections, like it was with layers. Collections and the current selection (to me) appear to be orthogonal concepts. And in order to organize collections visually (i.e. without involving the outliner) you want to be able to switch between collections while maintaining the current selection to determine which objects to move between collections.

By the way, https://developer.blender.org/T55162 mentions the dash (-) key as being usable to switch collections, but that does not seem to work?

collections.blend

**System Information** Operating system: Arch Linux Graphics card: GTX 970 **Blender Version** Broken: 2.80, 036e95bb21fa **Short description of error** I know layers and collection aren't fully compatible, but with the new collection system it seems impossible to make a selection of objects that is maintained when switching collections with the 1,2..0 keys. The changes in selection state also seem inconsistent. **Exact steps for others to reproduce the error** See the attached scene containing 3 collections and 4 objects. The plane is in all 3 collections, the other objects only in one of the collections each. - With all 3 collections visible select all objects with A, then switch to collection 2 with key 2. Only the cube stays selected, even though the plane is also present in collection 2? - Again show all collections, select all objects, switch to collection 1. Now both the plane and the torus stay selected. Why? - Show all collections, deselect all objects, then select the plane. Switch to only collection 1 with key 1: the plane stays selected. Repeat the same but switching to collection 2 resp. 3. In these cases the plane does not stay selected? All in all it would be useful if the object selection is not touched in any way when switching collections, like it was with layers. Collections and the current selection (to me) appear to be orthogonal concepts. And in order to organize collections visually (i.e. without involving the outliner) you want to be able to switch between collections while maintaining the current selection to determine which objects to move between collections. By the way, https://developer.blender.org/T55162 mentions the dash (-) key as being usable to switch collections, but that does not seem to work? [collections.blend](https://archive.blender.org/developer/F7015587/collections.blend)
Author

Added subscriber: @PaulMelis

Added subscriber: @PaulMelis

Added subscriber: @ZedDB

Added subscriber: @ZedDB

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Sebastian Parborg self-assigned this 2019-05-09 15:46:14 +02:00

This seems to be a feature request and show go to: https://blender.community/c/rightclickselect/

This seems to be a feature request and show go to: https://blender.community/c/rightclickselect/
Author

Part of this may be a feature request, but can you explain the logic between what stays selected when switching collections? Because it seems inconsistent/unpredictable and therefore buggy.

Part of this may be a feature request, but can you explain the logic between what stays selected when switching collections? Because it seems inconsistent/unpredictable and therefore buggy.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
Sebastian Parborg removed their assignment 2019-05-10 10:19:36 +02:00
Dalai Felinto was assigned by Sebastian Parborg 2019-05-10 10:19:36 +02:00

This is a legit bug, I will look at it.

This is a legit bug, I will look at it.
Dalai Felinto removed their assignment 2019-07-12 17:43:12 +02:00
Sergey Sharybin was assigned by Dalai Felinto 2019-07-12 17:43:12 +02:00

Added subscribers: @Sergey, @dfelinto

Added subscribers: @Sergey, @dfelinto

Basically layer_collection_sync calls BKE_base_eval_flags right away while iterating over the bases.
However when a parent/sibling collection is to influence the collection flag of an object that exists in more than one collection, it is too late since we deselect the object in BKE_base_eval_flags right away.

A fix would be to move the BKE_base_eval_flags call outside layer_collection_sync. However I think we need some of these settings set as early as possible.
In this case I think the best is to have a separate BKE_base_eval_flags_select_update to deselect the base if it is not selectable, and we run it separately.

@Sergey thoughts?

Basically *layer_collection_sync* calls *BKE_base_eval_flags* right away while iterating over the bases. However when a parent/sibling collection is to influence the collection flag of an object that exists in more than one collection, it is too late since we deselect the object in *BKE_base_eval_flags* right away. A fix would be to move the BKE_base_eval_flags call outside *layer_collection_sync*. However I think we need some of these settings set as early as possible. In this case I think the best is to have a separate *BKE_base_eval_flags_select_update* to deselect the base if it is not selectable, and we run it separately. @Sergey thoughts?

This issue was referenced by bfa6cb3a7d

This issue was referenced by bfa6cb3a7d9a867d4f664e169ab8b65e2bd2142b

As from dependency graph point of view you should be able to simply remove BKE_base_eval_flags() from layer_collection_sync.
Dependency graph will update base flags via BKE_object_eval_eval_base_flags().

BKE_layer_collection_sync must leave every base's flag_from_collection in a correct state. Those are the bits which are dependent on the settings from collections.
Any modifications to the collections which affect base flags must tag scene for ID_RECALC_BASE_FLAGS.

BKE_object_eval_eval_base_flags must be able to evaluate correct base flags
This function is called after flag_from_collection is calculated.
Any change to object/base which affects on base flags must tag object for flag_from_collection.

I don't see a reason why would you treat selection flags differently. From my point of view this doesn't make sense. But this isn't my area actually.

As from dependency graph point of view you should be able to simply remove `BKE_base_eval_flags()` from `layer_collection_sync`. Dependency graph will update base flags via `BKE_object_eval_eval_base_flags()`. `BKE_layer_collection_sync` must leave every base's `flag_from_collection` in a correct state. Those are the bits which are dependent on the settings from collections. Any modifications to the collections which affect base flags must tag scene for `ID_RECALC_BASE_FLAGS`. `BKE_object_eval_eval_base_flags` must be able to evaluate correct base flags This function is called after `flag_from_collection` is calculated. Any change to object/base which affects on base flags must tag object for `flag_from_collection`. I don't see a reason why would you treat selection flags differently. From my point of view this doesn't make sense. But this isn't my area actually.

It is indeed strange that we call BKE_base_eval_flags instead of BKE_object_eval_eval_base_flags. That said calling DEG_id_tag_update((ID *)&scene->id, ID_RECALC_BASE_FLAGS); is not enough so I would say the patch should be good as it is.

It is indeed strange that we call BKE_base_eval_flags instead of BKE_object_eval_eval_base_flags. That said calling `DEG_id_tag_update((ID *)&scene->id, ID_RECALC_BASE_FLAGS);` is not enough so I would say the patch should be good as it is.
Sergey Sharybin was unassigned by Dalai Felinto 2019-07-12 18:21:31 +02:00
Dalai Felinto self-assigned this 2019-07-12 18:21:31 +02:00

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#64312
No description provided.