[Bf-blender-cvs] [23427bf] blender-v2.76-release: Fix view-selected w/ custom bone shapes
Campbell Barton
noreply at git.blender.org
Wed Sep 23 16:12:05 CEST 2015
Commit: 23427bfebf414105846b88e054289af6c85abac8
Author: Campbell Barton
Date: Mon Sep 21 15:03:31 2015 +1000
Branches: blender-v2.76-release
https://developer.blender.org/rB23427bfebf414105846b88e054289af6c85abac8
Fix view-selected w/ custom bone shapes
Was ignoring bone-length, also check that drawing shapes is enabled.
===================================================================
M source/blender/blenkernel/intern/armature.c
===================================================================
diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index c23595b..29f2ad0 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 {
More information about the Bf-blender-cvs
mailing list