16 b.use_custom_socket_order();
17 b.allow_any_socket_order();
20 .description(
"Curves to switch the start and end of");
21 b.add_output<
decl::Geometry>(
"Curve"_ustr).propagate_all_geometry().align_with_previous();
25 .evaluated_geometry_field();
33 selection_evaluator.
add(selection_field);
39 curves.reverse_curves(selection);
45 for (
const int layer_index :
grease_pencil.layers().index_range()) {
47 if (drawing ==
nullptr) {
76 params.
set_output(
"Curve"_ustr, std::move(geometry_set));
83 ntype.
ui_name =
"Reverse Curve";
84 ntype.
ui_description =
"Change the direction of curves by swapping their start and end data";
Low-level operations for curves.
Low-level operations for grease pencil.
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_REVERSE_CURVE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
bke::CurvesGeometry & strokes_for_write()
void tag_topology_changed()
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_as_mask(int field_index)
T extract_input(const UString identifier)
void set_output(const UString identifier, T &&value)
static void remember_deformed_positions_if_necessary(GeometrySet &geometry)
void node_register_type(bNodeType &ntype)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
static void node_declare(NodeDeclarationBuilder &b)
static void node_register()
static void reverse_grease_pencil(GreasePencil &grease_pencil, const Field< bool > &selection_field)
static void node_geo_exec(GeoNodeExecParams params)
static void reverse_curve(bke::CurvesGeometry &curves, const fn::FieldContext &field_context, const Field< bool > &selection_field)
void geo_node_type_base(bke::bNodeType *ntype, UString 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