Appending a particle system pulls in an unused collection #98583

Closed
opened 2022-06-03 20:06:47 +02:00 by Bill Hails · 13 comments

System Information
Operating system: macOS-11.6.4-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 560X OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.6.21

Blender Version
Broken: version: 3.2.0 Release Candidate, branch: master, commit date: 2022-06-03 03:14, hash: c4701a027f
Worked: don't know if it ever worked

Short description of error
If you open a new file and append the Particle settings from the attached file it will pull in both the sphere object and the "Cubes" collection, even though the particle system no longer makes any reference to the Cubes collection.

Exact steps for others to reproduce the error

To recreate the attached file:

  • open a new file
  • Create a Cubes collection
  • Move the default cube into it
  • Create a Sphere
  • Create a Plane
  • Add a Particle system to the plane
  • In the particle settings set render to collection and choose the Cubes collection
  • Save the file (not sure if this step is relevant)
  • In the particle settings change render to object and select the sphere
  • save the file again

Now if you open a new file and append the particle settings from the file you created, it will append both the sphere and the Cubes collection.

particles.blend

**System Information** Operating system: macOS-11.6.4-x86_64-i386-64bit 64 Bits Graphics card: AMD Radeon Pro 560X OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.6.21 **Blender Version** Broken: version: 3.2.0 Release Candidate, branch: master, commit date: 2022-06-03 03:14, hash: `c4701a027f` Worked: don't know if it ever worked **Short description of error** If you open a new file and append the Particle settings from the attached file it will pull in both the sphere object and the "Cubes" collection, even though the particle system no longer makes any reference to the Cubes collection. **Exact steps for others to reproduce the error** To recreate the attached file: - open a new file - Create a Cubes collection - Move the default cube into it - Create a Sphere - Create a Plane - Add a Particle system to the plane - In the particle settings set render to collection and choose the Cubes collection - Save the file (not sure if this step is relevant) - In the particle settings change render to object and select the sphere - save the file again Now if you open a new file and append the particle settings from the file you created, it will append both the sphere and the Cubes collection. [particles.blend](https://archive.blender.org/developer/F13131030/particles.blend)
Author

Added subscriber: @billhails

Added subscriber: @billhails

Added subscriber: @mod_moder

Added subscriber: @mod_moder

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

I can confirm that this behavior exists.
But I doubt this behavior is not intended. Maybe there is still a connection between the objects, in case the collection mode is turned on again?
Either this behavior is not planned

I can confirm that this behavior exists. But I doubt this behavior is not intended. Maybe there is still a connection between the objects, in case the collection mode is turned on again? Either this behavior is not planned
Member

If we move this out of the triaging queue (by changing status label to Needs Information from Developers), this needs to be the responsibility of a module (so a Module label must be added)

If we move this out of the triaging queue (by changing status label to `Needs Information from Developers`), this needs to be the responsibility of a module (so a `Module` label must be added)
Philipp Oeser added
Status
Needs Triage
and removed
Status
Needs Info from Developers
labels 2023-02-14 12:02:51 +01:00
Iliya Katushenock added
Module
Nodes & Physics
Status
Confirmed
and removed
Status
Needs Triage
labels 2023-02-14 12:27:41 +01:00

By analogy with: #103497
All properties today exist all the time. Like when you see them, or you don't see them. You can still change them by removing the dependency. But this is not a bug.

By analogy with: https://projects.blender.org/blender/blender/issues/103497 All properties today exist all the time. Like when you see them, or you don't see them. You can still change them by removing the dependency. But this is not a bug.
Member

@mod_moder : not sure I understand what you are saying, but when you say

But this is not a bug.

it makes little sense confirming the issue?

@mod_moder : not sure I understand what you are saying, but when you say > But this is not a bug. it makes little sense confirming the issue?
Philipp Oeser added
Status
Needs Triage
and removed
Status
Confirmed
labels 2023-02-14 13:11:44 +01:00

This is a confirmed behavior and will most likely not need to be fixed. But most likely this is a known design problem (or just something like that)

This is a confirmed behavior and will most likely not need to be fixed. But most likely this is a known design problem (or just something like that)
Member

We can check users with https://docs.blender.org/api/3.5/bpy.types.BlendData.html#bpy.types.BlendData.user_map

