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/blenloader | |
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/blenloader')
-rw-r--r-- | source/blender/blenloader/BLO_readfile.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 4e1b2c68bd9..5a919ae3605 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -228,6 +228,8 @@ typedef enum eBLOLibLinkFlags { BLO_LIBLINK_APPEND_RECURSIVE = 1 << 20, /** Try to re-use previously appended matching ID on new append. */ BLO_LIBLINK_APPEND_LOCAL_ID_REUSE = 1 << 21, + /** Clear the asset data. */ + BLO_LIBLINK_APPEND_ASSET_DATA_CLEAR = 1 << 22, /** Instantiate object data IDs (i.e. create objects for them if needed). */ BLO_LIBLINK_OBDATA_INSTANCE = 1 << 24, /** Instantiate collections as empties, instead of linking them into current view layer. */ |