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:
authorCampbell Barton <ideasman42@gmail.com>2015-09-21 08:03:31 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-09-21 08:15:59 +0300
commitff3c7460e5e0865b63f964f10ffe4f47e627674e (patch)
tree88e89cfc20928550b2454b88812d86e7b8a297ba
parent034cc855f0abf265f84b3d1ffdfc65a401fd94bc (diff)
Fix view-selected w/ custom bone shapes
Was ignoring bone-length, also check that drawing shapes is enabled.
-rw-r--r--source/blender/blenkernel/intern/armature.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index c23595b6ee1..29f2ad0d512 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -2225,11 +2225,12 @@ bool BKE_pose_minmax(Object *ob, float r_min[3], float r_max[3], bool use_hidden
!((use_select == true) && ((pchan->bone->flag & BONE_SELECTED) == 0))))
{
bPoseChannel *pchan_tx = (pchan->custom && pchan->custom_tx) ? pchan->custom_tx : pchan;
- BoundBox *bb_custom = pchan->custom ? BKE_object_boundbox_get(pchan->custom) : NULL;
-
+ BoundBox *bb_custom = ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM)) ?
+ BKE_object_boundbox_get(pchan->custom) : NULL;
if (bb_custom) {
- float mat[4][4];
- mul_m4_m4m4(mat, ob->obmat, pchan_tx->pose_mat);
+ float mat[4][4], smat[4][4];
+ scale_m4_fl(smat, pchan->bone->length);
+ mul_m4_series(mat, ob->obmat, pchan_tx->pose_mat, smat);
BKE_boundbox_minmax(bb_custom, mat, r_min, r_max);
}
else {