Fix T51057 Modifiers lose bevel weight and crease

This is for 2.80 (though bug I mistakenly merged into was for 2.78.
Duplicate bugs T58127, T58411, T58440, and T58789 all fixed.
Bevel weights and crease are not real Mesh layers so get lost
on coversion of mesh to bmesh unelss the mesh's cd_flag member
tells the converter to create layers for them.
Most code the copies or partially copies meshes uses
mesh_new_nomain_from_template_ex, so copied the flag there.
This commit is contained in:
2018-12-08 06:39:46 -06:00
parent 64bca2e648
commit aff9ccbade

View File

@@ -662,6 +662,8 @@ static Mesh *mesh_new_nomain_from_template_ex(
me_dst->totloop = loops_len;
me_dst->totpoly = polys_len;
me_dst->cd_flag = me_src->cd_flag;
CustomData_copy(&me_src->vdata, &me_dst->vdata, mask, CD_CALLOC, verts_len);
CustomData_copy(&me_src->edata, &me_dst->edata, mask, CD_CALLOC, edges_len);
CustomData_copy(&me_src->ldata, &me_dst->ldata, mask, CD_CALLOC, loops_len);