diff options
Diffstat (limited to 'source/blender/blenkernel/intern/lib_id.c')
-rw-r--r-- | source/blender/blenkernel/intern/lib_id.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lib_id.c b/source/blender/blenkernel/intern/lib_id.c index ad2cf078054..fe25016344e 100644 --- a/source/blender/blenkernel/intern/lib_id.c +++ b/source/blender/blenkernel/intern/lib_id.c @@ -1033,6 +1033,18 @@ void BKE_lib_libblock_session_uuid_ensure(ID *id) } /** + * Re-generate a new session-wise uuid for the given \a id. + * + * \warning This has a very specific use-case (to handle UI-related data-blocks that are kept + * across new file reading, when we do keep existing UI). No other usage is expected currently. + */ +void BKE_lib_libblock_session_uuid_renew(ID *id) +{ + id->session_uuid = MAIN_ID_SESSION_UUID_UNSET; + BKE_lib_libblock_session_uuid_ensure(id); +} + +/** * Generic helper to create a new empty data-block of given type in given \a bmain database. * * \param name: can be NULL, in which case we get default name for this ID type. |