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-07-13 21:27:32 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-07-13 21:30:16 +0300
commit406b9aa7b1ead0ff2757a463bc7efe9fdcee5fbe (patch)
tree70272b7c803598d5875f711db6c1ddbdfc019477 /source/blender/editors/transform/transform_snap.c
parent6f7926c61c94ea9bd2969ebfcc7e09994ffe901d (diff)
Fix T45402: Transform crash w/ project+align snap
Only euler rotations were checked for. Also delta rotations caused random/unusable output.
Diffstat (limited to 'source/blender/editors/transform/transform_snap.c')
-rw-r--r--source/blender/editors/transform/transform_snap.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c
index e86b11f1df3..99d9836014c 100644
--- a/source/blender/editors/transform/transform_snap.c
+++ b/source/blender/editors/transform/transform_snap.c
@@ -343,31 +343,13 @@ void applyProject(TransInfo *t)
/* handle alignment as well */
const float *original_normal;
float mat[3][3];
- float totmat[3][3], smat[3][3];
- float eul[3], fmat[3][3];
- float obmat[3][3];
/* In pose mode, we want to align normals with Y axis of bones... */
original_normal = td->axismtx[2];
rotation_between_vecs_to_mat3(mat, original_normal, no);
- mul_m3_m3m3(totmat, mat, td->mtx);
- mul_m3_m3m3(smat, td->smtx, totmat);
-
- /* calculate the total rotatation in eulers */
- add_v3_v3v3(eul, td->ext->irot, td->ext->drot); /* we have to correct for delta rot */
- eulO_to_mat3(obmat, eul, td->ext->rotOrder);
- /* mat = transform, obmat = object rotation */
- mul_m3_m3m3(fmat, smat, obmat);
-
- mat3_to_compatible_eulO(eul, td->ext->rot, td->ext->rotOrder, fmat);
-
- /* correct back for delta rot */
- sub_v3_v3v3(eul, eul, td->ext->drot);
-
- /* and apply */
- copy_v3_v3(td->ext->rot, eul);
+ transform_data_ext_rotate(td, mat, true);
/* TODO support constraints for rotation too? see ElementRotation */
}