22 b.use_custom_socket_order();
23 b.allow_any_socket_order();
24 b.add_default_layout();
26 .supported_type(GeometryComponent::Type::Curve)
27 .description(
"Curves to set handles of control points on");
28 b.add_output<
decl::Geometry>(
"Curve").propagate_all().align_with_previous();
103 std::atomic<bool> has_curves =
false;
104 std::atomic<bool> has_bezier =
false;
111 if (!attributes.
contains(
"handle_type_left") || !attributes.
contains(
"handle_type_right")) {
120 if (has_curves && !has_bezier) {
124 params.set_output(
"Curve", std::move(geometry_set));
131 ntype.
ui_name =
"Set Handle Type";
132 ntype.
ui_description =
"Set the handle type for the control points of a Bézier curve";
139 "NodeGeometryCurveSetHandles",
Low-level operations for curves.
#define NODE_STORAGE_FUNCS(StorageT)
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_CURVE_SET_HANDLE_TYPE
#define BLI_assert_unreachable()
GeometryNodeCurveHandleMode
@ GEO_NODE_CURVE_HANDLE_RIGHT
@ GEO_NODE_CURVE_HANDLE_LEFT
GeometryNodeCurveHandleType
@ GEO_NODE_CURVE_HANDLE_ALIGN
@ GEO_NODE_CURVE_HANDLE_AUTO
@ GEO_NODE_CURVE_HANDLE_FREE
@ GEO_NODE_CURVE_HANDLE_VECTOR
#define NOD_REGISTER_NODE(REGISTER_FUNC)
BMesh const char void * data
bool contains(StringRef attribute_id) const
MutableSpan< int8_t > handle_types_right_for_write()
void tag_topology_changed()
AttributeAccessor attributes() const
void calculate_bezier_auto_handles()
MutableSpan< int8_t > handle_types_left_for_write()
void set_selection(Field< bool > selection)
IndexMask get_evaluated_selection_as_mask() const
void * MEM_callocN(size_t len, const char *str)
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 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_layout(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_init(bNodeTree *, bNode *node)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
void node_free_standard_storage(bNode *node)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
Curves * get_curves_for_write()
std::string ui_description
void(* initfunc)(bNodeTree *ntree, bNode *node)
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
NodeDeclareFunction declare
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)