Fix T102861: Store named attribute warning with empty geometry

This commit is contained in:
Hans Goudey 2022-11-29 16:36:09 -06:00
parent 6c4c09b2df
commit b7d27ce914
Notes: blender-bot 2023-02-13 13:55:10 +01:00
Referenced by issue #102861, "Store Named Attribute" node show warning at empty geometry
1 changed files with 6 additions and 2 deletions

View File

@ -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);
}
}
}
}