Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-02-17 12:34:21 +0300
committerJoshua Leung <aligorith@gmail.com>2009-02-17 12:34:21 +0300
commit6eae888d496de6f05764138dc0e47eec1e24258d (patch)
tree4e2cc6a11d962e20dfd57eab670cea7c06a88e0a
parente81fde5aa41f6dbaed3af0105cc268a6d4f3588c (diff)
PoseChannel Transforms - AutoIK Restored
- Auto-IK works again now. - Quick-animate feature works with Auto-IK now. - Also disabled the checks for existing animation data for this, making it easier to use/discover. At least we've got undo to cover for the cases where the user didn't intend to do this.
-rw-r--r--source/blender/editors/transform/transform_conversions.c10
-rw-r--r--source/blender/editors/transform/transform_generics.c10
2 files changed, 9 insertions, 11 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index bfa2394d292..3df76c1e4c4 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -125,6 +125,7 @@
#include "ED_image.h"
#include "ED_keyframing.h"
#include "ED_keyframes_edit.h"
+#include "ED_object.h"
#include "ED_mesh.h"
#include "ED_types.h"
#include "ED_uvedit.h"
@@ -835,18 +836,17 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
if(data->tar==NULL || (data->tar->type==OB_ARMATURE && data->subtarget[0]==0)) {
targetless = con;
/* but, if this is a targetless IK, we make it auto anyway (for the children loop) */
- if (con->enforce!=0.0) {
+ if (con->enforce!=0.0f) {
targetless->flag |= CONSTRAINT_IK_AUTO;
return 0;
}
}
- if ((con->flag & CONSTRAINT_DISABLE)==0 && (con->enforce!=0.0))
+ if ((con->flag & CONSTRAINT_DISABLE)==0 && (con->enforce!=0.0f))
return 0;
}
}
- // TRANSFORM_FIX_ME
- //con = add_new_constraint(CONSTRAINT_TYPE_KINEMATIC);
+ con = add_new_constraint(CONSTRAINT_TYPE_KINEMATIC);
BLI_addtail(&pchan->constraints, con);
pchan->constflag |= (PCHAN_HAS_IK|PCHAN_HAS_TARGET); /* for draw, but also for detecting while pose solving */
data= con->data;
@@ -965,7 +965,6 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
if (arm->flag & ARM_RESTPOS) {
if (ELEM(t->mode, TFM_DUMMY, TFM_BONESIZE)==0) {
- //notice("Pose edit not possible while Rest Position is enabled");
BKE_report(CTX_reports(C), RPT_ERROR, "Can't select linked when sync selection is enabled.");
return;
}
@@ -1004,7 +1003,6 @@ static void createTransPose(bContext *C, TransInfo *t, Object *ob)
}
if(td != (t->data+t->total)) {
- // printf("Bone selection count error\n");
BKE_report(CTX_reports(C), RPT_DEBUG, "Bone selection count error.");
}
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 7c865e91c40..16798ea2cd5 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -565,10 +565,10 @@ void recalcData(TransInfo *t)
* check if the auto-record feature means that we should record 'samples'
* (i.e. uneditable animation values)
*/
- // XXX experimental feature
// TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes?
- if ((ob->adt) && (t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
- short targetless_ik= 0; // XXX...
+ // TODO: maybe the ob->adt check isn't really needed? makes it too difficult to use...
+ if (/*(ob->adt) && */(t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
+ short targetless_ik= (t->flag & T_AUTOIK);
autokeyframe_pose_cb_func(t->scene, (View3D *)t->view, ob, t->mode, targetless_ik);
}
@@ -593,9 +593,9 @@ void recalcData(TransInfo *t)
* check if the auto-record feature means that we should record 'samples'
* (i.e. uneditable animation values)
*/
- // XXX experimental feature
// TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes?
- if ((ob->adt) && (t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
+ // TODO: maybe the ob->adt check isn't really needed? makes it too difficult to use...
+ if (/*(ob->adt) && */(t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
autokeyframe_ob_cb_func(t->scene, (View3D *)t->view, ob, t->mode);
}