Free, open-source 3D sculpting for Linux, macOS and Windows: dense meshes, remeshing, painting, built-in AI (image/text to 3D), Send to Unreal, game-ready LODs, Gaussian splats and OpenUSD.
C++ 3d3d-sculptingcppdear-imguidigital-sculptingfbxgame-developmentgaussian-splattinggltfimage-to-3dmcpopenglopenusdsculptingtext-to-3dunreal-engine
View axes: only a plain drag on the disc orbits; Alt / Ctrl / Shift drags starting there keep pan, mask, roll (pen navigation tests)
islandmed306ef0e9b813
diff --git a/src/app/App.cpp b/src/app/App.cppindex 8fa66b5c..21cb0bf5 100644--- a/src/app/App.cpp+++ b/src/app/App.cpp@@ -4113,12 +4113,14 @@ bool App::overViewNavigator(float x, float y) const {bool App::axisGizmoMouseDown(float x, float y) {// A click on an end snaps to that side view, orthographic (#43, as in Blender's navigation gizmo), a second click- // on it to the opposite side; a drag on the disc behind the ends orbits; a click on the View Figure snaps to+ // on it to the opposite side; a plain drag on the disc behind the ends orbits; a click on the View Figure snaps to// the side view nearest the current one.const auto ends = axisGizmoLayout();const float unit = axisGizmoUnit();int hit = uiPrefs_.showAxes ? axisGizmoSnapEnd(ends, axisGizmoHit(ends, x, y, kAxisGizmoHitRadius * unit)) : -1;- if (hit < 0 && uiPrefs_.showAxes && axisGizmoOnDisc(axisGizmoCentre(), kAxisGizmoDisc * unit, x, y)) {+ // Only a plain press: Alt / Ctrl / Shift drags starting there keep their meaning (pan, mask, roll...).+ const bool plain = !((SDL_GetModState() | keyMods()) & (SDL_KMOD_SHIFT | SDL_KMOD_CTRL | SDL_KMOD_ALT | SDL_KMOD_GUI));+ if (hit < 0 && plain && uiPrefs_.showAxes && axisGizmoOnDisc(axisGizmoCentre(), kAxisGizmoDisc * unit, x, y)) {drag_ = Drag::Orbit;rightClick_.pending = false;return true;diff --git a/tests/ui/view_axes.sfui b/tests/ui/view_axes.sfuiindex fa425ae1..ddf6ef4d 100644--- a/tests/ui/view_axes.sfui+++ b/tests/ui/view_axes.sfui@@ -130,3 +130,11 @@ key escapeshot with_view_figureview_figure_clickexpect_value camera_aligned == 1++# Alt+drag starting on the disc still pans (only a plain drag there orbits).+camera 35 -25+remember camera_pan p0+hold alt+axis_drag 0 60+hold none+expect_value camera_pan > $p0