diff options
author | Ton Roosendaal <ton@blender.org> | 2011-01-06 17:19:46 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-01-06 17:19:46 +0300 |
commit | 7b302d5052f982f233cebd3492a5c4fb6f761994 (patch) | |
tree | b1f8ffa32041ce85347a1d4c1a306067c03f0873 /source/blender/editors/transform/transform.c | |
parent | 149955b3e2dd557057d7507f26594964f4ff5cc0 (diff) |
Bug fix:
On texture-space transform, pressing Rkey crashed.
Now it refuses to enter rotation mode. :)
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 3f21b9bc702..d25a443a741 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -607,20 +607,22 @@ int transformEvent(TransInfo *t, wmEvent *event) break; case TFM_MODAL_ROTATE: /* only switch when... */ - if( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) { - - resetTransRestrictions(t); - - if (t->mode == TFM_ROTATION) { - restoreTransObjects(t); - initTrackball(t); - } - else { - restoreTransObjects(t); - initRotation(t); + if(!(t->options & CTX_TEXTURE)) { + if( ELEM4(t->mode, TFM_ROTATION, TFM_RESIZE, TFM_TRACKBALL, TFM_TRANSLATION) ) { + + resetTransRestrictions(t); + + if (t->mode == TFM_ROTATION) { + restoreTransObjects(t); + initTrackball(t); + } + else { + restoreTransObjects(t); + initRotation(t); + } + initSnapping(t, NULL); // need to reinit after mode change + t->redraw |= TREDRAW_HARD; } - initSnapping(t, NULL); // need to reinit after mode change - t->redraw |= TREDRAW_HARD; } break; case TFM_MODAL_RESIZE: |