Commit Graph

1080 Commits

Author SHA1 Message Date
Tim Jenssen
05f9769d91 qml2puppet: fix build
Change-Id: I0f06da77efe852cd8f4b914a4dc843fabbdd8f31
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-12 09:58:52 +00:00
Tim Jenssen
d6c10e775d qmlpuppet: remove qmlprivategate DesignerSupport < Qt 5.6
Task-number: QTCREATORBUG-26600
Change-Id: I629c8cd1f497ed2dd354ff461aa890a77bdc2a01
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-12 09:20:04 +00:00
Marco Bubke
67324512e9 QmlPuppet: Adapt to C++ 17 [[maybe_unused]]
It has the advantage to to move the attribute to the declaration instead
of using a workaround.

Change-Id: Ia6115ab8fefbe03f247edfea2b7bed73e9149068
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-07-11 09:29:37 +00:00
Marco Bubke
fd41105191 QmlDesigner: Introduction of PropertyMetaInfo
Because the project storage is integer id based the string based API
isn't fitting well for the new approach. PropertyMetaInfo can be easier
mapped to the project storage.

Task-number: QDS-7197
Change-Id: I49bc650abdaacf4b039d76c2514b5ad05ec84abe
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-07-06 12:40:58 +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
Tim Jenssen
56bcad81ad Merge remote-tracking branch 'origin/7.0' into 8.0
Change-Id: I7cd5d3808007ef739212f4347ba9b16e7b298943
2022-07-01 09:22:10 +00:00
Miikka Heikkinen
8a8a2f5c55 QmlDesigner: Unify the background of 3D preview images
Added 3D checkerboard floor on all 3D previews.
Since shadows generally look bad for arbitrary 3D scenes, and would
mostly be obscured by the model itself as we want the light mostly
from the front, removed shadows also from the material preview to unify
the previews.

Qt5 had issues rendering the 3D floor texture, so used a static image
there, as Qt5 only generates previews of one size.

Fixes: QDS-7078
Change-Id: I74d094878ed01e6e531ad60df1f8d9d7cf415860
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-23 13:06:04 +00:00
Miikka Heikkinen
9c3636af49 QmlDesigner: Ensure materials render properly after puppet reset
This is a workaround for quick3d issue QTBUG-103316, where
material library materials for editor are properly initialized only
if the first encountered View3D in the scene is also rendered first.

Fixes: QDS-7084
Change-Id: I8bb6a8e6bfe2fcffddfe86f92157d386fdf4095d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-16 13:53:43 +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
Thomas Hartmann
7ae288d355 QmlDesigner: Use changed properties to update 3D preview
EffectReference is always dirty and it is the only dirty flag.
Instead, we update now if any property changed.

Task-number: QDS-7079
Change-Id: I157cf2d3b15120c33f4a6b3f53e526d555c7f80c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-13 08:35:11 +00:00
Thomas Hartmann
13c1b6f237 QmlDesigner: Do not apply smooth rendering if root is a 3D node
Task-number: QDS-7136
Change-Id: I5260153b8d6131160a8d4b67418e81c6f6e4d862
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-13 08:12:39 +00:00
Miikka Heikkinen
dedbbc75b5 QmlDesigner: Apply root item transform in Node component previews
When generating a preview from a component with a 3D node for a root,
the root Node transform is now applied when calculating camera zoom.

Fixes: QDS-7131
Change-Id: I73054a09b3e82868c999ef6f9797dc941e625b33
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-10 13:15:05 +00:00
Miikka Heikkinen
36dbc62a1d QmlDesigner: Queue puppet processes during import
On some systems launcing multiple simultaneous import processes causes
imports to fail. Fixed by only launching single process at a time
and queuing the rest.

Fixes: QDS-7107
Change-Id: I330c5920dcbd74d3b4f2e7f40899795a4fbaf3ac
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-10 09:31:03 +00:00
Thomas Hartmann
d8c605179a QmlDesigner: Add option for smooth rendering in form editor
Smooth rendering turns on MSAA and doubles the resolution for
rendered items. With this option enabled everything stays smooth when
zooming in. Around factor 8-10 pixels become clearly visible again, but
it still looks relatively smooth.
I added both MSAA and increased the resolution to one option, for simplicity.
The smooth mode takes 4 times the shared memory, which should not
be an issue in most cases.
For now, the option is not the default.

Task-number: QDS-7129
Task-number: QDS-7128
Change-Id: I8a778650bb40f8ba796960db9bc966e8a1efff4e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-06-10 09:04:11 +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
Christian Strømme
3335698fba Import3D: Update call to importFile() after change in QtQuick3d
The function in QtQuick3d will from Qt 6.4.0 accept the json object
directly meaning it's no longer necessary to convert to a variant map
first.

