diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 13 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 12 |
3 files changed, 21 insertions, 6 deletions
diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index a555a196060..556f554eb98 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -603,7 +603,7 @@ extern UserDef U; /* from blenkernel blender.c */ #define NDOF_ORBIT_INVERT_AXES (1 << 6) /* zoom is up/down if this flag is set (otherwise forward/backward) */ #define NDOF_ZOOM_UPDOWN (1 << 7) -#define NDOF_INVERT_ZOOM (1 << 8) +#define NDOF_ZOOM_INVERT (1 << 8) #ifdef __cplusplus diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index b3dbafeab7d..57044188dd9 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -2746,19 +2746,32 @@ static void rna_def_userdef_input(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Drag Threshold", "Amount of pixels you have to drag before dragging UI items happens"); /* 3D mouse settings */ + /* global options */ prop= RNA_def_property(srna, "ndof_sensitivity", PROP_FLOAT, PROP_NONE); RNA_def_property_range(prop, 0.25f, 4.0f); RNA_def_property_ui_text(prop, "Sensitivity", "Overall sensitivity of the 3D Mouse"); + prop= RNA_def_property(srna, "ndof_zoom_updown", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_UPDOWN); + RNA_def_property_ui_text(prop, "Zoom = Up/Down", "Zoom using up/down on the device (otherwise forward/backward)"); + + prop= RNA_def_property(srna, "ndof_zoom_invert", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_INVERT); + RNA_def_property_ui_text(prop, "Invert Zoom", "Zoom using opposite direction"); + + /* 3D view */ prop= RNA_def_property(srna, "ndof_show_guide", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_SHOW_GUIDE); RNA_def_property_ui_text(prop, "Show Navigation Guide", "Display the center and axis during rotation"); /* TODO: update description when fly-mode visuals are in place ("projected position in fly mode")*/ + /* 3D view: orbit */ prop= RNA_def_property(srna, "ndof_orbit_invert_axes", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ORBIT_INVERT_AXES); RNA_def_property_ui_text(prop, "Invert Axes", "Toggle between moving the viewpoint or moving the scene being viewed"); + /* in 3Dx docs, this is called 'object mode' vs. 'target camera mode' + /* 3D view: fly */ prop= RNA_def_property(srna, "ndof_lock_horizon", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_LOCK_HORIZON); RNA_def_property_ui_text(prop, "Lock Horizon", "Keep horizon level while flying with 3D Mouse"); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 0dac0bd7401..258d6bbc025 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2330,26 +2330,28 @@ static void attach_ndof_data(wmEvent* event, const GHOST_TEventNDOFMotionData* g const float s = U.ndof_sensitivity; data->tvec[0]= s * ghost->tx; + data->rvec[0]= s * ghost->rx; + data->rvec[1]= s * ghost->ry; + data->rvec[2]= s * ghost->rz; if (U.ndof_flag & NDOF_ZOOM_UPDOWN) { - // swap Y and Z + // rotate so Y is where Z was (maintain handed-ness) data->tvec[1]= s * ghost->tz; - data->tvec[2]= s * ghost->ty; + data->tvec[2]= s * -ghost->ty; // should this affect rotation also? // initial guess is 'yes', but get user feedback immediately! +#if 0 // after turning this on, my guess becomes 'no' data->rvec[1]= s * ghost->rz; data->rvec[2]= s * ghost->ry; +#endif } else { data->tvec[1]= s * ghost->ty; data->tvec[2]= s * ghost->tz; - - data->rvec[1]= s * ghost->ry; - data->rvec[2]= s * ghost->rz; } data->dt = ghost->dt; |