Refactor duplicate of data-blocks.

Main change from user side, besides that all pointers should now be
properly remapped to new IDs, is that linked objects are no longer
preserved when doing a full copy of scenes.

Will open a task to check whether we actually still want that behavior
(and re-code it in a more correct way then).

This is the main part of work done here, it aims at uniformizing and
sanitizing that 'deep copy' process for supported IDs (currently scenes,
collections and objects).

Note that there will be more follow up commits after that one, but this
should be the most risky and changing one.
This commit is contained in:
Bastien Montagne
2020-06-17 15:02:04 +02:00
parent 514f80b0c4
commit ad6cccf058
10 changed files with 308 additions and 253 deletions

View File

@@ -157,10 +157,10 @@ def check_linked_scene_copying():
extern_sce = get_scene("lib.blend", "Scene_lib")
# check node's props
# we made full copy from linked scene, so pointers must equal each other
# must point to own scene camera
abort_if_false(intern_sce.node_tree.nodes['Render Layers']["prop"] and
intern_sce.node_tree.nodes['Render Layers']["prop"] ==
extern_sce.node_tree.nodes['Render Layers']["prop"])
not (intern_sce.node_tree.nodes['Render Layers']["prop"] ==
extern_sce.node_tree.nodes['Render Layers']["prop"]))
def check_scene_copying():