diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-09-12 14:35:48 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-09-12 14:35:48 +0400 |
commit | b2b3b018948f2a5b14b888e386ba811d9e1236e0 (patch) | |
tree | c9c50bc73341c74cd8de09f29cb60d2fd93f6f11 /source/blender/src/editface.c | |
parent | d1dcfd744a1c28e85a1e61b17782c2444fa14e8b (diff) |
Added UV face rotate and mirror to editmode and re arranged some of the editmode keys
The WKey menu was way too big and not well organized, re-arranged keys like this.
Ctrl+V - Vert Menu (remove doubles, smooth...)
Ctrl+E - Edge Menu - left as is
Ctrl+F - Face Menu - (flip normals, shading, Rotate and Mirror UV's/Colors)
Wkey menu only has subdivide in it now.
filesel.c - only show the relative paths option if the file is saved, (flag on by default caused the image to silently fail loading on my system, and gave permission errors on a users), also removed a warning.
Diffstat (limited to 'source/blender/src/editface.c')
-rw-r--r-- | source/blender/src/editface.c | 147 |
1 files changed, 0 insertions, 147 deletions
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index 2a0a0432955..48edf7e8096 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -766,153 +766,6 @@ void selectswap_tface(void) object_tface_flags_changed(OBACT, 0); } -void rotate_uv_tface() -{ - Mesh *me; - MFace *mf; - MCol *mcol; - MTFace *tf; - short mode; - int a; - - me= get_mesh(OBACT); - if(me==0 || me->mtface==0) return; - - mode= pupmenu("Rotate %t|UV Co-ordinates %x1|Vertex Colors %x2"); - - if (mode == 1 && me->mtface) { - tf= me->mtface; - mf= me->mface; - for(a=0; a<me->totface; a++, tf++, mf++) { - if(mf->flag & ME_FACE_SEL) { - float u1= tf->uv[0][0]; - float v1= tf->uv[0][1]; - - tf->uv[0][0]= tf->uv[1][0]; - tf->uv[0][1]= tf->uv[1][1]; - - tf->uv[1][0]= tf->uv[2][0]; - tf->uv[1][1]= tf->uv[2][1]; - - if(mf->v4) { - tf->uv[2][0]= tf->uv[3][0]; - tf->uv[2][1]= tf->uv[3][1]; - - tf->uv[3][0]= u1; - tf->uv[3][1]= v1; - } - else { - tf->uv[2][0]= u1; - tf->uv[2][1]= v1; - } - } - } - - BIF_undo_push("Rotate UV face"); - object_uvs_changed(OBACT); - } - else if (mode == 2 && me->mcol) { - tf= me->mtface; - mcol= me->mcol; - mf= me->mface; - for(a=0; a<me->totface; a++, tf++, mf++, mcol+=4) { - if(mf->flag & ME_FACE_SEL) { - MCol tmpcol= mcol[0]; - - mcol[0]= mcol[1]; - mcol[1]= mcol[2]; - - if(mf->v4) { - mcol[2]= mcol[3]; - mcol[3]= tmpcol; - } - else - mcol[2]= tmpcol; - } - } - - BIF_undo_push("Rotate color face"); - object_uvs_changed(OBACT); - } -} - -void mirror_uv_tface() -{ - Mesh *me; - MFace *mf; - MTFace *tf; - MCol *mcol; - short mode; - int a; - - me= get_mesh(OBACT); - if(me==0 || me->mtface==0) return; - - mode= pupmenu("Mirror %t|UV Co-ordinates %x1|Vertex Colors %x2"); - - if (mode==1 && me->mtface) { - mf= me->mface; - tf= me->mtface; - - for (a=0; a<me->totface; a++, tf++, mf++) { - if(mf->flag & ME_FACE_SEL) { - float u1= tf->uv[0][0]; - float v1= tf->uv[0][1]; - if(mf->v4) { - tf->uv[0][0]= tf->uv[3][0]; - tf->uv[0][1]= tf->uv[3][1]; - - tf->uv[3][0]= u1; - tf->uv[3][1]= v1; - - u1= tf->uv[1][0]; - v1= tf->uv[1][1]; - - tf->uv[1][0]= tf->uv[2][0]; - tf->uv[1][1]= tf->uv[2][1]; - - tf->uv[2][0]= u1; - tf->uv[2][1]= v1; - } - else { - tf->uv[0][0]= tf->uv[2][0]; - tf->uv[0][1]= tf->uv[2][1]; - tf->uv[2][0]= u1; - tf->uv[2][1]= v1; - } - } - } - } - else if(mode==2 && me->mcol) { - mf= me->mface; - tf= me->mtface; - mcol= me->mcol; - - for (a=0; a<me->totface; a++, tf++, mf++, mcol+=4) { - if(mf->flag & ME_FACE_SEL) { - MCol tmpcol= mcol[0]; - - if(mf->v4) { - mcol[0]= mcol[3]; - mcol[3]= tmpcol; - - tmpcol = mcol[1]; - mcol[1]= mcol[2]; - mcol[2]= tmpcol; - } - else { - mcol[0]= mcol[2]; - mcol[2]= tmpcol; - } - } - } - } - - BIF_undo_push("Mirror UV face"); - - object_uvs_changed(OBACT); -} - int minmax_tface(float *min, float *max) { Object *ob; |