diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2021-06-17 11:31:53 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2021-06-17 11:31:53 +0300 |
commit | a1a9077750f3f6c4f16b11594df738ae218bb0f3 (patch) | |
tree | 744fa069503a26a4ddf654b30b602d0002a641cb | |
parent | 1e5c46ad8eaff05f53473180abb24f037e9be9f3 (diff) |
Modernized for loop style.geometry-nodes-raycast
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_raycast.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc index 255a4deccb6..3a4492d24d6 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_raycast.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_raycast.cc @@ -153,7 +153,8 @@ static void raycast_to_mesh(const Mesh *mesh, } } -static bke::mesh_surface_sample::eAttributeMapMode get_map_mode(GeometryNodeRaycastMapMode map_mode) +static bke::mesh_surface_sample::eAttributeMapMode get_map_mode( + GeometryNodeRaycastMapMode map_mode) { switch (map_mode) { case GEO_NODE_RAYCAST_INTERPOLATED: @@ -248,7 +249,7 @@ static void raycast_from_points(const GeoNodeExecParams ¶ms, /* Custom interpolated attributes */ bke::mesh_surface_sample::MeshAttributeInterpolator interp(src_mesh, hit_positions, hit_indices); - for (int i = 0; i < hit_attribute_names.size(); ++i) { + for (const int i : hit_attribute_names.index_range()) { const std::optional<AttributeMetaData> meta_data = src_mesh_component->attribute_get_meta_data( hit_attribute_names[i]); if (meta_data) { |