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>2012-08-10 14:34:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-10 14:34:24 +0400
commit6a1a5ad08b593953ab0ada04b2883687e85bb744 (patch)
tree2b0c9baeb82664279d4d382be79b88fa5936cd85
parent3c35f560db8f5afec282b4c380e12152783470e4 (diff)
split off auto depth option to have cursor placement use depth too since you dont always want both.
-rw-r--r--release/scripts/presets/interaction/blender.py3
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py3
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c4
-rw-r--r--source/blender/makesdna/DNA_userdef_types.h5
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c9
5 files changed, 15 insertions, 9 deletions
diff --git a/release/scripts/presets/interaction/blender.py b/release/scripts/presets/interaction/blender.py
index c5454e479a3..0c79a3fc909 100644
--- a/release/scripts/presets/interaction/blender.py
+++ b/release/scripts/presets/interaction/blender.py
@@ -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
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index e443c7804a6..e7dd9fb4751 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -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")
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 20afe42763d..47d6bf62c91 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -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;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 01b189c2260..8b62f58212b 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -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)
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index 0ffdd15df5a..e3cd236a8e3 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -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",