Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-02-19 15:44:23 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-02-19 15:49:54 +0300
commitcba447966ec51db48459e57d838e8b4562b96c5e (patch)
treebbe99275f4c252163e9218843ae9f35b13cca5f3 /source/blender/windowmanager/intern/wm_files_link.c
parent4df88960627aa9560e70e4bcfcfa5c3acfb2c8b7 (diff)
Fix T61683: Linking the instance of a collection crashes Blender.
Do not instance linked object immediately in scene, this was never a good idea and is doomed to fail nowadays, with complex relations between objects, collections and scenes. Instead, this commit refactors a bit linking code to add loose objects to current scene *after* everything has been imported, and ID pointers have been properly remapped to new ones - i.e. once new linked data is supposed to be fully valid, just like we were already doing with collections. As a bonus, it means we do not have to pass around scene, view3d etc. to `BLO_library_link_named_part_ex()` and co.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files_link.c')
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index b64cf0f2d15..3b27d2199b6 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -253,9 +253,7 @@ static void wm_link_do(
continue;
}
- new_id = BLO_library_link_named_part_ex(
- mainl, &bh, item->idcode, item->name, flag, bmain,
- scene, view_layer, v3d);
+ new_id = BLO_library_link_named_part_ex(mainl, &bh, item->idcode, item->name, flag);
if (new_id) {
/* If the link is successful, clear item's libs 'todo' flags.