Geometry Nodes: Improve viewer node domain choice for blur node
Add preferred domain based on the "Value" input field. Most often, the domain must match the original domain for the value. Differential Revision: https://developer.blender.org/D16730
This commit is contained in:
parent
07b67894e8
commit
ad05b78d09
|
@ -14,6 +14,7 @@
|
|||
|
||||
#include "BKE_attribute_math.hh"
|
||||
#include "BKE_curves.hh"
|
||||
#include "BKE_geometry_fields.hh"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_mesh_mapping.h"
|
||||
|
||||
|
@ -443,6 +444,11 @@ class BlurAttributeFieldInput final : public bke::GeometryFieldInput {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
std::optional<eAttrDomain> preferred_domain(const GeometryComponent &component) const override
|
||||
{
|
||||
return bke::try_detect_field_domain(component, value_field_);
|
||||
}
|
||||
};
|
||||
|
||||
static StringRefNull identifier_suffix(eCustomDataType data_type)
|
||||
|
|
Loading…
Reference in New Issue