From d4fe2595f7c350c90feba61ba8d520850648b06f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 6 Nov 2009 10:38:00 +0000 Subject: bring back align to view to object - In 2.4x this was numpad *, however that would only align on the Z axis. - New behavior for VIEW3D_OT_viewnumpad, holding Shift with Numpad 1/3/7 sets the left/top/front etc on the normal axis. - Uses active bone, face, edge, vert, curve handel & object (just like the view manipulator with 'Normal' selected). --- .../editors/transform/transform_manipulator.c | 44 +--------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'source/blender/editors/transform/transform_manipulator.c') diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c index a1d62f93568..dd94fef4059 100644 --- a/source/blender/editors/transform/transform_manipulator.c +++ b/source/blender/editors/transform/transform_manipulator.c @@ -259,8 +259,6 @@ int calc_manipulator_stats(const bContext *C) RegionView3D *rv3d= ar->regiondata; Base *base; Object *ob= OBACT; - float normal[3]={0.0, 0.0, 0.0}; - float plane[3]={0.0, 0.0, 0.0}; int a, totsel= 0; /* transform widget matrix */ @@ -498,47 +496,7 @@ int calc_manipulator_stats(const bContext *C) } case V3D_MANIP_NORMAL: if(obedit || ob->mode & OB_MODE_POSE) { - float mat[3][3]; - int type; - - type = getTransformOrientation(C, normal, plane, (v3d->around == V3D_ACTIVE)); - - switch (type) - { - case ORIENTATION_NORMAL: - if (createSpaceNormalTangent(mat, normal, plane) == 0) - { - type = ORIENTATION_NONE; - } - break; - case ORIENTATION_VERT: - if (createSpaceNormal(mat, normal) == 0) - { - type = ORIENTATION_NONE; - } - break; - case ORIENTATION_EDGE: - if (createSpaceNormalTangent(mat, normal, plane) == 0) - { - type = ORIENTATION_NONE; - } - break; - case ORIENTATION_FACE: - if (createSpaceNormalTangent(mat, normal, plane) == 0) - { - type = ORIENTATION_NONE; - } - break; - } - - if (type == ORIENTATION_NONE) - { - Mat4One(rv3d->twmat); - } - else - { - Mat4CpyMat3(rv3d->twmat, mat); - } + getTransformOrientationMatrix(C, rv3d->twmat, (v3d->around == V3D_ACTIVE)); break; } /* no break we define 'normal' as 'local' in Object mode */ -- cgit v1.2.3