Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2007-06-10 18:06:34 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-06-10 18:06:34 +0400
commitd39d2e72797973fe079ab6e8a7810dbcb2c506b8 (patch)
tree93c8aea1171a5707c0868fb9ca90c71a56cc50e4 /source/blender/src/editsima.c
parent2393896ceedf34cb30767a8f08e8f216826af478 (diff)
Patch #6717:
Select Inverse function in the UV editor, by Juho Vepsalainen.
Diffstat (limited to 'source/blender/src/editsima.c')
-rw-r--r--source/blender/src/editsima.c35
1 files changed, 32 insertions, 3 deletions
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c
index 40cbe36ac8c..3f257bb848f 100644
--- a/source/blender/src/editsima.c
+++ b/source/blender/src/editsima.c
@@ -430,6 +430,31 @@ void weld_align_menu_tface_uv(void)
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) {
+ tface->flag ^= TF_SEL1;
+ tface->flag ^= TF_SEL2;
+ tface->flag ^= TF_SEL3;
+ if(mface->v4) tface->flag ^= TF_SEL4;
+ }
+ }
+
+ BIF_undo_push("Select Inverse UV");
+
+ allqueue(REDRAWIMAGE, 0);
+}
+
void select_swap_tface_uv(void)
{
Mesh *me;
@@ -1033,10 +1058,14 @@ void reveal_tface_uv(void)
me= get_mesh(OBACT);
mface= me->mface;
- for(a=me->totface, tface= me->mtface; a>0; a--, tface++, mface++)
- if(!(mface->flag & ME_HIDE))
- if(!(mface->flag & ME_FACE_SEL))
+ for(a=me->totface, tface= me->mtface; a>0; a--, tface++, mface++) {
+ if(!(mface->flag & ME_HIDE)) {
+ if(!(mface->flag & ME_FACE_SEL)) {
+ mface->flag |= ME_FACE_SEL;
tface->flag |= (TF_SEL1|TF_SEL2|TF_SEL3|TF_SEL4);
+ }
+ }
+ }
BIF_undo_push("Reveal UV");