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>2009-12-19 13:27:23 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-12-19 13:27:23 +0300
commit3e23f002b42dc1892665e1705f9f107c4e047b8a (patch)
treeafee38661589d491c664d04855c64e3f263a44df /source/blender/editors/object/object_transform.c
parentde7ffa1bac820a45a65e31cd367bc446153c89af (diff)
fix for non Euler-XYZ rotations...
- Camera to 3D view didnt check for rotation order. - Fly mode didnt check for rotation order. added util functions. - object_apply_mat4(ob, mat4); applies a 4x4 matrix to an objects loc,scale,rot (accounting for rotation modes) - object_mat3_to_rot(ob, mat3, use_compat); apply a 3x3 matrix to the objects rotation, option to use a euler compatible with the existing euler.
Diffstat (limited to 'source/blender/editors/object/object_transform.c')
-rw-r--r--source/blender/editors/object/object_transform.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index cd2361a1cc0..a16b0f2a7ac 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -555,17 +555,7 @@ static int visual_transform_apply_exec(bContext *C, wmOperator *op)
CTX_DATA_BEGIN(C, Object*, ob, selected_editable_objects) {
where_is_object(scene, ob);
-
- VECCOPY(ob->loc, ob->obmat[3]);
- mat4_to_size(ob->size,ob->obmat);
-
- if (ob->rotmode == ROT_MODE_QUAT)
- mat4_to_quat(ob->quat, ob->obmat);
- else if (ob->rotmode == ROT_MODE_AXISANGLE)
- mat4_to_axis_angle(ob->rotAxis, &ob->rotAngle, ob->obmat);
- else
- mat4_to_eul(ob->rot,ob->obmat);
-
+ object_apply_mat4(ob, ob->obmat);
where_is_object(scene, ob);
change = 1;