diff options
author | Bastien Montagne <bastien@blender.org> | 2021-10-21 13:55:15 +0300 |
---|---|---|
committer | Bastien Montagne <bastien@blender.org> | 2021-10-21 13:55:15 +0300 |
commit | 641a5be50e03f4a7152dd37e97680bee26dc3e6f (patch) | |
tree | 171544b7a2c8e25ab1db5231e68e7ba615af7c86 /source/blender/blenkernel/intern/object.c | |
parent | 17a96051cf0f664509638bc31b714a4925b5052c (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/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 0d5fd6aadec..58041c84cdf 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -357,8 +357,8 @@ static void object_make_local(Main *bmain, ID *id, const int flags) } if (force_local) { - BKE_lib_id_clear_library_data(bmain, &ob->id); - BKE_lib_id_expand_local(bmain, &ob->id); + BKE_lib_id_clear_library_data(bmain, &ob->id, flags); + BKE_lib_id_expand_local(bmain, &ob->id, flags); if (clear_proxy) { if (ob->proxy_from != NULL) { ob->proxy_from->proxy = NULL; |