From 7be3378d1620b1a8029b78425e3a64e2fcd6b210 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 7 Sep 2018 11:24:37 +1000 Subject: Fix normal transform orientation calculation When using the 'normal' orientation, the normal would be ignored if the plane couldn't be calculated. Now use only the normal if the plane is zero length, this was already done, just not in all cases. --- source/blender/editors/transform/transform.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/transform/transform.h') diff --git a/source/blender/editors/transform/transform.h b/source/blender/editors/transform/transform.h index 5f738804579..d53f51f5076 100644 --- a/source/blender/editors/transform/transform.h +++ b/source/blender/editors/transform/transform.h @@ -796,6 +796,8 @@ bool applyTransformOrientation(const struct bContext *C, float mat[3][3], char r #define ORIENTATION_VERT 2 #define ORIENTATION_EDGE 3 #define ORIENTATION_FACE 4 +#define ORIENTATION_USE_PLANE(ty) \ + ELEM(ty, ORIENTATION_NORMAL, ORIENTATION_EDGE, ORIENTATION_FACE) int getTransformOrientation_ex(const struct bContext *C, float normal[3], float plane[3], const short around); int getTransformOrientation(const struct bContext *C, float normal[3], float plane[3]); -- cgit v1.2.3