From 3d013f7b10b6837ab29eccf9a203477e13d278a2 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 4 Dec 2018 12:30:24 +0100 Subject: Fix for assert failure in material preview All localized datablocks are not supposed to have animation data associated with them. There was an easy way to reproduce assert failure: toggle animation decorator for Viewport Display -> Color. --- source/blender/blenkernel/BKE_library.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/blenkernel/BKE_library.h') diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h index 038e9377ba4..a4eb40cbb38 100644 --- a/source/blender/blenkernel/BKE_library.h +++ b/source/blender/blenkernel/BKE_library.h @@ -93,6 +93,8 @@ void BKE_libblock_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r void *BKE_libblock_copy(struct Main *bmain, const struct ID *id) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(); /* "Deprecated" old API. */ void *BKE_libblock_copy_nolib(const struct ID *id, const bool do_action) ATTR_NONNULL(); +/* Special version. sued by datablock localization. */ +void *BKE_libblock_copy_for_localize(const struct ID *id); void BKE_libblock_rename(struct Main *bmain, struct ID *id, const char *name) ATTR_NONNULL(); void BLI_libblock_ensure_unique_name(struct Main *bmain, const char *name) ATTR_NONNULL(); -- cgit v1.2.3