[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [49763] trunk/blender: split off auto depth option to have cursor placement use depth too since you dont always want both .

Campbell Barton ideasman42 at gmail.com
Fri Aug 10 12:34:25 CEST 2012


Revision: 49763
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=49763
Author:   campbellbarton
Date:     2012-08-10 10:34:24 +0000 (Fri, 10 Aug 2012)
Log Message:
-----------
split off auto depth option to have cursor placement use depth too since you dont always want both.

Modified Paths:
--------------
    trunk/blender/release/scripts/presets/interaction/blender.py
    trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
    trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
    trunk/blender/source/blender/makesdna/DNA_userdef_types.h
    trunk/blender/source/blender/makesrna/intern/rna_userdef.c

Modified: trunk/blender/release/scripts/presets/interaction/blender.py
===================================================================
--- trunk/blender/release/scripts/presets/interaction/blender.py	2012-08-10 10:20:28 UTC (rev 49762)
+++ trunk/blender/release/scripts/presets/interaction/blender.py	2012-08-10 10:34:24 UTC (rev 49763)
@@ -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

Modified: trunk/blender/release/scripts/startup/bl_ui/space_userpref.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_userpref.py	2012-08-10 10:20:28 UTC (rev 49762)
+++ trunk/blender/release/scripts/startup/bl_ui/space_userpref.py	2012-08-10 10:34:24 UTC (rev 49763)
@@ -197,7 +197,8 @@
 
         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")

Modified: trunk/blender/source/blender/editors/space_view3d/view3d_edit.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2012-08-10 10:20:28 UTC (rev 49762)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_edit.c	2012-08-10 10:34:24 UTC (rev 49763)
@@ -434,7 +434,7 @@
 		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 @@
 	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;

Modified: trunk/blender/source/blender/makesdna/DNA_userdef_types.h
===================================================================
--- trunk/blender/source/blender/makesdna/DNA_userdef_types.h	2012-08-10 10:20:28 UTC (rev 49762)
+++ trunk/blender/source/blender/makesdna/DNA_userdef_types.h	2012-08-10 10:34:24 UTC (rev 49763)
@@ -503,13 +503,12 @@
 /*#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)

Modified: trunk/blender/source/blender/makesrna/intern/rna_userdef.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-08-10 10:20:28 UTC (rev 49762)
+++ trunk/blender/source/blender/makesrna/intern/rna_userdef.c	2012-08-10 10:34:24 UTC (rev 49763)
@@ -2542,11 +2542,16 @@
 	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",




More information about the Bf-blender-cvs mailing list