Commit Graph

53 Commits

Author SHA1 Message Date
Miikka Heikkinen
3485d97755 QmlDesigner: Add support any pickable node with 3d view context menu
Previously only 3D models could be picked for context menu target.
Now any node that can be resolved from a point at 3D edit view can be
picked.

Fixes: QDS-7518
Change-Id: Id4a30d96744c42907d45688493776bdff35b934e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-09-08 10:36:11 +00:00
Mahmoud Badri
4e5673850c QmlDesigner: Allow adding imported 3D models using the context menu
Also some changes to support translation and avoid translation-related
issues.

Change-Id: Ie2cc491cf491ac4c14e12e8cf666d4b452b9e7c1
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-29 09:32:56 +00:00
Mahmoud Badri
184614c3d8 QmlDesigner: Cleanups for includes of edit3dview.h
Change-Id: I6219fe71c4c566e2fe68198bf2567835518acd62
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-08-26 14:35:41 +00:00
Mahmoud Badri
3b3e2e1baa QmlDesigner: Add "Create" submenu to the 3D Editor's context menu
Allow adding Quick3D Node-based items to the 3D scene using the contxt
menu.

Fixes: QDS-7397
Fixes: QDS-7399
Fixes: QDS-7400
Change-Id: Ib0a9b1c0243e3e945b4925262f68d80d2460f516
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-08-26 09:39:18 +00:00
Mahmoud Badri
8656bafbd4 QmlDesigner: Add delete action to 3D Editor's context menu
This entails selecting a model upon right-clicking if it is not selected.
Also fixed a memory leak and small tweaks.

Fixes: QDS-7401
Change-Id: I592acb3fff30ecc3236f3cf2fbe126de4fb389dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-08-25 09:55:32 +00:00
Mahmoud Badri
fc4ebb0cab QmlDesigner: Create a context menu for the 3D Editor
For now only 1 action is implemented (edit material), more actions are
coming next.

Task-number: QDS-7414
Task-number: QDS-7398
Change-Id: Id8e36c23d9a4d35ee94d55d3d6b15df78241a05d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-08-22 13:26:18 +00:00
Samuel Ghinet
86f93b8949 Sync color between environment map and 3D Editor background
Task-number: QDS-7097
Change-Id: I5f2c83bc43bd589d0d1f32e01e7512ab20a03bcf
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-08-03 09:35:11 +00:00
Mahmoud Badri
5a9a6804ee QmlDesigner: Implement drag-n-drop materials to the 3D Editor
Fixes: QDS-7011
Change-Id: Id6e4aea2c19561ea861507480636ae2358ece067
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-01 15:38:29 +00:00
Thomas Hartmann
b5a34902d0 QmlDesigner: Remove QTC_ASSERT
This crashes if edit3DWidget() is null and we check below.

Change-Id: If993b73461fb442fb6d668ba9fc15c46ea763a11
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-01 15:04:34 +00:00
Tim Jenssen
56bcad81ad Merge remote-tracking branch 'origin/7.0' into 8.0
Change-Id: I7cd5d3808007ef739212f4347ba9b16e7b298943
2022-07-01 09:22:10 +00:00
Samuel Ghinet
50aadacb6e QDS Editor 3D: Allow the user to select (and reset) the color of grid lines
Task-number: QDS-7122
Change-Id: I686269e61b53bd5e3d5d1225376930612d869072
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-16 10:17:01 +00:00
Eike Ziller
84ff5eb169 Merge remote-tracking branch 'origin/7.0' into 8.0
Change-Id: Ib669e2e993c4675a7382f721ccb7d6ecff11fc20
2022-06-07 10:28:37 +02:00
Samuel Ghinet
fe4d8e3eda Fix tooltip text in 3D Editor toolbar background color button
Task-number: QDS-6585
Change-Id: I397de9ac51b69697234f5f0dc48b90f330ec49d2
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-02 13:32:43 +00:00
Eike Ziller
68c5968447 Merge remote-tracking branch 'origin/7.0' into 8.0
Conflicts:
	src/libs/utils/launchersocket.cpp

Change-Id: I7ec649485bb7fc7c299b571d92519d2b7fc9506b
2022-06-02 10:54:10 +02:00
Samuel Ghinet
c3b90c0ce5 Allow changing the 3D Editor's background color
Task-number: QDS-6585
Change-Id: Ibcac69d3792b521b29dfbdce2d49557d36de99a9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-01 09:57:05 +00:00
Eike Ziller
82ee8baad8 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I254066f8be63cb5b15650ef2a470206db56de026
2022-05-25 11:42:13 +02:00
Mahmoud Badri
f09d4538e7 QmlDesigner: Implement Material Editor
Task-number: QDS-6438
Task-number: QDS-6439
Change-Id: I04e899a68aea665f0df8b65e21523632174ec76b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-23 16:44:02 +00:00
Eike Ziller
f14b1a484a Merge remote-tracking branch 'origin/7.0'
Change-Id: I7037b2b400617b0be0e1a010dd293e4f96d77328
2022-05-23 12:26:27 +02:00
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
Eike Ziller
1b7295514c Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri
	src/plugins/languageclient/languageclientoutline.cpp

Change-Id: I106fbde6467818368a8358d612d793313cad27e6
2022-05-02 15:06:08 +02: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
Thomas Hartmann
648e659356 QmlDesigner: Simplify naming of views
* Curve Editor -> Curves
* 3D Editor -> 3D
* Form Editor -> 2D
* Text Editor -> Text
* Transition Editor -> Transitions

Most view titles are now a single word and all superfluous "Editor"
as part of the title have been removed.
"File System" and "Open Documents" stay as they are.

Task-number: QDS-6325
Change-Id: I8fb6477f9e07c324f76a49796f550a8b8799fedd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-21 10:04:08 +00:00
Eike Ziller
b6f679d777 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/webassembly/webassemblytoolchain.cpp

Change-Id: Ia75c783e3ecab1f97de2b5c73a0979c49da82009
2022-03-18 16:07:51 +01: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
Eike Ziller
cd8c4ced81 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: Ic02df53b880d0861d9d9ea0df3e0d381ae99f350
2022-03-11 09:50:48 +01: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
Eike Ziller
fcb8d3b2a4 Merge remote-tracking branch 'origin/7.0'
Conflicts:
	src/plugins/qmldesigner/components/itemlibrary/itemlibraryview.cpp

Change-Id: Icda34067bb89d066a3e7eb47f8cca1d62dc3ae0d
2022-02-11 11:20:13 +01: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
Knud Dollereder
381bfd623c Remove ToolBarWidgetFactoryInterface from WidgetInfo
Since it is sometimes created with new but never used,
it leaked memory.

Change-Id: I5adfb71f9c773be37c1cefc619236bad9f34aad1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-08 10:05:49 +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