diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-29 04:59:04 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-04-29 04:59:04 +0400 |
commit | 2585d524057da908668bb6d5ff7ec8b344d23093 (patch) | |
tree | 2494aaa2281e568e4904fbe419f6a032535c65ad /source/blender/editors/transform/transform_orientations.c | |
parent | d8e12e8710f7c24e046c132e84eff416b8e8d06c (diff) | |
parent | 4465d2f419a8515df41a8fc415774eedaef0e6f6 (diff) |
Merged changes in the trunk up to revision 46045.
Conflicts resolved:
doc/python_api/sphinx_doc_gen.py
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/editors/mesh/editmesh_tools.c
source/blender/makesdna/DNA_scene_types.h
Diffstat (limited to 'source/blender/editors/transform/transform_orientations.c')
-rw-r--r-- | source/blender/editors/transform/transform_orientations.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c index bdd7c633df2..3d7f5d758c6 100644 --- a/source/blender/editors/transform/transform_orientations.c +++ b/source/blender/editors/transform/transform_orientations.c @@ -176,8 +176,7 @@ TransformOrientation *createMeshSpace(bContext *C, ReportList *reports, char *na type = getTransformOrientation(C, normal, plane, 0); - switch (type) - { + switch (type) { case ORIENTATION_VERT: if (createSpaceNormal(mat, normal) == 0) { BKE_reports_prepend(reports, "Cannot use vertex with zero-length normal"); @@ -493,7 +492,7 @@ void initTransformOrientation(bContext *C, TransInfo *t) Object *ob = CTX_data_active_object(C); Object *obedit = CTX_data_active_object(C); - switch(t->current_orientation) { + switch (t->current_orientation) { case V3D_MANIP_GLOBAL: strcpy(t->spacename, "global"); break; @@ -576,12 +575,11 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], float vec[3]= {0,0,0}; /* USE LAST SELECTED WITH ACTIVE */ - if (activeOnly && EDBM_editselection_active_get(em, &ese)) { - EDBM_editselection_normal(normal, &ese); - EDBM_editselection_plane(em, plane, &ese); + if (activeOnly && BM_select_history_active_get(em->bm, &ese)) { + BM_editselection_normal(&ese, normal); + BM_editselection_plane(&ese, plane); - switch (ese.htype) - { + switch (ese.htype) { case BM_VERT: result = ORIENTATION_VERT; break; @@ -716,15 +714,14 @@ int getTransformOrientation(const bContext *C, float normal[3], float plane[3], Nurb *nu; BezTriple *bezt; int a; - ListBase *nurbs= curve_editnurbs(cu); + ListBase *nurbs= BKE_curve_editNurbs_get(cu); for (nu = nurbs->first; nu; nu = nu->next) { /* only bezier has a normal */ if (nu->type == CU_BEZIER) { bezt= nu->bezt; a= nu->pntsu; - while (a--) - { + while (a--) { /* exception */ if ((bezt->f1 & SELECT) + (bezt->f2 & SELECT) + (bezt->f3 & SELECT) > SELECT) { sub_v3_v3v3(normal, bezt->vec[0], bezt->vec[2]); @@ -885,8 +882,7 @@ void ED_getTransformOrientationMatrix(const bContext *C, float orientation_mat[] type = getTransformOrientation(C, normal, plane, activeOnly); - switch (type) - { + switch (type) { case ORIENTATION_NORMAL: if (createSpaceNormalTangent(orientation_mat, normal, plane) == 0) { type = ORIENTATION_NONE; |