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-11-06 13:38:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-06 13:38:00 +0300
commitd4fe2595f7c350c90feba61ba8d520850648b06f (patch)
tree5740ccae324a64e4ab369fc07c01c22024a0d6ed /source/blender/editors/transform/transform_manipulator.c
parentcc2476fde5f2ae4a3df625780b056580c7836712 (diff)
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).
Diffstat (limited to 'source/blender/editors/transform/transform_manipulator.c')
-rw-r--r--source/blender/editors/transform/transform_manipulator.c44
1 files changed, 1 insertions, 43 deletions
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 */