|
Blender V4.3
|
Classes | |
| struct | IndexAttributes |
Functions | |
| NODE_STORAGE_FUNCS (NodeGeometryDuplicateElements) | |
| static void | node_declare (NodeDeclarationBuilder &b) |
| static void | node_init (bNodeTree *, bNode *node) |
| static void | node_layout (uiLayout *layout, bContext *, PointerRNA *ptr) |
| static void | node_rna (StructRNA *srna) |
| static void | node_register () |
Utility Functions | |
| static OffsetIndices< int > | accumulate_counts_to_offsets (const IndexMask &selection, const VArray< int > &counts, Array< int > &r_offset_data) |
| static void | copy_hashed_ids (const Span< int > src, const int hash, MutableSpan< int > dst) |
| static void | threaded_id_offset_copy (const OffsetIndices< int > offsets, const Span< int > src, MutableSpan< int > all_dst) |
| 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 | copy_stable_id_point (const OffsetIndices< int > offsets, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes) |
Duplicate Curves | |
| 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 | copy_stable_id_curves (const bke::CurvesGeometry &src_curves, const IndexMask &selection, const OffsetIndices< int > offsets, bke::CurvesGeometry &dst_curves) |
| 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 | duplicate_curves (GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter) |
Duplicate Faces | |
| 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 | 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 | duplicate_faces (GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter) |
Duplicate Edges | |
| 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 | 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 | duplicate_edges (GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter) |
Duplicate Points (Curves) | |
| 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 | duplicate_points_curve (GeometrySet &geometry_set, const Field< int > &count_field, const Field< bool > &selection_field, const IndexAttributes &attribute_outputs, const AttributeFilter &attribute_filter) |
Duplicate Points (Grease Pencil) | |
| 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) |
Duplicate Points (Mesh) | |
| 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) |
Duplicate Points (Point Cloud) | |
| 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) |
Duplicate Points | |
| 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) |
Duplicate Layers | |
| 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) |
Duplicate Instances | |
| 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) |
Entry Point | |
| static void | node_geo_exec (GeoNodeExecParams params) |
|
static |
Definition at line 67 of file node_geo_duplicate_elements.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), count, blender::offset_indices::fill_constant_group_size(), blender::array_utils::gather(), blender::VArrayCommon< T >::get_if_single(), and blender::Array< T, InlineBufferCapacity, Allocator >::reinitialize().
|
static |
Copies the attributes for curve duplicates. If copying the curve domain, the attributes are copied with an offset fill, otherwise a mapping is used.
Definition at line 160 of file node_geo_duplicate_elements.cc.
References ATTR_DOMAIN_MASK_ALL, blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), BLI_assert_unreachable, copy_curve_attributes_without_id(), and blender::bke::CurvesGeometry::points_by_curve().
Referenced by copy_curve_attributes_without_id(), and duplicate_curves_CurveGeometry().
|
static |
Copies the attributes for edge duplicates. If copying the edge domain, the attributes are copied with an offset fill, for point domain a mapping is used.
Definition at line 573 of file node_geo_duplicate_elements.cc.
References ATTR_DOMAIN_MASK_EDGE, ATTR_DOMAIN_MASK_POINT, BLI_assert_unreachable, and copy_edge_attributes_without_id().
Referenced by copy_edge_attributes_without_id().
|
static |
Copies the attributes for face duplicates. If copying the face domain, the attributes are copied with an offset fill, otherwise a mapping is used.
Definition at line 369 of file node_geo_duplicate_elements.cc.
References ATTR_DOMAIN_MASK_ALL, BLI_assert_unreachable, and copy_face_attributes_without_id().
Referenced by copy_face_attributes_without_id(), and duplicate_faces().
|
static |
Definition at line 82 of file node_geo_duplicate_elements.cc.
References blender::noise::hash(), hash, and blender::Span< T >::index_range().
Referenced by copy_stable_id_curves().
|
static |
Copy the stable ids to the first duplicate and create new ids based on a hash of the original id and the duplicate number. In the curve case, copy the entire curve's points to the destination, then loop over the remaining ones point by point, hashing their ids to the new ids.
Definition at line 208 of file node_geo_duplicate_elements.cc.
References blender::bke::CurvesGeometry::attributes(), blender::bke::CurvesGeometry::attributes_for_write(), CD_PROP_INT32, copy_hashed_ids(), copy_stable_id_curves(), blender::IndexRange::drop_front(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::CurvesGeometry::points_by_curve(), size(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), blender::bke::GSpanAttributeWriter::span, blender::GMutableSpan::typed(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by copy_stable_id_curves(), and duplicate_curves_CurveGeometry().
|
static |
Copy the stable ids to the first duplicate and create new ids based on a hash of the original id and the duplicate number. This function is used for points when duplicating the edge domain.
Definition at line 606 of file node_geo_duplicate_elements.cc.
References CD_PROP_INT32, copy_stable_id_edges(), blender::bke::GSpanAttributeWriter::finish(), blender::IndexRange::is_empty(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::IndexRange::size(), blender::bke::GSpanAttributeWriter::span, blender::IndexRange::start(), blender::GMutableSpan::typed(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by copy_stable_id_edges().
|
static |
Copy the stable ids to the first duplicate and create new ids based on a hash of the original id and the duplicate number. This function is used for points when duplicating the face domain.
This function could be threaded in the future, but since it is only 1 attribute and the face->edge->vert mapping would mean creating a 1/1 mapping to allow for it, is it worth it?
Definition at line 414 of file node_geo_duplicate_elements.cc.
References CD_PROP_INT32, copy_stable_id_faces(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::IndexRange::size(), blender::bke::GSpanAttributeWriter::span, blender::GMutableSpan::typed(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by copy_stable_id_faces(), and duplicate_faces().
|
static |
Copy the stable ids to the first duplicate and create new ids based on a hash of the original id and the duplicate number. This function is used for the point domain elements.
Definition at line 130 of file node_geo_duplicate_elements.cc.
References CD_PROP_INT32, copy_stable_id_point(), blender::bke::GSpanAttributeWriter::finish(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::GSpanAttributeWriter::span, threaded_id_offset_copy(), blender::GMutableSpan::typed(), blender::GVArray::typed(), and blender::bke::GAttributeReader::varray.
Referenced by copy_stable_id_point(), duplicate_points_mesh(), and duplicate_points_pointcloud().
|
static |
Create the copy indices for the duplication domain.
Definition at line 109 of file node_geo_duplicate_elements.cc.
References create_duplicate_index_attribute(), blender::nodes::node_geo_duplicate_elements_cc::IndexAttributes::duplicate_index, blender::bke::SpanAttributeWriter< T >::finish(), and blender::bke::SpanAttributeWriter< T >::span.
Referenced by create_duplicate_index_attribute(), duplicate_curves_CurveGeometry(), duplicate_faces(), duplicate_instances(), duplicate_layers(), duplicate_points_mesh(), and duplicate_points_pointcloud().
|
static |
Definition at line 313 of file node_geo_duplicate_elements.cc.
References duplicate_curves_CurveGeometry(), blender::bke::GeometrySet::get_curves(), blender::bke::GeometrySet::get_grease_pencil_for_write(), blender::bke::GeometrySet::keep_only_during_modify(), and blender::bke::GeometrySet::replace_curves().
|
static |
Definition at line 243 of file node_geo_duplicate_elements.cc.
References copy_curve_attributes_without_id(), copy_stable_id_curves(), count, create_duplicate_index_attribute(), duplicate_curves_CurveGeometry(), blender::nodes::node_geo_duplicate_elements_cc::IndexAttributes::duplicate_index, blender::Array< T, InlineBufferCapacity, Allocator >::last(), blender::MutableSpan< T >::last(), blender::IndexRange::size(), blender::offset_indices::OffsetIndices< T >::size(), and blender::MutableSpan< T >::slice().
Referenced by duplicate_curves(), and duplicate_curves_CurveGeometry().
|
static |
Definition at line 644 of file node_geo_duplicate_elements.cc.
References blender::fn::FieldEvaluator::add(), BKE_mesh_new_nomain(), duplicate_edges(), blender::bke::GeometrySet::get_mesh(), blender::bke::GeometrySet::has_mesh(), mesh, blender::bke::GeometrySet::remove_geometry_during_modify(), blender::IndexRange::size(), blender::IndexRange::start(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by duplicate_edges(), and node_geo_exec().
|
static |
Definition at line 458 of file node_geo_duplicate_elements.cc.
References blender::fn::FieldEvaluator::add(), BKE_mesh_new_nomain(), copy_face_attributes_without_id(), copy_stable_id_faces(), count, create_duplicate_index_attribute(), duplicate_faces(), blender::nodes::node_geo_duplicate_elements_cc::IndexAttributes::duplicate_index, blender::fn::FieldEvaluator::evaluate(), blender::fn::FieldEvaluator::get_evaluated(), blender::fn::FieldEvaluator::get_evaluated_selection_as_mask(), blender::bke::GeometrySet::get_mesh(), blender::bke::GeometrySet::has_mesh(), blender::IndexRange::index_range(), blender::bke::GeometrySet::keep_only_during_modify(), blender::IndexRange::last(), mesh, blender::bke::GeometrySet::remove_geometry_during_modify(), blender::bke::GeometrySet::replace_mesh(), blender::fn::FieldEvaluator::set_selection(), blender::Array< T, InlineBufferCapacity, Allocator >::size(), blender::MutableSpan< T >::size(), and Mesh::verts_num.
Referenced by duplicate_faces(), and node_geo_exec().
|
static |
Definition at line 1086 of file node_geo_duplicate_elements.cc.
References blender::bke::Instances::attributes(), blender::bke::GeometrySet::clear(), create_duplicate_index_attribute(), blender::nodes::node_geo_duplicate_elements_cc::IndexAttributes::duplicate_index, duplicate_instances(), blender::bke::GeometrySet::get_instances(), blender::bke::GeometrySet::has_instances(), blender::bke::Instances::instances_num(), blender::bke::Instances::reference_handles(), blender::bke::Instances::references(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by duplicate_instances(), and node_geo_exec().
|
static |
Definition at line 1006 of file node_geo_duplicate_elements.cc.
References BKE_grease_pencil_copy_layer_parameters(), BKE_grease_pencil_copy_parameters(), BKE_grease_pencil_new_nomain(), blender::bke::GeometrySet::clear(), create_duplicate_index_attribute(), blender::nodes::node_geo_duplicate_elements_cc::IndexAttributes::duplicate_index, duplicate_layers(), blender::bke::GeometrySet::get_grease_pencil(), blender::bke::GeometrySet::has_grease_pencil(), blender::bke::GeometrySet::keep_only_during_modify(), pos, blender::bke::GeometrySet::replace_grease_pencil(), blender::bke::greasepencil::Drawing::strokes(), blender::bke::greasepencil::Drawing::strokes_for_write(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by duplicate_layers(), and node_geo_exec().
|
static |
Definition at line 957 of file node_geo_duplicate_elements.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), duplicate_points_curve(), duplicate_points_grease_pencil(), duplicate_points_mesh(), duplicate_points_pointcloud(), blender::bke::GeometrySet::gather_component_types(), blender::bke::GeometrySet::has_curves(), blender::bke::GeometrySet::has_grease_pencil(), blender::bke::GeometrySet::has_mesh(), blender::bke::GeometrySet::has_pointcloud(), and blender::bke::GeometrySet::keep_only_during_modify().
|
static |
Definition at line 794 of file node_geo_duplicate_elements.cc.
References duplicate_points_curve(), duplicate_points_CurvesGeometry(), Curves::geometry, blender::bke::GeometrySet::get_curves(), and blender::bke::GeometrySet::replace_curves().
Referenced by duplicate_points(), and duplicate_points_curve().
|
static |
Definition at line 726 of file node_geo_duplicate_elements.cc.
References ATTR_DOMAIN_MASK_CURVE, blender::bke::CurvesGeometry::attributes(), duplicate_points_CurvesGeometry(), blender::bke::CurvesGeometry::point_to_curve_map(), blender::bke::CurvesGeometry::points_num(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by duplicate_points_curve(), and duplicate_points_CurvesGeometry().
|
static |
Definition at line 822 of file node_geo_duplicate_elements.cc.
References duplicate_points_grease_pencil(), and blender::bke::GeometrySet::get_grease_pencil_for_write().
Referenced by duplicate_points(), and duplicate_points_grease_pencil().
|
static |
Definition at line 858 of file node_geo_duplicate_elements.cc.
References blender::fn::FieldEvaluator::add(), BKE_mesh_new_nomain(), copy_stable_id_point(), create_duplicate_index_attribute(), blender::nodes::node_geo_duplicate_elements_cc::IndexAttributes::duplicate_index, duplicate_points_mesh(), blender::bke::GeometrySet::get_mesh(), mesh, blender::bke::GeometrySet::replace_mesh(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by duplicate_points(), and duplicate_points_mesh().
|
static |
Definition at line 909 of file node_geo_duplicate_elements.cc.
References Geometry::attributes, BKE_pointcloud_new_nomain(), copy_stable_id_point(), create_duplicate_index_attribute(), blender::nodes::node_geo_duplicate_elements_cc::IndexAttributes::duplicate_index, duplicate_points_pointcloud(), blender::bke::GeometrySet::get_pointcloud(), blender::bke::GeometrySet::replace_pointcloud(), blender::offset_indices::OffsetIndices< T >::total_size(), and PointCloud::totpoint.
Referenced by duplicate_points(), and duplicate_points_pointcloud().
|
static |
Definition at line 32 of file node_geo_duplicate_elements.cc.
References b, blender::nodes::decl::Int::default_value, blender::nodes::SocketDeclaration::description, blender::nodes::SocketDeclaration::hide_value, and min.
Referenced by node_register().
|
static |
Definition at line 1155 of file node_geo_duplicate_elements.cc.
References BLI_assert_unreachable, duplicate_edges(), duplicate_faces(), duplicate_instances(), duplicate_layers(), blender::bke::GeometrySet::is_empty(), blender::bke::GeometrySet::modify_geometry_sets(), node_geo_exec(), and params.
Referenced by node_geo_exec(), and node_register().
|
static |
Definition at line 47 of file node_geo_duplicate_elements.cc.
References data.
Referenced by node_register().
|
static |
Definition at line 54 of file node_geo_duplicate_elements.cc.
References ptr, UI_ITEM_NONE, and uiItemR().
Referenced by node_register().
|
static |
Definition at line 1243 of file node_geo_duplicate_elements.cc.
References blender::bke::bNodeType::declare, blender::bke::bNodeType::draw_buttons, geo_node_type_base(), blender::bke::bNodeType::geometry_node_execute, blender::bke::bNodeType::initfunc, NODE_CLASS_GEOMETRY, node_copy_standard_storage(), node_declare(), node_free_standard_storage(), node_geo_exec(), node_init(), node_layout(), node_register(), blender::bke::node_register_type(), node_rna(), blender::bke::node_type_storage(), blender::bke::bNodeType::rna_ext, and ExtensionRNA::srna.
Referenced by node_register().
|
static |
Definition at line 1220 of file node_geo_duplicate_elements.cc.
References int, NOD_storage_enum_accessors, node_rna(), and blender::nodes::RNA_def_node_enum().
Referenced by node_register(), and node_rna().
| blender::nodes::node_geo_duplicate_elements_cc::NODE_STORAGE_FUNCS | ( | NodeGeometryDuplicateElements | ) |
|
static |
Definition at line 89 of file node_geo_duplicate_elements.cc.
References BLI_assert, blender::offset_indices::OffsetIndices< T >::index_range(), blender::threading::parallel_for(), blender::MutableSpan< T >::size(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by copy_stable_id_point().