[Bf-blender-cvs] [f34e9585531] soc-2019-adaptive-cloth: Cloth: fix some bugs in a hacky way, must see again later
ishbosamiya
noreply at git.blender.org
Fri Jul 26 20:19:46 CEST 2019
Commit: f34e95855317706f9a0f49d19834a7acddb450e9
Author: ishbosamiya
Date: Fri Jul 26 12:34:52 2019 +0530
Branches: soc-2019-adaptive-cloth
https://developer.blender.org/rBf34e95855317706f9a0f49d19834a7acddb450e9
Cloth: fix some bugs in a hacky way, must see again later
===================================================================
M source/blender/blenkernel/intern/cloth_remeshing.cpp
===================================================================
diff --git a/source/blender/blenkernel/intern/cloth_remeshing.cpp b/source/blender/blenkernel/intern/cloth_remeshing.cpp
index 14b8b9667f6..c7dd2105a6f 100644
--- a/source/blender/blenkernel/intern/cloth_remeshing.cpp
+++ b/source/blender/blenkernel/intern/cloth_remeshing.cpp
@@ -500,7 +500,11 @@ static bool cloth_remeshing_flip_edges(BMesh *bm,
BMEdge *edge = independent_edges[i];
/* BM_EDGEROT_CHECK_SPLICE sets it up for BM_CREATE_NO_DOUBLE */
BMEdge *new_edge = BM_edge_rotate(bm, edge, true, BM_EDGEROT_CHECK_SPLICE);
- BLI_assert(new_edge != NULL);
+ /* TODO(Ish): all the edges part of independent_edges should be
+ * rotatable, not sure why some of them fail to rotate, need to
+ * check this later. It might be fixed after seam or boundary
+ * detection is fixed */
+ /* BLI_assert(new_edge != NULL); */
/* TODO(Ish): need to check if the normals are flipped by some
* kind of area check */
cloth_remeshing_update_active_faces(active_faces, bm, new_edge);
@@ -930,6 +934,11 @@ static bool cloth_remeshing_split_edges(ClothModifierData *clmd, ClothVertMap &c
BMEdge *e;
for (int i = 0; i < bad_edges.size(); i++) {
e = bad_edges[i];
+ if (!(e->head.htype == BM_EDGE)) {
+ /* TODO(Ish): this test should not be required in theory, it
+ * might be fixed after seam or boundary detection is fixed */
+ continue;
+ }
BMEdge old_edge = *e;
BMVert *new_vert = cloth_remeshing_split_edge_keep_triangles(bm, e, e->v1, 0.5);
if (!new_vert) {
More information about the Bf-blender-cvs
mailing list