Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/geometry_component_mesh.cc
| Show First 20 Lines • Show All 992 Lines • ▼ Show 20 Lines | |||||
| return false; | return false; | ||||
| } | } | ||||
| BLI_remlink(&mesh->vertex_group_names, group); | BLI_remlink(&mesh->vertex_group_names, group); | ||||
| MEM_freeN(group); | MEM_freeN(group); | ||||
| if (mesh->deform_verts().is_empty()) { | if (mesh->deform_verts().is_empty()) { | ||||
| return true; | return true; | ||||
| } | } | ||||
| for (MDeformVert &dvert : mesh->deform_verts_for_write()) { | MutableSpan<MDeformVert> dverts = mesh->deform_verts_for_write(); | ||||
| MDeformWeight *weight = BKE_defvert_find_index(&dvert, index); | threading::parallel_for(dverts.index_range(), 1024, [&](IndexRange range) { | ||||
| BKE_defvert_remove_group(&dvert, weight); | for (MDeformVert &dvert : dverts.slice(range)) { | ||||
| for (MDeformWeight &weight : MutableSpan(dvert.dw, dvert.totweight)) { | MDeformWeight *weight = BKE_defvert_find_index(&dvert, index); | ||||
| if (weight.def_nr > index) { | BKE_defvert_remove_group(&dvert, weight); | ||||
| weight.def_nr--; | for (MDeformWeight &weight : MutableSpan(dvert.dw, dvert.totweight)) { | ||||
| if (weight.def_nr > index) { | |||||
| weight.def_nr--; | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| } | }); | ||||
| return true; | return true; | ||||
| } | } | ||||
| bool foreach_attribute(const void *owner, const AttributeForeachCallback callback) const final | bool foreach_attribute(const void *owner, const AttributeForeachCallback callback) const final | ||||
| { | { | ||||
| const Mesh *mesh = static_cast<const Mesh *>(owner); | const Mesh *mesh = static_cast<const Mesh *>(owner); | ||||
| if (mesh == nullptr) { | if (mesh == nullptr) { | ||||
| return true; | return true; | ||||
| ▲ Show 20 Lines • Show All 264 Lines • Show Last 20 Lines | |||||