split off auto depth option to have cursor placement use depth too since you dont...
authorCampbell Barton <ideasman42@gmail.com>
Fri, 10 Aug 2012 10:34:24 +0000 (10:34 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 10 Aug 2012 10:34:24 +0000 (10:34 +0000)
release/scripts/presets/interaction/blender.py
release/scripts/startup/bl_ui/space_userpref.py
source/blender/editors/space_view3d/view3d_edit.c
source/blender/makesdna/DNA_userdef_types.h
source/blender/makesrna/intern/rna_userdef.c

index c5454e479a30a0924f7e818d5197d3c287df508b..0c79a3fc909266657859ec6f1fef5e42cc8f960d 100644 (file)
@@ -1,7 +1,8 @@
 # Configuration Blender
 import bpy
 
-bpy.context.user_preferences.view.use_mouse_auto_depth = False
+bpy.context.user_preferences.view.use_mouse_depth_cursor = False
+bpy.context.user_preferences.view.use_mouse_depth_navigate = False
 bpy.context.user_preferences.view.use_zoom_to_mouse = False
 bpy.context.user_preferences.view.use_rotate_around_active = False
 bpy.context.user_preferences.edit.use_drag_immediately = False
index e443c7804a61caaa7c7b00492f974b11a11adaa6..e7dd9fb47515ccf306b3a17cc2e235ab76c7257f 100644 (file)
@@ -197,7 +197,8 @@ class USERPREF_PT_interface(Panel):
 
         col = row.column()
         col.label(text="View Manipulation:")
-        col.prop(view, "use_mouse_auto_depth")
+        col.prop(view, "use_mouse_depth_cursor")
+        col.prop(view, "use_mouse_depth_navigate")
         col.prop(view, "use_zoom_to_mouse")
         col.prop(view, "use_rotate_around_active")
         col.prop(view, "use_global_pivot")
index 20afe42763d1fd560032b6a89eb0103e82c89e12..47d6bf62c9117126788b8e0e3a6d4b45c5f0f982 100644 (file)
@@ -434,7 +434,7 @@ static void viewops_data_create(bContext *C, wmOperator *op, wmEvent *event)
                calculateTransformCenter(C, V3D_CENTROID, lastofs, NULL);
                negate_v3_v3(vod->dyn_ofs, lastofs);
        }
-       else if (U.uiflag & USER_ORBIT_ZBUF) {
+       else if (U.uiflag & USER_ZBUF_ORBIT) {
 
                view3d_operator_needs_opengl(C); /* needed for zbuf drawing */
 
@@ -3402,7 +3402,7 @@ static int set_3dcursor_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *eve
        if (mval[0] != IS_CLIPPED) {
                short depth_used = 0;
 
-               if (U.uiflag & USER_ORBIT_ZBUF) {  /* maybe this should be accessed some other way */
+               if (U.uiflag & USER_ZBUF_CURSOR) {  /* maybe this should be accessed some other way */
                        view3d_operator_needs_opengl(C);
                        if (ED_view3d_autodist(scene, ar, v3d, event->mval, fp))
                                depth_used = 1;
index 01b189c2260bd53fd3944643fe9773668ff481fc..8b62f58212b84ffa244d1dfa06489598c9d79649 100644 (file)
@@ -503,13 +503,12 @@ extern UserDef U; /* from blenkernel blender.c */
 /*#define USER_FLIPFULLSCREEN          (1 << 7)*/ /* deprecated */
 #define USER_ALLWINCODECS              (1 << 8)
 #define USER_MENUOPENAUTO              (1 << 9)
-/*#define USER_PANELPINNED             (1 << 10)               deprecated */
+#define USER_ZBUF_CURSOR               (1 << 10)
 #define USER_AUTOPERSP                 (1 << 11)
 #define USER_LOCKAROUND        (1 << 12)
 #define USER_GLOBALUNDO        (1 << 13)
 #define USER_ORBIT_SELECTION   (1 << 14)
-// old flag for #define USER_KEYINSERTAVAI             (1 << 15)
-#define USER_ORBIT_ZBUF                        (1 << 15)
+#define USER_ZBUF_ORBIT                        (1 << 15)
 #define USER_HIDE_DOT                  (1 << 16)
 #define USER_SHOW_ROTVIEWICON  (1 << 17)
 #define USER_SHOW_VIEWPORTNAME (1 << 18)
index 0ffdd15df5a67fe1162b7e9df5aa87741030c270..e3cd236a8e339f623bf093ff4854c301f43acde6 100644 (file)
@@ -2542,11 +2542,16 @@ static void rna_def_userdef_view(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_LOCKAROUND);
        RNA_def_property_ui_text(prop, "Global Pivot", "Lock the same rotation/scaling pivot in all 3D Views");
 
-       prop = RNA_def_property(srna, "use_mouse_auto_depth", PROP_BOOLEAN, PROP_NONE);
-       RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ORBIT_ZBUF);
+       prop = RNA_def_property(srna, "use_mouse_depth_navigate", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_ORBIT);
        RNA_def_property_ui_text(prop, "Auto Depth",
                                 "Use the depth under the mouse to improve view pan/rotate/zoom functionality");
 
+       prop = RNA_def_property(srna, "use_mouse_depth_cursor", PROP_BOOLEAN, PROP_NONE);
+       RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_CURSOR);
+       RNA_def_property_ui_text(prop, "Cursor Depth",
+                                "Use the depth under the mouse when placing the cursor");
+
        prop = RNA_def_property(srna, "use_camera_lock_parent", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_CAM_LOCK_NO_PARENT);
        RNA_def_property_ui_text(prop, "Camera Parent Lock",