Index: source/blender/include/BIF_editsima.h =================================================================== --- source/blender/include/BIF_editsima.h (revision 10728) +++ source/blender/include/BIF_editsima.h (working copy) @@ -52,6 +52,7 @@ void borderselect_sima(short whichuvs); void mouseco_to_curtile(void); void mouse_select_sima(void); +void select_invert_tface_uv(void); void select_swap_tface_uv(void); void mirrormenu_tface_uv(void); void mirror_tface_uv(char mirroraxis); Index: source/blender/src/editsima.c =================================================================== --- source/blender/src/editsima.c (revision 10728) +++ source/blender/src/editsima.c (working copy) @@ -430,6 +430,38 @@ else if(mode==2 || mode==3) BIF_undo_push("Align UV"); } +void select_invert_tface_uv(void) +{ + Mesh *me; + MTFace *tface; + MFace *mface; + int a; + + if( is_uv_tface_editing_allowed()==0 ) return; + me= get_mesh(OBACT); + mface= me->mface; + + for(a=me->totface, tface= me->mtface; a>0; a--, tface++, mface++) { + if(mface->flag & ME_FACE_SEL) { + if(tface->flag & TF_SEL1) tface->flag &= ~TF_SEL1; + else tface->flag |= TF_SEL1; + + if(tface->flag & TF_SEL2) tface->flag &= ~TF_SEL2; + else tface->flag |= TF_SEL2; + + if(tface->flag & TF_SEL3) tface->flag &= ~TF_SEL3; + else tface->flag |= TF_SEL3; + + if(tface->flag & TF_SEL4) tface->flag &= ~TF_SEL4; + else tface->flag |= TF_SEL4; + } + } + + BIF_undo_push("Invert UV"); + + allqueue(REDRAWIMAGE, 0); +} + void select_swap_tface_uv(void) { Mesh *me; Index: source/blender/src/header_image.c =================================================================== --- source/blender/src/header_image.c (revision 10728) +++ source/blender/src/header_image.c (working copy) @@ -524,6 +524,9 @@ case 1: /* Select/Deselect All */ select_swap_tface_uv(); break; + case 9: /* Select Inverse */ + select_invert_tface_uv(); + break; case 2: /* Unlink Selection */ unlink_selection(); break; @@ -591,6 +594,8 @@ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Select/Deselect All|A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Inverse", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 9, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Unlink Selection|Alt L", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");