Geometry Nodes: Avoid corner domain for Blur Attribute viewing

Face Corner is not supported.
In case prefer domain is used, face corner shouldn't be proposed.
This will make the viewer node preview the values on the point
domain instead in the viewport.

Pull Request: https://projects.blender.org/blender/blender/pulls/113905
This commit is contained in:
Iliya Katueshenock
2023-10-18 20:11:47 +02:00
committed by Hans Goudey
parent 86bf9b1163
commit 4a5bfb273f

View File

@@ -485,7 +485,12 @@ class BlurAttributeFieldInput final : public bke::GeometryFieldInput {
std::optional<eAttrDomain> preferred_domain(const GeometryComponent &component) const override
{
return bke::try_detect_field_domain(component, value_field_);
const std::optional<eAttrDomain> domain = bke::try_detect_field_domain(component,
value_field_);
if (domain.has_value() && *domain == ATTR_DOMAIN_CORNER) {
return ATTR_DOMAIN_POINT;
}
return domain;
}
};