diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-18 12:41:38 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-18 12:41:38 +0400 |
commit | e364c94c7b803c78b8dd44a8023dac8952e6efab (patch) | |
tree | 17c390c87caf93f2931bfbd19f3a7652d5b4720b /source/blender/blenkernel | |
parent | 2c0bceb1f51344ece4be7a41ca93cc72f0151667 (diff) |
fix [#33580] Masking keyframes disappear from dope sheet when using undo.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/BKE_library.h | 1 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 8 |
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index bc081b7f308..b9bb67fa509 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -62,6 +62,7 @@ void BKE_libblock_copy_data(struct ID *id, const struct ID *id_from, const shor void BKE_id_lib_local_paths(struct Main *bmain, struct Library *lib, struct ID *id); void id_lib_extern(struct ID *id); void BKE_library_filepath_set(struct Library *lib, const char *filepath); +void id_us_ensure_real(struct ID *id); void id_us_plus(struct ID *id); void id_us_min(struct ID *id); diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 855e2d44661..9ace0ceade3 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -152,6 +152,14 @@ void id_lib_extern(ID *id) } } +/* ensure we have a real user */ +void id_us_ensure_real(ID *id) +{ + if (ID_REAL_USERS(id) <= 0) { + id->us = MAX2(id->us, 0) + 1; + } +} + void id_us_plus(ID *id) { if (id) { |