Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/armature.c
| Show First 20 Lines • Show All 2,875 Lines • ▼ Show 20 Lines | for (pchan = ob->pose->chanbase.first; pchan; pchan = pchan->next) { | ||||
| if (pchan->bone && (!((use_hidden == false) && (PBONE_VISIBLE(arm, pchan->bone) == false)) && | if (pchan->bone && (!((use_hidden == false) && (PBONE_VISIBLE(arm, pchan->bone) == false)) && | ||||
| !((use_select == true) && ((pchan->bone->flag & BONE_SELECTED) == 0)))) { | !((use_select == true) && ((pchan->bone->flag & BONE_SELECTED) == 0)))) { | ||||
| bPoseChannel *pchan_tx = (pchan->custom && pchan->custom_tx) ? pchan->custom_tx : pchan; | bPoseChannel *pchan_tx = (pchan->custom && pchan->custom_tx) ? pchan->custom_tx : pchan; | ||||
| BoundBox *bb_custom = ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM)) ? | BoundBox *bb_custom = ((pchan->custom) && !(arm->flag & ARM_NO_CUSTOM)) ? | ||||
| BKE_object_boundbox_get(pchan->custom) : | BKE_object_boundbox_get(pchan->custom) : | ||||
| NULL; | NULL; | ||||
| if (bb_custom) { | if (bb_custom) { | ||||
| float mat[4][4], smat[4][4]; | float mat[4][4], smat[4][4]; | ||||
| scale_m4_fl(smat, PCHAN_CUSTOM_DRAW_SIZE(pchan)); | scale_m4_fl(smat, PCHAN_CUSTOM_BONE_LENGTH(pchan)); | ||||
| mul_m4_v3(smat, pchan->custom_scale_xyz); | |||||
| mul_m4_series(mat, ob->obmat, pchan_tx->pose_mat, smat); | mul_m4_series(mat, ob->obmat, pchan_tx->pose_mat, smat); | ||||
| BKE_boundbox_minmax(bb_custom, mat, r_min, r_max); | BKE_boundbox_minmax(bb_custom, mat, r_min, r_max); | ||||
| } | } | ||||
| else { | else { | ||||
| float vec[3]; | float vec[3]; | ||||
| mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_head); | mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_head); | ||||
| minmax_v3v3_v3(r_min, r_max, vec); | minmax_v3v3_v3(r_min, r_max, vec); | ||||
| mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_tail); | mul_v3_m4v3(vec, ob->obmat, pchan_tx->pose_tail); | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||