Duplication of IDs and linked data-blocks #77959

Closed
opened 2020-06-17 17:23:52 +02:00 by Bastien Montagne · 14 comments

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:

  • Keep new behavior, which matches all other deep-copying (of collections in particular).
  • 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.
  • Restore previous behavior (i.e. have an exception corner case handling reserved to only scene duplication).
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](https://wiki.blender.org/w/index.php?title=Reference/Release_Notes/2.90/More_Features#Data_Duplication)). One of them is that linked Objects are no longer kept unchanged when fully copying a scene. I can see three possibilities here: - Keep new behavior, which matches all other deep-copying (of collections in particular). - 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. - Restore previous behavior (i.e. have an exception corner case handling reserved to only scene duplication).
Author
Owner

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

Changed status from 'Needs Triage' to: 'Confirmed'
Author
Owner
Added subscribers: @mont29, @brecht, @dfelinto, @JulianEisel, @ideasman42
Author
Owner

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?

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?
Author
Owner

Added subscribers: @Hjalti, @eyecandy

Added subscribers: @Hjalti, @eyecandy
Author
Owner

@eyecandy @Hjalti you should also be involved in that discussion I think. ;)

@eyecandy @Hjalti you should also be involved in that discussion I think. ;)
Member

AFAIK this task it done?

AFAIK this task it done?
Author
Owner

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

@JulianEisel afaik this task is not done at all? I posted the issue with some possible solutions, and got no comment about it at all…
Member

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 :)

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 :)
Contributor

Added subscriber: @RedMser

Added subscriber: @RedMser
Author
Owner

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

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

Added subscriber: @Imaginer

Added subscriber: @Imaginer
Member

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.

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

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
Bastien Montagne self-assigned this 2020-07-09 17:58:07 +02:00
Author
Owner

Implemented in 7b1c406b54:

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

Implemented in 7b1c406b54: 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).
Thomas Dinges added this to the 2.90 milestone 2023-02-08 16:27:13 +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#77959
No description provided.