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
committerSergey Sharybin <sergey.vfx@gmail.com>2015-09-23 17:02:24 +0300
commit23427bfebf414105846b88e054289af6c85abac8 (patch)
tree88845c4ec9fa6c1758562ceed6068107157df0be
parent574e859e387ef5c4a44b78530ea86ff8d9b63cbd (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 {