diff options
author | Bastien Montagne <b.mont29@gmail.com> | 2020-03-05 18:17:14 +0300 |
---|---|---|
committer | Bastien Montagne <b.mont29@gmail.com> | 2020-03-05 18:30:12 +0300 |
commit | c43725e1891bd8534ac4b668277cddae9762d524 (patch) | |
tree | 59e26be9adb639b82305ce0f6f4dc36490052f06 /source/blender/blenloader/intern/versioning_250.c | |
parent | 88db9a17ce70c4553be1922e3ecef091e8c1d039 (diff) |
Add an session-wise uuid integer to IDs.
"session-wise" here mean while editing a same .blend file. So creating
or opening a new one will reset the uuid counter. This should avoid any
overflow in practice.
Only IDs added to Main database get an uuid, runtime-only ones are not
affected.
This is intended to provide undo with a way to find IDs across several
'memory realms' (undo speedup project).
No behavior change is expected from this commit itself.
Part of T60695.
Differential Revision: https://developer.blender.org/D7007
Diffstat (limited to 'source/blender/blenloader/intern/versioning_250.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_250.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_250.c b/source/blender/blenloader/intern/versioning_250.c index a4b51f91be4..cf4924eeb6d 100644 --- a/source/blender/blenloader/intern/versioning_250.c +++ b/source/blender/blenloader/intern/versioning_250.c @@ -446,6 +446,8 @@ static void versions_gpencil_add_main(ListBase *lb, ID *id, const char *name) BKE_id_new_name_validate(lb, id, name); /* alphabetic insertion: is in BKE_id_new_name_validate */ + BKE_lib_libblock_session_uuid_ensure(id); + if (G.debug & G_DEBUG) { printf("Converted GPencil to ID: %s\n", id->name + 2); } |