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>2021-10-23 08:42:07 +0300
committerHans Goudey <h.goudey@me.com>2021-10-23 08:42:07 +0300
commit50e7645211fb023280c6c55147fe15edcadddc17 (patch)
treeaeadd62e3cf38c93b740ab717f3fdcbcb7c29d11 /source/blender/nodes/geometry/nodes/node_geo_instances_to_points.cc
parent3bcd264141fda53529e9c11f98f9fc28b548b79c (diff)
Fix: Asset using selection in instances to points node
Caused by my own incorrect cleanup when committing the patch.
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_instances_to_points.cc')
-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();
}