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:
authorMattias Fredriksson <Osares>2022-11-09 19:50:51 +0300
committerHans Goudey <h.goudey@me.com>2022-11-09 19:54:19 +0300
commit11f6c65e61a22ea9423962d6165f54ec29e221a8 (patch)
tree6f924b00d29af30eda3de692240d0149c1ce50b5 /source/blender/geometry/GEO_trim_curves.hh
parentd01187c9634631b53c932e2a2eed1f2e9e203989 (diff)
Geometry Nodes: Trim curve node selection input and corrections
Correct trim for cyclical curves mentioned in T101379, splitting the curves if the start/endpoint is at the 'loop point'. Correct implementation based on comments in D14481, request was made to use 'foreach_curve_by_type' to computing the point lookups. Included corrections from D16066 as it may not be a adopted solution. Exposed selection input by adding it as input to the node. Note: This is disabled for 3.4 to avoid making UI changes in Bcon3. Differential Revision: https://developer.blender.org/D16161
Diffstat (limited to 'source/blender/geometry/GEO_trim_curves.hh')
-rw-r--r--source/blender/geometry/GEO_trim_curves.hh20
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/geometry/GEO_trim_curves.hh b/source/blender/geometry/GEO_trim_curves.hh
index d2ff770f225..197ef79c25b 100644
--- a/source/blender/geometry/GEO_trim_curves.hh
+++ b/source/blender/geometry/GEO_trim_curves.hh
@@ -3,6 +3,7 @@
#pragma once
#include "BLI_span.hh"
+#include "DNA_node_types.h"
#include "BKE_curves.hh"
#include "BKE_curves_utils.hh"
@@ -16,21 +17,8 @@ namespace blender::geometry {
*/
bke::CurvesGeometry trim_curves(const bke::CurvesGeometry &src_curves,
IndexMask selection,
- Span<bke::curves::CurvePoint> start_points,
- Span<bke::curves::CurvePoint> end_points);
-
-/**
- * Find the point(s) and piecewise segment corresponding to the given distance along the length of
- * the curve. Returns points on the evaluated curve for Catmull-Rom and NURBS splines.
- *
- * \param curves: Curve geometry to sample.
- * \param lengths: Distance along the curve on form [0.0, length] to determine the point for.
- * \param curve_indices: Curve index to lookup for each 'length', negative index are set to 0.
- * \param normalized_factors: If true, 'lengths' are normalized to the interval [0.0, 1.0].
- */
-Array<bke::curves::CurvePoint, 12> lookup_curve_points(const bke::CurvesGeometry &curves,
- Span<float> lengths,
- Span<int64_t> curve_indices,
- bool normalized_factors);
+ const VArray<float> &starts,
+ const VArray<float> &ends,
+ GeometryNodeCurveSampleMode mode);
} // namespace blender::geometry