[Bf-blender-cvs] [fee8367e4ab] soc-2021-adaptive-cloth: adaptive_cloth: Mesh: get elements mutably
ishbosamiya
noreply at git.blender.org
Mon Jul 19 17:35:45 CEST 2021
Commit: fee8367e4ab2c9be1edaf79eac8d25ffc7999788
Author: ishbosamiya
Date: Fri Jul 16 23:30:34 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rBfee8367e4ab2c9be1edaf79eac8d25ffc7999788
adaptive_cloth: Mesh: get elements mutably
Useful to get the elements mutably.
This does make `Mesh` less "safe" since anyone can add or delete
elements without creating/deleting the necessary referencing between
the elements but this shouldn't be too much of a problem because it
would lead to an instant forced crash when the `Mesh` is used for
anything.
===================================================================
M source/blender/blenkernel/BKE_cloth_remesh.hh
===================================================================
diff --git a/source/blender/blenkernel/BKE_cloth_remesh.hh b/source/blender/blenkernel/BKE_cloth_remesh.hh
index 8dae55e09dc..f660fb9fba2 100644
--- a/source/blender/blenkernel/BKE_cloth_remesh.hh
+++ b/source/blender/blenkernel/BKE_cloth_remesh.hh
@@ -946,21 +946,41 @@ template<typename END, typename EVD, typename EED, typename EFD> class Mesh {
return this->nodes;
}
+ auto &get_nodes_mut()
+ {
+ return this->nodes;
+ }
+
const auto &get_verts() const
{
return this->verts;
}
+ auto &get_verts_mut()
+ {
+ return this->verts;
+ }
+
const auto &get_edges() const
{
return this->edges;
}
+ auto &get_edges_mut()
+ {
+ return this->edges;
+ }
+
const auto &get_faces() const
{
return this->faces;
}
+ auto &get_faces_mut()
+ {
+ return this->faces;
+ }
+
std::optional<EdgeIndex> get_connecting_edge_index(VertIndex vert_1_index,
VertIndex vert_2_index) const
{
More information about the Bf-blender-cvs
mailing list