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 <bastien@blender.org>2021-10-21 13:55:15 +0300
committerBastien Montagne <bastien@blender.org>2021-10-21 13:55:15 +0300
commit641a5be50e03f4a7152dd37e97680bee26dc3e6f (patch)
tree171544b7a2c8e25ab1db5231e68e7ba615af7c86 /source/blender/blenkernel/intern/brush.c
parent17a96051cf0f664509638bc31b714a4925b5052c (diff)
IDManagement: Add option to clear asset data when making ID local.
When appending an asset from the asset browser, its asset data needs to be cleared. However, linking an asset (or regular append from the file browser) should not clear such data. In linking case, it would be there again after a blend file reload anyway. So this commit introduces a new `BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR` option. NOTE: in case the appended ID needs to be copied from its linked data (instead of making the later directly local), asset data is lost anyway since it is never copied with the ID currently. Ref. {T91749} and D11768.
Diffstat (limited to 'source/blender/blenkernel/intern/brush.c')
-rw-r--r--source/blender/blenkernel/intern/brush.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/brush.c b/source/blender/blenkernel/intern/brush.c
index d70b941695e..9facb146361 100644
--- a/source/blender/blenkernel/intern/brush.c
+++ b/source/blender/blenkernel/intern/brush.c
@@ -183,8 +183,8 @@ static void brush_make_local(Main *bmain, ID *id, const int flags)
}
if (force_local) {
- BKE_lib_id_clear_library_data(bmain, &brush->id);
- BKE_lib_id_expand_local(bmain, &brush->id);
+ BKE_lib_id_clear_library_data(bmain, &brush->id, flags);
+ BKE_lib_id_expand_local(bmain, &brush->id, flags);
/* enable fake user by default */
id_fake_user_set(&brush->id);