Blender
V3.3
|
Functions | |
template<typename T > | |
static void | copy_data_based_on_mask (Span< T > data, MutableSpan< T > r_data, IndexMask mask) |
template<typename T > | |
static void | copy_data_based_on_map (Span< T > src, MutableSpan< T > dst, Span< int > index_map) |
static void | copy_attributes (const Map< AttributeIDRef, AttributeKind > &attributes, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes, const Span< eAttrDomain > domains) |
static void | copy_attributes_based_on_mask (const Map< AttributeIDRef, AttributeKind > &attributes, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes, const eAttrDomain domain, const IndexMask mask) |
static void | copy_attributes_based_on_map (const Map< AttributeIDRef, AttributeKind > &attributes, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes, const eAttrDomain domain, const Span< int > index_map) |
static void | copy_face_corner_attributes (const Map< AttributeIDRef, AttributeKind > &attributes, const bke::AttributeAccessor src_attributes, bke::MutableAttributeAccessor dst_attributes, const int selected_loops_num, const Span< int > selected_poly_indices, const Mesh &mesh_in) |
static void | copy_masked_vertices_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_map) |
static void | copy_masked_edges_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > edge_map) |
static void | copy_masked_edges_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_map, Span< int > edge_map) |
static void | copy_masked_polys_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > edge_map, Span< int > masked_poly_indices, Span< int > new_loop_starts) |
static void | copy_masked_polys_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > masked_poly_indices, Span< int > new_loop_starts) |
static void | copy_masked_polys_to_new_mesh (const Mesh &src_mesh, Mesh &dst_mesh, Span< int > vertex_map, Span< int > edge_map, Span< int > masked_poly_indices, Span< int > new_loop_starts) |
static void | delete_curves_selection (GeometrySet &geometry_set, const Field< bool > &selection_field, const eAttrDomain selection_domain) |
static void | separate_point_cloud_selection (GeometrySet &geometry_set, const Field< bool > &selection_field) |
static void | delete_selected_instances (GeometrySet &geometry_set, const Field< bool > &selection_field) |
static void | compute_selected_vertices_from_vertex_selection (const Span< bool > vertex_selection, MutableSpan< int > r_vertex_map, int *r_selected_vertices_num) |
static void | compute_selected_edges_from_vertex_selection (const Mesh &mesh, const Span< bool > vertex_selection, MutableSpan< int > r_edge_map, int *r_selected_edges_num) |
static void | compute_selected_polygons_from_vertex_selection (const Mesh &mesh, const Span< bool > vertex_selection, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_vertices_and_edges_from_edge_selection (const Mesh &mesh, const Span< bool > edge_selection, MutableSpan< int > r_vertex_map, MutableSpan< int > r_edge_map, int *r_selected_vertices_num, int *r_selected_edges_num) |
static void | compute_selected_edges_from_edge_selection (const Mesh &mesh, const Span< bool > edge_selection, MutableSpan< int > r_edge_map, int *r_selected_edges_num) |
static void | compute_selected_polygons_from_edge_selection (const Mesh &mesh, const Span< bool > edge_selection, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_mesh_data_from_vertex_selection_edge_face (const Mesh &mesh, const Span< bool > vertex_selection, MutableSpan< int > r_edge_map, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_edges_num, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_mesh_data_from_vertex_selection (const Mesh &mesh, const Span< bool > vertex_selection, MutableSpan< int > r_vertex_map, MutableSpan< int > r_edge_map, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_vertices_num, int *r_selected_edges_num, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_mesh_data_from_edge_selection_edge_face (const Mesh &mesh, const Span< bool > edge_selection, MutableSpan< int > r_edge_map, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_edges_num, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_mesh_data_from_edge_selection (const Mesh &mesh, const Span< bool > edge_selection, MutableSpan< int > r_vertex_map, MutableSpan< int > r_edge_map, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_vertices_num, int *r_selected_edges_num, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_polygons_from_poly_selection (const Mesh &mesh, const Span< bool > poly_selection, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_mesh_data_from_poly_selection_edge_face (const Mesh &mesh, const Span< bool > poly_selection, MutableSpan< int > r_edge_map, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_edges_num, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | compute_selected_mesh_data_from_poly_selection (const Mesh &mesh, const Span< bool > poly_selection, MutableSpan< int > r_vertex_map, MutableSpan< int > r_edge_map, Vector< int > &r_selected_poly_indices, Vector< int > &r_loop_starts, int *r_selected_vertices_num, int *r_selected_edges_num, int *r_selected_polys_num, int *r_selected_loops_num) |
static void | do_mesh_separation (GeometrySet &geometry_set, const Mesh &mesh_in, const Span< bool > selection, const eAttrDomain domain, const GeometryNodeDeleteGeometryMode mode) |
static void | separate_mesh_selection (GeometrySet &geometry_set, const Field< bool > &selection_field, const eAttrDomain selection_domain, const GeometryNodeDeleteGeometryMode mode) |
static void | node_declare (NodeDeclarationBuilder &b) |
static void | node_layout (uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr) |
static void | node_init (bNodeTree *UNUSED(tree), bNode *node) |
static void | node_geo_exec (GeoNodeExecParams params) |
|
static |
Checks for every edge if it is in edge_selection
.
Definition at line 517 of file node_geo_delete_geometry.cc.
References BLI_assert, mesh, blender::Span< T >::size(), and Mesh::totedge.
Referenced by compute_selected_mesh_data_from_edge_selection_edge_face().
|
static |
Definition at line 415 of file node_geo_delete_geometry.cc.
References BLI_assert, Mesh::medge, mesh, blender::MutableSpan< T >::size(), and Mesh::totedge.
Referenced by compute_selected_mesh_data_from_vertex_selection(), and compute_selected_mesh_data_from_vertex_selection_edge_face().
|
static |
Checks for every edge if it is in edge_selection
. If it is, the vertices belonging to that edge are kept as well. The polygons are kept if all edges are in the selection.
Definition at line 658 of file node_geo_delete_geometry.cc.
References compute_selected_polygons_from_edge_selection(), compute_selected_vertices_and_edges_from_edge_selection(), blender::MutableSpan< T >::fill(), and mesh.
Referenced by do_mesh_separation().
|
static |
Checks for every edge if it is in edge_selection
. The polygons are kept if all edges are in the selection.
Definition at line 634 of file node_geo_delete_geometry.cc.
References compute_selected_edges_from_edge_selection(), compute_selected_polygons_from_edge_selection(), and mesh.
Referenced by do_mesh_separation().
|
static |
Checks for every polygon if it is in poly_selection
. If it is, the edges and vertices belonging to that polygon are kept as well.
Definition at line 763 of file node_geo_delete_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), BLI_assert, blender::MutableSpan< T >::fill(), MPoly::loopstart, mesh, Mesh::mloop, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::MutableSpan< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Mesh::totedge, Mesh::totloop, MPoly::totloop, and Mesh::totpoly.
Referenced by do_mesh_separation().
|
static |
Checks for every polygon if it is in poly_selection
. If it is, the edges belonging to that polygon are kept as well.
Definition at line 716 of file node_geo_delete_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), BLI_assert, blender::MutableSpan< T >::fill(), MPoly::loopstart, mesh, Mesh::mloop, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::MutableSpan< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Mesh::totedge, Mesh::totloop, MPoly::totloop, and Mesh::totpoly.
Referenced by do_mesh_separation().
|
static |
Checks for every vertex if it is in vertex_selection
. The polygons and edges are kept if all vertices of that polygon or edge are in the selection.
Definition at line 605 of file node_geo_delete_geometry.cc.
References compute_selected_edges_from_vertex_selection(), compute_selected_polygons_from_vertex_selection(), compute_selected_vertices_from_vertex_selection(), and mesh.
Referenced by do_mesh_separation().
|
static |
Checks for every edge and polygon if all its vertices are in vertex_selection
.
Definition at line 579 of file node_geo_delete_geometry.cc.
References compute_selected_edges_from_vertex_selection(), compute_selected_polygons_from_vertex_selection(), and mesh.
Referenced by do_mesh_separation().
|
static |
Checks for every polygon if all the edges are in edge_selection
. If they are, then that polygon is kept.
Definition at line 542 of file node_geo_delete_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), MPoly::loopstart, mesh, Mesh::mloop, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Mesh::totloop, MPoly::totloop, and Mesh::totpoly.
Referenced by compute_selected_mesh_data_from_edge_selection(), compute_selected_mesh_data_from_edge_selection_edge_face(), and do_mesh_separation().
|
static |
Checks for every polygon if it is in poly_selection
.
Definition at line 687 of file node_geo_delete_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), BLI_assert, mesh, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Mesh::totloop, MPoly::totloop, and Mesh::totpoly.
Referenced by do_mesh_separation().
|
static |
Definition at line 439 of file node_geo_delete_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append_unchecked(), BLI_assert, MPoly::loopstart, mesh, Mesh::mloop, Mesh::mpoly, blender::Vector< T, InlineBufferCapacity, Allocator >::reserve(), blender::Span< T >::size(), blender::Vector< T, InlineBufferCapacity, Allocator >::size(), Mesh::totloop, MPoly::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by compute_selected_mesh_data_from_vertex_selection(), compute_selected_mesh_data_from_vertex_selection_edge_face(), and do_mesh_separation().
|
static |
Checks for every edge if it is in edge_selection
. If it is, then the two vertices of the edge are kept along with the edge.
Definition at line 479 of file node_geo_delete_geometry.cc.
References BLI_assert, Mesh::medge, mesh, blender::Span< T >::size(), and Mesh::totedge.
Referenced by compute_selected_mesh_data_from_edge_selection().
|
static |
Definition at line 395 of file node_geo_delete_geometry.cc.
References BLI_assert, blender::MutableSpan< T >::index_range(), blender::Span< T >::size(), and blender::MutableSpan< T >::size().
Referenced by compute_selected_mesh_data_from_vertex_selection().
|
static |
Copies the attributes with a domain in domains
to result_component
.
Definition at line 45 of file node_geo_delete_geometry.cc.
References attribute, blender::Span< T >::contains(), blender::attribute_math::convert_to_static_type(), blender::MutableSpan< T >::copy_from(), blender::bke::cpp_type_to_custom_data_type(), blender::bke::GSpanAttributeWriter::finish(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::GSpanAttributeWriter::span, T, and blender::GMutableSpan::typed().
Referenced by do_mesh_separation().
|
static |
Definition at line 120 of file node_geo_delete_geometry.cc.
References attribute, blender::attribute_math::convert_to_static_type(), copy_data_based_on_map(), blender::bke::cpp_type_to_custom_data_type(), blender::bke::GSpanAttributeWriter::finish(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), blender::bke::GSpanAttributeWriter::span, T, and blender::GMutableSpan::typed().
Referenced by do_mesh_separation().
|
static |
For each attribute with a domain in domains
it copies the parts of that attribute which lie in the mask to result_component
.
Definition at line 84 of file node_geo_delete_geometry.cc.
References attribute, blender::attribute_math::convert_to_static_type(), copy_data_based_on_mask(), blender::bke::cpp_type_to_custom_data_type(), blender::bke::GSpanAttributeWriter::finish(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::items(), blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), mask(), blender::bke::GSpanAttributeWriter::span, T, and blender::GMutableSpan::typed().
Referenced by copy_face_corner_attributes(), do_mesh_separation(), and separate_point_cloud_selection().
|
static |
Definition at line 32 of file node_geo_delete_geometry.cc.
References blender::Span< T >::index_range(), and src.
Referenced by copy_attributes_based_on_map().
|
static |
Definition at line 24 of file node_geo_delete_geometry.cc.
Referenced by copy_attributes_based_on_mask().
|
static |
Definition at line 156 of file node_geo_delete_geometry.cc.
References ATTR_DOMAIN_CORNER, copy_attributes_based_on_mask(), indices, MPoly::loopstart, Mesh::mpoly, and MPoly::totloop.
Referenced by do_mesh_separation().
|
static |
Definition at line 195 of file node_geo_delete_geometry.cc.
References BLI_assert, ELEM, Mesh::medge, blender::Span< T >::size(), Mesh::totedge, MEdge::v1, and MEdge::v2.
Referenced by do_mesh_separation().
|
static |
Definition at line 213 of file node_geo_delete_geometry.cc.
References BLI_assert, Mesh::medge, blender::Span< T >::size(), Mesh::totedge, Mesh::totvert, MEdge::v1, and MEdge::v2.
|
static |
Definition at line 236 of file node_geo_delete_geometry.cc.
References MLoop::e, blender::Span< T >::index_range(), MPoly::loopstart, Mesh::mloop, Mesh::mpoly, MPoly::totloop, and MLoop::v.
Referenced by do_mesh_separation().
|
static |
Definition at line 263 of file node_geo_delete_geometry.cc.
References MLoop::e, blender::Span< T >::index_range(), MPoly::loopstart, Mesh::mloop, Mesh::mpoly, MPoly::totloop, and MLoop::v.
|
static |
Definition at line 288 of file node_geo_delete_geometry.cc.
References MLoop::e, blender::Span< T >::index_range(), MPoly::loopstart, Mesh::mloop, Mesh::mpoly, MPoly::totloop, and MLoop::v.
|
static |
Definition at line 177 of file node_geo_delete_geometry.cc.
References BLI_assert, blender::Span< T >::index_range(), Mesh::mvert, blender::Span< T >::size(), and Mesh::totvert.
Referenced by do_mesh_separation().
|
static |
Definition at line 315 of file node_geo_delete_geometry.cc.
References ATTR_DOMAIN_CURVE, ATTR_DOMAIN_POINT, GeometryComponent::attribute_domain_size(), component(), curves, blender::bke::domain_num(), GeometrySet::get_component_for_read(), GeometrySet::get_component_for_write(), blender::IndexMask::is_empty(), GeometrySet::remove(), blender::IndexMask::size(), and blender::bke::CurvesGeometry::wrap().
Referenced by blender::nodes::separate_geometry().
|
static |
Definition at line 377 of file node_geo_delete_geometry.cc.
References ATTR_DOMAIN_INSTANCE, GeometrySet::get_component_for_write(), InstancesComponent::instances_num(), blender::IndexMask::is_empty(), GeometrySet::remove(), and InstancesComponent::remove_instances().
Referenced by blender::nodes::separate_geometry().
|
static |
Keep the parts of the mesh that are in the selection.
Definition at line 817 of file node_geo_delete_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), ATTR_DOMAIN_EDGE, ATTR_DOMAIN_FACE, ATTR_DOMAIN_POINT, BKE_mesh_calc_edges_loose(), BKE_mesh_new_nomain_from_template(), BLI_assert_unreachable, compute_selected_mesh_data_from_edge_selection(), compute_selected_mesh_data_from_edge_selection_edge_face(), compute_selected_mesh_data_from_poly_selection(), compute_selected_mesh_data_from_poly_selection_edge_face(), compute_selected_mesh_data_from_vertex_selection(), compute_selected_mesh_data_from_vertex_selection_edge_face(), compute_selected_polygons_from_edge_selection(), compute_selected_polygons_from_poly_selection(), compute_selected_polygons_from_vertex_selection(), copy_attributes(), copy_attributes_based_on_map(), copy_attributes_based_on_mask(), copy_face_corner_attributes(), copy_masked_edges_to_new_mesh(), copy_masked_polys_to_new_mesh(), copy_masked_vertices_to_new_mesh(), GeometrySet::gather_attributes_for_propagation(), GEO_COMPONENT_TYPE_MESH, GEO_NODE_DELETE_GEOMETRY_MODE_ALL, GEO_NODE_DELETE_GEOMETRY_MODE_EDGE_FACE, GEO_NODE_DELETE_GEOMETRY_MODE_ONLY_FACE, Mesh::medge, blender::bke::mesh_attributes(), blender::bke::mesh_attributes_for_write(), Mesh::mvert, GeometrySet::replace_mesh(), Mesh::totedge, and Mesh::totvert.
Referenced by separate_mesh_selection().
|
static |
Definition at line 1132 of file node_geo_delete_geometry.cc.
References usdtokens::b(), blender::nodes::SocketDeclaration::description(), and N_.
Referenced by register_node_type_geo_delete_geometry().
|
static |
Definition at line 1165 of file node_geo_delete_geometry.cc.
References ATTR_DOMAIN_INSTANCE, NodeGeometryDeleteGeometry::domain, if(), blender::fn::invert_boolean_field(), NodeGeometryDeleteGeometry::mode, GeometrySet::modify_geometry_sets(), params, and blender::nodes::separate_geometry().
Referenced by register_node_type_geo_delete_geometry().
|
static |
Definition at line 1156 of file node_geo_delete_geometry.cc.
References ATTR_DOMAIN_POINT, data, GEO_NODE_DELETE_GEOMETRY_MODE_ALL, and node.
|
static |
Definition at line 1143 of file node_geo_delete_geometry.cc.
References ATTR_DOMAIN_EDGE, ATTR_DOMAIN_FACE, ATTR_DOMAIN_POINT, PointerRNA::data, NodeGeometryDeleteGeometry::domain, ELEM, node, ptr, and uiItemR().
Referenced by register_node_type_geo_delete_geometry().
|
static |
Definition at line 1061 of file node_geo_delete_geometry.cc.
References GeometryComponent::attribute_domain_size(), do_mesh_separation(), GeometrySet::get_component_for_read(), MeshComponent::get_for_read(), blender::VArrayCommon< T >::get_internal_single(), blender::VArrayCommon< T >::is_empty(), and blender::VArrayCommon< T >::is_single().
Referenced by blender::nodes::separate_geometry().
|
static |
Definition at line 347 of file node_geo_delete_geometry.cc.
References ATTR_DOMAIN_POINT, GeometryComponent::attribute_domain_size(), BKE_pointcloud_new_nomain(), copy_attributes_based_on_mask(), GeometrySet::gather_attributes_for_propagation(), GEO_COMPONENT_TYPE_POINT_CLOUD, GeometrySet::get_component_for_read(), PointCloudComponent::get_for_read(), blender::IndexMask::is_empty(), blender::bke::pointcloud_attributes(), blender::bke::pointcloud_attributes_for_write(), GeometrySet::replace_pointcloud(), and blender::IndexMask::size().
Referenced by blender::nodes::separate_geometry().