26 static const auto fn = mf::build::SI2_SO<float3, float3, float3>(
29 mf::build::exec_presets::AllSpanOrSingle());
35 static const auto fn = mf::build::SI2_SO<float3, float3, float3>(
38 mf::build::exec_presets::AllSpanOrSingle());
61 if (attributes.contains(
"handle_right") && attributes.contains(
"handle_left")) {
64 for (
const StringRef name : {
"handle_left",
"handle_right"}) {
76 curves.calculate_bezier_auto_handles();
84 for (
const int layer_index : grease_pencil.layers().index_range()) {
85 Drawing *drawing = grease_pencil.get_eval_drawing(grease_pencil.layer(layer_index));
117 [&](
const int i) { transforms[i].location() = result[i]; });
129 if (
Mesh *mesh = geometry.get_mesh_for_write()) {
135 if (
PointCloud *point_cloud = geometry.get_pointcloud_for_write()) {
141 if (
Curves *curves_id = geometry.get_curves_for_write()) {
148 if (
GreasePencil *grease_pencil = geometry.get_grease_pencil_for_write()) {
151 if (
bke::Instances *instances = geometry.get_instances_for_write()) {
155 params.set_output(
"Geometry", std::move(geometry));
Low-level operations for curves.
Low-level operations for grease pencil.
#define NODE_CLASS_GEOMETRY
General operations for point clouds.
#define NOD_REGISTER_NODE(REGISTER_FUNC)
bke::CurvesGeometry & strokes_for_write()
const bke::CurvesGeometry & strokes() const
void tag_positions_changed()
void set_selection(Field< bool > selection)
IndexMask get_evaluated_selection_as_mask() const
int add_with_destination(GField field, GVMutableArray dst)
static std::shared_ptr< FieldOperation > Create(std::shared_ptr< const mf::MultiFunction > function, Vector< GField > inputs={})
local_group_size(16, 16) .push_constant(Type b
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 node_register_type(bNodeType *ntype)
static void set_position_in_grease_pencil(GreasePencil &grease_pencil, const Field< bool > &selection_field, const Field< float3 > &position_field)
static void node_geo_exec(GeoNodeExecParams params)
static const auto & get_add_fn()
static void node_declare(NodeDeclarationBuilder &b)
static void set_curves_position(bke::CurvesGeometry &curves, const fn::FieldContext &field_context, const Field< bool > &selection_field, const Field< float3 > &position_field)
static void node_register()
static void set_instances_position(bke::Instances &instances, const Field< bool > &selection_field, const Field< float3 > &position_field)
static const auto & get_sub_fn()
static void set_points_position(bke::MutableAttributeAccessor attributes, const fn::FieldContext &field_context, const Field< bool > &selection_field, const Field< float3 > &position_field)
void geo_node_type_base(blender::bke::bNodeType *ntype, int type, const char *name, short nclass)
NodeGeometryExecFunction geometry_node_execute
NodeDeclareFunction declare