Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/transform/transform_orientations.c
| Show First 20 Lines • Show All 630 Lines • ▼ Show 20 Lines | if (ob->type == OB_MESH) { | ||||
| } | } | ||||
| else { | else { | ||||
| if (em->bm->totfacesel >= 1) { | if (em->bm->totfacesel >= 1) { | ||||
| BMFace *efa; | BMFace *efa; | ||||
| BMIter iter; | BMIter iter; | ||||
| BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { | BM_ITER_MESH (efa, &iter, em->bm, BM_FACES_OF_MESH) { | ||||
| if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) { | if (BM_elem_flag_test(efa, BM_ELEM_SELECT)) { | ||||
| BM_face_calc_plane(efa, vec); | BM_face_calc_tangent_auto(efa, vec); | ||||
| add_v3_v3(normal, efa->no); | add_v3_v3(normal, efa->no); | ||||
| add_v3_v3(plane, vec); | add_v3_v3(plane, vec); | ||||
| } | } | ||||
| } | } | ||||
| result = ORIENTATION_FACE; | result = ORIENTATION_FACE; | ||||
| } | } | ||||
| else if (em->bm->totvertsel == 3) { | else if (em->bm->totvertsel == 3) { | ||||
| ▲ Show 20 Lines • Show All 441 Lines • Show Last 20 Lines | |||||