diff options
author | Hans Goudey <h.goudey@me.com> | 2021-05-27 05:14:59 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-05-27 05:14:59 +0300 |
commit | c97b6215a37e5eca744d54d2e80741af78e1dafc (patch) | |
tree | c055f4d633a625b8b6123d25cad041b09d53cb07 /source/blender/blenkernel/BKE_geometry_set.hh | |
parent | f3944cf503966a93a124e389d9232d7f833c0077 (diff) |
Geometry Nodes: Support interpolation between curve domains
This commit adds interpolation from the point domain to the spline
domain and the other way around. Before this, spline domain attributes
were basically useless, but now they are quite helpful as a way to use
a shared value in a contiguous group of points.
I implementented a special virtual array for the spline to points
conversion, so that conversion should be close to the ideal performance
level, but there are a few ways we could optimize the point to spline
conversion in the future:
- Use a function virtual array to mix the point values for each spline
on demand.
- Implement a special case for when the input virtual array is one of
the virtual arrays from the spline point attributes. In other words,
decrease curve attribute access overhead.
Differential Revision: https://developer.blender.org/D11376
Diffstat (limited to 'source/blender/blenkernel/BKE_geometry_set.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_geometry_set.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index 3b3856f11ab..0ed6eea7954 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -420,6 +420,10 @@ class CurveComponent : public GeometryComponent { CurveEval *get_for_write(); int attribute_domain_size(const AttributeDomain domain) const final; + std::unique_ptr<blender::fn::GVArray> attribute_try_adapt_domain( + std::unique_ptr<blender::fn::GVArray> varray, + const AttributeDomain from_domain, + const AttributeDomain to_domain) const final; bool is_empty() const final; |