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>2018-09-07 04:27:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-07 04:27:18 +0300
commit5940ea11ce89ce16db1cfa956b80efcfddc2e2c8 (patch)
treecf220b075727cfc222a7b8c714caef7e6e4f7b02 /source/blender/editors/transform/transform_orientations.c
parentd49cbe19364c6bb03a2d531abc5abe95dfaa6c7d (diff)
parent7be3378d1620b1a8029b78425e3a64e2fcd6b210 (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r--source/blender/editors/transform/transform_orientations.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 93d4b1d5409..2dcd11d89ff 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -793,12 +793,7 @@ int getTransformOrientation_ex(const bContext *C, float normal[3], float plane[3
}
}
- if (is_zero_v3(plane)) {
- result = ORIENTATION_VERT;
- }
- else {
- result = ORIENTATION_EDGE;
- }
+ result = ORIENTATION_EDGE;
}
else if (em->bm->totvertsel > 3) {
BMIter iter;
@@ -1101,6 +1096,11 @@ void ED_getTransformOrientationMatrix(const bContext *C, float orientation_mat[3
type = getTransformOrientation_ex(C, normal, plane, around);
+ /* Fallback, when the plane can't be calculated. */
+ if (ORIENTATION_USE_PLANE(type) && is_zero_v3(plane)) {
+ type = ORIENTATION_VERT;
+ }
+
switch (type) {
case ORIENTATION_NORMAL:
if (createSpaceNormalTangent(orientation_mat, normal, plane) == 0) {