Armature-Pose IK goodies!

- Added option to the IK buttons, to have it use the 'tip' as end of the
  IK chain. I never really understood this old convention (IK didn't work
  on the Bone itself).
  Old files still will read OK though. But I made the "To Tip" a default
  when adding new IK constraints.

- Hotkey CTRL+I: add IK, with option to have it adding an Empty target,
  or use a selected Bone as target. With the new non-modal PoseMode, it
  gives instant access to playing with the IK chain.

- Hotkey ALT+I: clears IK, on all selected Bones

- Hotkey ALT+C: clears Constraints on all selected Bones (incl IK)
This commit is contained in:
2005-07-24 11:36:05 +00:00
parent 1d27a7676b
commit 4d273d8d5b
10 changed files with 218 additions and 35 deletions

View File

@@ -103,6 +103,7 @@
#include "BIF_meshtools.h"
#include "BIF_mywindow.h"
#include "BIF_oops.h"
#include "BIF_poseobject.h"
#include "BIF_outliner.h"
#include "BIF_resources.h"
#include "BIF_screen.h"
@@ -1122,7 +1123,10 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
copy_attr_menu();
}
else if(G.qual==LR_ALTKEY) {
convertmenu(); /* editobject.c */
if(ob && (ob->flag & OB_POSEMODE))
pose_clear_constraints(); /* poseobject.c */
else
convertmenu(); /* editobject.c */
}
else if((G.qual==LR_SHIFTKEY)) {
view3d_home(1);
@@ -1295,6 +1299,17 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
}
break;
case IKEY:
if(G.obedit);
else if(G.qual==LR_CTRLKEY) {
if(ob && ob->type==OB_ARMATURE)
if(ob->flag & OB_POSEMODE)
pose_add_IK();
}
else if(G.qual==LR_ALTKEY) {
if(ob && ob->type==OB_ARMATURE)
if(ob->flag & OB_POSEMODE)
pose_clear_IK();
}
break;
case JKEY: