From c3bbd543c708dd42fc124172939cabde7601fe9d Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 14 Nov 2007 16:50:51 +0000 Subject: Small feature added to new "show bone paths around cfra": - after a insert-key (autokey mode) it updates paths. --- source/blender/src/editarmature.c | 5 ++--- source/blender/src/transform_conversions.c | 11 +++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) (limited to 'source') diff --git a/source/blender/src/editarmature.c b/source/blender/src/editarmature.c index d61656045fd..3e7e00ef240 100644 --- a/source/blender/src/editarmature.c +++ b/source/blender/src/editarmature.c @@ -2371,6 +2371,8 @@ int do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits) nearBone= get_bone_from_selectbuffer(base, buffer, hits, 1); if (nearBone) { + bArmature *arm= ob->data; + /* since we do unified select, we don't shift+select a bone if the armature object was not active yet */ if (!(G.qual & LR_SHIFTKEY) || base!=BASACT){ deselectall_posearmature(ob, 0, 0); @@ -2381,9 +2383,7 @@ int do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits) if (nearBone->flag & BONE_SELECTED) { /* if not active, we make it active */ if((nearBone->flag & BONE_ACTIVE)==0) { - bArmature *arm= ob->data; bone_looper(ob, arm->bonebase.first, NULL, clear_active_flag); - nearBone->flag |= BONE_ACTIVE; } else { @@ -2392,7 +2392,6 @@ int do_pose_selectbuffer(Base *base, unsigned int *buffer, short hits) } } else{ - bArmature *arm= ob->data; bone_looper(ob, arm->bonebase.first, NULL, clear_active_flag); nearBone->flag |= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE); diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 7de16146bca..60ff52ec747 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -2765,6 +2765,7 @@ void autokeyframe_ob_cb_func(Object *ob, int tmode) */ void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik) { + bArmature *arm= ob->data; bAction *act; bPose *pose; bPoseChannel *pchan; @@ -2838,6 +2839,16 @@ void autokeyframe_pose_cb_func(Object *ob, int tmode, short targetless_ik) remake_action_ipos (act); allqueue(REDRAWMARKER, 0); + + /* locking can be disabled */ + ob->pose->flag &= ~(POSE_DO_UNLOCK|POSE_LOCKED); + + /* do the bone paths */ + if (arm->pathflag & ARM_PATH_ACFRA) { + pose_clear_paths(ob); + pose_calculate_path(ob); + } + } else { /* tag channels that should have unkeyed data */ -- cgit v1.2.3