diff options
author | Martin Poirier <theeth@yahoo.com> | 2005-05-10 08:21:11 +0400 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2005-05-10 08:21:11 +0400 |
commit | d07dccc3869943c8c24275c59917429af4eae452 (patch) | |
tree | 8488705a716557daa0bfd2a8782db29f04306b87 /source/blender/src/toolbox.c | |
parent | 0c3f0556770ba1ef599400546beec62577904b35 (diff) |
Found some time do sanitize the big Transform call:
- Splited off the event treatment into a fonction of its own
- Splited off the initialisation phase into a function of its own (will have to do it for the manipulator function too)
Calling transform now works like this:
initTransform(mode, context)
- possible post init calls, constraints mostly
Transform()
- eventually, the postTransform function, so that Transform is just a simple big loop which could in the end just be tied in the blender event system instead.
- Added a state variable in TransInfo to replace the ret_val local variable. Possible values are: TRANS_RUNNING, TRANS_CANCEL, TRANS_CONFIRM
- Tied MMB and the hotkey select for constraint together, so selecting an axis with MMB and pressing the axis key after that goes to local mode on that axis. Much less confusing.
Diffstat (limited to 'source/blender/src/toolbox.c')
-rw-r--r-- | source/blender/src/toolbox.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c index e1a23e17bb5..16448c74838 100644 --- a/source/blender/src/toolbox.c +++ b/source/blender/src/toolbox.c @@ -1991,13 +1991,16 @@ static void tb_do_transform(void *arg, int event) switch(event) { case 0: /* Grab/move */ - Transform(TFM_TRANSLATION, CTX_NONE); + initTransform(TFM_TRANSLATION, CTX_NONE); + Transform(); break; case 1: /* Rotate */ - Transform(TFM_ROTATION, CTX_NONE); + initTransform(TFM_ROTATION, CTX_NONE); + Transform(); break; case 2: /* Scale */ - Transform(TFM_RESIZE,CTX_NONE); + initTransform(TFM_RESIZE,CTX_NONE); + Transform(); break; case 3: /* transform properties */ add_blockhandler(curarea, VIEW3D_HANDLER_OBJECT, UI_PNL_UNSTOW); @@ -2006,13 +2009,16 @@ static void tb_do_transform(void *arg, int event) snapmenu(); break; case 5: /* Shrink/Fatten Along Normals */ - Transform(TFM_SHRINKFATTEN, CTX_NONE); + initTransform(TFM_SHRINKFATTEN, CTX_NONE); + Transform(); break; case 6: /* Shear */ - Transform(TFM_SHEAR, CTX_NONE); + initTransform(TFM_SHEAR, CTX_NONE); + Transform(); break; case 7: /* Warp */ - Transform(TFM_WARP, CTX_NONE); + initTransform(TFM_WARP, CTX_NONE); + Transform(); break; case 8: /* proportional edit (toggle) */ if(G.scene->proportional) G.scene->proportional= 0; |