diff options
author | Julian Eisel <julian@blender.org> | 2021-12-02 13:19:00 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2021-12-02 13:19:00 +0300 |
commit | 7da979c0700fc255569d86ed18d9038470daeb54 (patch) | |
tree | 6a53f0837af1f05845a0fb27ee6a6571b12a6635 /source/blender | |
parent | 9f290467ca3a8517b13d81031099744d86f3ae21 (diff) | |
parent | 67c490daafd9642f91c2ca7a93482e3176e4c70c (diff) |
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/blenkernel/intern/lib_id.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c index c53fed4ba4c..53dada99405 100644 --- a/source/blender/blenkernel/intern/lib_id.c +++ b/source/blender/blenkernel/intern/lib_id.c @@ -220,8 +220,14 @@ void BKE_lib_id_clear_library_data(Main *bmain, ID *id, const int flags) BKE_lib_libblock_session_uuid_renew(id); } - if ((flags & LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR) != 0 && id->asset_data != NULL) { - BKE_asset_metadata_free(&id->asset_data); + if (ID_IS_ASSET(id)) { + if ((flags & LIB_ID_MAKELOCAL_ASSET_DATA_CLEAR) != 0) { + BKE_asset_metadata_free(&id->asset_data); + } + else { + /* Assets should always have a fake user. Ensure this is the case after "Make Local". */ + id_fake_user_set(id); + } } /* We need to tag this IDs and all of its users, conceptually new local ID and original linked |