mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T93548: Appended (material) assets don't have a fake user
Since our design is to always keep data-blocks marked as assets on exit, and our technical design for this is to do this via fake users, ensure the fake user is set for an appended asset. Reviewed by: Bastien Montagne Differential Revision: https://developer.blender.org/D13443
This commit is contained in:
parent
68e3755209
commit
67c490daaf
1 changed files with 8 additions and 2 deletions
|
|
@ -179,8 +179,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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue