Commit Graph

122 Commits

Author SHA1 Message Date
Bas Ruigrok
fb85c92dd0 Gui: Fix camera position shift when starting rotation 2025-01-19 14:34:31 -05:00
tritao
19cfb363b8 Gui: Bind NavigationStyle to Python. 2025-01-14 15:11:09 -06:00
Chris Hennes
64f63ae97e Merge pull request #15528 from ppphp/move_some_inventor
refactor: move some nodes to Inventor folder
2024-11-22 12:20:50 -05:00
wmayer
aea09d4a45 MSVC: Fix compiler warnings 2024-11-22 16:53:00 +01:00
Bas Ruigrok
513103718b Gui: Fix camera behavior when rotation center is far from object
Also fixes a regression in turntable navigation speed
2024-11-04 17:59:19 +01:00
Bas Ruigrok
1cf5b23927 Gui: Correct spin sensitivity 2024-10-28 09:54:28 -05:00
Bas Ruigrok
66002908c7 Gui: Set spin projector sphere depending on rotation center 2024-10-21 18:04:38 +02:00
Bas Ruigrok
59ccadb2c4 Gui: Fix orthographic camera standard views in an empty scene 2024-09-09 17:59:50 +02:00
Bas Ruigrok
6f0c3d2fea Gui: Use Coin 4.0.3 fix for orthographic camera clipping 2024-09-09 17:58:32 +02:00
xtemp09
abb362f83a Fix the crash involving context menu
Closes #13637.
2024-08-05 11:43:56 -04:00
liukaiwen
4c6b7dadeb refactor: move some nodes to Inventor folder 2024-07-20 01:07:04 +08:00
Bas Ruigrok
0001879be0 Gui: Fix rotation mode for Gesture style 2024-06-04 21:57:15 +02:00
Bas Ruigrok
5ba93dd9f0 Gui: Improve lookAtPoint (#13556)
* Gui: Rename NavigationStyle::pan to setupPanningPlane

* Gui: Replace duplicate code with NavigationStyle::setupPanningPlane

* Gui: Use panning plane when hit point not found in lookAtPoint

Also enables navigation animations when pressing MMB while the mouse is not over an object

* Gui: Remove unused methods
2024-05-06 10:45:14 -05:00
mos
a025af2d26 removed deprecaded functions
.

.
2024-02-26 17:38:01 +01:00
Rexbas
dfa20b4648 Gui: Prevent showing the context menu after dragging, panning or zooming 2024-01-24 21:02:25 +01:00
Rexbas
286ebec851 Gui: Only show context menu if not dragged in TinkerCAD navigation style 2023-12-26 22:03:02 +01:00
Rexbas
8588335c7f Gui: Show context menu on right click in OpenSCAD navigation style if not panned 2023-12-26 12:00:20 +01:00
wmayer
d9f680f901 Gui: fix several lint warnings 2023-12-04 10:53:51 -06:00
wmayer
0d079c885c Gui: refactor FCSphereSheetProjector 2023-12-04 10:53:51 -06:00
Bas Ruigrok
9e2577bce7 Gui: Add a separate checkbox for enabling spinning animations (#11534)
* Gui: Create group box for animation preferences

* Gui: Add spinning animation checkbox

* Gui: Implement isAnimating() for NavigationAnimator

* Gui: No need to enable animations in DemoMode

The spin animation is played regardless of the user preference and does not need to be enabled before starting the spin animation

* Gui: Change comment
2023-12-04 10:50:29 -06:00
Rexbas
2a91413742 Gui: Find scene bounding sphere after zoom 2023-11-25 09:40:49 +01:00
Rexbas
72c69ce2f0 Gui: Update rotation center indicator after zoom 2023-11-24 22:43:48 +01:00
Rexbas
cafede514a Gui: Find bounding sphere after showing rotation center 2023-11-12 14:42:45 +01:00
Rexbas
a740632616 Gui: Find bounding sphere before drag or animation 2023-11-10 22:33:41 +01:00
Rexbas
e327a3fd40 Gui: Fix window center rotation mode and orthographic view clipping 2023-11-10 19:43:36 +01:00
Rexbas
870ca64654 Gui: Hide rotation center when in spinning mode 2023-10-28 11:04:51 +02:00
Rexbas
61c1b2bfc2 Gui: Apply Law of Demeter to starting and stopping animations 2023-10-25 11:17:55 +02:00
Rexbas
7bb97c1882 Gui: Bring back removed lookAtPoint(SbVec3f&) 2023-10-25 11:17:55 +02:00
Rexbas
37e600e766 Gui: Refactor navigation animations
- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
2023-10-25 11:17:55 +02:00
Yorik van Havre
ffd66cf826 Revert "Gui: Refactor navigation animations" 2023-09-26 19:44:16 +02:00
Rexbas
9fed764368 Gui: Refactor navigation animations
- Animations are played through an Animator
- Standard animations have a fixed duration and inherit from QVariantAnimation
- The animation duration can be changed in the preferences
- Fix animations when using the two arrows above the NaviCube
- Start an animation or start and wait for an animation
- Replaces standard camera animations (e.g. by selecting standard views or NaviCube) with FixedTimeAnimation
- Replace View3DInventorViewer's CameraAnimation with FixedTimeAnimation
- Replace OpenInventor navigation style infinite spin animation with SpinningAnimation
- Stops an active animation when a new animation is started
- Stops an active animation when the user starts dragging, panning or zooming
- Refactor reorientCamera so it can be used in animations
- Enable animations by default
2023-09-04 21:43:41 +02:00
wmayer
5a153e50ff Gui: modernize C++: use default member init 2023-08-23 19:51:44 +02:00
wmayer
c016f1c1fb Gui: modernize C++: use equals default 2023-08-20 18:12:43 +02:00
wmayer
54bb9c9c62 Gui: modernize C++: return braced init list 2023-08-18 00:36:24 +02:00
Rexbas
fcbee3ad49 Gui: Improve object center rotation mode 2023-08-16 16:02:32 -05:00
Rexbas
579e2ee6ea Set rotation center for WindowCenter mode 2023-07-11 21:35:19 +02:00
Rexbas
7fe3e1bd5d Add visual indication for the rotation center 2023-07-11 17:33:47 +02:00
Jolbas
3b92ebea3a Fix clipping near camera in orthogonal view
Fix #6836
2023-05-31 20:10:28 -04:00
Nabos
9cda82cf20 Gui: Added FreeTurntable orbit style (#8048)
* Added FreeTurntable orbit style
2022-12-20 03:21:46 +01:00
wmayer
d119c1c7a5 Gui/Sketcher: disable geometry deselection when user holds Ctrl or additionally Shift or Alt 2022-11-05 22:56:38 +01:00
Paddle
eeddcfd2aa Base: + Sketcher: disable deselection when user holds Ctrl. 2022-11-04 10:44:52 -05:00
0penBrain
63c7e62c79 Gui: remove hardcoded functions from NavigationStyle 2022-09-28 17:29:11 +02:00
marioalexis
0382f276a2 Gui: Replace C cast 2022-09-18 11:06:51 -05:00
berniev
75acacd1b7 Gui: Use auto and range-based for (#7481)
* On lines where the variable type is obvious from inspection, avoid repeating the type using auto. 
* When possible use a ranged for loop instead of begin() and end() iterators
2022-09-14 13:25:13 -05:00
wmayer
ba8d5ab055 Gui: modernize C++: replace 'typedef' with 'using' 2022-08-29 14:09:18 +02:00
berniev
0c70d45c83 Gui: Use override etc 2 2022-08-09 12:43:23 +02:00
Uwe
3e99d39d05 [Gui] remove some more superfluous nullptr checks 2022-07-18 13:15:38 +02:00
Uwe
1d95c26e2e [Gui] remove more superfluous nullptr checks 2022-07-18 03:34:22 +02:00
andrea
3018985f80 Remove unused code into GUI 2022-07-17 03:53:11 +02:00
wmayer
e9890c0798 Gui/Mod: replace several reinterpret_cast with static_cast 2022-06-25 11:36:55 +02:00