From d5934974219135102f364f57c45a8b1465e2b8d9 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 7 Sep 2022 21:41:39 -0500 Subject: Cleanup: Use C++ methods to retrieve attribute accessors Replace `mesh_attributes`, `mesh_attributes_for_write` and the point cloud versions with methods on the `Mesh` and `PointCloud` types. This makes them friendlier to use and improves readability. Differential Revision: https://developer.blender.org/D15907 --- source/blender/editors/object/object_add.cc | 2 +- source/blender/editors/object/object_modifier.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_add.cc b/source/blender/editors/object/object_add.cc index 513ead708e3..1068da6816f 100644 --- a/source/blender/editors/object/object_add.cc +++ b/source/blender/editors/object/object_add.cc @@ -3158,7 +3158,7 @@ static int object_convert_exec(bContext *C, wmOperator *op) } /* Anonymous attributes shouldn't be available on the applied geometry. */ - blender::bke::mesh_attributes_for_write(*new_mesh).remove_anonymous(); + new_mesh->attributes_for_write().remove_anonymous(); BKE_object_free_modifiers(newob, 0); /* after derivedmesh calls! */ } diff --git a/source/blender/editors/object/object_modifier.cc b/source/blender/editors/object/object_modifier.cc index 8bbceccab28..9bb82cc086c 100644 --- a/source/blender/editors/object/object_modifier.cc +++ b/source/blender/editors/object/object_modifier.cc @@ -766,7 +766,7 @@ static bool modifier_apply_obdata( BKE_mesh_nomain_to_mesh(mesh_applied, me, ob, &CD_MASK_MESH, true); /* Anonymous attributes shouldn't be available on the applied geometry. */ - blender::bke::mesh_attributes_for_write(*me).remove_anonymous(); + me->attributes_for_write().remove_anonymous(); if (md_eval->type == eModifierType_Multires) { multires_customdata_delete(me); -- cgit v1.2.3