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/blenloader/BLO_readfile.h
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/blenloader/BLO_readfile.h')
-rw-r--r--source/blender/blenloader/BLO_readfile.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h
index bddfdf6926f..c3a1c0e5185 100644
--- a/source/blender/blenloader/BLO_readfile.h
+++ b/source/blender/blenloader/BLO_readfile.h
@@ -133,8 +133,7 @@ struct Main *BLO_library_link_begin(struct Main *mainvar, BlendHandle **bh, cons
struct ID *BLO_library_link_named_part(struct Main *mainl, BlendHandle **bh, const short idcode, const char *name);
struct ID *BLO_library_link_named_part_ex(
struct Main *mainl, BlendHandle **bh,
- const short idcode, const char *name, const int flag,
- struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, const struct View3D *v3d);
+ const short idcode, const char *name, const int flag);
void BLO_library_link_end(
struct Main *mainl, BlendHandle **bh, int flag,
struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer, const struct View3D *v3d);