[Bf-blender-cvs] [5da807e00fb] master: Fix: Store Named Attribute node not working when attribute did not exist

Jacques Lucke noreply at git.blender.org
Sat Jul 23 12:14:57 CEST 2022


Commit: 5da807e00fb75de31442f872f4997ba361be00f8
Author: Jacques Lucke
Date:   Sat Jul 23 12:14:45 2022 +0200
Branches: master
https://developer.blender.org/rB5da807e00fb75de31442f872f4997ba361be00f8

Fix: Store Named Attribute node not working when attribute did not exist

===================================================================

M	source/blender/nodes/geometry/nodes/node_geo_store_named_attribute.cc

===================================================================

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



More information about the Bf-blender-cvs mailing list