>>> bpy.data.user_map(subset=(bpy.data.collections['Cubes'], ))
{bpy.data.collections['Cubes']: {bpy.data.scenes['Scene'], bpy.data.collections['Collection'], bpy.data.particles['ParticleSettings']}}

So indeed, it is still used by the particles.
Why? Because once you set the collection (ParticleSettings->instance_collection in code), it will stay there even if you change Render As to Object. You can check by switching back Render As to Collection, the collection will still be set there. It is probably a good thing even, dont think totally resetting/clearing the collection once you switch to Object automatically has benefits in all scenarios.

So, this might be what @mod_moder also wanted to say, to not have it being pulled in when appending, you should clear the collection "by hand" (and then set Render As to Object)

image

@billhails : makes sense?

We can check users with https://docs.blender.org/api/3.5/bpy.types.BlendData.html#bpy.types.BlendData.user_map ``` >>> bpy.data.user_map(subset=(bpy.data.collections['Cubes'], )) {bpy.data.collections['Cubes']: {bpy.data.scenes['Scene'], bpy.data.collections['Collection'], bpy.data.particles['ParticleSettings']}} ``` So indeed, it is still used by the particles. Why? Because once you set the collection (`ParticleSettings->instance_collection` in code), it will stay there even if you change `Render As` to `Object`. You can check by switching back `Render As` to `Collection`, the collection will still be set there. It is probably a good thing even, dont think totally resetting/clearing the collection once you switch to `Object` automatically has benefits in all scenarios. So, this might be what @mod_moder also wanted to say, to **not** have it being pulled in when appending, you should clear the collection "by hand" (and then set `Render As` to `Object`) ![image](/attachments/c376ff46-6d03-4fb6-8855-6ac27f846a07) @billhails : makes sense?
Philipp Oeser added
Status
Needs Information from User
and removed
Status
Needs Triage
labels 2023-02-15 14:54:46 +01:00
Author

Hi Yeah it makes sense, It would be mildly annoying if you switched from collection to object and back again and had to re-locate the collection, but I think I might still prefer that personally. Having to know that you need to manually clear it isn't ideal.

Just a suggestion but might it possible that blender could arrange to forget the connection when the file is saved?

Hi Yeah it makes sense, It would be mildly annoying if you switched from collection to object and back again and had to re-locate the collection, but I think I might still prefer that personally. Having to know that you need to manually clear it isn't ideal. Just a suggestion but might it possible that blender could arrange to forget the connection when the file is saved?

This is an implicit delete. And there are different situations. So don't please everyone. (Confirm, but not sure if that bug or know issues... :) )

This is an implicit delete. And there are different situations. So don't please everyone. (Confirm, but not sure if that bug or know issues... :) )
Member

Just a suggestion but might it possible that blender could arrange to forget the connection when the file is saved?

Possible? Yes. We could just skip expanding the collection on file read.
Not 100% sure about this, but there are other conditional usages of BLO_expand so I think that would actually be the right thing to do.

Btw. the same is true the other way around as well: so if you set Render As to Collection while still having an object set, the object will also (unnecessarily) be pulled in. Will post a patch for this shortly.

Bonus: checking on this I found another bug :)

> Just a suggestion but might it possible that blender could arrange to forget the connection when the file is saved? Possible? Yes. We could just skip expanding the collection on file read. Not 100% sure about this, but there are other conditional usages of `BLO_expand` so I think that would actually be the right thing to do. Btw. the same is true the other way around as well: so if you set `Render As` to `Collection` while still having an object set, the object will also (unnecessarily) be pulled in. Will post a patch for this shortly. Bonus: checking on this I found another bug :)
Philipp Oeser self-assigned this 2023-02-16 11:03:34 +01:00

This is expected behavior, no bug here.

Starting to implicitly filter out what data we import based on what is currently exposed to the user is a hard no-go. If you do not want your collection to be used by your particles, then you set that up properly in your library.

This is expected behavior, no bug here. Starting to implicitly filter out what data we import based on what is currently exposed to the user is a hard no-go. If you do not want your collection to be used by your particles, then you set that up properly in your library.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2023-02-16 12:44:58 +01:00
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#98583
No description provided.