From b3d8a748a355c0eb56e40eed18cd74ad45f3d031 Mon Sep 17 00:00:00 2001 From: ishbosamiya Date: Wed, 11 Aug 2021 00:06:56 +0530 Subject: adaptive_cloth: AdaptiveMesh: call compute_info() where needed --- source/blender/blenkernel/intern/cloth_remesh.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/cloth_remesh.cc b/source/blender/blenkernel/intern/cloth_remesh.cc index 82d70b8bfba..dd2296923de 100644 --- a/source/blender/blenkernel/intern/cloth_remesh.cc +++ b/source/blender/blenkernel/intern/cloth_remesh.cc @@ -388,11 +388,7 @@ class AdaptiveMesh : public Mesh, VertData, EdgeData, internal::Em auto mesh_diff = this->flip_edge_triangulate(edge.get_self_index(), false); - /* For each new edge added, set it's sizing */ - for (const auto &edge_index : mesh_diff.get_added_edges()) { - auto &edge = this->get_checked_edge(edge_index); - this->edge_set_size(edge); - } + this->compute_info_adaptivemesh(mesh_diff); #if SHOULD_REMESH_DUMP_FILE auto after_flip_msgpack = this->serialize(); @@ -450,11 +446,7 @@ class AdaptiveMesh : public Mesh, VertData, EdgeData, internal::Em dump_file(after_split_filename, after_split_msgpack); #endif - /* For each new edge added, set it's sizing */ - for (const auto &edge_index : mesh_diff.get_added_edges()) { - auto &edge = this->get_checked_edge(edge_index); - this->edge_set_size(edge); - } + this->compute_info_adaptivemesh(mesh_diff); /* Flip edges of those faces that were created during the * split edge operation */ @@ -521,6 +513,8 @@ class AdaptiveMesh : public Mesh, VertData, EdgeData, internal::Em #endif const auto mesh_diff = op_mesh_diff.value(); + this->compute_info_adaptivemesh(mesh_diff); + /* Must run flip edges on the newly added faces and * together the newly added faces must be added to * new_active_faces */ -- cgit v1.2.3