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:
authorLukas Tönne <lukas.toenne@gmail.com>2021-06-17 11:31:53 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2021-06-17 11:31:53 +0300
commita1a9077750f3f6c4f16b11594df738ae218bb0f3 (patch)
tree744fa069503a26a4ddf654b30b602d0002a641cb
parent1e5c46ad8eaff05f53473180abb24f037e9be9f3 (diff)
Modernized for loop style.geometry-nodes-raycast
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_raycast.cc5
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 &params,
/* 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) {