diff options
author | Jacques Lucke <jacques@blender.org> | 2022-02-04 15:11:18 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2022-02-04 15:11:18 +0300 |
commit | f9aab6717bd5c47e19a93f3ad6eb3500888f12d4 (patch) | |
tree | 484ecf3163760f7cbec1059521867c05f1fe6b20 /source/blender/modifiers | |
parent | e6f9a728841082a98ba1ec1c0e006322edfe81fe (diff) | |
parent | b8a634cb1dff736f5c4b2109e759cfb8ac848c41 (diff) |
Merge branch 'blender-v3.1-release'
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_nodes.cc | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc index fdf1f1a68aa..ca4bfbed5f5 100644 --- a/source/blender/modifiers/intern/MOD_nodes.cc +++ b/source/blender/modifiers/intern/MOD_nodes.cc @@ -1031,21 +1031,18 @@ static void store_computed_output_attributes( { for (const OutputAttributeToStore &store : attributes_to_store) { GeometryComponent &component = geometry.get_component_for_write(store.component_type); - /* Try deleting an existing attribute, so that we can just use `attribute_try_create` to pass - * in the data directly. */ - component.attribute_try_delete(store.name); if (component.attribute_exists(store.name)) { /* Copy the data into an existing attribute. */ blender::bke::WriteAttributeLookup write_attribute = component.attribute_try_get_for_write( store.name); if (write_attribute) { write_attribute.varray.set_all(store.data.data()); - store.data.type().destruct_n(store.data.data(), store.data.size()); - MEM_freeN(store.data.data()); if (write_attribute.tag_modified_fn) { write_attribute.tag_modified_fn(); } } + store.data.type().destruct_n(store.data.data(), store.data.size()); + MEM_freeN(store.data.data()); } else { component.attribute_try_create(store.name, |