Revision: 26601
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26601
Author:   campbellbarton
Date:     2010-02-04 17:30:28 +0100 (Thu, 04 Feb 2010)

Log Message:
-----------
when autodepth is enabled use the z-depth for placing the cursor.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c     
2010-02-04 10:42:15 UTC (rev 26600)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c     
2010-02-04 16:30:28 UTC (rev 26601)
@@ -2306,9 +2306,19 @@
        initgrabz(rv3d, fp[0], fp[1], fp[2]);
 
        if(mval[0]!=IS_CLIPPED) {
+               short depth_used = 0;
 
-               window_to_3d_delta(ar, dvec, mval[0]-mx, mval[1]-my);
-               sub_v3_v3v3(fp, fp, dvec);
+               if (U.uiflag & USER_ORBIT_ZBUF) { /* maybe this should be 
accessed some other way */
+                       short mval_depth[2] = {mx, my};
+                       view3d_operator_needs_opengl(C);
+                       if (view_autodist(scene, ar, v3d, mval_depth, fp))
+                               depth_used= 1;
+               }
+
+               if(depth_used==0) {
+                       window_to_3d_delta(ar, dvec, mval[0]-mx, mval[1]-my);
+                       sub_v3_v3v3(fp, fp, dvec);
+               }
        }
        else {
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to