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:
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.cc')
-rw-r--r--source/blender/editors/mesh/mesh_data.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc
index 9901f4e1836..01cb1951c93 100644
--- a/source/blender/editors/mesh/mesh_data.cc
+++ b/source/blender/editors/mesh/mesh_data.cc
@@ -45,6 +45,7 @@
#include "mesh_intern.h" /* own include */
using blender::Array;
+using blender::float3;
using blender::MutableSpan;
using blender::Span;
@@ -798,12 +799,12 @@ static int mesh_customdata_custom_splitnormals_add_exec(bContext *C, wmOperator
/* Tag edges as sharp according to smooth threshold if needed,
* to preserve auto-smooth shading. */
if (me->flag & ME_AUTOSMOOTH) {
- const Span<MVert> verts = me->verts();
+ const Span<float3> verts = me->positions();
MutableSpan<MEdge> edges = me->edges_for_write();
const Span<MPoly> polys = me->polys();
const Span<MLoop> loops = me->loops();
- BKE_edges_sharp_from_angle_set(verts.data(),
+ BKE_edges_sharp_from_angle_set(reinterpret_cast<const float(*)[3]>(verts.data()),
verts.size(),
edges.data(),
edges.size(),
@@ -1144,8 +1145,9 @@ static void mesh_add_verts(Mesh *mesh, int len)
CustomData_copy(&mesh->vdata, &vdata, CD_MASK_MESH.vmask, CD_SET_DEFAULT, totvert);
CustomData_copy_data(&mesh->vdata, &vdata, 0, 0, mesh->totvert);
- if (!CustomData_has_layer(&vdata, CD_MVERT)) {
- CustomData_add_layer(&vdata, CD_MVERT, CD_SET_DEFAULT, nullptr, totvert);
+ if (!CustomData_get_layer_named(&vdata, CD_PROP_FLOAT3, "position")) {
+ CustomData_add_layer_named(
+ &vdata, CD_PROP_FLOAT3, CD_SET_DEFAULT, nullptr, totvert, "position");
}
CustomData_free(&mesh->vdata, mesh->totvert);