diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-15 17:54:15 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-15 17:54:45 +0300 |
commit | 47d961a4b1c14b0cee2817de226ee356e711e146 (patch) | |
tree | 4c057b00b7eb82144e4acf12196b9bf33481e9a5 /source/blender/blenkernel/BKE_curves.hh | |
parent | e96a809a68ef40225d5eddfd790644538e171a8d (diff) |
Fix: Apply tilt in curves data-block normals calculation
The ported normal calculation from ceed37fc5cbb466a0 neglected to
use the tilt attribute to rotate the normals around the tangents.
This commit adds that behavior back, adding a new math header file
to avoid duplicating the rotation function for normalized axes.
Differential Revision: https://developer.blender.org/D14655
Diffstat (limited to 'source/blender/blenkernel/BKE_curves.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_curves.hh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 06971a2243a..3d912e10fb2 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -183,6 +183,13 @@ class CurvesGeometry : public ::CurvesGeometry { MutableSpan<int> resolution_for_write(); /** + * The angle used to rotate evaluated normals around the tangents after their calculation. + * Call #tag_normals_changed after changes. + */ + VArray<float> tilt() const; + MutableSpan<float> tilt_for_write(); + + /** * Which method to use for calculating the normals of evaluated points (#NormalMode). * Call #tag_normals_changed after changes. */ |