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:
authorHans Goudey <h.goudey@me.com>2022-09-21 21:17:05 +0300
committerHans Goudey <h.goudey@me.com>2022-09-21 21:17:05 +0300
commit91dd29fd45d190728f29cc2f6cf9cd5549392f61 (patch)
tree72a579bcacdcc96e0bd8806364d80199d156bdfd /source/blender/nodes
parent600c069e0ef5334575164e5c4d758efe7324b0c7 (diff)
Attributes: Allow calling "finish" on empty accessors
This removes some boilerplate when creating many optional attributes.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
index a007f6afcc7..cdcb16985ac 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_distribute_points_on_faces.cc
@@ -382,13 +382,8 @@ BLI_NOINLINE static void compute_attribute_outputs(const Mesh &mesh,
}
ids.finish();
-
- if (normals) {
- normals.finish();
- }
- if (rotations) {
- rotations.finish();
- }
+ normals.finish();
+ rotations.finish();
}
static Array<float> calc_full_density_factors_with_selection(const Mesh &mesh,