forked from bartvdbraak/blender
IDManagement: Assign current Main's lib to newly created IDs.
This is mainly for doversion code, when it needs to create new IDs those should be considered as part of the same library as the current Main's one. No practical changes are expected here, this is more of a general consistency fix, and a pre-requisite for {T92333}.
This commit is contained in:
parent
10fb5cc58d
commit
7681326acd
@ -1141,6 +1141,11 @@ void *BKE_libblock_alloc(Main *bmain, short type, const char *name, const int fl
|
||||
/* alphabetic insertion: is in new_id */
|
||||
BKE_main_unlock(bmain);
|
||||
|
||||
/* This is important in 'readfile doversion after liblink' context mainly, but is a good
|
||||
* consistency change in general: ID created for a Main should get that main's current
|
||||
* library pointer. */
|
||||
id->lib = bmain->curlib;
|
||||
|
||||
/* TODO: to be removed from here! */
|
||||
if ((flag & LIB_ID_CREATE_NO_DEG_TAG) == 0) {
|
||||
DEG_id_type_tag(bmain, type);
|
||||
|
Loading…
Reference in New Issue
Block a user