Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-09-08 05:41:39 +0300
committerHans Goudey <h.goudey@me.com>2022-09-08 05:41:39 +0300
commitd5934974219135102f364f57c45a8b1465e2b8d9 (patch)
tree415beea6d138085505b74d52301ff913781203dd /source/blender/io/collada/GeometryExporter.cpp
parent17bc29253070f1707acd40c75e4a0e5c53704b24 (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/io/collada/GeometryExporter.cpp')
-rw-r--r--source/blender/io/collada/GeometryExporter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/io/collada/GeometryExporter.cpp b/source/blender/io/collada/GeometryExporter.cpp
index 3728bbd34c3..e60900ccdb6 100644
--- a/source/blender/io/collada/GeometryExporter.cpp
+++ b/source/blender/io/collada/GeometryExporter.cpp
@@ -288,7 +288,7 @@ static bool collect_vertex_counts_per_poly(Mesh *me,
std::vector<unsigned long> &vcount_list)
{
const Span<MPoly> polys = me->polys();
- const blender::bke::AttributeAccessor attributes = blender::bke::mesh_attributes(*me);
+ const blender::bke::AttributeAccessor attributes = me->attributes();
const blender::VArray<int> material_indices = attributes.lookup_or_default<int>(
"material_index", ATTR_DOMAIN_FACE, 0);
bool is_triangulated = true;
@@ -399,7 +399,7 @@ void GeometryExporter::create_mesh_primitive_list(short material_index,
/* performs the actual writing */
prepareToAppendValues(is_triangulated, *primitive_list, vcount_list);
- const blender::bke::AttributeAccessor attributes = blender::bke::mesh_attributes(*me);
+ const blender::bke::AttributeAccessor attributes = me->attributes();
const blender::VArray<int> material_indices = attributes.lookup_or_default<int>(
"material_index", ATTR_DOMAIN_FACE, 0);