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>
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>
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>
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>
- 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>
This will break the file selectors for styles.
Change-Id: Ie539f768eb277fb4dc0df3eceb736ff9e4353837
Reviewed-by: Thomas Hartmann <thomas.hartmann@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>
Added lock feature support for 3D editor. Also refactored the hide
support, since the two use largely similar logic.
Task-number: QDS-2915
Change-Id: I627848f3a3a73881427a03aeec6793fd26a1885a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
When building with Qt 6 or if qmlpuppet_unifiedRenderPath is set
in the environment we switch to a different render path.
In this case we use QQuickWindow::grabWindow() and render the root item.
No composition is done in the Qt Creator process anymore.
This is a similar approach we already take for the 3D view.
Performance is acceptable and we fix rendering issues related to
effects and layers.
Change-Id: Ic963eca047e0bf16ca3a099ec94658ae2af0fb63
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This ensures components defined in .qml files get loaded properly.
Change-Id: I070132ab5ad58b2531f27f623f218e0ee3565c5b
Fixes: QDS-2697
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Quick3D Texture elements require some window signals to show QML item
as texture, so we fake them to make textures appear in form editor
and state preview. To prevent texture mirroring, flipV value
is force set at proxy creation. To keep state preview up to date,
we trigger multiple render passes if there are any QML items used
as texture sources in quick3D textures.
Task-number: QDS-2290
Change-Id: I16c34aad943213c0b737fdb073333be3bbd40f2d
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
For each created items we retrieve a list of the names
of all existing states.
Task-number: QDS-1978
Change-Id: I8e85e439fce3c6204cb8bcf69f6be847cc8dae5c
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
If a component cannot be created we have to show a proper
error message.
Task-number: QDS-1980
Change-Id: I48a6ff0fd89c9666328c501abb00dc0997171d96
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Edit3D view is now a tab alongside Form Editor.
Buttons were moved to a Creator side task bar on Edit 3D view.
Change-Id: Ia06107e4f855ba512ffea3e628a61558894e800e
Fixes: QDS-1570
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
When editing values in the puppet we did not take reflection into account.
This means that any changes we did from the puppet for notified back
from Qt Creator. Since those notifications are asynchronous this leads
to various issues especially when more than one axis (property) was modified
at once.
This patch avoids reflection. The notifications are 'flagged' and then
ignored in the Qt5InformationNodeInstanceServer.
While a node is moved we ignore any changes to that specific node.
Task-number: QDS-1191
Change-Id: Ic74e22ea71832ce12321f9085a7296c2a7d9893d
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
We use Quick3DNodeInstance as a proxy class to wrap QQuick3DNode.
The access to private API like QQuick3DNodePrivate::setIsHiddenInEditor()
is restriced by such proxy classes.
Change-Id: If5191c3b730359000cf983c3af206dcffa07be74
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
If we do not set the source property of the Q3DSPresentationItem
nothing is actually rendered.
If a scene is rendered in the puppet we get an invalid OpenGL context
when rendering in the qml2puppet.
Change-Id: I74db0df7de759e830499967bc6985745be291856
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
In some cases items render their children directly using an effect.
In this case we do not want to hide the children when calling
refFromEffectItem().
If the hint takesOverRenderingOfChildren is set in the .metainfo hints
for a parent item we forward a flag to the puppet and refFromEffectItem()
is not hiding this item,
Change-Id: I37a8c0ad8a15bc914c220e03b1b744779431d655
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
A "raw" QObject (created instead of the Timer) will crash the engine later. Instead we setup
the QObject using createPrimitive().
Task-number: QTCREATORBUG-15916
Change-Id: I5f0dd9c887fd57d492222d221e54f267e12a5044
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Those headers are used implcitly.
Change-Id: I49dcfb1a04b2103866b1d828605381570fb3e5c6
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
Reduce the use of NodeInstanceMetaObject in QtQuickDesigner code
to two static methods:
- registerNodeInstanceMetaObject
- createNewDynamicProperty
Change-Id: I0ef8ee96995184e968467b799147c6b4c80fbccc
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
The connected SLOT is even not existing any more.
Change-Id: Iea352ca4929146c20b897e1a8fbb00a601364068
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
We excluded item which had a node instance. For the preview all item should
be marked dirty.
Change-Id: I0cbad89707d7d94f65ac0d055488e124da40e7b3
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
There is no stand content item interface, so try to work around to enable
snapping and anchoring.
Change-Id: Ib2eaf0d6c35e3ba289dd7d55b2ba4c064ad40748
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>