diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-04-04 13:00:57 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-04-04 13:00:57 +0300 |
commit | 3a566687e1159904fee4ac7aef5daf38fb4e00ed (patch) | |
tree | 2d5f58d0c97322c81ef55526ec7a775ae66de6c7 /source/blender | |
parent | 948f4e8c943e2fb3ef9f9211965f9cdf1db9ed3d (diff) | |
parent | 677d699645be41acb96f256a1e2088aa21e5e72b (diff) |
Merge branch 'master' into blender2.8
Conflicts:
source/blender/blenloader/intern/readfile.c
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 1f37eaf390b..4c212ecca01 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2287,6 +2287,10 @@ static void direct_link_id(FileData *fd, ID *id) } id->py_instance = NULL; + /* That way datablock reading not going through main read_libblock() function are still in a clear tag state. + * (glowering at certain nodetree fake datablock here...). */ + id->tag = 0; + /* Link direct data of overrides. */ if (id->override_static) { id->override_static = newdataadr(fd, id->override_static); @@ -8541,7 +8545,6 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short if (!id) return blo_nextbhead(fd, bhead); - id->tag = tag | LIB_TAG_NEED_LINK; id->lib = main->curlib; id->us = ID_FAKE_USERS(id); id->icon_id = 0; @@ -8551,12 +8554,12 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short /* this case cannot be direct_linked: it's just the ID part */ if (bhead->code == ID_ID) { + /* That way, we know which datablock needs do_versions (required currently for linking). */ + id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW; + return blo_nextbhead(fd, bhead); } - /* That way, we know which datablock needs do_versions (required currently for linking). */ - id->tag |= LIB_TAG_NEW; - /* need a name for the mallocN, just for debugging and sane prints on leaks */ allocname = dataname(GS(id->name)); @@ -8565,7 +8568,11 @@ static BHead *read_libblock(FileData *fd, Main *main, BHead *bhead, const short /* init pointers direct data */ direct_link_id(fd, id); - + + /* That way, we know which datablock needs do_versions (required currently for linking). */ + /* Note: doing this after driect_link_id(), which resets that field. */ + id->tag = tag | LIB_TAG_NEED_LINK | LIB_TAG_NEW; + switch (GS(id->name)) { case ID_WM: direct_link_windowmanager(fd, (wmWindowManager *)id); |