22 b.use_custom_socket_order();
23 b.allow_any_socket_order();
24 b.add_default_layout();
27 .description(
"Curves to set handles of control points on");
28 b.add_output<
decl::Geometry>(
"Curve"_ustr).propagate_all_geometry().align_with_previous();
32 .evaluated_geometry_field();
80 curves.handle_types_left_for_write(), new_handle_type, selection);
84 curves.handle_types_right_for_write(), new_handle_type, selection);
87 curves.tag_topology_changed();
91 curves.calculate_bezier_auto_handles();
106 std::atomic<bool> has_curves =
false;
107 std::atomic<bool> has_bezier =
false;
114 if (!attributes.
contains(
"handle_type_left") || !attributes.
contains(
"handle_type_right")) {
123 if (has_curves && !has_bezier) {
127 params.
set_output(
"Curve"_ustr, std::move(geometry_set));
134 ntype.
ui_name =
"Set Handle Type";
135 ntype.
ui_description =
"Set the handle type for the control points of a Bézier curve";
142 "NodeGeometryCurveSetHandles",
Low-level operations for curves.
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_CURVE_SET_HANDLE_TYPE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define BLI_assert_unreachable()
bool contains(StringRef name) const
void set_selection(Field< bool > selection)
IndexMask get_evaluated_selection_as_mask() const
void error_message_add(const NodeWarningType type, StringRef message) const
T extract_input(const UString identifier)
const bNode & node() const
void set_output(const UString identifier, T &&value)
#define storage(slot, qualifiers)
void node_register_type(bNodeType &ntype)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
void masked_fill(MutableSpan< T > data, const T &value, const IndexMask &mask)
static void node_geo_exec(GeoNodeExecParams params)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void set_handle_type(Curves &curves_id, const GeometryNodeCurveHandleMode mode, const HandleType new_handle_type, const Field< bool > &selection_field)
static HandleType handle_type_from_input_type(GeometryNodeCurveHandleType type)
static void node_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
GeometryNodeCurveHandleType
@ GEO_NODE_CURVE_HANDLE_FREE
@ GEO_NODE_CURVE_HANDLE_AUTO
@ GEO_NODE_CURVE_HANDLE_VECTOR
@ GEO_NODE_CURVE_HANDLE_ALIGN
BMesh const char void * data
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
void node_free_standard_storage(bNode *node)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
GeometryNodeCurveHandleMode
@ GEO_NODE_CURVE_HANDLE_LEFT
@ GEO_NODE_CURVE_HANDLE_RIGHT
Curves * get_curves_for_write()
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)