Fix T97595: Modifier attribute output broken for vertex groups
`attribute_try_create` didn't understand that the vertex group attribute already existed because it only looks for names in custom data layers when the domain matches. Using `attribute_exists` unfortunately requires another loop through all attribute names, but that should be optimized separately in the future anyway. Differential Revision: https://developer.blender.org/D14756
This commit is contained in:
parent
3b4b2bcb13
commit
96834a7bac
Notes:
blender-bot
2023-02-14 00:13:36 +01:00
Referenced by issue #97595, Regression: GeoNode attribute output passing does not work in the latest nightly
|
@ -939,6 +939,9 @@ bool GeometryComponent::attribute_try_create(const AttributeIDRef &attribute_id,
|
|||
if (providers == nullptr) {
|
||||
return false;
|
||||
}
|
||||
if (this->attribute_exists(attribute_id)) {
|
||||
return false;
|
||||
}
|
||||
if (attribute_id.is_named()) {
|
||||
const BuiltinAttributeProvider *builtin_provider =
|
||||
providers->builtin_attribute_providers().lookup_default_as(attribute_id.name(), nullptr);
|
||||
|
|
Loading…
Reference in New Issue