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:
authorJacques Lucke <jacques@blender.org>2021-01-12 14:49:34 +0300
committerJacques Lucke <jacques@blender.org>2021-01-12 14:50:29 +0300
commit3a254b93fd8597c47fc4fe55fa0417d1f9fa85fc (patch)
tree00fe1e373f828b23a3242b80c37b65146a2dd1c3 /source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
parent58dae919e51547a8fe7e676e317de3ee17b49e64 (diff)
Geometry Nodes: support reading from spans of WriteAttribute
Previously, the span returned by `WriteAttribute`s might not contain the current value of the attribute for performance reasons. To avoid some bugs, the span now always contains the old values (they might have to be copied over from the internal storage, dependending on how the attribute is stored). The old behavior is still available with the `get_span_for_write_only` method. The span that it returns might not contain the current attribute values. Therefore, it should only be used when you want to overwrite an attribute without looking at the old values.
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
index 80ac45aed4e..75736ae714a 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_join_geometry.cc
@@ -182,7 +182,7 @@ static void join_attributes(Span<const GeometryComponent *> src_components,
write_attribute->domain() != domain) {
continue;
}
- fn::GMutableSpan dst_span = write_attribute->get_span();
+ fn::GMutableSpan dst_span = write_attribute->get_span_for_write_only();
fill_new_attribute(src_components, attribute_name, data_type, domain, dst_span);
write_attribute->apply_span();
}