Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-11-08 22:33:58 +0300
committerHans Goudey <h.goudey@me.com>2022-11-08 22:34:11 +0300
commitd80d7b8f70d8aa676ca8a71fbe6604455c429020 (patch)
tree5403a90be138b9666d8b7b64ed958686be6f9d40 /source/blender/blenkernel/intern/geometry_component_curves.cc
parentda41f11a290d9641fed4e73e140fda33a803d391 (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/blenkernel/intern/geometry_component_curves.cc')
-rw-r--r--source/blender/blenkernel/intern/geometry_component_curves.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/geometry_component_curves.cc b/source/blender/blenkernel/intern/geometry_component_curves.cc
index d6987d76028..fff9004bc16 100644
--- a/source/blender/blenkernel/intern/geometry_component_curves.cc
+++ b/source/blender/blenkernel/intern/geometry_component_curves.cc
@@ -282,6 +282,12 @@ bool CurveLengthFieldInput::is_equal_to(const fn::FieldNode &other) const
return dynamic_cast<const CurveLengthFieldInput *>(&other) != nullptr;
}
+std::optional<eAttrDomain> CurveLengthFieldInput::preferred_domain(
+ const bke::CurvesGeometry & /*curves*/) const
+{
+ return ATTR_DOMAIN_CURVE;
+}
+
/** \} */
} // namespace blender::bke