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:
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 9a94ca8624c..967fbfd26af 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -103,6 +103,24 @@ void view3d_set_viewcontext(bContext *C, ViewContext *vc)
vc->obedit= CTX_data_edit_object(C);
}
+void view3d_get_view_aligned_coordinate(ViewContext *vc, float *fp, short mval[2])
+{
+ float dvec[3];
+ short mx, my;
+
+ mx= mval[0];
+ my= mval[1];
+
+ project_short_noclip(vc->ar, fp, mval);
+
+ initgrabz(vc->rv3d, fp[0], fp[1], fp[2]);
+
+ if(mval[0]!=IS_CLIPPED) {
+ window_to_3d_delta(vc->ar, dvec, mval[0]-mx, mval[1]-my);
+ VecSubf(fp, fp, dvec);
+ }
+}
+
/* ********************** view3d_select: selection manipulations ********************* */
/* XXX to solve *************** */