diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_add.c | 5 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index 8a493eb0743..e9cbd7bed55 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -2930,7 +2930,10 @@ static int object_convert_exec(bContext *C, wmOperator *op) /* Full (edge-angle based) draw calculation should ideally be performed. */ BKE_mesh_edges_set_draw_render(me_eval); BKE_object_material_from_eval_data(bmain, newob, &me_eval->id); - BKE_mesh_nomain_to_mesh(me_eval, newob->data, newob, &CD_MASK_MESH, true); + Mesh *new_mesh = (Mesh *)newob->data; + BKE_mesh_nomain_to_mesh(me_eval, new_mesh, newob, &CD_MASK_MESH, true); + /* Anonymous attributes shouldn't be available on the applied geometry. */ + BKE_mesh_anonymous_attributes_remove(new_mesh); BKE_object_free_modifiers(newob, 0); /* after derivedmesh calls! */ } else if (ob->type == OB_FONT) { diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 4ac2a9dca62..d8247d86e07 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -763,11 +763,8 @@ static bool modifier_apply_obdata( BKE_object_material_from_eval_data(bmain, ob, &mesh_applied->id); BKE_mesh_nomain_to_mesh(mesh_applied, me, ob, &CD_MASK_MESH, true); - /* Anonymous attributes shouldn't by available on the applied geometry. */ - CustomData_free_layers_anonymous(&me->vdata, me->totvert); - CustomData_free_layers_anonymous(&me->edata, me->totedge); - CustomData_free_layers_anonymous(&me->pdata, me->totpoly); - CustomData_free_layers_anonymous(&me->ldata, me->totloop); + /* Anonymous attributes shouldn't be available on the applied geometry. */ + BKE_mesh_anonymous_attributes_remove(me); if (md_eval->type == eModifierType_Multires) { multires_customdata_delete(me); |