diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-22 17:15:03 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-22 17:43:46 +0300 |
commit | e3d63215308fc2c8b639ee00845344ea735a46e3 (patch) | |
tree | 7e6c42dce11d581ed6e654d9647ec02d204111d4 /source/blender/blenloader/intern/versioning_270.c | |
parent | 81667b770ccdb41b3e63f5fdea75fe7da56b0d07 (diff) |
Fix T51520: Broken vertex weights after two mesh joining.
Root of the issue here was that two stupid modifiers could create named
vgroup CD layers (vgroup editing ones... shame on me :") ).
Fix that, and added some versionning code to also fix 'corrupted' blend
files created by those so far.
Diffstat (limited to 'source/blender/blenloader/intern/versioning_270.c')
-rw-r--r-- | source/blender/blenloader/intern/versioning_270.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c index 810e6507c91..008ef4e60cd 100644 --- a/source/blender/blenloader/intern/versioning_270.c +++ b/source/blender/blenloader/intern/versioning_270.c @@ -1643,6 +1643,11 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main) scene->r.im_format.exr_codec = R_IMF_EXR_CODEC_DWAA; } } + + /* Fix related to VGroup modifiers creating named defgroup CD layers! See T51520. */ + for (Mesh *me = main->mesh.first; me; me = me->id.next) { + CustomData_set_layer_name(&me->vdata, CD_MDEFORMVERT, 0, ""); + } } } |