diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-21 21:17:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-21 21:17:05 +0300 |
commit | 91dd29fd45d190728f29cc2f6cf9cd5549392f61 (patch) | |
tree | 72a579bcacdcc96e0bd8806364d80199d156bdfd /source/blender/nodes | |
parent | 600c069e0ef5334575164e5c4d758efe7324b0c7 (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.cc | 9 |
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, |