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-03-18 20:24:05 +0300
committerHans Goudey <h.goudey@me.com>2022-03-18 20:24:05 +0300
commit298d8a7b4aedb76600b3774727ec203e6c4d0586 (patch)
treee963b54d67627258818b4f1ef1fa993d6a982407 /source/blender/blenkernel/BKE_curves.hh
parentd2726e46262a4f8cecc9a060ecc26ffc5928854c (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.hh6
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.
*/