Commit Graph

8 Commits

Author SHA1 Message Date
Miikka Heikkinen
a35a2d6bf3 QmlDesigner: Fix far away gizmo scaling
Changed auto scaler math to use more double precision math to improve
scaling accuracy when camera is zoomed far or gizmo is far from origin.

Change-Id: Ic3020bbf159c0d5d090af9c9b8e8a4aa372d2406
Fixes: QDS-1528
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-01-31 11:48:14 +00:00
Miikka Heikkinen
4ce7f39e4e QmlDesigner: Fix 3D edit gizmos orientation and rotation order
When selected node has non-default rotation order or orientation,
gizmos need to account for that.

Change-Id: Ie3817fd057b43f708ac1feea3e98e1e44f56d66a
Fixes: QDS-1290
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-12-04 09:54:26 +00:00
Miikka Heikkinen
c7120bde92 QmlDesigner: Implement axis helper on 3D edit view
Axis helper shows up on top right corner of 3D edit view.
Clicking on axis helper arms zooms camera on that side of the selected
object.

Change-Id: Ibd81a933036f7965f825e3dc97ad7156da62e14c
Fixes: QDS-1205
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-11-22 13:57:43 +00:00
Miikka Heikkinen
77cb514a79 QmlDesigner: Implement better camera navigation in 3D edit view
Edit camera is now controlled as in Qt 3D Studio:
ALT + left button orbits camera.
ALT + middle button pans camera.
ALT + right button zooms camera.
Wheel zooms camera.

Task-number: QDS-1206
Change-Id: Ia72644073d172b00483ceed8bcc5ffb8dce68741
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-11-22 10:47:42 +00:00
Miikka Heikkinen
47f54dd101 QmlDesigner: Add camera and light gizmos to 3D edit view
A small icon and a placeholder mesh are displayed at the location of
the lights and cameras in the scene, to provide a way to see and
interact with them.

Change-Id: I1f90fce77a643cab2c3fda3ee2105af53dea57a9
Task-number: QDS-1177
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-10-29 12:57:06 +00:00
Miikka Heikkinen
baced09bc7 QmlDesigner: Fix edit view issues caused by quick3d api changes
Change-Id: I4bb110ff4693c57089f659e0f125c9f89c6bdb9c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-10-25 12:24:04 +00:00
Miikka Heikkinen
0de98aa240 QmlDesigner: Add overlay display to show position in 3D edit view
When dragging using move gizmo, a label is displayed that shows the
current position of the selected object.

Change-Id: I2e03b363ce9dcb975bcfe198ffae2e98024d74c8
Fixes: QDS-1129
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2019-10-25 08:12:28 +00:00
Miikka Heikkinen
1fe204565a QmlDesigner: Add support for move gadget to 3D edit view
This proof-of-concept move gadget is based on the move gadget
in studio example of QtQuick3D.

Change-Id: I1b596443a3e99c16ed214bc464c5367a0f7aa503
Fixes: QDS-1125
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
2019-10-25 07:51:09 +00:00