Gizmo orientation in multiselection case should always be aligned to
the global axes, so we now reset multiselection on release
handlers of rotation gizmo.
Fixes: QDS-4492
Change-Id: Ic10f26f65df42869e4643f48457bcbcbf970fe9a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Add support for moving, rotating, and scaling a multiselection of 3D
nodes in 3D edit view.
Fixes: QDS-4313
Change-Id: Icf83911ac6f87fde1cb79d6f5059ae01ed434d7f
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
QtQuick3D doesn't support both rotation and eulerRotation set on same
node, so we delete existing quaternion rotation if user sets an euler
rotation to the node. If node has quaternion rotation animation,
we block any change to eulerRotation in the node.
3D editor also disables the rotation gizmo for blocked nodes.
Task-number: QDS-4335
Change-Id: I4ce7b022c732a9547751f101548ecea948279db8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The issue blocking this was fixed in QtQuick3D.
Change-Id: I31ceb3091f7deb4450c966a8c41a203782569f14
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This allows using a Qt 5 puppet with simple Qt 6 files.
Change-Id: Ic3264ffbf8d798ff260305079a0bb281f9628795
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
initializeView(); creates the necessary engine
where we need to set the languageUi.
Change-Id: Ib9f9f35e00167ce0bfe4d96ed4e66a965daea084
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Private API puppet uses for custom 3D geometries has changed.
Change-Id: Ie9f2052b04399db6f9643aba6319f6e95df1c15b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Moved 3D asset import to puppet to ensure import always uses the
correct version of the QtQuick3D.
Fixes: QDS-3154
Change-Id: I630a833e7231383b87bf8b7214d3545d12de15ab
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Automatically register all fonts from 'fonts' folder at scene creation.
Fixes: QDS-3624
Change-Id: I38728e458952ea52c941244daaca715102a93c55
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
The contentItemBoundingRect is typically null, unless there is a content
item.
Change-Id: Ic32deac3c2506ff05feb28399b1ccaedacb5f68f
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Refactored item library component preview tooltip to be also suitable
for asset previews.
Also now using the same image cache for font asset icons.
Fixes: QDS-3254
Fixes: QDS-3470
Change-Id: I34c1278be2e5697e01eaedabe2798104507a6ad8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Puppet cleanup was not handled properly, so derefFromEffectItem() was
not called for all objects that needed it, causing puppet to crash
at shutdown.
Fixes: QDS-3461
Change-Id: I22c0552fe1223789fa42b276ab377d4a9e929955
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
There is an unknown issue causing the first premade material from
QtQuick3D.Materials library encountered in the scene to fail to load
properly as a component. In scene creation this is worked around by
falling back on primitive creation, but the same issue prevents
loading the component for preview image generation purposes. Luckily,
materials can be shared freely between views, so we don't need to
actually load the component in this case. We can use the existing
material instance just like with non-component materials.
As a side effect, this change also fixes the issue where premade
custom material previews didn't reflect the changes in material
properties, like other materials do.
Change-Id: I7f1d6863fe96734a610d725f2f71e252f03a4428
Fixes: QDS-3114
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Currently it is enabled via #define FPS_COUNTER in
qt5informationnodeinstanceserver.cpp
Change-Id: If9af313232fc91fca674a43c7ca70b04db7e59f7
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Port QQuickRenderControl rendering used for 3D edit view also for
2D views.
This also fixes the issue of only partially rendered form editor
view for root items with non-origin position by adjusting the
position to 0,0 on the puppet side via an extra injected item.
As a result of the root item always being rendered at origin,
the visualization of the root item offset is no longer visible in
the form editor (the checkerboard background item).
Change-Id: Ide29510ef52513340d205ed35ac35c8cce66715c
Fixes: QDS-3159
Fixes: QDS-3175
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Rendering is now done using QRhi private API and QQuickRenderControl.
In addition, input event handling was changed to use sendEvent instead
of postEvent for our fake mouse events, as mouse event position
gets corrupted somehow if event is handled asynchronously when the
window is hidden.
Change-Id: Ia2466622cd4b60e3f73e0ad3e7e4da7c7c335451
Fixes: QDS-3125
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Such a cast rely on the fact that some internal data
of both classes must match. Qt doesn't guarantee it.
Change-Id: I5c29af98e320b72b599c059a2827eb2e7d3843da
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Silence warnings when QUICK3D_MODULE is not defined.
Change-Id: I4974ce04e2d6185764d91767461e038eac59d90a
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
When grabbing the window we have to clip the window using
the root item size.
Depending on the window manager the window is resized.
Another issue is that when grabbing the window offscreen
the pixel ratio is always 1.
Before we assumed that the pixel ratio of all images
is the same for the host process as for the puppet.
This is not necessarily anymore and we have to set
and forward the correct pixel ratio.
Change-Id: I36b467291ab120f825119adea4ed7db10d34266d
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This frequently crashes the puppet. Will be re-enabled once the
underlying issue QTBUG-88320 is fixed.
Task-number: QTBUG-88320
Change-Id: Ie4c1ad914e5bd62dcf3b132cea588ba6fc003bc5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>