diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-12-18 11:38:02 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-12-18 11:38:02 +0400 |
commit | 2c0bceb1f51344ece4be7a41ca93cc72f0151667 (patch) | |
tree | fba68880e8a83ea31b5c34eb3007114409337153 /source/blender/editors | |
parent | a82397561e884a6ff4a640dc0cc419ff90a596e2 (diff) |
fix for own error in recent commit with active pose mode, depended on an uninitialized flag.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/transform/transform_manipulator.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index f848ab9f4dc..6b016bf4303 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -148,10 +148,8 @@ static void stats_pose(Scene *scene, RegionView3D *rv3d, bPoseChannel *pchan) Bone *bone = pchan->bone; if (bone) { - if (bone->flag & BONE_TRANSFORM) { - calc_tw_center(scene, pchan->pose_head); - protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag); - } + calc_tw_center(scene, pchan->pose_head); + protectflag_to_drawflags(pchan->protectflag, &rv3d->twdrawflag); } } @@ -503,9 +501,12 @@ int calc_manipulator_stats(const bContext *C) if ((v3d->around == V3D_ACTIVE) && (pchan = BKE_pose_channel_active(ob))) { /* doesn't check selection or visibility intentionally */ - stats_pose(scene, rv3d, pchan); - totsel = 1; - ok = TRUE; + Bone *bone = pchan->bone; + if (bone) { + stats_pose(scene, rv3d, pchan); + totsel = 1; + ok = TRUE; + } } else { totsel = count_set_pose_transflags(&mode, 0, ob); @@ -513,7 +514,10 @@ int calc_manipulator_stats(const bContext *C) if (totsel) { /* use channels to get stats */ for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { - stats_pose(scene, rv3d, pchan); + Bone *bone = pchan->bone; + if (bone && (bone->flag & BONE_TRANSFORM)) { + stats_pose(scene, rv3d, pchan); + } } ok = TRUE; } |