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:
authorJohnny Matthews <johnny.matthews@gmail.com>2022-06-14 20:53:50 +0300
committerJohnny Matthews <johnny.matthews@gmail.com>2022-06-14 20:53:50 +0300
commit6737f89e4916b5add06e412b8192e0007d5de03b (patch)
tree1374ad2be912381f4be7979f301e6a49c5d83490
parent7a24fe372c2148bf28e3768d42c14192ed46c5d6 (diff)
Fix T98718: Face Is Planar Node Not handling Certain Conditions
The comparison between dot products of each point of the poly were not taking into consideration negative values. FLT_MIN was used rather than -FLT_MAX due to a misunderstanding of the FLT_MIN definition. Maniphest Tasks: T98718 Differential Revision: https://developer.blender.org/D15161
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc2
1 files changed, 1 insertions, 1 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 c400760f902..532c3dc81e5 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
@@ -65,7 +65,7 @@ class PlanarFieldInput final : public GeometryFieldInput {
float3 reference_normal = poly_normals[i_poly];
float min = FLT_MAX;
- float max = FLT_MIN;
+ float max = -FLT_MAX;
for (const int i_loop : poly_loops.index_range()) {
const float3 vert = mesh->mvert[poly_loops[i_loop].v].co;