Index: source/blender/editors/uvedit/uvedit_intern.h =================================================================== --- source/blender/editors/uvedit/uvedit_intern.h (revision 48223) +++ source/blender/editors/uvedit/uvedit_intern.h (working copy) @@ -59,14 +59,13 @@ void uv_poly_copy_aspect(float uv_orig [][2], float uv[][2], float aspx, float void uv_poly_center(struct BMEditMesh *em, struct BMFace *f, float r_cent[2]); /* find nearest */ - typedef struct NearestHit { struct BMFace *efa; struct MTexPoly *tf; struct BMLoop *l, *nextl; struct MLoopUV *luv, *nextluv; - int lindex; //index of loop within face - int vert1, vert2; //index in mesh of edge vertices + int lindex; /* index of loop within face */ + int vert1, vert2; /* index in mesh of edge vertices */ float dist; /* distance to hit, as in dx + dy */ } NearestHit; @@ -74,9 +73,12 @@ void uv_find_nearest_vert(struct Scene *scene, struct Image *ima, struct BMEditM const float co[2], const float penalty[2], struct NearestHit *hit); void uv_find_nearest_edge(struct Scene *scene, struct Image *ima, struct BMEditMesh *em, const float co[2], struct NearestHit *hit); +void uv_find_nearest_face(struct Scene *scene, struct Image *ima, struct BMEditMesh *em, + const float co[2], NearestHit *hit); +void uv_find_nearest_island(struct Scene *scene, struct Image *ima, struct BMEditMesh *em, + const float co[2], NearestHit *hit); /* utility tool functions */ - struct UvElement *ED_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l); void uvedit_live_unwrap_update(struct SpaceImage *sima, struct Scene *scene, struct Object *obedit); Index: source/blender/editors/uvedit/uvedit_ops.c =================================================================== --- source/blender/editors/uvedit/uvedit_ops.c (revision 48223) +++ source/blender/editors/uvedit/uvedit_ops.c (working copy) @@ -541,8 +541,7 @@ void uv_poly_center(BMEditMesh *em, BMFace *f, float r_cent[2]) float uv_poly_area(float uv[][2], int len) { - //BMESH_TODO: make this not suck - //maybe use scanfill? I dunno. + /* BMESH_TODO: make this not suck, maybe use scanfill? I dunno. */ if (len >= 4) return area_tri_v2(uv[0], uv[1], uv[2]) + area_tri_v2(uv[0], uv[2], uv[3]); @@ -691,7 +690,7 @@ void uv_find_nearest_edge(Scene *scene, Image *ima, BMEditMesh *em, const float } } -static void find_nearest_uv_face(Scene *scene, Image *ima, BMEditMesh *em, const float co[2], NearestHit *hit) +static void uv_find_nearest_face(Scene *scene, Image *ima, BMEditMesh *em, const float co[2], NearestHit *hit) { MTexPoly *tf; BMFace *efa; @@ -853,7 +852,7 @@ void uv_find_nearest_island(Scene *scene, Image *ima, BMEditMesh *em, const floa } memset(&temp_hit, 0, sizeof(temp_hit)); - find_nearest_uv_face(scene, ima, em, co, &temp_hit); + uv_find_nearest_face(scene, ima, em, co, &temp_hit); if (temp_hit.efa != NULL) { if (hit) { if (temp_hit.dist <= hit->dist) @@ -1827,7 +1826,7 @@ static int mouse_select(bContext *C, const float co[2], int extend, int loop) } else if (selectmode == UV_SELECT_FACE) { /* find face */ - find_nearest_uv_face(scene, ima, em, co, &hit); + uv_find_nearest_face(scene, ima, em, co, &hit); if (hit.efa == NULL) { BLI_array_free(hitv); BLI_array_free(hituv); @@ -2369,8 +2368,8 @@ static void uv_faces_do_sticky(SpaceImage *sima, Scene *scene, Object *obedit, s struct UvVertMap *vmap; float limit[2]; unsigned int efa_index; - //BMVert *eve; /* removed vert counting for now */ - //int a; + /* BMVert *eve; */ /* removed vert counting for now */ + /* int a; */ uvedit_pixel_to_float(sima, limit, 0.05);