Commit: 0e9051fbfefbff8f043b98a4750a1e33ec0e85d8
Author: Campbell Barton
Date:   Sat Aug 1 15:11:45 2015 +1000
Branches: master
https://developer.blender.org/rB0e9051fbfefbff8f043b98a4750a1e33ec0e85d8

BMesh connect pair, fallback to identity matrix

For overlapping vertices, a matrix for the operation can't be calculated.

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

M       source/blender/bmesh/operators/bmo_connect_pair.c

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

diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c 
b/source/blender/bmesh/operators/bmo_connect_pair.c
index cf0e233..d5bc4db 100644
--- a/source/blender/bmesh/operators/bmo_connect_pair.c
+++ b/source/blender/bmesh/operators/bmo_connect_pair.c
@@ -556,7 +556,9 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op)
                copy_v3_v3(pc.matrix[0], basis_tmp);
                copy_v3_v3(pc.matrix[1], basis_dir);
                copy_v3_v3(pc.matrix[2], basis_nor);
-               invert_m3(pc.matrix);
+               if (invert_m3(pc.matrix) == false) {
+                       unit_m3(pc.matrix);
+               }
 
                pc.axis_sep = dot_m3_v3_row_x(pc.matrix, pc.v_a->co);
        }
@@ -598,6 +600,11 @@ void bmo_connect_vert_pair_exec(BMesh *bm, BMOperator *op)
                        else {
                                /* didn't reach the end, remove it,
                                 * links are shared between states so just free 
the link_pool at the end */
+
+#ifdef DEBUG_PRINT
+                               printf("%s: state %p removed\n", __func__, 
state);
+#endif
+
                                BLI_remlink(&pc.state_lb, state);
                                MEM_freeN(state);
                        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to