diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-08 05:41:39 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-08 05:41:39 +0300 |
commit | d5934974219135102f364f57c45a8b1465e2b8d9 (patch) | |
tree | 415beea6d138085505b74d52301ff913781203dd /source/blender/makesdna/DNA_mesh_types.h | |
parent | 17bc29253070f1707acd40c75e4a0e5c53704b24 (diff) |
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
Diffstat (limited to 'source/blender/makesdna/DNA_mesh_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index f14ec52decc..00a9e36612c 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -18,6 +18,10 @@ namespace blender { template<typename T> class Span; template<typename T> class MutableSpan; +namespace bke { +class AttributeAccessor; +class MutableAttributeAccessor; +} // namespace bke } // namespace blender #endif @@ -346,6 +350,9 @@ typedef struct Mesh { /** Write access to loop data. */ blender::MutableSpan<MLoop> loops_for_write(); + blender::bke::AttributeAccessor attributes() const; + blender::bke::MutableAttributeAccessor attributes_for_write(); + /** * Vertex group data, encoded as an array of indices and weights for every vertex. * \warning: May be empty. |