[Bf-blender-cvs] [36bc806e2b2] temp-select-pick: Add preference
Campbell Barton
noreply at git.blender.org
Wed Mar 8 19:43:49 CET 2017
Commit: 36bc806e2b2c1119626946ff8b2dfaa941059b88
Author: Campbell Barton
Date: Thu Mar 9 05:39:03 2017 +1100
Branches: temp-select-pick
https://developer.blender.org/rB36bc806e2b2c1119626946ff8b2dfaa941059b88
Add preference
===================================================================
M release/scripts/startup/bl_ui/space_userpref.py
M source/blender/editors/space_view3d/view3d_view.c
M source/blender/makesdna/DNA_userdef_types.h
M source/blender/makesrna/intern/rna_userdef.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index d7f5723539d..cd12255c24c 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -453,6 +453,7 @@ class USERPREF_PT_system(Panel):
col.separator()
col.label(text="Selection")
col.prop(system, "select_method", text="")
+ col.prop(system, "use_select_pick_depth")
col.separator()
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index aff8c58eed6..9d1a3633786 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -1180,10 +1180,10 @@ int view3d_opengl_select(
rcti rect;
int hits;
const bool use_obedit_skip = (scene->obedit != NULL) && (vc->obedit == NULL);
- const bool is_pick_select = true;
+ const bool is_pick_select = (U.gpu_select_pick_deph != 0);
const bool do_passes = (
(is_pick_select == false) &&
- (select_mode == GPU_SELECT_PICK_NEAREST) &&
+ (select_mode == VIEW3D_SELECT_PICK_NEAREST) &&
GPU_select_query_check_active());
char gpu_select_mode;
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h
index 0ad4482708f..73c341e35ba 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -497,7 +497,6 @@ typedef struct UserDef {
int prefetchframes;
float pad_rot_angle; /* control the rotation step of the view when PAD2, PAD4, PAD6&PAD8 is use */
short frameserverport;
- short pad4;
short obcenter_dia;
short rvisize; /* rotating view icon size */
short rvibright; /* rotating view icon brightness */
@@ -509,6 +508,8 @@ typedef struct UserDef {
char ipo_new; /* interpolation mode for newly added F-Curves */
char keyhandles_new; /* handle types for newly added keyframes */
char gpu_select_method;
+ char gpu_select_pick_deph;
+ char pad4;
char view_frame_type;
int view_frame_keyframes; /* number of keyframes to zoom around current frame */
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
index e68e67586e9..74888bf4f00 100644
--- a/source/blender/makesrna/intern/rna_userdef.c
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -4180,6 +4180,10 @@ static void rna_def_userdef_system(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Selection Method",
"Use OpenGL occlusion queries or selection render mode to accelerate selection");
+ prop = RNA_def_property(srna, "use_select_pick_depth", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "gpu_select_pick_deph", 1);
+ RNA_def_property_ui_text(prop, "OpenGL Depth Picking", "Use the depth buffer for picking 3D View selection");
+
/* Full scene anti-aliasing */
prop = RNA_def_property(srna, "multi_sample", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_bitflag_sdna(prop, NULL, "ogl_multisamples");
More information about the Bf-blender-cvs
mailing list