Maniphest T93757

When linking a blend file into another one selecting a collection, it also imports objects from other collections
Closed, ResolvedTO DO

Assigned To
Bastien Montagne (mont29)
Authored By
Facundo (Facu_FX)
Dec 6 2021, 5:24 PM
Tags
  • BF Blender
  • Core
Subscribers
Bastien Montagne (mont29)
Brent (3D4)
Facundo (Facu_FX)
Richard Antalik (ISS)
Steffen Dünner (SteffenD)

Description

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




Blender Version
Broken: version: 3.1.0 Alpha, branch: master, commit date: 2021-12-04 01:26, hash: rB5ef5a9fc2466
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:

.
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.

Revisions and Commits

rB Blender

Event Timeline

Facundo (Facu_FX) created this task.Dec 6 2021, 5:24 PM
Facundo (Facu_FX) updated the task description.
Steffen Dünner (SteffenD) added a subscriber: Steffen Dünner (SteffenD).Dec 6 2021, 6:39 PM
Richard Antalik (ISS) changed the task status from Needs Triage to Confirmed.Dec 6 2021, 6:56 PM
Richard Antalik (ISS) updated the task description.
Richard Antalik (ISS) added a project: Core.
Richard Antalik (ISS) added a subscriber: Brent (3D4).
Richard Antalik (ISS) mentioned this in T93872: Copy/Pasting Instance Collection.Dec 9 2021, 12:09 AM
Richard Antalik (ISS) merged a task: T93872: Copy/Pasting Instance Collection.
Richard Antalik (ISS) added a subscriber: Richard Antalik (ISS).
Richard Antalik (ISS) triaged this task as High priority.Dec 9 2021, 6:34 PM
Richard Antalik (ISS) added a subscriber: Bastien Montagne (mont29).

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

Bastien Montagne (mont29) lowered the priority of this task from High to Normal.Dec 20 2021, 4:51 PM
Bastien Montagne (mont29) moved this task from Backlog to Blender 3.1 on the Core board.
Bastien Montagne (mont29) changed the subtype of this task from "Report" to "To Do".

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[:] 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.

Bastien Montagne (mont29) added a comment.Dec 20 2021, 6:16 PM
In T93757#1275926, @Bastien Montagne (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[:] 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.

Bastien Montagne (mont29) closed this task as Resolved by committing rB68f1b2c6719a: Fix T93757: Do not force-instantiate indrectly linked objects in linking case..Dec 21 2021, 10:09 AM
Bastien Montagne (mont29) claimed this task.
Bastien Montagne (mont29) added a commit: rB68f1b2c6719a: Fix T93757: Do not force-instantiate indrectly linked objects in linking case..