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>
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>
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>
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>
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>
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>
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>
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>
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>
updateDirtyNodeRecursive and renderPreviewImage belongs to quick image and
not in the node instance server.
Change-Id: I629b89c748036c0614e78bcfa0c837cb16ca6374
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
And PropertyName is a typedef for QByteArray. Because we don't use the
features of QString and the source would be cluttered with QLatin1Strings
we changed the property name to QByteArray.
Change-Id: Ib70ef136bbc411504b450456bd9bb705ae93dd25
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
(cherry picked from commit ee4bf638ca)
Reviewed-by: Marco Bubke <marco.bubke@digia.com>