[Bf-blender-cvs] [b7d27ce9140] blender-v3.4-release: Fix T102861: Store named attribute warning with empty geometry

Hans Goudey noreply at git.blender.org
Tue Nov 29 23:36:18 CET 2022


Commit: b7d27ce914084a8f5d026032d9f3a3c8a2d99687
Author: Hans Goudey
Date:   Tue Nov 29 16:36:09 2022 -0600
Branches: blender-v3.4-release
https://developer.blender.org/rBb7d27ce914084a8f5d026032d9f3a3c8a2d99687

Fix T102861: Store named attribute warning with empty geometry

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

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 3c85fd459e1..b2406ad1f30 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
@@ -143,7 +143,9 @@ static void node_geo_exec(GeoNodeExecParams params)
       GeometryComponent &component = geometry_set.get_component_for_write(
           GEO_COMPONENT_TYPE_INSTANCES);
       if (!bke::try_capture_field_on_geometry(component, name, domain, field)) {
-        failure.store(true);
+        if (component.attribute_domain_size(domain) != 0) {
+          failure.store(true);
+        }
       }
     }
   }
@@ -154,7 +156,9 @@ static void node_geo_exec(GeoNodeExecParams params)
         if (geometry_set.has(type)) {
           GeometryComponent &component = geometry_set.get_component_for_write(type);
           if (!bke::try_capture_field_on_geometry(component, name, domain, field)) {
-            failure.store(true);
+            if (component.attribute_domain_size(domain) != 0) {
+              failure.store(true);
+            }
           }
         }
       }



More information about the Bf-blender-cvs mailing list