15 .
description(
"The control point to retrieve data from");
17 .field_source_reference_all()
18 .
description(
"The curve the control point is part of");
20 .field_source_reference_all()
21 .
description(
"How far along the control point is along its curve");
35 if (domain != AttrDomain::Point) {
43 return 413209687345908697;
53 return AttrDomain::Point;
68 if (domain != AttrDomain::Point) {
71 const Span<int> offsets = curves.offsets();
72 Array<int> point_to_curve_map = curves.point_to_curve_map();
75 [offsets, point_to_curve_map = std::move(point_to_curve_map)](
const int point_i) {
76 const int curve_i = point_to_curve_map[point_i];
77 return point_i - offsets[curve_i];
83 return 9834765987345677;
93 return AttrDomain::Point;
100 if (
params.output_is_required(
"Curve Index")) {
103 Field<int>(std::make_shared<bke::EvaluateAtIndexInput>(
104 point_index,
Field<int>(std::make_shared<CurveOfPointInput>()), AttrDomain::Point)));
106 if (
params.output_is_required(
"Index in Curve")) {
107 params.set_output(
"Index in Curve",
108 Field<int>(std::make_shared<bke::EvaluateAtIndexInput>(
110 Field<int>(std::make_shared<PointIndexInCurveInput>()),
111 AttrDomain::Point)));
119 ntype.
ui_name =
"Curve of Point";
120 ntype.
ui_description =
"Retrieve the curve a control point is part of";
Low-level operations for curves.
#define GEO_NODE_CURVE_TOPOLOGY_CURVE_OF_POINT
@ NODE_DEFAULT_INPUT_INDEX_FIELD
#define NOD_REGISTER_NODE(REGISTER_FUNC)
unsigned long long int uint64_t
static VArray ForContainer(ContainerT container)
static VArray ForFunc(const int64_t size, GetFunc get_func)
void node_register_type(bNodeType &ntype)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare