diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 69c3bc405f2..07156ae2799 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -1018,9 +1018,9 @@ typedef enum eNdof_Flag { // NDOF_UNUSED_6 = (1 << 6), /* Dirty. */ /** * When set translation results in zoom being up/down otherwise forward/backward - * This also swaps X/Y for rotation. + * This also swaps Y/Z for rotation. */ - NDOF_SWAP_XY_AXIS = (1 << 7), + NDOF_SWAP_YZ_AXIS = (1 << 7), // NDOF_UNUSED_8 = (1 << 8), /* Dirty. */ NDOF_ROTX_INVERT_AXIS = (1 << 9), NDOF_ROTY_INVERT_AXIS = (1 << 10), diff --git a/source/blender/makesrna/intern/rna_userdef.cc b/source/blender/makesrna/intern/rna_userdef.cc index 516f86a0691..e02cf1ead6a 100644 --- a/source/blender/makesrna/intern/rna_userdef.cc +++ b/source/blender/makesrna/intern/rna_userdef.cc @@ -6493,7 +6493,7 @@ static void rna_def_userdef_input(BlenderRNA *brna) 0, "Forward/Backward", "Zoom by pulling the 3D Mouse cap upwards or pushing the cap downwards"}, - {NDOF_SWAP_XY_AXIS, + {NDOF_SWAP_YZ_AXIS, "NDOF_ZOOM_UP", 0, "Up/Down", diff --git a/source/blender/windowmanager/intern/wm_event_query.cc b/source/blender/windowmanager/intern/wm_event_query.cc index a5cd068e164..7f6a506b853 100644 --- a/source/blender/windowmanager/intern/wm_event_query.cc +++ b/source/blender/windowmanager/intern/wm_event_query.cc @@ -513,7 +513,7 @@ static blender::float3 event_ndof_translation_get_with_sign(const wmNDOFMotionDa { int ndof_flag = U.ndof_flag; int x = 0, y = 1, z = 2; - if (ndof_flag & NDOF_SWAP_XY_AXIS) { + if (ndof_flag & NDOF_SWAP_YZ_AXIS) { /* Map `{x, y, z}` -> `{x, -z, y}`. */ std::swap(y, z); ndof_flag ^= NDOF_PANY_INVERT_AXIS; @@ -530,7 +530,7 @@ static blender::float3 event_ndof_rotation_get_with_sign(const wmNDOFMotionData { int ndof_flag = U.ndof_flag; int x = 0, y = 1, z = 2; - if (ndof_flag & NDOF_SWAP_XY_AXIS) { + if (ndof_flag & NDOF_SWAP_YZ_AXIS) { /* Map `{x, y, z}` -> `{x, -z, y}`. */ std::swap(y, z); ndof_flag ^= NDOF_ROTY_INVERT_AXIS; @@ -579,13 +579,13 @@ float WM_event_ndof_rotation_get_axis_angle(const wmNDOFMotionData &ndof, float bool WM_event_ndof_translation_has_pan(const wmNDOFMotionData &ndof) { - return (U.ndof_flag & NDOF_SWAP_XY_AXIS) ? ((ndof.tvec[0] != 0.0f) || (ndof.tvec[2] != 0.0f)) : + return (U.ndof_flag & NDOF_SWAP_YZ_AXIS) ? ((ndof.tvec[0] != 0.0f) || (ndof.tvec[2] != 0.0f)) : ((ndof.tvec[0] != 0.0f) || (ndof.tvec[1] != 0.0f)); } bool WM_event_ndof_translation_has_zoom(const wmNDOFMotionData &ndof) { - return ndof.tvec[(U.ndof_flag & NDOF_SWAP_XY_AXIS) ? 1 : 2] != 0.0f; + return ndof.tvec[(U.ndof_flag & NDOF_SWAP_YZ_AXIS) ? 1 : 2] != 0.0f; } #endif /* WITH_INPUT_NDOF */