Fix T51520: Broken vertex weights after two mesh joining.

Take Two, did not detect that dynapaint was also creating named vgroup cdlayer!
This commit is contained in:
Bastien Montagne 2017-05-29 12:06:40 +02:00
parent be31582e3d
commit 2fb56e7157

@ -1897,8 +1897,8 @@ static DerivedMesh *dynamicPaint_Modifier_apply(
/* apply weights into a vertex group, if doesnt exists add a new layer */
if (defgrp_index != -1 && !dvert && (surface->output_name[0] != '\0')) {
dvert = CustomData_add_layer_named(&result->vertData, CD_MDEFORMVERT, CD_CALLOC,
NULL, sData->total_points, surface->output_name);
dvert = CustomData_add_layer(&result->vertData, CD_MDEFORMVERT, CD_CALLOC,
NULL, sData->total_points);
}
if (defgrp_index != -1 && dvert) {
int i;