17 "Output the handle positions relative to the corresponding control point "
18 "instead of in the local space of the geometry");
19 b.add_output<
decl::Vector>(
"Left").field_source_reference_all();
20 b.add_output<
decl::Vector>(
"Right").field_source_reference_all();
45 evaluator.
add(relative_);
52 StringRef side = left_ ?
"handle_left" :
"handle_right";
54 side, AttrDomain::Point, {0, 0, 0});
59 for (
const int i : positions.index_range()) {
69 for (
const int i : positions.index_range()) {
83 relative_.node().for_each_field_input_recursive(
fn);
96 return relative_ == other_handle->relative_ && left_ == other_handle->left_;
104 return AttrDomain::Point;
111 Field<float3> left_field{std::make_shared<HandlePositionFieldInput>(relative,
true)};
112 Field<float3> right_field{std::make_shared<HandlePositionFieldInput>(relative,
false)};
114 params.set_output(
"Left", std::move(left_field));
115 params.set_output(
"Right", std::move(right_field));
123 ntype.
ui_name =
"Curve Handle Positions";
124 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)
unsigned long long int uint64_t
T get_internal_single() const
static VArray from_container(ContainerT container)
GAttributeReader lookup_or_default(StringRef attribute_id, 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
Span< float3 > positions() const
AttributeAccessor attributes() const
int add(GField field, GVArray *varray_ptr)
const GVArray & get_evaluated(const int field_index) const
ccl_device_inline float2 mask(const MaskType mask, const float2 a)
void node_register_type(bNodeType &ntype)
void node_type_size_preset(bNodeType &ntype, eNodeSizePreset size)
uint64_t get_default_hash(const T &v, const Args &...args)
VecBase< float, 3 > float3
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