16 b.use_custom_socket_order();
17 b.allow_any_socket_order();
19 .supported_type({GeometryComponent::Type::Curve, GeometryComponent::Type::GreasePencil})
20 .description(
"Curves to set the radius on");
21 b.add_output<
decl::Geometry>(
"Curve").propagate_all().align_with_previous();
53 set_radius(curves, field_context, selection, radius);
57 for (
const int layer_index : grease_pencil->layers().index_range()) {
58 Drawing *drawing = grease_pencil->get_eval_drawing(grease_pencil->layer(layer_index));
59 if (drawing ==
nullptr) {
71 params.set_output(
"Curve", std::move(geometry_set));
79 ntype.
ui_name =
"Set Curve Radius";
80 ntype.
ui_description =
"Set the radius of the curve at each control point";
Low-level operations for curves.
Low-level operations for grease pencil.
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_SET_CURVE_RADIUS
#define NOD_REGISTER_NODE(REGISTER_FUNC)
MutableAttributeAccessor attributes_for_write()
bke::CurvesGeometry & strokes_for_write()
void node_register_type(bNodeType &ntype)
bool try_capture_field_on_geometry(MutableAttributeAccessor attributes, const fn::FieldContext &field_context, const StringRef attribute_id, AttrDomain domain, const fn::Field< bool > &selection, const fn::GField &field)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
static void node_declare(NodeDeclarationBuilder &b)
static void set_radius(bke::CurvesGeometry &curves, const fn::FieldContext &field_context, const Field< bool > &selection, const Field< float > &radius)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
void geo_node_type_base(blender::bke::bNodeType *ntype, std::string idname, const std::optional< int16_t > legacy_type)
Curves * get_curves_for_write()
GreasePencil * get_grease_pencil_for_write()
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
const char * enum_name_legacy
NodeDeclareFunction declare