diff options
author | Hans Goudey <h.goudey@me.com> | 2022-11-08 22:33:58 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-11-08 22:34:11 +0300 |
commit | d80d7b8f70d8aa676ca8a71fbe6604455c429020 (patch) | |
tree | 5403a90be138b9666d8b7b64ed958686be6f9d40 /source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc | |
parent | da41f11a290d9641fed4e73e140fda33a803d391 (diff) |
Geometry Nodes: Add preferred domain to many field inputs
The preferred domain is used to decide which domain the viewer node
should use when set to "Auto" domain. This commit adds it to some curve
input nodes and the curve and mesh topology nodes. This makes debugging
node setups with these nodes a bit faster and less frustrating.
Diffstat (limited to 'source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc')
-rw-r--r-- | source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc index 4bb4618588b..5a42949d4c8 100644 --- a/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc +++ b/source/blender/nodes/geometry/nodes/node_geo_input_spline_length.cc @@ -56,6 +56,11 @@ class SplineCountFieldInput final : public bke::CurvesFieldInput { { return dynamic_cast<const SplineCountFieldInput *>(&other) != nullptr; } + + std::optional<eAttrDomain> preferred_domain(const bke::CurvesGeometry & /*curves*/) const final + { + return ATTR_DOMAIN_CURVE; + } }; static void node_geo_exec(GeoNodeExecParams params) |