Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-10-20 17:47:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-20 18:47:07 +0300
commit71538eaad66b0d2a532df4b1f82e983fb6aed088 (patch)
tree6c644806bddd679c75246e44a89efe42ebd75fe1 /source/blender/bmesh/intern/bmesh_mesh_duplicate.h
parent98ab0f173c8c5c9f34af22f9e8748e0101cc6dd1 (diff)
Fix T70864: Separate loose parts runs indefinitely
Large objects with many separate pieces became unstably slow (run for hours and not finish). The entire original mesh was being duplicated twice per loose part. In own tests, millions of vertices and thousands of loose parts now run in around 5-15 seconds.
Diffstat (limited to 'source/blender/bmesh/intern/bmesh_mesh_duplicate.h')
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_duplicate.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_duplicate.h b/source/blender/bmesh/intern/bmesh_mesh_duplicate.h
new file mode 100644
index 00000000000..17d4071b69f
--- /dev/null
+++ b/source/blender/bmesh/intern/bmesh_mesh_duplicate.h
@@ -0,0 +1,33 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#ifndef __BMESH_MESH_DUPLICATE_H__
+#define __BMESH_MESH_DUPLICATE_H__
+
+/** \file
+ * \ingroup bmesh
+ */
+
+void BM_mesh_copy_arrays(BMesh *bm_src,
+ BMesh *bm_dst,
+ BMVert **verts_src,
+ uint verts_src_len,
+ BMEdge **edges_src,
+ uint edges_src_len,
+ BMFace **faces_src,
+ uint faces_src_len);
+
+#endif /* __BMESH_MESH_DUPLICATE_H__ */