[Bf-blender-cvs] [5b67a7a2e76] master: Cleanup: rename user preference flags

Campbell Barton noreply at git.blender.org
Mon Jan 29 05:09:13 CET 2018


Commit: 5b67a7a2e76c167b7c7fb0b4eca89b36d485cfb6
Author: Campbell Barton
Date:   Mon Jan 29 15:06:23 2018 +1100
Branches: master
https://developer.blender.org/rB5b67a7a2e76c167b7c7fb0b4eca89b36d485cfb6

Cleanup: rename user preference flags

USER_ZBUF_ORBIT -> USER_DEPTH_NAVIGATE
The name didn't make sense since it's used for all view navigation.

Also rename USER_ZBUF_CURSOR -> USER_DEPTH_CURSOR since zbuf
is an internal detail.

===================================================================

M	source/blender/blenloader/intern/versioning_defaults.c
M	source/blender/editors/space_view3d/view3d_edit.c
M	source/blender/makesdna/DNA_userdef_types.h
M	source/blender/makesrna/intern/rna_userdef.c

===================================================================

diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c
index 523581203d5..7e05ba1f529 100644
--- a/source/blender/blenloader/intern/versioning_defaults.c
+++ b/source/blender/blenloader/intern/versioning_defaults.c
@@ -54,7 +54,7 @@ void BLO_update_defaults_userpref_blend(void)
 {
 	/* defaults from T37518 */
 
-	U.uiflag |= USER_ZBUF_CURSOR;
+	U.uiflag |= USER_DEPTH_CURSOR;
 	U.uiflag |= USER_QUIT_PROMPT;
 	U.uiflag |= USER_CONTINUOUS_MOUSE;
 
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 9d67e77ed0f..4a1f214453c 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -340,7 +340,7 @@ static enum eViewOpsOrbit viewops_orbit_mode(void)
 {
 	return viewops_orbit_mode_ex(
 	        (U.uiflag & USER_ORBIT_SELECTION) != 0,
-	        (U.uiflag & USER_ZBUF_ORBIT) != 0);
+	        (U.uiflag & USER_DEPTH_NAVIGATE) != 0);
 }
 
 /**
@@ -4489,7 +4489,7 @@ void ED_view3d_cursor3d_position(bContext *C, float fp[3], const int mval[2])
 		ED_view3d_calc_zfac(rv3d, fp, NULL /* &flip */ );
 	}
 
-	if (U.uiflag & USER_ZBUF_CURSOR) {  /* maybe this should be accessed some other way */
+	if (U.uiflag & USER_DEPTH_CURSOR) {  /* maybe this should be accessed some other way */
 		view3d_operator_needs_opengl(C);
 		if (ED_view3d_autodist(scene, ar, v3d, mval, fp, true, NULL))
 			depth_used = true;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index c1ba808ec03..e590e04fc6d 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -676,12 +676,12 @@ typedef enum eUserpref_UI_Flag {
 	USER_UIFLAG_DEPRECATED_7 = (1 << 7),
 	USER_ALLWINCODECS		= (1 << 8),
 	USER_MENUOPENAUTO		= (1 << 9),
-	USER_ZBUF_CURSOR		= (1 << 10),
+	USER_DEPTH_CURSOR		= (1 << 10),
 	USER_AUTOPERSP     		= (1 << 11),
 	USER_LOCKAROUND     	= (1 << 12),
 	USER_GLOBALUNDO     	= (1 << 13),
 	USER_ORBIT_SELECTION	= (1 << 14),
-	USER_ZBUF_ORBIT			= (1 << 15),
+	USER_DEPTH_NAVIGATE     = (1 << 15),
 	USER_HIDE_DOT			= (1 << 16),
 	USER_SHOW_ROTVIEWICON	= (1 << 17),
 	USER_SHOW_VIEWPORTNAME	= (1 << 18),
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index df74fc12ae1..c66ac26f928 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -3489,12 +3489,12 @@ static void rna_def_userdef_view(BlenderRNA *brna)
 	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_depth_navigate", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_ZBUF_ORBIT);
+	RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_NAVIGATE);
 	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_boolean_sdna(prop, NULL, "uiflag", USER_DEPTH_CURSOR);
 	RNA_def_property_ui_text(prop, "Cursor Depth",
 	                         "Use the depth under the mouse when placing the cursor");



More information about the Bf-blender-cvs mailing list