diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-09-20 08:56:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-09-20 08:56:24 +0400 |
commit | edb78d090cca36110290f8f37d27767d75894a1a (patch) | |
tree | 792844cfe7e78cbf8a679328a742ae4fee73fab4 /source/blender/editors/transform | |
parent | f169643d46ce05d1ac1054d15e280e15b8d78abc (diff) |
code cleanup:
- make view3d project names more consistent.
- remove apply_project_float() its not needed.
- update comments referencing an old function name.
- move doxygen docs into the C file, prefer they are kept here to avoid getting out of sync with code.
Diffstat (limited to 'source/blender/editors/transform')
-rw-r--r-- | source/blender/editors/transform/transform.c | 14 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_snap.c | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 669e66686cb..07f98297c1c 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -226,7 +226,7 @@ void projectIntView(TransInfo *t, const float vec[3], int adr[2]) { if (t->spacetype == SPACE_VIEW3D) { if (t->ar->regiontype == RGN_TYPE_WINDOW) - project_int_noclip(t->ar, vec, adr); + ED_view3d_project_int_noclip(t->ar, vec, adr); } else if (t->spacetype == SPACE_IMAGE) { SpaceImage *sima = t->sa->spacedata.first; @@ -344,7 +344,7 @@ void projectFloatView(TransInfo *t, const float vec[3], float adr[2]) case SPACE_VIEW3D: { if (t->ar->regiontype == RGN_TYPE_WINDOW) { - project_float_noclip(t->ar, vec, adr); + ED_view3d_project_float_noclip(t->ar, vec, adr); return; } break; @@ -4765,7 +4765,7 @@ static void calcNonProportionalEdgeSlide(TransInfo *t, SlideData *sld, const flo sv->edge_len = len_v3v3(dw_p, up_p); mul_v3_m4v3(v_proj, t->obedit->obmat, sv->v->co); - project_float_noclip(t->ar, v_proj, v_proj); + ED_view3d_project_float_noclip(t->ar, v_proj, v_proj); dist = len_squared_v2v2(mval, v_proj); if (dist < min_dist) { @@ -5031,19 +5031,19 @@ static int createSlideVerts(TransInfo *t) j = GET_INT_FROM_POINTER(BLI_smallhash_lookup(&table, (uintptr_t)v)); if (sv_array[j].down) { - ED_view3d_project_float_v3(ar, sv_array[j].down->co, vec1, projectMat); + ED_view3d_project_float_v3_m4(ar, sv_array[j].down->co, vec1, projectMat); } else { add_v3_v3v3(vec1, v->co, sv_array[j].downvec); - ED_view3d_project_float_v3(ar, vec1, vec1, projectMat); + ED_view3d_project_float_v3_m4(ar, vec1, vec1, projectMat); } if (sv_array[j].up) { - ED_view3d_project_float_v3(ar, sv_array[j].up->co, vec2, projectMat); + ED_view3d_project_float_v3_m4(ar, sv_array[j].up->co, vec2, projectMat); } else { add_v3_v3v3(vec2, v->co, sv_array[j].upvec); - ED_view3d_project_float_v3(ar, vec2, vec2, projectMat); + ED_view3d_project_float_v3_m4(ar, vec2, vec2, projectMat); } /* global direction */ diff --git a/source/blender/editors/transform/transform_snap.c b/source/blender/editors/transform/transform_snap.c index 6e371e5e002..1d75be05534 100644 --- a/source/blender/editors/transform/transform_snap.c +++ b/source/blender/editors/transform/transform_snap.c @@ -315,7 +315,7 @@ void applyProject(TransInfo *t) copy_v3_v3(iloc, td->ob->obmat[3]); } - project_float(t->ar, iloc, mval); + ED_view3d_project_float(t->ar, iloc, mval); if (snapObjectsTransform(t, mval, &dist, loc, no, t->tsnap.modeSelect)) { // if (t->flag & (T_EDIT|T_POSE)) { @@ -601,7 +601,7 @@ int updateSelectedSnapPoint(TransInfo *t) int dx, dy; int dist; - project_int(t->ar, p->co, screen_loc); + ED_view3d_project_int(t->ar, p->co, screen_loc); dx = t->mval[0] - screen_loc[0]; dy = t->mval[1] - screen_loc[1]; @@ -1164,7 +1164,7 @@ static int snapFace(ARegion *ar, float v1co[3], float v2co[3], float v3co[3], fl new_depth = len_v3v3(location, ray_start); - project_int(ar, location, screen_loc); + ED_view3d_project_int(ar, location, screen_loc); new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); if (new_dist <= *dist && new_depth < *depth) { @@ -1232,7 +1232,7 @@ static int snapEdge(ARegion *ar, float v1co[3], short v1no[3], float v2co[3], sh new_depth = len_v3v3(location, ray_start); - project_int(ar, location, screen_loc); + ED_view3d_project_int(ar, location, screen_loc); new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); /* 10% threshold if edge is closer but a bit further @@ -1289,7 +1289,7 @@ static int snapVertex(ARegion *ar, float vco[3], short vno[3], float obmat[][4], new_depth = len_v3v3(location, ray_start); - project_int(ar, location, screen_loc); + ED_view3d_project_int(ar, location, screen_loc); new_dist = abs(screen_loc[0] - (int)mval[0]) + abs(screen_loc[1] - (int)mval[1]); if (new_dist <= *r_dist && new_depth < *r_depth) { |