Change-Id: If180672963cbfea78582f245431e246f84111c9b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-06-06 08:52:30 +00:00
Miikka Heikkinen
d1a56ddcfa QmlDesigner: Fix issues with quick3d private API changes in Qt 6.4
Change-Id: I5974c7f663262c88810ddaac6f9c775d95749266
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-06-03 13:25:44 +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
Miikka Heikkinen
c789186418 QmlDesigner: Handle picking of models under View3D component properly
If a model defined inside the View3D component is picked on 3D editor,
the parent View3D is selected instead as there is no instance for
the model itself. This is similar to how Node based component picking
works.

Fixes: QDS-6934
Change-Id: I4f273972da8cb1c55f03cab323dd9804a5d10def
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-31 12:02:49 +00:00
Christian Stenger
b336ebafc3 QmlPuppet: Silence warnings
Change-Id: I25ebc3b33d5e636176f87af35ee2316e302f233a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-31 08:32:29 +00:00
Miikka Heikkinen
80ea026fd8 QmlDesigner: Refactor library icon generation for imported 3D assets
Previously, icon generation was done at import time, but that was
wasteful, as we now have image cache backed icon generation
available for component library icons. Added the few remaining missing
bits to support icon generation for image cache and disabled the old
icon generation implementation for Qt6.

A few issues in fit algorithm for preview image generation were also
uncovered and fixed to make icons render scene in comparable size to
the old version.

Qt5 imports still generate using old way since component library
3D previews generation doesn't work on Qt5.

Fixes: QDS-6205
Change-Id: I5418fa19d86e81adcd184be023f1dfbc813d0bf5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-05-30 14:16:53 +00:00
Miikka Heikkinen
46049bac32 QmlDesigner: Remove hardcoded timeout from 3D import puppet
It doesn't seem that this timeout is needed.

Fixes: QDS-6909
Change-Id: I7794d8548acd75fbb220a20458d091f413b5fcbb
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-30 14:16:27 +00:00
Eike Ziller
09efabaf89 Merge remote-tracking branch 'origin/7.0' into 8.0
Change-Id: I3780a56c1e02c2e98028aaf02b54733c6f222498
2022-05-30 14:14:04 +02:00
Miikka Heikkinen
d92bdcce40 QmlDesigner: Show form editor preview for 3D material root nodes
Fixes: QDS-6561
Change-Id: I62a06eb6c83b0a4813a1b20f91b09e17b04a1332
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-27 08:49:14 +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
Marcus Tillmanns
f117c2a37b ImageContainer: Fix potential use after free
Found during clang-analyzer run.

Change-Id: I6549403ac949650058348ccc22b2020d09ef53e0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-05-24 14:44:41 +00:00
Christian Stenger
37445824e3 QmlDesigner: Fix puppet build for Qt5
Amends f09d4538e7.

Change-Id: Ibff8b834e65fd18f6345431c8729b7592eab0c5c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-24 07:46:07 +00: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
Miikka Heikkinen
6dda55a8cd QmlDesigner: Show id-less scenes properly in 3D edit view
Fixes: QDS-6942
Change-Id: I5b7fa966bf9d7321b1735ef0ea7cb904b82f542d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-18 13:30:49 +00:00
Miikka Heikkinen
17982e661c QmlDesigner: Disable shadows for gizmos
Some gizmos (selection box and helper grid) are drawn to main 3D editor
scene. Disabled receiving and casting shadows for those gizmos so
they do not interfere with scene lighting.

Change-Id: Ia589d3896c2591061966f6a4d532a0dedbf6fe12
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-13 11:11:54 +00:00
Miikka Heikkinen
0334d4886b QmlDesigner: Fix puppet crash when property animation has no target
Fixes: QDS-6935
Change-Id: Ib6dae3a6c39a12e9e62bd494d5a27917d7f97048
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-05-13 07:32:50 +00:00
Thomas Hartmann
bf3c3b624a QmlDesigner: Fix 3D formeditor preview
I remember testing this and ContentUpdateMask seemed to work.
This might have changed with Qt 6.3 and using AllMask instead, which
works for all cases I tested should not have any negative impact.

Task-number: QDS-6896
Change-Id: I648c10fe75df813ae25a54a13a862cad0228bfdb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-05-12 09:11:29 +00:00
Marco Bubke
4bd71ebf6a QmlDesigner: Fix poor snapshot quality
It removes the image cache in the AssetsLibraryView too because it is not
used. Fix ODR violation too.

