New: Hotkey/menu access in 3D window to add constraints. Works in PoseMode

as well as for Objects. Hotkey: CTRL+ALT+C (bit clumsy I know, but I like
to use the Ckey).

Constraints are added to the active Object or Bone.
Based on selection context, the menu has three versions:

Pose Mode:
  - if another bone is selected, bone becomes target
  - else if another Object is selected, Object becomes target
  - else it adds a new Empty as target
Object Mode
  - if another Object is selected: Object becomes target
  - else it adds a new Empty as target

Same works this way now for CTRL+I, "Add IK".

To be solved: ALT+C in PoseMode is "Clear Constraints", but in Object Mode
it does "Convert" still...
This commit is contained in:
2005-10-23 12:18:32 +00:00
parent 84f6642437
commit d4f47002b8
4 changed files with 197 additions and 101 deletions

View File

@@ -87,6 +87,7 @@
#include "BIF_drawtext.h"
#include "BIF_drawscript.h"
#include "BIF_editarmature.h"
#include "BIF_editconstraint.h"
#include "BIF_editfont.h"
#include "BIF_editkey.h"
#include "BIF_editlattice.h"
@@ -1157,6 +1158,8 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
else
convertmenu(); /* editobject.c */
}
else if(G.qual==(LR_ALTKEY|LR_CTRLKEY))
add_constraint(0); /* editconstraint.c, generic for objects and posemode */
else if((G.qual==LR_SHIFTKEY)) {
view3d_home(1);
curs= give_cursor();