diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-10 14:34:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-10 14:34:24 +0400 |
commit | 6a1a5ad08b593953ab0ada04b2883687e85bb744 (patch) | |
tree | 2b0c9baeb82664279d4d382be79b88fa5936cd85 /source | |
parent | 3c35f560db8f5afec282b4c380e12152783470e4 (diff) |
split off auto depth option to have cursor placement use depth too since you dont always want both.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 9 |
3 files changed, 11 insertions, 7 deletions
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", |