summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMiikka Heikkinen <miikka.heikkinen@qt.io>2023-03-24 16:53:23 +0200
committerMiikka Heikkinen <miikka.heikkinen@qt.io>2023-03-27 07:55:23 +0000
commit79f4066dacd9ef3ef0866262c5ea9b4f1c8021cc (patch)
tree88fdeb45ce63ec90926b4198a04be84a5e9b2e82 /share
parentfeabda3aa78b7861ae03f1cc2296e8adf34ba038 (diff)
downloadqt-creator-79f4066dacd9ef3ef0866262c5ea9b4f1c8021cc.tar.gz
QmlDesigner: Add BakedLightmap item to component library
Also adds relevant property specifics and navigator drop support. Fixes: QDS-9521 Change-Id: I78539548770ae75fbe0602c2871fb5fea5515ab4 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSection.qml64
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSpecifics.qml14
2 files changed, 78 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSection.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSection.qml
new file mode 100644
index 0000000000..ceb4179360
--- /dev/null
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSection.qml
@@ -0,0 +1,64 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
+
+import QtQuick 2.15
+import QtQuick.Layouts 1.15
+import HelperWidgets 2.0
+import StudioTheme 1.0 as StudioTheme
+
+Section {
+ caption: qsTr("Baked Lightmap")
+ width: parent.width
+
+ SectionLayout {
+ PropertyLabel {
+ text: qsTr("Enabled")
+ tooltip: qsTr("When false, the lightmap generated for the model is not stored during lightmap baking,\neven if the key is set to a non-empty value.")
+ }
+
+ SecondColumnLayout {
+ CheckBox {
+ text: backendValues.enabled.valueToString
+ backendValue: backendValues.enabled
+ implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Key")
+ tooltip: qsTr("Sets the filename base for baked lightmap files for the model.\nNo other Model in the scene can use the same key.")
+ }
+
+ SecondColumnLayout {
+ LineEdit {
+ backendValue: backendValues.key
+ showTranslateCheckBox: false
+ implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ width: implicitWidth
+ }
+
+ ExpandingSpacer {}
+ }
+
+ PropertyLabel {
+ text: qsTr("Load Prefix")
+ tooltip: qsTr("Sets the folder where baked lightmap files are generated.\nIt should be a relative path.")
+ }
+
+ SecondColumnLayout {
+ LineEdit {
+ backendValue: backendValues.loadPrefix
+ showTranslateCheckBox: false
+ implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ + StudioTheme.Values.actionIndicatorWidth
+ width: implicitWidth
+ }
+
+ ExpandingSpacer {}
+ }
+ }
+}
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSpecifics.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSpecifics.qml
new file mode 100644
index 0000000000..cca06c421a
--- /dev/null
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/QtQuick3D/BakedLightmapSpecifics.qml
@@ -0,0 +1,14 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0 WITH Qt-GPL-exception-1.0
+
+import QtQuick 2.15
+import QtQuick.Layouts 1.15
+import HelperWidgets 2.0
+
+Column {
+ width: parent.width
+
+ BakedLightmapSection {
+ width: parent.width
+ }
+}