17 "Output the handle positions relative to the corresponding control point "
18 "instead of in the local space of the geometry");
20 .structure_type(StructureType::Field)
21 .propagate_references();
23 .structure_type(StructureType::Field)
24 .propagate_references();
49 evaluator.
add(relative_);
56 StringRef side = left_ ?
"handle_left" :
"handle_right";
58 side, AttrDomain::Point, {0, 0, 0});
63 for (
const int i : positions.index_range()) {
64 output[i] = handles[i] - positions[i];
73 for (
const int i : positions.index_range()) {
75 output[i] = handles[i] - positions[i];
92 static constexpr int8_t id = 0;
94 hash.add(deep_hash_cache.ensure(relative_));
101 return AttrDomain::Point;
111 params.
set_output(
"Left"_ustr, std::move(left_field));
112 params.
set_output(
"Right"_ustr, std::move(right_field));
120 ntype.
ui_name =
"Curve Handle Positions";
121 ntype.
ui_description =
"Retrieve the position of each Bézier control point's handles";
Low-level operations for curves.
#define GEO_NODE_INPUT_CURVE_HANDLES
#define NOD_REGISTER_NODE(REGISTER_FUNC)
T get_internal_single() const
static VArray from_container(ContainerT container)
GAttributeReader lookup_or_default(StringRef name, AttrDomain domain, AttrType data_type, const void *default_value=nullptr) const
GVArray adapt_domain(const GVArray &varray, const AttrDomain from_domain, const AttrDomain to_domain) const
int add(GField field, GVArray *varray_ptr)
const GVArray & get_evaluated(const int field_index) const
static Field from_input(Args &&...args)
T extract_input(const UString identifier)
void set_output(const UString identifier, T &&value)
StructureType structure_type
void node_register_type(bNodeType &ntype)
VecBase< float, 3 > float3
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
static constexpr int _160
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare