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
25 lines
715 B
C++
25 lines
715 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
#pragma once
|
|
|
|
#include "BLI_span.hh"
|
|
#include "DNA_node_types.h"
|
|
|
|
#include "BKE_curves.hh"
|
|
#include "BKE_curves_utils.hh"
|
|
#include "BKE_geometry_set.hh"
|
|
|
|
namespace blender::geometry {
|
|
|
|
/*
|
|
* Create a new Curves instance by trimming the input curves. Copying the selected splines
|
|
* between the start and end points.
|
|
*/
|
|
bke::CurvesGeometry trim_curves(const bke::CurvesGeometry &src_curves,
|
|
IndexMask selection,
|
|
const VArray<float> &starts,
|
|
const VArray<float> &ends,
|
|
GeometryNodeCurveSampleMode mode);
|
|
|
|
} // namespace blender::geometry
|