39 b.add_input<
decl::Geometry>(
"Geometry"_ustr).description(
"Geometry to duplicate elements of");
43 .evaluated_geometry_field();
47 .evaluated_geometry_field()
48 .description(
"The number of duplicates to create for each element")
52 .propagate_all_geometry()
53 .
description(
"The duplicated geometry, not including the original geometry");
54 b.add_output<
decl::Int>(
"Duplicate Index"_ustr)
55 .anonymous_attribute_output()
56 .
description(
"The indices of the duplicates for each element");
84 if (
const std::optional<int> count = counts.
get_if_single()) {
110 for (const int i : range) {
111 MutableSpan<int> dst = all_dst.slice(offsets[i]);
112 if (dst.is_empty()) {
115 dst.first() = src[i];
116 for (const int i_duplicate : dst.index_range().drop_front(1)) {
117 dst[i_duplicate] = noise::hash(src[i], i_duplicate);
135 duplicate_indices.
finish();
147 if (!src_attribute) {
150 if (!
ELEM(src_attribute.
domain, AttrDomain::Point, AttrDomain::Instance)) {
157 "id", AttrDomain::Point);
158 if (!dst_attribute) {
190 {bke::AttrDomain::Point, bke::AttrDomain::Curve},
194 case AttrDomain::Curve:
198 case AttrDomain::Point:
200 const Span<T> src = attribute.src.typed<T>();
201 MutableSpan<T> dst = attribute.dst.span.typed<T>();
202 selection.foreach_index(
203 [&](const int64_t index, const int64_t i_selection) {
204 const Span<T> curve_src = src.slice(src_points_by_curve[index]);
205 for (const int dst_curve_index : curve_offsets[i_selection]) {
206 dst.slice(dst_points_by_curve[dst_curve_index]).copy_from(curve_src);
232 if (!src_attribute) {
235 if (src_attribute.
domain != AttrDomain::Point) {
245 if (!dst_attribute) {
257 const Span<int> curve_src = src.
slice(src_points_by_curve[i_src_curve]);
258 const IndexRange duplicates_range = offsets[i_selection];
261 const int i_dst_curve = duplicates_range[i_duplicate];
278 evaluator.
add(count_field);
287 Array<int> curve_offset_data(selection.size() + 1);
288 Array<int> point_offset_data(selection.size() + 1);
290 int dst_curves_num = 0;
291 int dst_points_num = 0;
293 selection.foreach_index_optimized<
int>([&](
const int index,
const int i_curve) {
294 const int count = counts[
index];
295 curve_offset_data[i_curve] = dst_curves_num;
296 point_offset_data[i_curve] = dst_points_num;
297 dst_curves_num += count;
298 dst_points_num += count * points_by_curve[
index].
size();
301 if (dst_points_num == 0) {
305 curve_offset_data.
last() = dst_curves_num;
306 point_offset_data.
last() = dst_points_num;
313 selection.foreach_index(
315 const IndexRange src_curve_range = points_by_curve[i_src_curve];
316 const IndexRange dst_curves_range = curve_offsets[i_selection];
318 for (
const int i_duplicate :
IndexRange(dst_curves_range.
size())) {
319 dst_offsets[i_duplicate] = point_offsets[i_selection].start() +
320 src_curve_range.
size() * i_duplicate;
324 all_dst_offsets.
last() = dst_points_num;
367 for (const int layer_i : layers_range) {
368 Layer &layer = grease_pencil->layer(layer_i);
369 Drawing *drawing = grease_pencil->get_eval_drawing(layer);
373 bke::CurvesGeometry &curves = drawing->strokes_for_write();
374 const bke::GreasePencilLayerFieldContext field_context{
375 *grease_pencil, AttrDomain::Curve, layer_i};
376 curves = duplicate_curves_CurveGeometry(curves,
382 drawing->tag_topology_changed();
415 attribute_filter, {
"id",
".corner_vert",
".corner_edge",
".edge_verts"})))
418 case AttrDomain::Point:
421 case AttrDomain::Edge:
424 case AttrDomain::Face:
428 case AttrDomain::Corner:
454 if (!src_attribute) {
457 if (src_attribute.
domain != AttrDomain::Point) {
464 "id", AttrDomain::Point);
465 if (!dst_attribute) {
475 const IndexRange range = face_offsets[i_face];
480 for ([[maybe_unused]]
const int i_duplicate :
IndexRange(range.
size())) {
481 for ([[maybe_unused]]
const int i_loops :
IndexRange(source.
size())) {
482 if (i_duplicate == 0) {
483 dst[loop_index] = src[vert_mapping[loop_index]];
486 dst[loop_index] =
noise::hash(src[vert_mapping[loop_index]], i_duplicate);
503 geometry_set.
clear();
515 evaluator.
add(count_field);
525 const int count = counts[
index];
526 offset_data[i_selection] = total_faces;
527 total_faces += count;
528 total_loops += count * faces[
index].
size();
530 offset_data[selection.
size()] = total_faces;
551 new_face_offsets[face_index] = loop_index;
552 for (
const int src_corner : source) {
553 loop_mapping[loop_index] = src_corner;
554 vert_mapping[loop_index] = corner_verts[src_corner];
555 edge_mapping[loop_index] = corner_edges[src_corner];
556 new_edges[loop_index][0] = loop_index;
557 if (src_corner != source.last()) {
558 new_edges[loop_index][1] = loop_index + 1;
561 new_edges[loop_index][1] = new_face_offsets[face_index];
571 new_mesh->tag_loose_verts_none();
572 new_mesh->tag_loose_edges_none();
573 new_mesh->tag_overlapping_none();
582 new_mesh->attributes_for_write());
616 new_mesh->attributes_for_write());
653 case AttrDomain::Edge:
657 case AttrDomain::Point:
742 if (!src_attribute) {
745 if (src_attribute.
domain != AttrDomain::Point) {
752 "id", AttrDomain::Point);
753 if (!dst_attribute) {
763 const IndexRange edge_range = offsets[i_selection];
770 dst[vert_range[0]] = src[edge[0]];
771 dst[vert_range[1]] = src[edge[1]];
772 for (
const int i_duplicate :
IndexRange(1, edge_range.
size() - 1)) {
773 dst[vert_range[i_duplicate * 2]] =
noise::hash(src[edge[0]], i_duplicate);
774 dst[vert_range[i_duplicate * 2 + 1]] =
noise::hash(src[edge[1]], i_duplicate);
788 geometry_set.
clear();
796 evaluator.
add(count_field);
804 selection, counts, offset_data);
805 const int output_edges_num = duplicates.
total_size();
811 Array<int> vert_orig_indices(output_edges_num * 2);
812 selection.foreach_index(
815 const IndexRange edge_range = duplicates[i_selection];
819 vert_orig_indices[vert_range[i_duplicate * 2]] = edge[0];
820 vert_orig_indices[vert_range[i_duplicate * 2 + 1]] = edge[1];
826 for (const int i_selection : range) {
827 const IndexRange edge_range = duplicates[i_selection];
828 const IndexRange vert_range(edge_range.start() * 2, edge_range.size() * 2);
829 for (const int i_duplicate : IndexRange(edge_range.size())) {
830 int2 &new_edge = new_edges[edge_range[i_duplicate]];
831 new_edge[0] = vert_range[i_duplicate * 2];
832 new_edge[1] = vert_range[i_duplicate * 2] + 1;
837 copy_edge_attributes_without_id(vert_orig_indices,
842 new_mesh->attributes_for_write());
844 copy_attributes_from_other_domains(
mesh.attributes(),
846 {AttrDomain::Point, AttrDomain::Edge},
850 new_mesh->attributes_for_write());
857 new_mesh->verts_num);
866 new_mesh->edges_num);
870 copy_stable_id_edges(
871 mesh, selection, duplicates, mesh.attributes(), new_mesh->attributes_for_write());
873 if (attribute_outputs.duplicate_index) {
874 create_duplicate_index_attribute(new_mesh->attributes_for_write(),
881 new_mesh->tag_overlapping_none();
883 geometry_set.replace_mesh(new_mesh);
905 evaluator.
add(count_field);
913 selection, counts, offset_data);
932 {bke::AttrDomain::Curve},
936 const Span<T> src = attribute.src.typed<T>();
937 MutableSpan<T> dst = attribute.dst.span.typed<T>();
938 selection.foreach_index(
939 [&](const int64_t index, const int64_t i_selection) {
940 const T &src_value = src[point_to_curve_map[index]];
941 dst.slice(duplicates[i_selection]).fill(src_value);
948 copy_stable_id_point(duplicates, src_curves.attributes(), new_curves.attributes_for_write());
950 if (attribute_outputs.duplicate_index) {
951 create_duplicate_index_attribute(new_curves.attributes_for_write(),
999 for (const int layer_i : layers_range) {
1000 Layer &layer = grease_pencil.layer(layer_i);
1001 Drawing *drawing = grease_pencil.get_eval_drawing(layer);
1005 bke::CurvesGeometry &curves = drawing->strokes_for_write();
1006 const bke::GreasePencilLayerFieldContext field_context{
1007 grease_pencil, AttrDomain::Point, layer_i};
1008 curves = duplicate_points_CurvesGeometry(curves,
1014 drawing->tag_topology_changed();
1035 evaluator.
add(count_field);
1043 selection, counts, offset_data);
1054 new_mesh->attributes_for_write());
1058 {AttrDomain::Point},
1062 new_mesh->attributes_for_write());
1083 new_mesh->tag_overlapping_none();
1104 evaluator.
add(count_field);
1112 selection, counts, offset_data);
1122 pointcloud->attributes_for_write());
1151 switch (component_type) {
1155 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1161 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1167 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1173 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1182 geometry_set.
keep_only(component_types);
1199 geometry_set.
clear();
1207 FieldEvaluator evaluator{field_context, src_grease_pencil.layers().size()};
1208 evaluator.
add(count_field);
1216 selection, counts, offset_data);
1217 const int new_layers_num = duplicates.
total_size();
1218 if (new_layers_num == 0) {
1219 geometry_set.
clear();
1226 new_grease_pencil->add_layers_with_empty_drawings_for_eval(new_layers_num);
1228 selection.
foreach_index([&](
const int src_layer_i,
const int pos) {
1233 const Layer &src_layer = src_grease_pencil.layer(src_layer_i);
1234 const Drawing *src_drawing = src_grease_pencil.get_eval_drawing(src_layer);
1236 static_empty_curves;
1238 for (
Layer *new_layer : new_grease_pencil->layers_for_write().slice(range)) {
1240 new_layer->set_name(src_layer_name);
1241 Drawing *new_drawing = new_grease_pencil->get_eval_drawing(*new_layer);
1252 new_grease_pencil->attributes_for_write());
1278 geometry_set.
clear();
1286 evaluator.
add(count_field);
1294 selection, counts, offset_data);
1296 geometry_set.
clear();
1303 auto dst_instances = std::make_unique<bke::Instances>(duplicates.
total_size());
1306 selection.
foreach_index([&](
const int i_src,
const int i_dst) {
1311 const int old_handle = src_handles[i_src];
1313 const int new_handle = dst_instances->add_reference(reference);
1319 AttrDomain::Instance,
1320 AttrDomain::Instance,
1324 dst_instances->attributes_for_write());
1328 AttrDomain::Instance,
1357 "Duplicate Index"_ustr);
1361 if (duplicate_domain == AttrDomain::Instance) {
1363 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1367 switch (duplicate_domain) {
1368 case AttrDomain::Curve:
1370 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1372 case AttrDomain::Face:
1374 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1376 case AttrDomain::Edge:
1378 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1380 case AttrDomain::Point:
1382 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1384 case AttrDomain::Layer:
1386 geometry_set, count_field, selection_field, attribute_outputs, attribute_filter);
1400 params.
set_output(
"Geometry"_ustr, std::move(geometry_set));
1408 {int(AttrDomain::Point),
"POINT", 0,
"Point",
""},
1409 {int(AttrDomain::Edge),
"EDGE", 0,
"Edge",
""},
1410 {int(AttrDomain::Face),
"FACE", 0,
"Face",
""},
1411 {int(AttrDomain::Curve),
"SPLINE", 0,
"Spline",
""},
1412 {int(AttrDomain::Layer),
"LAYER", 0,
"Layer",
""},
1413 {int(AttrDomain::Instance),
"INSTANCE", 0,
"Instance",
""},
1414 {0,
nullptr, 0,
nullptr,
nullptr},
1420 "Which domain to duplicate",
1423 int(AttrDomain::Point),
1432 ntype.
ui_name =
"Duplicate Elements";
1433 ntype.
ui_description =
"Generate an arbitrary number copies of each selected input element";
1437 "NodeGeometryDuplicateElements",
Low-level operations for curves.
CustomData interface, see also DNA_customdata_types.h.
Low-level operations for grease pencil.
#define NODE_CLASS_GEOMETRY
#define GEO_NODE_DUPLICATE_ELEMENTS
General operations for point clouds.
#define BLT_I18NCONTEXT_COUNTABLE
#define NOD_REGISTER_NODE(REGISTER_FUNC)
#define NOD_storage_enum_accessors(member)
#define BLI_assert_unreachable()
Span< T > as_span() const
MutableSpan< T > as_mutable_span()
const T & last(const int64_t n=0) const
void reinitialize(const int64_t new_size)
CommonVArrayInfo common_info() const
const CPPType & type() const
VArray< T > typed() const
constexpr int64_t first() const
constexpr int64_t size() const
constexpr bool is_empty() const
constexpr int64_t start() const
constexpr IndexRange index_range() const
constexpr IndexRange drop_front(int64_t n) const
constexpr int64_t size() const
constexpr MutableSpan slice(const int64_t start, const int64_t size) const
constexpr void fill(const T &value) const
constexpr void copy_from(Span< T > values) const
constexpr T & last(const int64_t n=0) const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr bool contains(const T &value) const
std::optional< T > get_if_single() const
void append(const T &value)
void foreach_attribute(const FunctionRef< void(const AttributeIter &)> fn) const
bool contains(StringRef name) const
GAttributeReader lookup(const StringRef name) const
GAttributeReader get() const
void update_curve_types()
AttributeAccessor attributes() const
MutableSpan< int > offsets_for_write()
OffsetIndices< int > points_by_curve() const
Array< int > point_to_curve_map() const
MutableAttributeAccessor attributes_for_write()
Span< int > reference_handles() const
Span< InstanceReference > references() const
bke::AttributeAccessor attributes() const
int instances_num() const
bool add(const StringRef name, const AttrDomain domain, const AttrType data_type, const AttributeInit &initializer)
GSpanAttributeWriter lookup_or_add_for_write_only_span(StringRef name, AttrDomain domain, AttrType data_type)
bke::CurvesGeometry & strokes_for_write()
const bke::CurvesGeometry & strokes() const
constexpr Span slice(int64_t start, int64_t size) const
void set_selection(Field< bool > selection)
int add(GField field, GVArray *varray_ptr)
IndexMask get_evaluated_selection_as_mask() const
const GVArray & get_evaluated(const int field_index) const
void foreach_index_optimized(Fn &&fn, Mode mode=exec_mode::serial) const
IndexRange index_range() const
void foreach_index(Fn &&fn, Mode mode=exec_mode::serial) const
static FieldOperationPtr from(std::shared_ptr< const mf::MultiFunction > fn, Vector< GField > inputs)
NodeAttributeFilter get_attribute_filter(const UString output_identifier) const
std::optional< std::string > get_output_anonymous_attribute_id_if_needed(const UString output_identifier, const bool force_create=false)
T extract_input(const UString identifier)
const bNode & node() const
void set_default_remaining_outputs()
void set_output(const UString identifier, T &&value)
static void remember_deformed_positions_if_necessary(GeometrySet &geometry)
IndexRange index_range() const
#define storage(slot, qualifiers)
void gather(const GVArray &src, const IndexMask &indices, GMutableSpan dst, exec_mode::Mode mode=exec_mode::parallel)
void gather_to_groups(const OffsetIndices< int > dst_offsets, const IndexMask &src_selection, const Span< T > src, MutableSpan< T > dst)
void fill_index_range(MutableSpan< T > span, const T start=0)
void gather(GSpan src, Span< int > map, GMutableSpan dst)
void gather_to_groups(OffsetIndices< int > dst_offsets, const IndexMask &src_selection, GSpan src, GMutableSpan dst)
void to_static_type(const CPPType &cpp_type, Fn &&fn)
IndexRange face_range(const OffsetIndices< int > faces, const int grid_area, const int face)
bool is_uv_map(const AttributeMetaData &meta_data)
auto attribute_filter_with_skip_ref(const AttributeFilter &filter, const Span< StringRef > skip)
void curves_copy_parameters(const Curves &src, Curves &dst)
void gather_attributes_to_groups(AttributeAccessor src_attributes, AttrDomain src_domain, AttrDomain dst_domain, const AttributeFilter &attribute_filter, OffsetIndices< int > dst_offsets, const IndexMask &src_selection, MutableAttributeAccessor dst_attributes)
void node_register_type(bNodeType &ntype)
Vector< AttributeTransferData > retrieve_attributes_for_transfer(const AttributeAccessor src_attributes, MutableAttributeAccessor dst_attributes, Span< AttrDomain > domains, const AttributeFilter &attribute_filter={})
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))
Curves * curves_new_nomain(int points_num, int curves_num)
constexpr ParallelGrainSize grain_size(int grain_size)
const MultiFunction & lookup(UString id)
void foreach_real_geometry(bke::GeometrySet &geometry, FunctionRef< void(bke::GeometrySet &geometry_set)> fn)
NODE_STORAGE_FUNCS(NodeGeometryDuplicateElements)
static void copy_stable_id_curves(const bke::CurvesGeometry &src_curves, const IndexMask &selection, const OffsetIndices< int > offsets, bke::CurvesGeometry &dst_curves)
static void duplicate_points_grease_pencil(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void duplicate_points_pointcloud(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void duplicate_faces(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static OffsetIndices< int > accumulate_counts_to_offsets(const IndexMask &selection, const VArray< int > &counts, Array< int > &r_offset_data)
static void node_rna(StructRNA *srna)
static void node_init(bNodeTree *, bNode *node)
static void copy_edge_attributes_without_id(const Span< int > point_mapping, const OffsetIndices< int > offsets, const IndexMask &selection, const AttributeFilter &attribute_filter, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes)
static void node_layout(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void duplicate_instances(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static bke::CurvesGeometry duplicate_curves_CurveGeometry(const bke::CurvesGeometry &curves, const FieldContext &field_context, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void copy_stable_id_faces(const Mesh &mesh, const IndexMask &selection, const OffsetIndices< int > face_offsets, const Span< int > vert_mapping, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes)
static void copy_hashed_ids(const Span< int > src, const int hash, MutableSpan< int > dst)
static void duplicate_layers(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void duplicate_curves(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void copy_stable_id_edges(const Mesh &mesh, const IndexMask &selection, const OffsetIndices< int > offsets, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes)
static void copy_face_attributes_without_id(const Span< int > edge_mapping, const Span< int > vert_mapping, const Span< int > loop_mapping, const OffsetIndices< int > offsets, const IndexMask &selection, const AttributeFilter &attribute_filter, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes)
static void node_declare(NodeDeclarationBuilder &b)
static void duplicate_points_curve(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static bke::CurvesGeometry duplicate_points_CurvesGeometry(const bke::CurvesGeometry &src_curves, const FieldContext &field_context, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void copy_attributes_from_other_domains(const bke::AttributeAccessor src_attributes, const AttrDomain domain, const Span< AttrDomain > copied_domains, const OffsetIndices< int > offsets, const IndexMask &selection, const AttributeFilter &attribute_filter, bke::MutableAttributeAccessor dst_attributes)
static void duplicate_points_mesh(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void copy_curve_attributes_without_id(const bke::CurvesGeometry &src_curves, const IndexMask &selection, const OffsetIndices< int > curve_offsets, const AttributeFilter &attribute_filter, bke::CurvesGeometry &dst_curves)
static void node_geo_exec(GeoNodeExecParams params)
static void create_duplicate_index_attribute(bke::MutableAttributeAccessor attributes, const AttrDomain output_domain, const IndexMask &selection, const IndexAttributes &attribute_outputs, const OffsetIndices< int > offsets)
static void duplicate_edges(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void threaded_id_offset_copy(const OffsetIndices< int > offsets, const Span< int > src, MutableSpan< int > all_dst)
static void copy_stable_id_point(const OffsetIndices< int > offsets, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes)
static void duplicate_points(GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter)
static void node_register()
PropertyRNA * RNA_def_node_enum(StructRNA *srna, const char *identifier, const char *ui_name, const char *ui_description, const EnumPropertyItem *static_items, const EnumRNAAccessors accessors, std::optional< int > default_value, const EnumPropertyItemFunc item_func, const bool allow_animation)
uint32_t hash(uint32_t kx)
OffsetIndices< int > accumulate_counts_to_offsets(MutableSpan< int > counts_to_offsets, int start_offset=0)
void fill_constant_group_size(int size, int start_offset, MutableSpan< int > offsets)
void parallel_for(const IndexRange range, const int64_t grain_size, const Function &function, const TaskSizeHints &size_hints=detail::TaskSizeHints_Static(1))
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
bool CustomData_has_layer(const CustomData *data, eCustomDataType type)
void BKE_grease_pencil_copy_layer_parameters(const bke::greasepencil::Layer &src, bke::greasepencil::Layer &dst)
void BKE_mesh_copy_parameters_for_eval(Mesh *me_dst, const Mesh *me_src)
VecBase< int32_t, 2 > int2
BMesh const char void * data
void BKE_grease_pencil_copy_parameters(const GreasePencil &src, GreasePencil &dst)
Mesh * BKE_mesh_new_nomain(int verts_num, int edges_num, int faces_num, int corners_num)
const void * CustomData_get_layer(const CustomData *data, eCustomDataType type)
void node_copy_standard_storage(bNodeTree *, bNode *dest_node, const bNode *src_node)
PointCloud * BKE_pointcloud_new_nomain(PointCloudType type, int totpoint)
void node_free_standard_storage(bNode *node)
void geo_node_type_base(bke::bNodeType *ntype, UString idname, const std::optional< int16_t > legacy_type)
GreasePencil * BKE_grease_pencil_new_nomain()
void * CustomData_add_layer(CustomData *data, eCustomDataType type, eCDAllocType alloctype, int totelem)
bool allow_skip(const StringRef name) const
void keep_only(Span< GeometryComponent::Type > component_types)
const GreasePencil * get_grease_pencil() const
bool has_pointcloud() const
void replace_pointcloud(PointCloud *pointcloud, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const Curves * get_curves() const
const Instances * get_instances() const
bool has_grease_pencil() const
bool has_instances() const
void replace_curves(Curves *curves, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
const PointCloud * get_pointcloud() const
const Mesh * get_mesh() const
void replace_mesh(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
GreasePencil * get_grease_pencil_for_write()
Vector< GeometryComponent::Type > gather_component_types(bool include_instances, bool ignore_empty) const
void replace_grease_pencil(GreasePencil *grease_pencil, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
MutableVArraySpan< T > span
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
std::string ui_description
NodeGeometryExecFunction geometry_node_execute
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
NodeDeclareFunction declare
static GeometrySet from_instances(std::unique_ptr< Instances > instances)
std::optional< std::string > duplicate_index
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)