The node instance view and his commands should be not called directly
from other views. There are special classes QmlItem which can do it but
every change should go through the model.
Change-Id: I734e5538d7f6ecb07d736912f647c5eb92dc7631
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Converted old auxiliary properties usage in material preview to
the new API. Since most properties need to be both persisted to the
document and used by puppet, those properties had to be duplicated.
Fixes: QTCREATORBUG-28085
Fixes: QDS-7624
Change-Id: Idf51c773a2d49d44413bfaf69d4a683692ea8a0d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
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>
Previously only 3D models could be picked for context menu target.
Now any node that can be resolved from a point at 3D edit view can be
picked.
Fixes: QDS-7518
Change-Id: Id4a30d96744c42907d45688493776bdff35b934e
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>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
We were passing the image with premultiplied alpha obtained from
QSGRhiLayer::toImage() to be shown in form editor. This corrupts the
colors in with 3D materials having partially transparent colors.
Converting the image to QImage::Format_ARGB32 format fixes the issue.
Fixes: QDS-7474
Change-Id: Id0b689d7e2d9fc111e98f28b18db0af3ac30041f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This entails selecting a model upon right-clicking if it is not selected.
Also fixed a memory leak and small tweaks.
Fixes: QDS-7401
Change-Id: I592acb3fff30ecc3236f3cf2fbe126de4fb389dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
The state is determined by the state view.
Change-Id: I3b76b25c618d4f860f13d2e005d88d93a660fbc0
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
There is no reason to set the when condition ever.
Change-Id: I4c6b5ca04cdb7ba62f833225c6878da83a02abaf
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
For now only 1 action is implemented (edit material), more actions are
coming next.
Task-number: QDS-7414
Task-number: QDS-7398
Change-Id: Id8e36c23d9a4d35ee94d55d3d6b15df78241a05d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reverts/comments out parts of 45f93a817a,
which needs to be resolved in a follow-up commit.
Conflicts:
cmake/QtCreatorIDEBranding.cmake
qbs/modules/qtc/qtc.qbs
qtcreator_ide_branding.pri
share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp
src/plugins/clangcodemodel/clangmodelmanagersupport.cpp
src/plugins/cmakeprojectmanager/cmakesettingspage.cpp
src/plugins/python/pythoneditor.cpp
src/plugins/qmldesigner/designercore/instances/nodeinstanceview.cpp
src/plugins/scxmleditor/common/colorsettings.cpp
Change-Id: I7f0f7b7120e75a9fc3a8886bc57c17345cbb501b
If the scene root item is Material subclass, material library is not
created for the scene. Material editor and browser functionalities that
relate to having material library are disabled.
Material editor will always show the material that is the scene root.
Fixes: QDS-7374
Change-Id: Icd1c212c17b59e4a2caa6b3b4d7e615e68b21eb9
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
rotBlock was using the mechanism to overwrite values but actually it is
only for communication to the puppet. So now there is
NodeInstanceAuxiliary as a generic way. NodeInstance was renamed
NodeInstancePropertyOverwrite to make it clear that it is for
overwriting properties.
Task-number: QDS-7338
Change-Id: Id5ab1f5c4761a184964a347f00d1449ae2d7d77f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
The model and the scene environment used to render material previews
can now be selected via buttons next to the preview in material editor.
Task-number: QDS-7347
Change-Id: I03089029e8420f80ed65be1c7b7a1ce4581f2fd4
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Auxiliary data so far used naming conventions to declare the kind of the
data. Now an enumeration is used. The auxiliaryData(...) is returning an
optional too so that it is known if a value exists. There is now
auxiliaryDataWithDefault(...) which is returning an invalid
QVariant instead.
The instance cache is now disabled because there is not notification for
information changes. So if we get the real data from the node instances
there will be no information changes because nothing changed. So the
form editor is a strange state of being reset but not all data
arrived. Before this patch there were still changes happen because of
some side effects that auxiliary properties were sent which were never
intended to be sent. If we re-enable the cache we need to send
information changes or every view must expect that the information is
already there.
Task-number: QDS-7338
Change-Id: I0cafd149c53df552c7c8442f1e8ba87f5451dbd1
Reviewed-by: Aleksei German <aleksei.german@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
It has the advantage to to move the attribute to the declaration instead
of using a workaround.
Change-Id: Ia6115ab8fefbe03f247edfea2b7bed73e9149068
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This is a workaround for quick3d issue QTBUG-103316, where
material library materials for editor are properly initialized only
if the first encountered View3D in the scene is also rendered first.
Fixes: QDS-7084
Change-Id: I8bb6a8e6bfe2fcffddfe86f92157d386fdf4095d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
EffectReference is always dirty and it is the only dirty flag.
Instead, we update now if any property changed.
Task-number: QDS-7079
Change-Id: I157cf2d3b15120c33f4a6b3f53e526d555c7f80c
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Smooth rendering turns on MSAA and doubles the resolution for
rendered items. With this option enabled everything stays smooth when
zooming in. Around factor 8-10 pixels become clearly visible again, but
it still looks relatively smooth.
I added both MSAA and increased the resolution to one option, for simplicity.
The smooth mode takes 4 times the shared memory, which should not
be an issue in most cases.
For now, the option is not the default.
Task-number: QDS-7129
Task-number: QDS-7128
Change-Id: I8a778650bb40f8ba796960db9bc966e8a1efff4e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
The function in QtQuick3d will from Qt 6.4.0 accept the json object
directly meaning it's no longer necessary to convert to a variant map
first.
Change-Id: If180672963cbfea78582f245431e246f84111c9b
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
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>
Previously, icon generation was done at import time, but that was
wasteful, as we now have image cache backed icon generation
available for component library icons. Added the few remaining missing
bits to support icon generation for image cache and disabled the old
icon generation implementation for Qt6.
A few issues in fit algorithm for preview image generation were also
uncovered and fixed to make icons render scene in comparable size to
the old version.
Qt5 imports still generate using old way since component library
3D previews generation doesn't work on Qt5.
Fixes: QDS-6205
Change-Id: I5418fa19d86e81adcd184be023f1dfbc813d0bf5
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
I remember testing this and ContentUpdateMask seemed to work.
This might have changed with Qt 6.3 and using AllMask instead, which
works for all cases I tested should not have any negative impact.
Task-number: QDS-6896
Change-Id: I648c10fe75df813ae25a54a13a862cad0228bfdb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
It removes the image cache in the AssetsLibraryView too because it is not
used. Fix ODR violation too.
Fixes: QDS-6553
Change-Id: I83d8f8b7cd385e2c8352986e4b5a5abd76ac7d5b
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
For some reason captureiconmode puppet is launched at QDS shutdown,
with empty resource path. This caused the entire drive to be searched
for fonts to register, making the puppet linger for up to a minute
after the shutdown.
Fixes: QDS-6482
Change-Id: I0f1fa4b6f5646c76d93f5820dae029033e1543a3
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>