[Bf-blender-cvs] [b3d8a748a35] soc-2021-adaptive-cloth: adaptive_cloth: AdaptiveMesh: call compute_info() where needed

ishbosamiya noreply at git.blender.org
Sun Aug 22 17:23:37 CEST 2021


Commit: b3d8a748a355c0eb56e40eed18cd74ad45f3d031
Author: ishbosamiya
Date:   Wed Aug 11 00:06:56 2021 +0530
Branches: soc-2021-adaptive-cloth
https://developer.blender.org/rBb3d8a748a355c0eb56e40eed18cd74ad45f3d031

adaptive_cloth: AdaptiveMesh: call compute_info() where needed

===================================================================

M	source/blender/blenkernel/intern/cloth_remesh.cc

===================================================================

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<NodeData<END>, 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<NodeData<END>, 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<NodeData<END>, 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 */



More information about the Bf-blender-cvs mailing list