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/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
index 7b084995fc3..0bd1cf968df 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
@@ -37,7 +37,7 @@ class PlanarFieldInput final : public bke::MeshFieldInput {
const eAttrDomain domain,
IndexMask /*mask*/) const final
{
- const Span<MVert> verts = mesh.verts();
+ const Span<float3> positions = mesh.positions();
const Span<MPoly> polys = mesh.polys();
const Span<MLoop> loops = mesh.loops();
const Span<float3> poly_normals{
@@ -49,7 +49,7 @@ class PlanarFieldInput final : public bke::MeshFieldInput {
evaluator.evaluate();
const VArray<float> thresholds = evaluator.get_evaluated<float>(0);
- auto planar_fn = [verts, polys, loops, thresholds, poly_normals](const int i) -> bool {
+ auto planar_fn = [positions, polys, loops, thresholds, poly_normals](const int i) -> bool {
const MPoly &poly = polys[i];
if (poly.totloop <= 3) {
return true;
@@ -61,7 +61,7 @@ class PlanarFieldInput final : public bke::MeshFieldInput {
float max = -FLT_MAX;
for (const int i_loop : poly_loops.index_range()) {
- const float3 vert = verts[poly_loops[i_loop].v].co;
+ const float3 &vert = positions[poly_loops[i_loop].v];
float dot = math::dot(reference_normal, vert);
if (dot > max) {
max = dot;