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:
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_instances_to_points.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_instances_to_points.cc b/source/blender/nodes/geometry/nodes/node_geo_instances_to_points.cc
index 7f9308d43ad..63d1f88a442 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_instances_to_points.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_instances_to_points.cc
@@ -80,8 +80,8 @@ static void convert_instances_to_points(GeometrySet &geometry_set,
OutputAttribute_Typed<int> id_attribute = points.attribute_try_get_for_output<int>(
"id", ATTR_DOMAIN_POINT, 0);
MutableSpan<int> ids = id_attribute.as_span();
- for (const int64_t i : selection) {
- ids[i] = instances.instance_ids()[i];
+ for (const int i : selection.index_range()) {
+ ids[i] = instances.instance_ids()[selection[i]];
}
id_attribute.save();
}