Collection user counts are set to 1 on file load. Boolean modifier orphans Collections. #89765

Closed
opened 2021-07-09 21:23:19 +02:00 by Will · 7 comments

System Information
Operating system: Polar Bear Buffet (Linux)
Graphics card: Intel

Blender Version
Broken: 2.93
Worked: N/A

Short description of error

Collection user counts are set to 1 on file load.

So removing a collection from a Boolean modifier decrements that collection's user count to 0, causing it to become orphaned and not be saved.

>>> D.collections["Collection"].users

1

>>> C.object.modifiers[0].collection = None
>>> D.collections["Collection"].users

0

I'm not sure if this also happens with E.G. physics simulations and the like that also have collection properties, and some of which are implemented as modifiers.

Exact steps for others to reproduce the error

  1. In the default scene, add a Boolean modifier to any object.

  2. Set the Boolean modifier to use the default collection.

  3. Save and re-open or "Revert" the file.

  4. Remove the collection from the Boolean modifier.

  5. The collection will now have a "0" next to it in the search template, it will be listed in the "Orphan Data" mode of the Outliner window, .users == 0 on it, and it will not be saved with the file.

Or click the "X" to remove the collection from the Boolean modifier in this file:

CollectionOrphaning.blend

**System Information** Operating system: Polar Bear Buffet (Linux) Graphics card: Intel **Blender Version** Broken: 2.93 Worked: N/A **Short description of error** Collection user counts are set to `1` on file load. So removing a collection from a Boolean modifier decrements that collection's user count to `0`, causing it to become orphaned and not be saved. ``` >>> D.collections["Collection"].users 1 >>> C.object.modifiers[0].collection = None >>> D.collections["Collection"].users 0 ``` I'm not sure if this also happens with E.G. physics simulations and the like that also have collection properties, and some of which are implemented as modifiers. **Exact steps for others to reproduce the error** 1. In the default scene, add a Boolean modifier to any object. 2. Set the Boolean modifier to use the default collection. 2. Save and re-open or "Revert" the file. 3. Remove the collection from the Boolean modifier. 4. The collection will now have a "0" next to it in the search template, it will be listed in the "Orphan Data" mode of the Outliner window, `.users == 0` on it, and it will not be saved with the file. Or click the "X" to remove the collection from the Boolean modifier in this file: [CollectionOrphaning.blend](https://archive.blender.org/developer/F10218624/CollectionOrphaning.blend)
Author

Added subscriber: @WCN

Added subscriber: @WCN
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

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

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

Can confirm.

Seems critical to me, will set to High prio.

Can confirm. Seems critical to me, will set to High prio.

This issue was referenced by 2d32bf14e4

This issue was referenced by 2d32bf14e47e830dcb38d98f7d29d803fc31a6c9

This issue was referenced by c4f9bfcf5e

This issue was referenced by c4f9bfcf5e7ddfaeacdea6dc9b01868edf74182f
Philipp Oeser self-assigned this 2021-07-10 16:18:20 +02:00
Member

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & 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
3 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#89765
No description provided.