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 15:05:08 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-07-25 15:05:08 +0400
commitb2b0b58fb5ee48fdbbee1d8f19b4051f80880908 (patch)
tree6126012b0c749a3529e3f5144929f340d0c69d60 /source/blender/editors/transform/transform_orientations.c
parentaec8cff9ab730fdf525242ffbf1f4dcfd67c2bb1 (diff)
fix [#36278] X,Y Direction wrong after bpy.ops.view3d.viewnumpad
the cause of the problem was the orientation from the active object was inconstant. copying the obmat directly gave a different result then getting the normal,tangent from getTransformOrientation and passing to createSpaceNormalTangent.
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 47a63bdb063..a424613d616 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -895,8 +895,11 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3],
}
if (ob) {
+ /* note: negating the plane so when used with createSpaceNormalTangent(),
+ * we want the normal and the plane to make the same orientation as
+ * what we would get from 'ob->obmat' */
copy_v3_v3(normal, ob->obmat[2]);
- copy_v3_v3(plane, ob->obmat[1]);
+ negate_v3_v3(plane, ob->obmat[1]);
}
result = ORIENTATION_NORMAL;
}