diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-18 20:24:05 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-18 20:24:05 +0300 |
commit | 298d8a7b4aedb76600b3774727ec203e6c4d0586 (patch) | |
tree | e963b54d67627258818b4f1ef1fa993d6a982407 /source/blender/blenkernel/BKE_curves.hh | |
parent | d2726e46262a4f8cecc9a060ecc26ffc5928854c (diff) |
Curves: Port reverse curves node to the new data-block
Create a function on CurvesGeometry that can also be used for an edit
mode operator in the future. Dealing with CustomData directly means the
code is a bit more verbose than would be ideal, but this would be a
simple thing to clean up in the future if we get an attribute API here.
Also change the reverse node to first work on a read-only geometry
component, and only get write access if there is a curve selected.
Differential Revision: https://developer.blender.org/D14375
Diffstat (limited to 'source/blender/blenkernel/BKE_curves.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_curves.hh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index c28886e8a52..93b98a01fce 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -277,6 +277,12 @@ class CurvesGeometry : public ::CurvesGeometry { void remove_curves(IndexMask curves_to_delete); + /** + * Change the direction of selected curves (switch the start and end) without changing their + * shape. + */ + void reverse_curves(IndexMask curves_to_reverse); + /* -------------------------------------------------------------------- * Attributes. */ |