This repository has been archived on 2023-10-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-archive/source/blender/geometry/GEO_trim_curves.hh
Mattias Fredriksson 11f6c65e61 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
2022-11-09 10:54:19 -06:00

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