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>
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>
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>
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>
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>
- 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>
If you triggered another preview generation while previous
is still going through the async loop, it was possible for puppet to
crash or create a preview image with e.g. both material and model
previews overlapping.
Fixes: QDS-5600
Change-Id: Ia11e01cff0503483dc4152aa412c3f9aea7fea6d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
If an effect uses transparent border int paints outside of the item.
Without this patch the item is only rendered inside the bounds of the item.
This patch always adds 40px to the bounding rectangle if an effect is
detected. This is done by effectAdjustedBoundingRect().
The 40px should be sufficient for every realistic case.
Task-number: QDS-3576
Change-Id: I82af0ea66c79039dcae92a88a5954b49de6d944f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Rendering of preview tooltip 3D content requires rendering multiple
frames to find the correct zoom level for a nice preview image.
This used to be done in a synchronous loop, which doesn't work in Qt6.
It doesn't work anymore because preview tooltip rendering uses a
selection box encompassing the component scene for finding the proper
zoom level. Selection boxes use custom geometry, which in Qt6
requires asynchronous rendering to allow the geometry to update between
frames.
Fixes: QDS-5600
Change-Id: Ib5e54a04ad5df2a8706fd22e554232feb45dd51e
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>
Do not stop particle system animation when user selects particle system
child object. Instead continue particle system animation and if the child
parent particle system is another particle system, enable that animation.
Task-number: QDS-5562
Change-Id: I334f522536b53e7fb5cbebf8f7e9914f6394d165
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
If we have more than one render in queue for 3D edit view, we know the
current render is not good, so do not send it to creator side but
instead wait until we have just one render in the queue.
Also changed the timeout for queued renders to closely correspond to
60fps frame time as there is no point rendering any faster than that.
This also means we never need to queue more than two frames to ensure
correct results.
Fixes: QDS-5467
Change-Id: I49a3a7aeaff24484f48784d0391414165ce50748
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
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>
We have to paint each item after a state change. This seems
to be a regression caused by the swtich to Qt 6.
Task-number: QDS-5462
Change-Id: I10a1e0e03c7e887c0998864f397fcbe429364ec7
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
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>
Invalid QVariant is a valid value for properties of type QVariant, so
propagate the value change from puppet to creator in that case.
Also change the property editor to notify controls of value change in
case of invalid value set, and clear LineEdit when invalid value is
set.
Fixes: QDS-5304
Change-Id: I02c7daaf3cde06317690a32e7ac8a82da754bd58
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>
Creating an item pixmap will render the entire scene and clear all
dirty flags, so we don't ever want to render just one item without
checking if other items need rendering, too. So pixmap creation is
removed from completeComponent(). Since completeComponent()
already inserts the completed instances to the dirty instance set,
this should not cause any problems; it just defers the rendering to
the next collectItemChangesAndSendChangeCommands() call.
Fixes: QDS-5271
Change-Id: Ic15dbb29f13875b966f4e3c3556a4ecd7194cdd6
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
When gobal picking is available (Qt 6.2+), use that instead of toggling
models pickable properties.
Task-number: QDS-4978
Change-Id: Id2a501ae97955128874447fa8a3b8afab3d1f2c7
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The type might not actually be exported and imported as a folder import.
Change-Id: I0ada27d619727044c2f8b8a601a2632a44c5a7cb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Any time repeater properties change, the repeater parent should be
dirtied to ensure it rerenders. Often the rerender is triggered
incidentally due to other triggers, but e.g. in case model value is
changed to zero, or if model property is removed, no other trigger
causes rerender.
Also moved the repeater parent checks into QuickItemNodeInstance
to avoid polluting Qt5NodeInstanceServer with such stuff.
Fixes: QDS-5233
Change-Id: Idd89e23c5ad022d26f443d665dac81dc2cbb0b28
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
- Fixed state preview rendering by deparenting nodes under
component wraps.
- Ensure state preview image is always clipped to root item.
The state preview bounding box broke when Repeater was direct
child of root and had delegate with rotation.
- Allow dragging items under Repeater to create implicit component.
- Allow dragging Components under Repeater.
- Do not ask for target property when Component is dragged under
any node.
- Update nodeSource properly when reparenting implicit component
or removing last child of a Component item.
- Fixed scene update when last child of a repeater is deleted/moved.
Fixes: QDS-5197
Change-Id: Iaaf1745e25db3522ffc1dba7fd1b051da29f5aec
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
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>
The size of the image to be rendered for the FormEditor is computed from
the bounding box enclosing the items within the scene.
There is a size limit, when reached the size was reset to (0,0) leading
to an empty FormEditor image. This is now fixed by returning the
bounding box of the root item in case this limit is reached.
Change-Id: I58366610da2e90c34aea6117e225765ff4b3288b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Linux mingw uses lowercase headers, so cross-building on Linux for Windows
target must use the correct form. Windows is case-insensitive, so it won't
affect host-native builds.
Change-Id: Ic2140412bb367bbce83b5e2546d70e0936928c5c
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: David Schulz <david.schulz@qt.io>