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
path: root/source
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2022-07-23 13:14:45 +0300
committerJacques Lucke <jacques@blender.org>2022-07-23 13:14:45 +0300
commit5da807e00fb75de31442f872f4997ba361be00f8 (patch)
tree27e47dbd2ce3f10f891e8a7658cf9c8e371f5df9 /source
parentfc8b9efb24768f33a95fe6d9938820cd45beb361 (diff)
Fix: Store Named Attribute node not working when attribute did not exist
Diffstat (limited to 'source')
-rw-r--r--source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
index dbd68f4c783..1d3beb8be96 100644
--- a/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
+++ b/source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc
@@ -122,11 +122,9 @@ static void try_capture_field_on_geometry(GeometryComponent &component,
return;
}
}
-
- if (attributes.remove(name)) {
- if (attributes.add(name, domain, data_type, bke::AttributeInitMove{buffer})) {
- return;
- }
+ attributes.remove(name);
+ if (attributes.add(name, domain, data_type, bke::AttributeInitMove{buffer})) {
+ return;
}
/* If the name corresponds to a builtin attribute, removing the attribute might fail if