Commit Graph

29 Commits

Author SHA1 Message Date
Thomas Hartmann
43700fa621 QmlDesigner: Fix crash on shutdown
Change-Id: I47e20e14fe22dcad77a65b031cf65bc80bad3490
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2022-05-19 09:39:49 +00:00
Mahmoud Badri
a984e9c097 QmlDesigner: Fix possible crash on exit
Crash log:
https://sentry.io/organizations/the-qt-company-00/issues/3227370374/?project=5421708

Change-Id: I73b574d565cc1f66ddec1fedcb96e3acd7c1ad72
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-04-28 07:33:47 +00:00
Miikka Heikkinen
c865481068 QmlDesigner: Add particle attractor visualization to 3D editor
Particle attractors are visualized similarly to particle emitters,
except that they are shown as blue instead of yellow when parent system
is active.

Fixes: QDS-6426
Change-Id: I085727dac7f3b4fa968e313b78db3f476941a7da
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-18 08:17:37 +00:00
Miikka Heikkinen
98673190ad QmlDesigner: Add visualization gizmo for ParticleEmitter3D
Particle emitters are now visualized in 3D edit view either by
a small sphere for point emitters or by a proper model for
model based emitters. The visualization model is rendered
transparent. The visualization models can be displayed either
always or only when the parent particle system is active
in editor.

Trail emitters are not visualized, as any visualization would
be misleading, since these emitters follow generated particles.

Fixes: QDS-6189
Change-Id: Idb6f12cadd9cea8110e5290cc18443aeb62c38d6
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-03-03 09:34:57 +00:00
Miikka Heikkinen
17710da67c QmlDesigner: Fix hotkeys for particle play and restart
The hotkeys overlapped transform gizmo hotkeys.

Fixes: QDS-6300
Change-Id: I3a87f2cedb218fbecea5641c86265f413487cef7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-01 08:57:23 +00:00
Thomas Hartmann
52e3f2cd5f QmlDesigner: Cache last image in 3D view and add busy indicator
This patch caches the last image from a document/model.
The result ist that when reopening a file in the 3D editor
the user sees immediately something.
Since the view is not interactive, yet, we show a busy indicator
until the view is fully initialized.

Change-Id: I26c8b0ea69f98ceb41580624c51d48d1e633ab80
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-10 21:00:11 +00:00
Miikka Heikkinen
d48a4bd60f QmlDesigner: Add 3D editor visibility toggle actions
Added toggle for showing selection boxes, camera frustums, and icon
gizmos.

Fixes: QDS-5954
Change-Id: I97e12a3a04b9a1a1af5851e382f36c58ee869f45
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-31 09:15:32 +00:00
Christian Kandeler
6993bc7382 Fix various warnings
Change-Id: Iea85f4b890ce7700e8b3632de4656cf848729a36
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-27 10:42:23 +00:00
Jere Tuliniemi
a03a50a262 QmlDesigner: Add camera alignment buttons
Add a button to 3D edit view that aligns the selected cameras to the
view camera. Add another button that aligns the view camera to a
selected camera.

Task-number: QDS-4482
Change-Id: Ibe6ceaf498db10f45c8c351e3a108419d8d7a59b
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-25 14:15:54 +00:00
Antti Määttä
eadc9cb0e3 Improve particle system animation driver
- Do not automatically restart particle system animation when pressing the
  restart button if the animation is paused.
- Use own QElapsedTimer in AnimationDriver and properly handle animation
  driver pausing.

Change-Id: Ic2924fb66fddffb8878625be8fa766f06219ca61
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-12-02 05:32:45 +00:00
Antti Määttä
96db947c81 Fix particles play button state when scene changes
Add play button state to the scene state.

Task-number: QDS-5499
Change-Id: Id3035de439aa80fd782348cf89a1d8456a7dd006
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-11-17 07:13:25 +00:00
Miikka Heikkinen
590d01e8a9 QmlDesigner: Block modifying imports when editing in-file subcomponent
Adding import statements fails silently when editing in-file
subcomponent, and removing them can crash creator, so block various
cases in component library, navigator, and 3D edit view that do this.

Fixes: QDS-5353
Change-Id: Ide5429cd97d2bf78f884b14e83cdffd10399f929
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-05 12:44:21 +00:00
Tomi Korpipaa
69c8be67ae Add particle editor support
Add a way to edit and view particles visually, as editing
only the properties in property editor does not help visualize
how the particle effect is going to look. Support toggling the
effects on/off, pausing, resuming, and scrubbing the time back
and forth. Only the selected particle system is animated to allow
concentrating on that particular system without being confused
by other possible particle systems.

Fixes: QDS-4623
Change-Id: I2677c56a73279d451d77df1d131bd7294e6b23bb
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-05 11:31:31 +00:00
Miikka Heikkinen
7ea6492a17 QmlDesigner: Add imports to subcomponent manager whenever they change
Possible imports were never added to subcomponent manager after
initial design mode activation, and imports added manually via text
editor were also not added to subcomponent manager.

The old implementation also added duplicate imports to subcomponent
manager if imports were removed and readded to the document via
item library.

