When linking a blend file into another one selecting a collection, it also imports objects from other collections #93757

Closed
opened 2021-12-06 17:24:12 +01:00 by Facundo · 13 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.76
system-info.txt
Splash.PNG
Captura1.PNG
Captura2.PNG

Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-04 01:26, hash: 5ef5a9fc24
Worked: 3.0 release
Short description of error
When linking a blend file into another one selecting a collection, it also imports objects from other collections

Exact steps for others to reproduce the error

  • Create a new scene and link into that the attached file: Test.blend.
    You should link the Collection named "Skinning"
  • It will import the Armature and Box objects from that Skinning collection, as well as the Circle object which is in another collection in the original file. That Circle object should not be imported.
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 496.76 [system-info.txt](https://archive.blender.org/developer/F12698613/system-info.txt) ![Splash.PNG](https://archive.blender.org/developer/F12698614/Splash.PNG) ![Captura1.PNG](https://archive.blender.org/developer/F12698629/Captura1.PNG) ![Captura2.PNG](https://archive.blender.org/developer/F12698632/Captura2.PNG) **Blender Version** Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-04 01:26, hash: `5ef5a9fc24` Worked: 3.0 release **Short description of error** When linking a blend file into another one selecting a collection, it also imports objects from other collections **Exact steps for others to reproduce the error** - Create a new scene and link into that the attached file: [Test.blend](https://archive.blender.org/developer/F12698621/Test.blend). You should link the Collection named "Skinning" - It will import the Armature and Box objects from that Skinning collection, as well as the Circle object which is in another collection in the original file. That Circle object should not be imported.
Author

Added subscriber: @Facu

Added subscriber: @Facu

#93872 was marked as duplicate of this issue

#93872 was marked as duplicate of this issue

#93839 was marked as duplicate of this issue

#93839 was marked as duplicate of this issue

Added subscriber: @SteffenD

Added subscriber: @SteffenD

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

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

Added subscriber: @3D4

Added subscriber: @3D4

Added subscriber: @iss

Added subscriber: @iss

Added subscriber: @mont29

Added subscriber: @mont29

Will CC @mont29, this looks to be quite bad regression. also set prio to high

Will CC @mont29, this looks to be quite bad regression. also set prio to high

I do not see how this Circle object should not be linked, since it's used by the linked armature as its bone shape.

"issue" here is that it gets instantiated in the scene, but... this is actually the correct behavior, previous behavior was actually a bug, since it would let an object without any owner collection (D.objects['Circle'].users_collection- [x] in py console would return an empty list), which is not allowed/supported in Blender.

While this is arguably a badly organized file (root collection of a character should typically always contain every dependency, in hidden or excluded sub-collections if they should not be visible on screen), think we should avoid instantiating those stray objects in the view layer, and just add them to an hidden ad-hoc collection instead.

I do not see how this `Circle` object should not be linked, since it's used by the linked armature as its bone shape. "issue" here is that it gets instantiated in the scene, but... this is actually the correct behavior, previous behavior was actually a bug, since it would let an object without any owner collection (`D.objects['Circle'].users_collection- [x]` in py console would return an empty list), which is not allowed/supported in Blender. While this is arguably a badly organized file (root collection of a character should typically always contain every dependency, in hidden or excluded sub-collections if they should not be visible on screen), think we should avoid instantiating those stray objects in the view layer, and just add them to an hidden ad-hoc collection instead.

In #93757#1275926, @mont29 wrote:
"issue" here is that it gets instantiated in the scene, but... this is actually the correct behavior, previous behavior was actually a bug, since it would let an object without any owner collection (D.objects['Circle'].users_collection- [x] in py console would return an empty list), which is not allowed/supported in Blender.

On second thought, it's better (in linking case only!) to not add indirectly linked objects to any local collection, otherwise it would make them directly linked, which is not ideal.

> In #93757#1275926, @mont29 wrote: > "issue" here is that it gets instantiated in the scene, but... this is actually the correct behavior, previous behavior was actually a bug, since it would let an object without any owner collection (`D.objects['Circle'].users_collection- [x]` in py console would return an empty list), which is not allowed/supported in Blender. On second thought, it's better (*in linking case only!*) to not add indirectly linked objects to any local collection, otherwise it would make them directly linked, which is not ideal.

This issue was referenced by 68f1b2c671

This issue was referenced by 68f1b2c6719ad1bbe52ec4896cecf3b94ad74146

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2021-12-21 10:09:33 +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
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#93757
No description provided.