[Bf-blender-cvs] [d62cf981640] temp-geometry-nodes-fields: A few picky changes to comments

Hans Goudey noreply at git.blender.org
Wed Sep 8 16:58:16 CEST 2021


Commit: d62cf98164064e2fb06768ca265b1241fd9ce7d8
Author: Hans Goudey
Date:   Wed Sep 8 09:51:00 2021 -0500
Branches: temp-geometry-nodes-fields
https://developer.blender.org/rBd62cf98164064e2fb06768ca265b1241fd9ce7d8

A few picky changes to comments

===================================================================

M	source/blender/functions/FN_field_cpp_type.hh
M	source/blender/nodes/geometry/nodes/node_geo_input_normal.cc

===================================================================

diff --git a/source/blender/functions/FN_field_cpp_type.hh b/source/blender/functions/FN_field_cpp_type.hh
index b7eff8f8cf0..5e6f1b5a585 100644
--- a/source/blender/functions/FN_field_cpp_type.hh
+++ b/source/blender/functions/FN_field_cpp_type.hh
@@ -45,8 +45,7 @@ class FieldCPPType : public CPPType {
     return field_type_;
   }
 
-  /* Ensure that a #GField and #Field<T> have the same layout, so pointers can be cast between the
-   * two. */
+  /* Ensure that #GField and #Field<T> have the same layout, to enable casting between the two. */
   static_assert(sizeof(Field<int>) == sizeof(GField));
   static_assert(sizeof(Field<int>) == sizeof(Field<std::string>));
 
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_normal.cc b/source/blender/nodes/geometry/nodes/node_geo_input_normal.cc
index e1e14eb367d..b8f126ef1db 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_input_normal.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_input_normal.cc
@@ -71,7 +71,7 @@ static GVArrayPtr mesh_vertex_normals(const Mesh &mesh,
   }
 
   /* If the normals are dirty, they must be recalculated for the output of this node's field
-   * source. Ideally vertex normals could be calculated lazily on a const mesh. But that's not
+   * source. Ideally vertex normals could be calculated lazily on a const mesh, but that's not
    * possible at the moment, so we take ownership of the results. Sadly we must also create a copy
    * of MVert to use the mesh normals API. This can be improved by adding mutex-protected lazy
    * calculation of normals on meshes.
@@ -136,8 +136,8 @@ static const GVArray *construct_mesh_normals_gvarray(const MeshComponent &mesh_c
       GVArrayPtr face_normals = mesh_face_normals(
           mesh, verts, polys, loops, IndexRange(polys.size()));
 
-      /* In this case using the mesh component's generic domain interpolation is fine,
-       * since the face normal is just copied to every corner. */
+      /* In this case using the mesh component's generic domain interpolation is fine, the data
+       * will still be normalized, since the face normal is just copied to every corner. */
       GVArrayPtr loop_normals = mesh_component.attribute_try_adapt_domain(
           std::move(face_normals), ATTR_DOMAIN_FACE, ATTR_DOMAIN_CORNER);
       return scope.add_value(std::move(loop_normals), __func__).get();



More information about the Bf-blender-cvs mailing list