From b51f68d7804a98d4b2235dfceb8af7f286d1a3ee Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Mon, 6 Sep 2021 10:22:14 -0500 Subject: Various small cleanups and comment changes --- source/blender/blenkernel/BKE_attribute_access.hh | 4 ++-- source/blender/functions/FN_field.hh | 3 ++- source/blender/makesdna/DNA_customdata_types.h | 4 ++-- source/blender/nodes/CMakeLists.txt | 2 +- source/blender/nodes/geometry/nodes/node_geo_input_normal.cc | 8 ++++---- source/blender/nodes/geometry/nodes/node_geo_point_translate.cc | 2 +- 6 files changed, 12 insertions(+), 11 deletions(-) diff --git a/source/blender/blenkernel/BKE_attribute_access.hh b/source/blender/blenkernel/BKE_attribute_access.hh index 532afbf769b..9d309d8a1c1 100644 --- a/source/blender/blenkernel/BKE_attribute_access.hh +++ b/source/blender/blenkernel/BKE_attribute_access.hh @@ -33,8 +33,8 @@ namespace blender::bke { /** - * Identifies an attribute that is either named or anonymous. It does not own the identifier, so it - * is just a reference. + * Identifies an attribute that is either named or anonymous. + * It does not own the identifier, so it is just a reference. */ class AttributeIDRef { private: diff --git a/source/blender/functions/FN_field.hh b/source/blender/functions/FN_field.hh index a4d4f7ea939..e25903fb3ce 100644 --- a/source/blender/functions/FN_field.hh +++ b/source/blender/functions/FN_field.hh @@ -58,7 +58,7 @@ namespace blender::fn { /** - * A node in a field-tree. It has one our more outputs that can be referenced by fields. + * A node in a field-tree. It has at least one output that can be referenced by fields. */ class FieldNode { private: @@ -331,6 +331,7 @@ class FieldEvaluator : NonMovable, NonCopyable { { } + /** Construct a field evaluator for all indices less than #size. */ FieldEvaluator(const FieldContext &context, const int64_t size) : context_(context), mask_(size) { } diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index f24d8962723..214b514b25c 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -56,8 +56,8 @@ typedef struct CustomDataLayer { /** Layer data. */ void *data; /** - * Run-time identifier for this layer. If no one has a strong reference to this id anymore, the - * layer can be removed. + * Run-time identifier for this layer. If no one has a strong reference to this id anymore, + * the layer can be removed. */ const struct AnonymousAttributeID *anonymous_id; } CustomDataLayer; diff --git a/source/blender/nodes/CMakeLists.txt b/source/blender/nodes/CMakeLists.txt index d315c4fd7c4..ac2200d496b 100644 --- a/source/blender/nodes/CMakeLists.txt +++ b/source/blender/nodes/CMakeLists.txt @@ -190,7 +190,7 @@ set(SRC geometry/nodes/node_geo_input_material.cc geometry/nodes/node_geo_input_normal.cc geometry/nodes/node_geo_input_position.cc - geometry/nodes/node_geo_index.cc + geometry/nodes/node_geo_input_index.cc geometry/nodes/node_geo_is_viewport.cc geometry/nodes/node_geo_join_geometry.cc geometry/nodes/node_geo_material_assign.cc 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 3422174cead..68b284ae671 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_normal.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_normal.cc @@ -71,10 +71,10 @@ 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, protected with a - * mutex. 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. + * 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. * * Use mask.min_array_size() to avoid calculating a final chunk of data if possible. */ Array temp_verts(verts); diff --git a/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc b/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc index 80fe90097a1..6cc04770e0d 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_point_translate.cc @@ -112,7 +112,7 @@ static void geo_node_point_translate_exec(GeoNodeExecParams params) const NodeGeometryPointTranslate &storage = *(const NodeGeometryPointTranslate *)params.node().storage; - const Array types{ + static const Array types{ GEO_COMPONENT_TYPE_MESH, GEO_COMPONENT_TYPE_POINT_CLOUD, GEO_COMPONENT_TYPE_CURVE, -- cgit v1.2.3