diff options
author | Joseph Eagar <joeedh@gmail.com> | 2009-07-24 11:39:41 +0400 |
---|---|---|
committer | Joseph Eagar <joeedh@gmail.com> | 2009-07-24 11:39:41 +0400 |
commit | c691b2b037fe5030726340a6461ceba1573074f5 (patch) | |
tree | 4cdd924c4bce4b98f55dcb72362837bc29a943e8 | |
parent | afbc5555dc8e083f36fae47e26c1d73f3df75df6 (diff) |
edge and loop select work in uv editor again.
-rw-r--r-- | source/blender/editors/mesh/bmeshutils.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.c | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_parametrizer.h | 2 | ||||
-rw-r--r-- | source/blender/editors/uvedit/uvedit_unwrap_ops.c | 3 |
5 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/bmeshutils.c b/source/blender/editors/mesh/bmeshutils.c index 42bf21ba28a..92f8cdb77f5 100644 --- a/source/blender/editors/mesh/bmeshutils.c +++ b/source/blender/editors/mesh/bmeshutils.c @@ -586,7 +586,7 @@ UvVertMap *EDBM_make_uv_vert_map(BMEditMesh *em, int selected, int do_face_idx_a buf->f= a; buf->separate = 0; - buf->next= vmap->vert[BMINDEX_GET(((BMLoop*)l->head.next)->v)]; + buf->next= vmap->vert[BMINDEX_GET(l->v)]; vmap->vert[BMINDEX_GET(l->v)]= buf; buf++; diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c index d095967868b..a7b5109e292 100644 --- a/source/blender/editors/uvedit/uvedit_ops.c +++ b/source/blender/editors/uvedit/uvedit_ops.c @@ -604,6 +604,8 @@ static void find_nearest_uv_edge(Scene *scene, Image *ima, BMEditMesh *em, float hit->lindex = i; hit->vert1 = BMINDEX_GET(hit->l->v); hit->vert2 = BMINDEX_GET(((BMLoop*)hit->l->head.next)->v); + + mindist = dist; } i++; diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.c b/source/blender/editors/uvedit/uvedit_parametrizer.c index 20f74085e52..418601c93bf 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.c +++ b/source/blender/editors/uvedit/uvedit_parametrizer.c @@ -727,7 +727,7 @@ static PEdge *p_edge_lookup(PHandle *handle, PHashKey *vkeys) return NULL; } -static PBool p_face_exists(PHandle *handle, PHashKey *vkeys, int i1, int i2, int i3) +int p_face_exists(PHandle *handle, PHashKey *vkeys, int i1, int i2, int i3) { PHashKey key = PHASH_edge(vkeys[i1], vkeys[i2]); PEdge *e = (PEdge*)phash_lookup(handle->hash_edges, key); diff --git a/source/blender/editors/uvedit/uvedit_parametrizer.h b/source/blender/editors/uvedit/uvedit_parametrizer.h index f1454ee3865..4e7f3c76fd0 100644 --- a/source/blender/editors/uvedit/uvedit_parametrizer.h +++ b/source/blender/editors/uvedit/uvedit_parametrizer.h @@ -30,6 +30,8 @@ ParamHandle *param_construct_begin(); void param_aspect_ratio(ParamHandle *handle, float aspx, float aspy); +int p_face_exists(ParamKey *handle, ParamKey *vkeys, int i1, int i2, int i3); + void param_face_add(ParamHandle *handle, ParamKey key, int nverts, diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c index 52000315248..ef882e44b0d 100644 --- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c +++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c @@ -216,7 +216,8 @@ ParamHandle *construct_param_handle(Scene *scene, BMEditMesh *em, short implicit select[1] = uvedit_uv_selected(em, scene, ls[1]) != 0; select[2] = uvedit_uv_selected(em, scene, ls[2]) != 0; - param_face_add(handle, key, 3, vkeys, co, uv, pin, select); + if (!p_face_exists(handle,vkeys,0,1,2)) + param_face_add(handle, key, 3, vkeys, co, uv, pin, select); } BLI_end_edgefill(); |