This will break the file selectors for styles.
Change-Id: Ie539f768eb277fb4dc0df3eceb736ff9e4353837
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Resizing the window doesn't actually trigger rerendering of the
root item image in single item rendering, so we ensure that happens
by making root item size dirty.
Fixes: QDS-4957
Change-Id: I08750c855458cc309a2683e56557c42dc7c49274
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Rendering effects requires actually rendering another item.
The effect is defined by another item that is rendered instead
of the original item.
For items that have an effect we do not render the children, since
the effect is only applied to the layer not the individual items.
We set layer.enabled temporarily to false, this ensures the effect
is not rendered as part of its parent item.
To detect the effect we use the source property an check if it points
to the ShaderEffectSource.
If one of the children inside the effect is transformed we have
to update the effect item.
If layer.enabled or layer.effect is changed we set the dirty flag
on the item and all children.
Change-Id: Iff61ef950e62a7a598b4bfa181ea70cb144368f3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
We have to render an item inside the bounding rect, because if
it is a component there might be child items outside its actual size.
The way we calculate the bounding rectangle excludes children
on the document level. We take clipping into account when calculating
the bounding rect.
When rendering the effect we do not have the instance. Therefore
we fall back to the standard bounding rectangle.
Change-Id: I7cd09d08d461d28c49a91fb891a5487185df0245
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
If the item is set to invisible we set visible to false in
the render and preview puppets. This will have no effect on the
value in the property editor.
Changing the actual value of visible can have side-effects on
the rendering in some rare cases.
Task-number: QDS-4932
Change-Id: I5ce0925ebff8f5e4e64bc71fd5d33d6154b85f91
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
That code path cannot be hit with Qt 6 anyhow.
Change-Id: I6f8e2a1a3606a4e6fbaa10f650fc5f22354f48a8
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Change the form editor rendering to be done by item basis instead of
just rendering the entire scene (unified rendering).
Fixes: QDS-2933
Change-Id: I999cbc834791bc6e96334eab8273d97e4f58975f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The cameraNode() function has been removed from QtQuick3D and it only
existed because of the weird way we we're creating the camera node.
Now, instead of the round-trip, just request the spatial node directly.
See: b74fde27@qtquick3d
Change-Id: Icc8584aebee4952356769a134756074cba8d1b0e
Reviewed-by: Kaj Grönholm <kaj.gronholm@qt.io>
If the component comes from the import paths we should not create
the component directly. This can have subtle unwanted side effects.
Styling for example is not working with Qt 6.
Change-Id: Ia4f33b46d3dc427ac95838f2ca73a880639d600a
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Using cross-window 2D content in 3D scene is prone to crashing,
and causes also issues with the primary purpose of
InformationNodeInstanceServer, i.e. getting the information, as the
rendering will remove dirty flags from nodes prematurely.
Fixes: QDS-4858
Change-Id: I9057889a28d36f12f1e401e9a39f808d66637681
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Adds an icon for Particle System Component making the component
visible in the editor allowing picking.
Task-number: QDS-4784
Change-Id: Ie6cffa9cfe3bb6a693372d7a7b4341e17f89911f
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
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>
The scene id was stored as array of QChars instead of QString, which
caused issues restoring the correct scene at puppet reset.
The intitial incorrect render size was caused by not changing the
render window size in addition to root QML item size.
Fixes: QDS-4586
Change-Id: Id6b16d778a9d886e8fdc40eab1e549d13091f8f4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This is a fallback to create components from source.
If the majorVersion is negative we should not generate
a version as part of the import.
Change-Id: I377b241e8e4c51141d560d7198e5906a9c963b54
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Active scene change involves deleting and recreating the View3D
instance of the 3D editor that imports the actual shown scene.
In Qt 5 it was necessary to mark the deleted View3D instance as having
no content, so it wouldn't receive any more updates. This hack no
longer appears to be necessary and causes this crash instead, so it
was removed.
Fixes: QDS-4786
Change-Id: I848ac78dc2f951ba7e1bf4d3d6aa4244b1443309
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Set mockup version to 1.0 if there is no version set.
Change-Id: Icfee0e84012a93978283d8309ec01d48dd8d4730
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This patch prevents continuous image updates by making sure
to only execute pixmapChangedCommnds if an item is dirty.
Change-Id: Icadc1d8a2a2298d18147b31fbed3fbc4205f0ea8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
There is no need to read back the texture into image when rendering
2D content for embedding into 3D scene, so don't do that.
Change-Id: If84619bdc20e6997733effc4745a496fab69e5b8
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Multiselection is now properly fit to the view when fit object is used.
Fixes: QDS-4608
Change-Id: Ia80133fc861bd177b9102423ebef37b592c74758
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Recent changes to custom geometry handling now require that the
zoom process in icon creation does each focus step asynchronously,
so that selection box geometry has a chance to update between frames.
Fixes: QDS-4652
Change-Id: If92bf580a556a68c10d3af1406c2eabef530254a
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Import QtQuick3D 1.15 no longer works in Qt 6.2, so provide a separate
set of qml files for each major Qt version.
Fixes: QDS-4642
Change-Id: I3e17fb248f71f87fb9a40dcad3c03e037cafb0f4
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>
Custom geometries often break and code becomes convoluted with
version ifdeffing, so refactor the custom geometries to use public
geometry api, which works both in Qt5 and Qt6.
Fixes: QDS-4611
Change-Id: I2d78776a14d5c8153b52806842254dbedb5de83d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
In order to render embedded 2D items in 3D scenes or 2D items used
as 3D material textures, those 2D items must be rendered.
2D content is now rendered when necessary also in editor puppet.
Fixes: QDS-4471
Change-Id: I83da90198ecebc3a3a9a35aab28f4aec36620492
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Scenerotation was queried from the node for each drag move, causing
drift in the calculations. Locking the rotation at drag start makes
negative scaling work nicely.
Also enabled negative values on all axis scaling, since it makes no
sense to block it there when single axis/planar scaling already allows
it.
Fixes: QDS-4493
Change-Id: I7a38a08556bd6d729974332d312aa4aa4e84ea30
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
We simply need to store the scene position of the pivot point of the
node instead of node itself and work with that.
Fixes: QDS-4515
Change-Id: I99155636c52897794bea21b2db7f7d2d00059d91
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
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>