16 b.use_custom_socket_order();
17 b.allow_any_socket_order();
19 .supported_type(GeometryComponent::Type::GreasePencil)
20 .align_with_previous()
21 .
description(
"Grease Pencil to set the softness of");
22 b.add_output<
decl::Geometry>(
"Grease Pencil").propagate_all().align_with_previous();
24 b.add_input<
decl::Float>(
"Softness").default_value(0.0f).min(0.0f).max(1.0f).field_on_all();
36 for (
const int layer_index : grease_pencil->layers().index_range()) {
37 Drawing *drawing = grease_pencil->get_eval_drawing(grease_pencil->layer(layer_index));
38 if (drawing ==
nullptr) {
44 *grease_pencil, AttrDomain::Curve, layer_index);
56 params.set_output(
"Grease Pencil", std::move(geometry_set));
64 ntype.
ui_name =
"Set Grease Pencil Softness";
65 ntype.
ui_description =
"Set softness attribute on Grease Pencil geometry";
Low-level operations for curves.
Low-level operations for grease pencil.
#define NODE_CLASS_GEOMETRY
constexpr int NODE_DEFAULT_MAX_WIDTH
#define NOD_REGISTER_NODE(REGISTER_FUNC)
MutableAttributeAccessor attributes_for_write()
bke::CurvesGeometry & strokes_for_write()
void node_type_size(bNodeType &ntype, int width, int minwidth, int maxwidth)
void node_register_type(bNodeType &ntype)
bool try_capture_fields_on_geometry(MutableAttributeAccessor attributes, const fn::FieldContext &field_context, Span< StringRef > attribute_ids, AttrDomain domain, const fn::Field< bool > &selection, Span< fn::GField > fields)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
static void node_geo_exec(GeoNodeExecParams params)
static void node_register()
static void node_declare(NodeDeclarationBuilder &b)
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
NodeDeclareFunction declare