[Bf-blender-cvs] [6737f89e491] master: Fix T98718: Face Is Planar Node Not handling Certain Conditions
Johnny Matthews
noreply at git.blender.org
Tue Jun 14 19:54:38 CEST 2022
Commit: 6737f89e4916b5add06e412b8192e0007d5de03b
Author: Johnny Matthews
Date: Tue Jun 14 12:53:50 2022 -0500
Branches: master
https://developer.blender.org/rB6737f89e4916b5add06e412b8192e0007d5de03b
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
===================================================================
M source/blender/nodes/geometry/nodes/node_geo_input_mesh_face_is_planar.cc
===================================================================
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;
More information about the Bf-blender-cvs
mailing list