Page MenuHome

Duplication of IDs and linked data-blocks
Closed, ResolvedPublicDESIGN


Until now (including 2.83), deep copy of object datablocks was very confusing and partially broken code (mostly missing some remapping to duplicated IDs).

Recent refactor made internal code much more maintainable and consistent, but it did add some user-side changes in behaviors (documented in the release notes).

One of them is that linked Objects are no longer kept unchanged when fully copying a scene.

I can see three possibilities here:

  1. Keep new behavior, which matches all other deep-copying (of collections in particular).
  2. Always consider that we do not want to copy sub-data that is linked during a duplicate. That would also involve all other ID types, not only objects.
  3. Restore previous behavior (i.e. have an exception corner case handling reserved to only scene duplication).

Event Timeline

Bastien Montagne (mont29) changed the task status from Needs Triage to Confirmed.Jun 17 2020, 5:23 PM
Bastien Montagne (mont29) created this task.
Bastien Montagne (mont29) changed the subtype of this task from "Report" to "Design".

I would personally go for solution #2, imho it makes sense to never copy linked sub-data in that scenario. Alternatively, we could make it an option?

AFAIK this task it done?

@Julian Eisel (Severin) afaik this task is not done at all? I posted the issue with some possible solutions, and got no comment about it at all…

Ah, pardon me. The task just caught my eye when updating the workboard, read the first two sentences and assumed this was about Lib Override duplication... Nevermind, sorry about the noise :)

If I do not get any feedback here I will just go on and implement #2...

My two cents:
I think that when a user does a full copy of a scene (or a full copy of anything) they would expect it be an exact copy/duplicate, i.e. all relationships/links maintained. It sounds like option #2 allows for this, so I agree, go with that one.

Bastien Montagne (mont29) closed this task as Resolved.Jul 9 2020, 5:58 PM
Bastien Montagne (mont29) claimed this task.

Implemented in rB7b1c406b5431: Implement T77959: Never duplicate linked data during deep-copy.:

Never duplicate linked IDs as part of deep copy, except when the root duplicated data-block itself is linked (in which case we consider user wants to make some locale deep copy of it).