diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-01 02:09:43 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-01 02:09:43 +0400 |
commit | 4c36a26af5d1093badc88401bfebf8454fdf0f34 (patch) | |
tree | 2e82fc5ff893651982d20ffdd15d4c69bfcbe7b8 /source/blender/bmesh/operators/bmo_connect.c | |
parent | 3b711a6ed009b35bb69cd0ca878eeb8d55fa0e77 (diff) | |
parent | 8f949dd58decac45fd49f9a93152f2cddc98d901 (diff) |
Merged changes in the trunk up to revision 45308.
Conflicts resolved:
source/blender/editors/interface/resources.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/space_view3d/drawobject.c
Diffstat (limited to 'source/blender/bmesh/operators/bmo_connect.c')
-rw-r--r-- | source/blender/bmesh/operators/bmo_connect.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c index e135473fc7e..5c60704d0ee 100644 --- a/source/blender/bmesh/operators/bmo_connect.c +++ b/source/blender/bmesh/operators/bmo_connect.c @@ -116,7 +116,7 @@ void bmo_connectverts_exec(BMesh *bm, BMOperator *op) } } - BMO_slot_buffer_from_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT); + BMO_slot_buffer_from_enabled_flag(bm, op, "edgeout", BM_EDGE, EDGE_OUT); BLI_array_free(loops); BLI_array_free(verts); @@ -141,7 +141,15 @@ static BMVert *get_outer_vert(BMesh *bm, BMEdge *e) /* Clamp x to the interval {0..len-1}, with wrap-around */ static int clamp_index(const int x, const int len) { - return (x < 0) ? (len - (-x % len)) : (x % len); + if (x >= 0) + return x % len; + else { + int r = len - (-x % len); + if(r == len) + return len - 1; + else + return r; + } } /* There probably is a better way to swap BLI_arrays, or if there |