Page MenuHome

You can copy-paste a collection instance into its source collection (creating recursion)
Closed, ArchivedPublic

Description

System Information
Operating system: Linux-5.13.0-0.rc6.45.fc35.x86_64-x86_64-with-glibc2.34.9000 64 Bits
Graphics card: NVIDIA GeForce GTX 970M/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 465.31

Blender Version
Broken: version: 3.0.0 Alpha, branch: master, commit date: 2021-08-29 21:39, hash: rBb42354672e80
Worked: never

Short description of error
You can copy-paste a collection instance into its source collection (creating recursion)

Exact steps for others to reproduce the error

  • open file
  • Ctrl+C
  • Ctrl+V
  • this will put the instance in its source collection (creating recursion -- which should be avoided)

Dragging and dropping is already prevented in the Outliner.
There is a check in collection_object_add here https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/collection.c$1074
But that fails to detect equality if instance comes from the pastebuffer.

Event Timeline

Bastien Montagne (mont29) changed the task status from Confirmed to Needs Information from User.Sep 3 2021, 12:55 PM

Am not sure I am following here... AFAIK copy/paste of IDs in 3DView uses temp blend file + append, so it's not pasting the same ID, but a new one (as you can see from the names, Collection.001)...

Yeah, but you still shouldnt be allowed to put the new ID into its source collection.
Same thing can be done just coping [no copy-paste] the instance (so you get the name Collection.001 also), try drag-dropping that into the collection --> is forbidden.

Philipp Oeser (lichtwerk) changed the task status from Needs Information from User to Needs Information from Developers.Sep 3 2021, 1:55 PM
Philipp Oeser (lichtwerk) closed this task as Archived.Sep 3 2021, 2:16 PM

Ah sorry (not my day today), you are right, this is not the same as duplicating the instance.
And yes, this is not recursion.