Fixes: QDS-6553
Change-Id: I83d8f8b7cd385e2c8352986e4b5a5abd76ac7d5b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-13 14:16:20 +00:00
Thomas Hartmann
aabff7bd35 QmlDesigner: Fix puppet crash with DelegateModel
Change-Id: Ibe42b87b6364c78157c54504f00354bff8bb4b23
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-03-24 17:10:55 +00:00
Miikka Heikkinen
10f2fb7be2 QmlDesigner: Don't scan for fonts if resource path is not valid
For some reason captureiconmode puppet is launched at QDS shutdown,
with empty resource path. This caused the entire drive to be searched
for fonts to register, making the puppet linger for up to a minute
after the shutdown.

Fixes: QDS-6482
Change-Id: I0f1fa4b6f5646c76d93f5820dae029033e1543a3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-18 11:27:35 +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
Robert Löhning
59a721c0ea QmlDesigner: Compile fix for Qt 5.15
error: passing ‘const QQmlContext’ as ‘this’ argument discards qualifiers

Change-Id: I4fa9ed0098f5bd63925534459d1171d7c9430897
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-03-15 12:36:52 +00:00
Miikka Heikkinen
72e4287ac3 QmlDesigner: Fix navigator preview of Models
Now we resolve absolute source url for our preview model, so it
will always find the custom mesh files.

Also always use the Node type preview if the instance is a component,
even if the root node is Model. This ensures the preview works properly
in case there are child nodes inside the component.

Fixes: QDS-6204
Change-Id: I48ef273e5a5dca13abe25816b5edf0be7dd217ff
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-15 10:45:24 +00:00
Miikka Heikkinen
8b27281354 QmlDesigner: Show error message on import log for failed 3D import
The import is done on puppet side, so we use a log file to pass the
error message.

Also changed how import process is matched to the import, so that
exit code is no longer needed for this purpose. Crashes are also
now reported as import errors.

Task-number: QDS-6402
Change-Id: Ie14cd1df0bbba965d8e5f2aa7302a955e944379b
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-11 14:18:04 +00:00
Miikka Heikkinen
eeddae0d2b QmlDesigner: Fix runtime JS warning
Particle emitter gizmos do not have locked property.

Change-Id: I4f11dbd52256b365402e647024d4d258351a3c60
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-03-10 13:44:58 +00:00
Miikka Heikkinen
be9b71af2f QmlDesigner: Fix runtime puppet compilation error
Change-Id: I6c3b1ce317305b6cbc088971beaa1700b5327682
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-10 08:43:01 +00:00
Miikka Heikkinen
2c32c9c991 QmlDesigner: Deactivate particle system when locked
Particle systems are now deactivated in 3D edit view unless nodes from
exactly one system are selected. Selected nodes that are not part of
any particle system are ignored for this determination. This now also
includes deactivating previously active system when an empty
selection is received from creator side (happens e.g. when selected
system is locked).

Fixes: QDS-6405
Change-Id: I5b1636640594e51db5d6e725684075727536b1a5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-08 11:32:54 +00:00
Miikka Heikkinen
ec02c157ee QmlDesigner: Simplify hidden and locked handling for gizmos
There is no need to have an event filter to listen to changes to
_edit3dLocked and _edit3dHidden properties, as they are only changed
in one place. We can simply emit the change notification there.

Fixes: QDS-6403
Change-Id: I8136f38fd8e435e3a4dbd69d70169496e1675dfa
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-08 07:38:41 +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
Thomas Hartmann
5a31ba3564 QmlDesigner: Change states thumbnail size to 320, 320
Task-number: QDS-6390
Change-Id: Id125e96a6b1615b7ac5c8eafe680f61b84a5353c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-03-01 10:26:41 +00:00
Thomas Hartmann
ee4757a8e8 QmlDesigner: Use LoggingCategory in ImageContainer
Change-Id: Ibdce399fc2df19883d6ffd12e9441c58d46035ec
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-23 20:47:09 +00:00
Mahmoud Badri
ed21e25e14 CrashPad: Remove the 1 crash per hour limitation
Change-Id: Ie7634012f15059fd204cb03e37afd3d63d7bfb29
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-23 13:00:59 +00:00
Thomas Hartmann
3f078ee89d QmlDesigner: Add preview of pure 3D component in form editor
If the root node is a 3D node we show a preview similar to
the state preview in the form editor. The size of the preview
is hard coded as (640, 480).

Change-Id: If7f96522b093c17422fa38102bffe11ede016063
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-02-22 10:43:49 +00:00
Christian Kandeler
fde7b90ee9 Fix some warnings
Change-Id: I2991f0ab84b26c93c0dbe2ec79f7638d299e3d39
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-11 12:14:27 +00:00