Fixes: QDS-5345
Change-Id: If45884f50b68282630af1d472af2816640b81c04
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-01 08:09:14 +00:00
Miikka Heikkinen
56555d8b74 QmlDesigner: Fix issues with QtQuick3D versioning
Empty version no longer triggers error about version incompatibility
when the import is set with Model::changeImports().

Adding QtQuick3D via the prompt inside 3D Edit view now correctly sets
empty version instead of 6.x.

Fixes: QDS-4494
Change-Id: I18e62ced6d6df45bc453431f8419bc853bf1e758
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-06-08 08:27:34 +00:00
Mahmoud Badri
767ce26ef2 QmlDesigner: Optimize adding QtQuick3D and asset imports
Update subcomponentmanager only for the needed imports when:
- Adding the QtQuick3D import via the link in the 3D editor.
- Adding 3D asset using the assets importer.

Also few renamings to make things clearer.

Change-Id: I4eb55f64307498f3dbb400e947667dfe9e42ff8e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-04-21 08:59:56 +00:00
Mahmoud Badri
88e5a6200b QmlDesigner: Make active3dScene internal (not saveable)
Task-number: QDS-2699
Change-Id: I7c8e8245c7f4631a7f3cac121ed9a88e3395f579
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-09-01 13:55:29 +00:00
Leena Miettinen
4174d0c72c Qt Quick Designer: Fix UI text capitalization to follow guidelines
Change-Id: I1dd9364117539ed2bda56d82a204f873019a2d2c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-07-02 06:55:58 +00:00
Thomas Hartmann
2f66b1d49a QmlDesigner: Rename 3d-active-scene to active3dScene
For annotations this has to be a valid QML property.

Task-number: QDS-2269
Change-Id: Ib6483a9dd673ddf24b8688909c599a518dfb361c
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-11 17:12:20 +00:00
Miikka Heikkinen
a248138685 QmlDesigner: Make 3D edit view onboarding text translatable
Also add a potential related nullptr check.

Change-Id: I8c6e4facbdb0c2d94f7c2af54f83eef0eca0b796
Fixes: QDS-1993
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-04-24 09:35:04 +00:00
Miikka Heikkinen
652596dc16 QmlDesigner: Update UI when an asset is reimported
Item library thumbnail and navigator icon are refreshed if asset is
reimported, and the puppet is restarted in case the asset is in use.

Change-Id: Ic5577eff3a24bcce87b504e9c059c29f6cb887a5
Fixes: QDS-1957
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-04-23 09:51:30 +00:00
Mahmoud Badri
621a823a53 QmlDesigner: Enable toggling the helper grid on/off
Also remove the toolbar buttons from the puppet side and few other
clean-ups.

Task-number: QDS-1849
Change-Id: I075753552043a9f1bc649f6baf54dc7b689e4f64
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-30 09:57:03 +00:00
Miikka Heikkinen
5e7cd5bf0c QmlDesigner: Register 3D edit view actions properly to ActionManager
Also fix one FormEditor action that specified its shortcut incorrectly.

Change-Id: Ieac988ff17c5ceee07a15ef0a31ab409829609a4
Fixes: QDS-1841
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-03-20 14:43:17 +00:00
Miikka Heikkinen
ddca92fc93 QmlDesigner: Add onboarding text to 3D edit view when there is no 3D
Change-Id: If9513da39efcc19129de6867ea7357bc6c0e2af4
Fixes: QDS-1748
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-20 08:23:30 +00:00
Mahmoud Badri
11bd2f8deb Enable Copy, Cut, and Paste in the Editor 3D
Task-number: QDS-1563
Change-Id: I22c3017b8c158d8bc084f050baef89fa8fffd365
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-13 13:25:58 +00:00
Miikka Heikkinen
206e7d3e70 QmlDesigner: Fix crash at project open when 3d edit view is undocked
Task-number: QDS-1739
Change-Id: I7a97fb8e22acca22744443b2a664ec230465905d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2020-03-13 10:43:03 +00:00
Leena Miettinen
1f26c6d1b9 Qt Quick Designer: Fix UI text punctuation and capitalization
According to the guidelines in
https://doc.qt.io/qtcreator-extending/qtcreator-ui-text.html

Task-number: QTCREATORBUG-23683
Change-Id: Id1f484855396c16d629b5743bef9710e84ba2cd6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-11 08:38:21 +00:00
Miikka Heikkinen
e8f76f0050 QmlDesigner: Store 3D edit tool states per document
This way we avoid interference from scenes in other documents.

3D Edit view content is also cleared whenever a model is detached,
and puppet resize is automatically triggered if incorrectly sized
image is received to keep edit 3D view content up to date.

Change-Id: Ic7a71f1d89f0ebfe5a62b49ea62570242b8f5b1d
Fixes: QDS-1734
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-03-09 08:41:42 +00:00
Miikka Heikkinen
4908055937 Integrate Edit3D view into Creator
Edit3D view is now a tab alongside Form Editor.
Buttons were moved to a Creator side task bar on Edit 3D view.

Change-Id: Ia06107e4f855ba512ffea3e628a61558894e800e
Fixes: QDS-1570
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-02-24 12:18:53 +00:00