NDOF: rename 'zoom updown' to 'pan xy swap axis'
This swapped translation for all ndof events.
This commit is contained in:
@@ -970,13 +970,13 @@ class USERPREF_MT_ndof_settings(Menu):
|
|||||||
layout.prop(input_prefs, "ndof_panx_invert_axis")
|
layout.prop(input_prefs, "ndof_panx_invert_axis")
|
||||||
layout.prop(input_prefs, "ndof_pany_invert_axis")
|
layout.prop(input_prefs, "ndof_pany_invert_axis")
|
||||||
layout.prop(input_prefs, "ndof_panz_invert_axis")
|
layout.prop(input_prefs, "ndof_panz_invert_axis")
|
||||||
|
layout.prop(input_prefs, "ndof_pan_yz_swap_axis")
|
||||||
|
|
||||||
layout.label(text="Zoom options")
|
layout.label(text="Zoom options")
|
||||||
layout.prop(input_prefs, "ndof_zoom_invert")
|
layout.prop(input_prefs, "ndof_zoom_invert")
|
||||||
layout.prop(input_prefs, "ndof_zoom_updown")
|
|
||||||
|
|
||||||
layout.separator()
|
layout.separator()
|
||||||
layout.label(text="Fly options")
|
layout.label(text="Fly/Walk options")
|
||||||
layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
|
layout.prop(input_prefs, "ndof_fly_helicopter", icon='NDOF_FLY')
|
||||||
layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
|
layout.prop(input_prefs, "ndof_lock_horizon", icon='NDOF_DOM')
|
||||||
|
|
||||||
|
|||||||
@@ -793,7 +793,7 @@ typedef enum eNdof_Flag {
|
|||||||
/* actually... users probably don't care about what the mode
|
/* actually... users probably don't care about what the mode
|
||||||
* is called, just that it feels right */
|
* is called, just that it feels right */
|
||||||
/* zoom is up/down if this flag is set (otherwise forward/backward) */
|
/* zoom is up/down if this flag is set (otherwise forward/backward) */
|
||||||
NDOF_ZOOM_UPDOWN = (1 << 7),
|
NDOF_PAN_YZ_SWAP_AXIS = (1 << 7),
|
||||||
NDOF_ZOOM_INVERT = (1 << 8),
|
NDOF_ZOOM_INVERT = (1 << 8),
|
||||||
NDOF_ROTATE_INVERT_AXIS = (1 << 9),
|
NDOF_ROTATE_INVERT_AXIS = (1 << 9),
|
||||||
NDOF_TILT_INVERT_AXIS = (1 << 10),
|
NDOF_TILT_INVERT_AXIS = (1 << 10),
|
||||||
|
|||||||
@@ -4046,10 +4046,10 @@ static void rna_def_userdef_input(BlenderRNA *brna)
|
|||||||
RNA_def_property_range(prop, 0.25f, 40.0f);
|
RNA_def_property_range(prop, 0.25f, 40.0f);
|
||||||
RNA_def_property_ui_text(prop, "Orbit Sensitivity", "Overall sensitivity of the 3D Mouse for orbiting");
|
RNA_def_property_ui_text(prop, "Orbit Sensitivity", "Overall sensitivity of the 3D Mouse for orbiting");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "ndof_zoom_updown", PROP_BOOLEAN, PROP_NONE);
|
prop = RNA_def_property(srna, "ndof_pan_yz_swap_axis", PROP_BOOLEAN, PROP_NONE);
|
||||||
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_UPDOWN);
|
RNA_def_property_boolean_sdna(prop, NULL, "ndof_flag", NDOF_PAN_YZ_SWAP_AXIS);
|
||||||
RNA_def_property_ui_text(prop, "Zoom = Up/Down",
|
RNA_def_property_ui_text(prop, "Y/Z Swap Axis",
|
||||||
"Zoom using up/down on the device (otherwise forward/backward)");
|
"Pan using up/down on the device (otherwise forward/backward)");
|
||||||
|
|
||||||
prop = RNA_def_property(srna, "ndof_zoom_invert", PROP_BOOLEAN, PROP_NONE);
|
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_boolean_sdna(prop, NULL, "ndof_flag", NDOF_ZOOM_INVERT);
|
||||||
|
|||||||
@@ -2855,33 +2855,20 @@ static void attach_ndof_data(wmEvent *event, const GHOST_TEventNDOFMotionData *g
|
|||||||
{
|
{
|
||||||
wmNDOFMotionData *data = MEM_mallocN(sizeof(wmNDOFMotionData), "customdata NDOF");
|
wmNDOFMotionData *data = MEM_mallocN(sizeof(wmNDOFMotionData), "customdata NDOF");
|
||||||
|
|
||||||
const float s = U.ndof_sensitivity;
|
const float ts = U.ndof_sensitivity;
|
||||||
const float rs = U.ndof_orbit_sensitivity;
|
const float rs = U.ndof_orbit_sensitivity;
|
||||||
|
|
||||||
data->tx = s * ghost->tx;
|
mul_v3_v3fl(data->tvec, &ghost->tx, ts);
|
||||||
|
mul_v3_v3fl(data->rvec, &ghost->rx, rs);
|
||||||
|
|
||||||
data->rx = rs * ghost->rx;
|
/**
|
||||||
data->ry = rs * ghost->ry;
|
* \note
|
||||||
data->rz = rs * ghost->rz;
|
* - optionally swap Y/Z.
|
||||||
|
* - maintain handed-ness? or just do what feels right? not for now.
|
||||||
if (U.ndof_flag & NDOF_ZOOM_UPDOWN) {
|
* - after testing seems best not to apply this to rotation.
|
||||||
/* rotate so Y is where Z was */
|
|
||||||
data->ty = s * ghost->tz;
|
|
||||||
data->tz = s * ghost->ty;
|
|
||||||
/* maintain handed-ness? or just do what feels right? */
|
|
||||||
|
|
||||||
/* should this affect rotation also?
|
|
||||||
* initial guess is 'yes', but get user feedback immediately!
|
|
||||||
*/
|
*/
|
||||||
#if 0
|
if (U.ndof_flag & NDOF_PAN_YZ_SWAP_AXIS) {
|
||||||
/* after turning this on, my guess becomes 'no' */
|
SWAP(float, data->tvec[1], data->tvec[2]);
|
||||||
data->ry = s * ghost->rz;
|
|
||||||
data->rz = s * ghost->ry;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
data->ty = s * ghost->ty;
|
|
||||||
data->tz = s * ghost->tz;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
data->dt = ghost->dt;
|
data->dt = ghost->dt;
|
||||||
|
|||||||
Reference in New Issue
Block a user