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>2013-03-26 06:37:29 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-26 06:37:29 +0400
commit09721bffc066fdc1f9352a00eeb30c1a3ddd6d77 (patch)
treefd58e8f5d58774302d8f9ecad7cebd108547af43 /source/blender/editors/space_view3d/view3d_select.c
parentae0e356de65ce9ce77fa71695e325846c623db21 (diff)
replace view3d_get_view_aligned_coordinate with ED_view3d_win_to_3d_int()
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index a84075fb60e..209bb76df91 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -108,39 +108,6 @@ void view3d_set_viewcontext(bContext *C, ViewContext *vc)
vc->obedit = CTX_data_edit_object(C);
}
-/**
- * Re-project \a fp so it stays on the same view-plane but is under \a mval (normally the cursor location).
- */
-bool view3d_get_view_aligned_coordinate(ARegion *ar, float fp[3], const int mval[2], const bool do_fallback)
-{
- RegionView3D *rv3d = ar->regiondata;
- float dvec[3];
- int mval_cpy[2];
- eV3DProjStatus ret;
-
- ret = ED_view3d_project_int_global(ar, fp, mval_cpy, V3D_PROJ_TEST_NOP);
-
- if (ret == V3D_PROJ_RET_OK) {
- const float mval_f[2] = {(float)(mval_cpy[0] - mval[0]),
- (float)(mval_cpy[1] - mval[1])};
- const float zfac = ED_view3d_calc_zfac(rv3d, fp, NULL);
- ED_view3d_win_to_delta(ar, mval_f, dvec, zfac);
- sub_v3_v3(fp, dvec);
-
- return true;
- }
- else {
- /* fallback to the view center */
- if (do_fallback) {
- negate_v3_v3(fp, rv3d->ofs);
- return view3d_get_view_aligned_coordinate(ar, fp, mval, false);
- }
- else {
- return false;
- }
- }
-}
-
/*
* ob == NULL if you want global matrices
* */