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>
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>
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>
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>
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>
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>
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>
Particle emitter gizmos do not have locked property.
Change-Id: I4f11dbd52256b365402e647024d4d258351a3c60
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
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>
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>
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>
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>
Refactored the existing 3D node preview generation to be done
synchronously, which enables their use also for creating state
and item library previews for 3D nodes with ease.
Fixes: QDS-5785
Change-Id: Ib493eccbc239f33bcad3301673a865494616a901
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Nanotrace headers are not exported to build dir at all if the feature
is disabled, so runtime puppet build can't find them. We have to
ifdef out the header include and define the required macros as empty
in puppet.
Fixes: QDS-6107
Change-Id: I702c3ed5521d30ee0b253d035dea4ea00d00848f
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
If the host proecess crashes then qml2puppet will also be shutdown.
I suspect this can lead to crash reports of the host application
not properly reported.
Change-Id: Ic503874ce660db3311958ecd0718255a1cf3daea
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
In Qt5 builds, we need additional async update at camera geometry
initialization to ensure source camera is up to date and frustum mesh
can be constructed.
Fixes: QDS-6071
Change-Id: I41371ae66fde432b0fdf4b5fee6a0604d005bf63
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>
RuntimeLoader creates the loaded nodes dynamically, similar to
Repeater3D and Loader3D, so handle it similarly as well.
Fixes: QDS-6053
Change-Id: Iece15254e720cfc0a6796b182ef00c3a773cf35d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
CMake's auto symbol export is a plain hack and does not work for
other build systems.
Besides fixing some non-working implicit conversions when using Qt5.15.
Change-Id: I80b77a4ebf8cad30c78c1c2ef2034e62d2063399
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Minitrace is a library to produce json traces suitable for chromes
built-in trace viewer. Unfortunately it lacks the ability to add
custom arguments to the json files which is needed in our case
in order to examine Design Studios state from within the evaluating
python script. Nanotrace is a rewrite of minitrace that adds this
ability. Additional benefits are higher precision and the fact that
it is written in c++.
Change-Id: Id2610b93188483d88547369c3fa8dacbe4dee9f7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
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>
3D edit camera can now be moved up/down/left/right with arrow keys.
Task-number: QDS-5790
Change-Id: I3b4a095b96bdaa9d00bf6b29b750af1f783b485e
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Do not use QQuick3DObject when disallowing recursive component complete
check so that the animations get added to the instance server.
Fixes: QDS-5731
Change-Id: Iff8e39f74d68b312b66d68adaf6ab79d625f88f8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The base model used for instancing is hidden at render time, so it
should not be pickable in 3D editor.
Fixes: QDS-5100
Change-Id: I7c58bd8e7e5c9bfbe75dbaff67c0fd99793ad610
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
The selection box in 3D editor no longer includes selection boxes of
immediate children for clarity. The box itself also now only shows the
corners of the box.
Fixes: QDS-3656
Change-Id: Iae3e884276f26385d6a362809b79a74e09c093a3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
The include is not required and
the whole class defined inside is not used since Qt 5.6 anymore.
I will remove the pre Qt 5.6 code in another patch.
Change-Id: Icfc13376ceba3ee16b516156727f743e49a85127
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
There is no top level Repeater3D node with an actual instance
when the Repeater3D is inside a component. The pick target was not
correctly set in this case.
Now we set pick target on every encountered Repeater3D object so
we can propagate it to every object they create.
The same was done for Loader3D, which also creates nodes dynamically.
Fixes: QDS-5745
Change-Id: I537de28ff7426adaa29c2febc6c4b3416baeccb5
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
QQuick3DViewport::pickAll was introduced in Qt 6.2.
Checking against version 6.2.1 because that's when the global picking
API was taken into use in QmlDesigner.
Change-Id: Id69ff9d958da89ba9e043dfb082a99f640884a4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The objects Repeater3D creates are created after handleInstanceHidden
is called for the repeater instance, so the _pickTarget of the created
children doesn't get properly updated. Added signal handler to
make sure handleInstanceHidden is called again after all objects have
been created.
Fixes: QDS-5643
Change-Id: I8b63614fca0be3956b6896028e3f3a0f49bfe397
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
We now check also the parent chain for pickability, because
a node is not pickable if one of the ancestors is not pickable,
as all properties picking depends on (visibility, locked state)
are implicitly inherited by descendants.
Rotate gizmo rings default to regular View3D picking when the angle
is so steep that the plane intersection is not reliable. With new
global picking enabled handling we need to check all hits instead
of just the first one.
Change-Id: Ib1aa604b06f7db1041f5d4c3019cc2badf29a20f
Fixes: QDS-5679
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Model bounds API changed with 25b757b7b0a286a392b3 so switch to new
API with version checks.
Task-number: QDS-5657
Change-Id: I6d880f179fc277f94ea9ac610ae682e9afbefe39
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>