Two new IK features.
1) Target-less IK If you add an IK constraint without a target set (no object or bone target), it now can be grabbed and moved with IK, using its own Bone tip or root as target itself. This way you can use IK for posing, without having the IK executed while it animates or while a Pose is being solved for real IK. After grabbing "Target-less IK", it applies the resulted motion in the pose-channels, which then can be used to insert keypositions. The Target-less IK bone can still be rotated without IK, also its chain can be edited as usual. UI: The CTRL+I menu gives this as an option too. In the 3D window it is drawn with orangish color. Note that IK is not resistant to non-uniform scaling yet. 2) Auto-IK When the option "Automatic IK" is set, in Edit Buttons Armature Panel, it creates automatic temporal Target-less IK for the Bone you grab or translate. The rules are: - it only works when a single Bone is selected - if the Bone is a root bone (no parent), it adds IK to the end of the chain(s) - otherwise it adds the IK to the active Bone - the temporal IK chain only consists of connected Bones. This method is still a bit experimental. Maybe it should become a special grabbing option (like SHIFT+G in Pose Mode). It also only works OK for rigs that fit for it well... when a rig already is fully setup with IK it can't do much good. :)
This commit is contained in:
@@ -622,7 +622,7 @@ void add_constraint(int only_IK)
|
||||
else if(obsel)
|
||||
nr= pupmenu("Add IK Constraint%t|To Selected Object%x10");
|
||||
else
|
||||
nr= pupmenu("Add IK Constraint%t|To New Empty Object%x10");
|
||||
nr= pupmenu("Add IK Constraint%t|To New Empty Object%x10|Without Target%x11");
|
||||
}
|
||||
else {
|
||||
if(pchanact) {
|
||||
@@ -648,7 +648,7 @@ void add_constraint(int only_IK)
|
||||
if(nr<1) return;
|
||||
|
||||
/* handle IK separate */
|
||||
if(nr==10) {
|
||||
if(nr==10 || nr==11) {
|
||||
|
||||
/* prevent weird chains... */
|
||||
if(pchansel) {
|
||||
@@ -675,6 +675,7 @@ void add_constraint(int only_IK)
|
||||
con = add_new_constraint(CONSTRAINT_TYPE_KINEMATIC);
|
||||
BLI_addtail(&pchanact->constraints, con);
|
||||
pchanact->constflag |= PCHAN_HAS_IK; // for draw, but also for detecting while pose solving
|
||||
if(nr==11) pchanact->constflag |= PCHAN_HAS_TARGET;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -704,7 +705,7 @@ void add_constraint(int only_IK)
|
||||
else if(obsel) {
|
||||
set_constraint_target(con, obsel, NULL);
|
||||
}
|
||||
else { /* add new empty as target */
|
||||
else if(nr!=11) { /* add new empty as target */
|
||||
Base *base= BASACT, *newbase;
|
||||
Object *obt;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user