15 .
description(
"The control point to retrieve data from")
16 .structure_type(StructureType::Field);
18 .field_source_reference_all()
19 .
description(
"The curve the control point is part of");
21 .field_source_reference_all()
22 .
description(
"How far along the control point is along its curve");
36 if (domain != AttrDomain::Point) {
44 return 413209687345908697;
54 return AttrDomain::Point;
69 if (domain != AttrDomain::Point) {
72 const Span<int> offsets = curves.offsets();
73 Array<int> point_to_curve_map = curves.point_to_curve_map();
76 [offsets, point_to_curve_map = std::move(point_to_curve_map)](
const int point_i) {
77 const int curve_i = point_to_curve_map[point_i];
78 return point_i - offsets[curve_i];
84 return 9834765987345677;
94 return AttrDomain::Point;
101 if (
params.output_is_required(
"Curve Index")) {
104 Field<int>(std::make_shared<bke::EvaluateAtIndexInput>(
105 point_index,
Field<int>(std::make_shared<CurveOfPointInput>()), AttrDomain::Point)));
107 if (
params.output_is_required(
"Index in Curve")) {
108 params.set_output(
"Index in Curve",
109 Field<int>(std::make_shared<bke::EvaluateAtIndexInput>(
111 Field<int>(std::make_shared<PointIndexInCurveInput>()),
112 AttrDomain::Point)));
120 ntype.
ui_name =
"Curve of Point";
121 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 from_func(const int64_t size, GetFunc get_func)
static VArray from_container(ContainerT container)
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