diff options
author | Martin Poirier <theeth@yahoo.com> | 2008-01-29 05:38:26 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2008-01-29 05:38:26 +0300 |
commit | 14d1c736b8b6f4e59c51b316b735136e79004873 (patch) | |
tree | 3a161acfaa54de2a4fd8598a9c6bd879e42bee7d /source/blender/src/editsima.c | |
parent | 8072d88c75cab6bbcd2baf3b484acdf43cb04b4e (diff) |
=== Mirror Tool ===
Fix calls to new mirror in UV window (it would segfault with invalid arguments).
Reported by Matt in the tracker (#8176)
Diffstat (limited to 'source/blender/src/editsima.c')
-rw-r--r-- | source/blender/src/editsima.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c index 0c29bceba37..73ff70436f3 100644 --- a/source/blender/src/editsima.c +++ b/source/blender/src/editsima.c @@ -240,17 +240,12 @@ void transform_width_height_tface_uv(int *width, int *height) } } -void mirror_tface_uv(char mirroraxis) -{ - if (mirroraxis == 'x') - Mirror(1); /* global x */ - else if (mirroraxis == 'y') - Mirror(2); /* global y */ -} - void mirrormenu_tface_uv(void) { + float mat[3][3]; short mode= 0; + + Mat3One(mat); if( is_uv_tface_editing_allowed()==0 ) return; @@ -258,8 +253,16 @@ void mirrormenu_tface_uv(void) if(mode==-1) return; - if(mode==1) mirror_tface_uv('x'); - else if(mode==2) mirror_tface_uv('y'); + if (mode == 1) { + initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM); + BIF_setSingleAxisConstraint(mat[0], " on X axis"); + Transform(); + } + else { + initTransform(TFM_MIRROR, CTX_NO_PET|CTX_AUTOCONFIRM); + BIF_setSingleAxisConstraint(mat[1], " on Y axis"); + Transform(); + } BIF_undo_push("Mirror UV"); } |