From c6d75628968818aa38b881d0bcaca7c07fc6492a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 25 Aug 2015 10:29:40 +0200 Subject: Fix T45729: Cycles Bake break when building a special mesh The issue was caused by CD_SHAPEKEY_INDEX layer being added to edge data, now we make sure all the layers are nicely re-allocated. --- source/blender/blenkernel/BKE_customdata.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/blender/blenkernel/BKE_customdata.h') diff --git a/source/blender/blenkernel/BKE_customdata.h b/source/blender/blenkernel/BKE_customdata.h index 1c7fb79856a..6fb27cf7577 100644 --- a/source/blender/blenkernel/BKE_customdata.h +++ b/source/blender/blenkernel/BKE_customdata.h @@ -131,6 +131,14 @@ void CustomData_update_typemap(struct CustomData *data); bool CustomData_merge(const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, int alloctype, int totelem); +/* Reallocate custom data to a new element count. + * Only affects on data layers which are owned by the CustomData itself, + * referenced data is kept unchanged, + * + * NOTE: Take care of referenced layers by yourself! + */ +void CustomData_realloc(struct CustomData *data, int totelem); + /* bmesh version of CustomData_merge; merges the layouts of source and dest, * then goes through the mesh and makes sure all the customdata blocks are * consistent with the new layout.*/ -- cgit v1.2.3