diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-10-31 13:50:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-10-31 13:50:24 +0400 |
commit | 12ed0c64bc7062f46cd1307b5566e99064330733 (patch) | |
tree | 82d27db755d250546cc5edf61addd701c8f4cdbd /source/blender/blenloader | |
parent | 26748efc037ccc069e1a08642d124bdfc50c6862 (diff) |
make use customdata typeoffset more, add an assert to ensure its to date.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 02016b2597d..b49e392d1f4 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -3824,7 +3824,7 @@ static void direct_link_customdata(FileData *fd, CustomData *data, int count) /* annoying workaround for bug [#31079] loading legacy files with * no polygons _but_ have stale customdata */ if (UNLIKELY(count == 0 && data->layers == NULL && data->totlayer != 0)) { - memset(data, 0, sizeof(*data)); + CustomData_reset(data); return; } @@ -8098,6 +8098,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) { Mesh *me; for (me = main->mesh.first; me; me = me->id.next) { + CustomData_update_typemap(&me->vdata); CustomData_free_layers(&me->vdata, CD_MSTICKY, me->totvert); } } |