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>2013-07-25 16:07:55 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-25 16:07:55 +0400
commite69fdfab301f518eaa6b8a53564d0f6fb92119fc (patch)
tree7282dc5c02c9dd54e2395778bb761f92ebc89d33 /source/blender/editors/armature/armature_edit.c
parentb2b0b58fb5ee48fdbbee1d8f19b4051f80880908 (diff)
adjust createSpaceNormalTangent so it can take values from a matrix without having to negate the plane first.
also add ED_armature_ebone_to_mat3/4 since there were quite a few places that did this inline.
Diffstat (limited to 'source/blender/editors/armature/armature_edit.c')
-rw-r--r--source/blender/editors/armature/armature_edit.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/editors/armature/armature_edit.c b/source/blender/editors/armature/armature_edit.c
index 12602c10955..90c1a439a19 100644
--- a/source/blender/editors/armature/armature_edit.c
+++ b/source/blender/editors/armature/armature_edit.c
@@ -78,11 +78,10 @@ void ED_armature_apply_transform(Object *ob, float mat[4][4])
/* Do the rotations */
for (ebone = arm->edbo->first; ebone; ebone = ebone->next) {
- float delta[3], tmat[3][3];
+ float tmat[3][3];
/* find the current bone's roll matrix */
- sub_v3_v3v3(delta, ebone->tail, ebone->head);
- vec_roll_to_mat3(delta, ebone->roll, tmat);
+ ED_armature_ebone_to_mat3(ebone, tmat);
/* transform the roll matrix */
mul_m3_m3m3(tmat, mat3, tmat);
@@ -282,15 +281,14 @@ static int armature_calc_roll_exec(bContext *C, wmOperator *op)
mul_m3_v3(imat, vec);
}
else if (type == CALC_ROLL_ACTIVE) {
- float mat[3][3], nor[3];
+ float mat[3][3];
ebone = (EditBone *)arm->act_edbone;
if (ebone == NULL) {
BKE_report(op->reports, RPT_ERROR, "No active bone set");
return OPERATOR_CANCELLED;
}
- sub_v3_v3v3(nor, ebone->tail, ebone->head);
- vec_roll_to_mat3(nor, ebone->roll, mat);
+ ED_armature_ebone_to_mat3(ebone, mat);
copy_v3_v3(vec, mat[2]);
}
else { /* Axis */