Skip to content
Snippets Groups Projects
Commit 2b8ef810 authored by Miikka Heikkinen's avatar Miikka Heikkinen
Browse files

Support for shader utils in designer


Also fixes a few other minor icon related issues.

Fixes: QDS-2603
Change-Id: I23793eab2e0ef3aeac27d95cb798d540ac982ecd
Reviewed-by: default avatarThomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: default avatarTomi Korpipää <tomi.korpipaa@qt.io>
Reviewed-by: default avatarAndy Nichols <andy.nichols@qt.io>
parent e9ad9264
No related branches found
No related tags found
No related merge requests found
Showing
with 615 additions and 7 deletions
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Section {
caption: qsTr("Effect")
width: parent.width
SectionLayout {
Label {
text: qsTr("Passes")
tooltip: qsTr("Render passes of the effect.")
}
SecondColumnLayout {
EditableListView {
backendValue: backendValues.passes
model: backendValues.passes.expressionAsList
Layout.fillWidth: true
typeFilter: "QtQuick3D.Pass"
onAdd: function(value) { backendValues.passes.idListAdd(value) }
onRemove: function(idx) { backendValues.passes.idListRemove(idx) }
onReplace: function (idx, value) { backendValues.passes.idListReplace(idx, value) }
}
}
}
}
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
EffectSection {
width: parent.width
}
}
......@@ -44,7 +44,9 @@ AUX_QML_FILES += \
$$PWD/TiltShiftSection.qml \
$$PWD/TiltShiftSpecifics.qml \
$$PWD/VignetteSection.qml \
$$PWD/VignetteSpecifics.qml
$$PWD/VignetteSpecifics.qml \
$$PWD/EffectSection.qml \
$$PWD/EffectSpecifics.qml
AUX_QML_FILES += \
$$PWD/images/effect.png \
......
......@@ -398,4 +398,22 @@ MetaInfo {
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Effect"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
}
ItemLibraryEntry {
name: "Effect"
category: "Qt Quick 3D Custom Shader Utils"
libraryIcon: "images/effect.png"
version: "1.15"
requiredImport: "QtQuick3D.Effects"
}
}
}
src/imports/effectlib/designer/images/effect.png

375 B | W: | H:

src/imports/effectlib/designer/images/effect.png

411 B | W: | H:

src/imports/effectlib/designer/images/effect.png
src/imports/effectlib/designer/images/effect.png
src/imports/effectlib/designer/images/effect.png
src/imports/effectlib/designer/images/effect.png
  • 2-up
  • Swipe
  • Onion skin
src/imports/effectlib/designer/images/effect16.png

253 B | W: | H:

src/imports/effectlib/designer/images/effect16.png

321 B | W: | H:

src/imports/effectlib/designer/images/effect16.png
src/imports/effectlib/designer/images/effect16.png
src/imports/effectlib/designer/images/effect16.png
src/imports/effectlib/designer/images/effect16.png
  • 2-up
  • Swipe
  • Onion skin
src/imports/effectlib/designer/images/effect@2x.png

499 B | W: | H:

src/imports/effectlib/designer/images/effect@2x.png

714 B | W: | H:

src/imports/effectlib/designer/images/effect@2x.png
src/imports/effectlib/designer/images/effect@2x.png
src/imports/effectlib/designer/images/effect@2x.png
src/imports/effectlib/designer/images/effect@2x.png
  • 2-up
  • Swipe
  • Onion skin
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
Section {
caption: qsTr("Custom Material")
width: parent.width
SectionLayout {
Label {
text: qsTr("Transparency")
tooltip: qsTr("Specifies if the material has transparency.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.hasTransparency.valueToString
backendValue: backendValues.hasTransparency
Layout.fillWidth: true
}
}
Label {
text: qsTr("Refraction")
tooltip: qsTr("Specifies if the material has refraction.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.hasRefraction.valueToString
backendValue: backendValues.hasRefraction
Layout.fillWidth: true
}
}
Label {
text: qsTr("Always Dirty")
tooltip: qsTr("Specifies if the material needs to be refreshed every time it is used.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.alwaysDirty.valueToString
backendValue: backendValues.alwaysDirty
Layout.fillWidth: true
}
}
Label {
text: qsTr("Shader Info")
tooltip: qsTr("Shader info for the material.")
}
SecondColumnLayout {
IdComboBox {
typeFilter: "QtQuick3D.ShaderInfo"
Layout.fillWidth: true
backendValue: backendValues.shaderInfo
}
}
Label {
text: qsTr("Passes")
tooltip: qsTr("Render passes of the material.")
}
SecondColumnLayout {
EditableListView {
backendValue: backendValues.passes
model: backendValues.passes.expressionAsList
Layout.fillWidth: true
typeFilter: "QtQuick3D.Pass"
onAdd: function(value) { backendValues.passes.idListAdd(value) }
onRemove: function(idx) { backendValues.passes.idListRemove(idx) }
onReplace: function (idx, value) { backendValues.passes.idListReplace(idx, value) }
}
}
}
}
Section {
// Copied from quick3d's MaterialSection.qml
caption: qsTr("Material")
width: parent.width
SectionLayout {
Label {
text: qsTr("Light Probe")
tooltip: qsTr("Defines a texture for overriding or setting an image based lighting texture for use with this material.")
}
SecondColumnLayout {
IdComboBox {
typeFilter: "QtQuick3D.Texture"
Layout.fillWidth: true
backendValue: backendValues.lightProbe
}
}
Label {
text: qsTr("Displacement Map")
tooltip: qsTr("Defines a grayscale image used to offset the vertices of geometry across the surface of the material.")
}
SecondColumnLayout {
IdComboBox {
typeFilter: "QtQuick3D.Texture"
Layout.fillWidth: true
backendValue: backendValues.displacementMap
}
}
Label {
text: qsTr("Displacement Amount")
tooltip: qsTr("Controls the offset amount for the displacement map.")
}
SecondColumnLayout {
SpinBox {
maximumValue: 9999999
minimumValue: -9999999
realDragRange: 5000
decimals: 0
backendValue: backendValues.displacementAmount
Layout.fillWidth: true
}
}
Label {
text: qsTr("Culling Mode")
tooltip: qsTr("Defines whether culling is enabled and which mode is actually enabled.")
}
ComboBox {
scope: "Material"
model: ["BackFaceCulling", "FrontFaceCulling", "NoCulling"]
backendValue: backendValues.cullMode
Layout.fillWidth: true
}
}
}
}
/****************************************************************************
**
** Copyright (C) 2019 The Qt Company Ltd.
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
......@@ -37,8 +37,4 @@ Column {
CustomMaterialSection {
width: parent.width
}
MaterialSection {
width: parent.width
}
}
......@@ -32,7 +32,9 @@ AUX_QML_FILES += \
$$PWD/PlasticStructuredRedMaterialSection.qml \
$$PWD/PlasticStructuredRedMaterialSpecifics.qml \
$$PWD/SteelMilledConcentricMaterialSection.qml \
$$PWD/SteelMilledConcentricMaterialSpecifics.qml
$$PWD/SteelMilledConcentricMaterialSpecifics.qml \
$$PWD/CustomMaterialSection.qml \
$$PWD/CustomMaterialSpecifics.qml
AUX_QML_FILES += \
$$PWD/images/custommaterial.png \
......
src/imports/materiallib/designer/images/custommaterial.png

375 B | W: | H:

src/imports/materiallib/designer/images/custommaterial.png

563 B | W: | H:

src/imports/materiallib/designer/images/custommaterial.png
src/imports/materiallib/designer/images/custommaterial.png
src/imports/materiallib/designer/images/custommaterial.png
src/imports/materiallib/designer/images/custommaterial.png
  • 2-up
  • Swipe
  • Onion skin
src/imports/materiallib/designer/images/custommaterial16.png

253 B | W: | H:

src/imports/materiallib/designer/images/custommaterial16.png

347 B | W: | H:

src/imports/materiallib/designer/images/custommaterial16.png
src/imports/materiallib/designer/images/custommaterial16.png
src/imports/materiallib/designer/images/custommaterial16.png
src/imports/materiallib/designer/images/custommaterial16.png
  • 2-up
  • Swipe
  • Onion skin
src/imports/materiallib/designer/images/custommaterial@2x.png

499 B | W: | H:

src/imports/materiallib/designer/images/custommaterial@2x.png

1.14 KiB | W: | H:

src/imports/materiallib/designer/images/custommaterial@2x.png
src/imports/materiallib/designer/images/custommaterial@2x.png
src/imports/materiallib/designer/images/custommaterial@2x.png
src/imports/materiallib/designer/images/custommaterial@2x.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -284,4 +284,22 @@ MetaInfo {
requiredImport: "QtQuick3D.Materials"
}
}
Type {
name: "QtQuick3D.Materials.CustomMaterial"
icon: "images/custommaterial16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
}
ItemLibraryEntry {
name: "Custom Material"
category: "Qt Quick 3D Custom Shader Utils"
libraryIcon: "images/custommaterial.png"
version: "1.14"
requiredImport: "QtQuick3D.Materials"
}
}
}
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
Section {
caption: qsTr("Blending")
width: parent.width
SectionLayout {
Label {
text: qsTr("Source")
tooltip: qsTr("Source blending for a pass.")
}
ComboBox {
scope: "Blending"
model: ["Unknown", "Zero", "One", "SrcColor", "OneMinusSrcColor", "DstColor", "OneMinusDstColor", "SrcAlpha", "OneMinusSrcAlpha", "DstAlpha", "OneMinusDstAlpha", "ConstantColor", "OneMinusConstantColor", "ConstantAlpha", "OneMinusConstantAlpha", "SrcAlphaSaturate"]
backendValue: backendValues.srcBlending
Layout.fillWidth: true
}
Label {
text: qsTr("Destination")
tooltip: qsTr("Destination blending for a pass.")
}
ComboBox {
scope: "Blending"
model: ["Unknown", "Zero", "One", "SrcColor", "OneMinusSrcColor", "DstColor", "OneMinusDstColor", "SrcAlpha", "OneMinusSrcAlpha", "DstAlpha", "OneMinusDstAlpha", "ConstantColor", "OneMinusConstantColor", "ConstantAlpha", "OneMinusConstantAlpha"]
backendValue: backendValues.destBlending
Layout.fillWidth: true
}
}
}
}
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
BlendingSection {
width: parent.width
}
}
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
Section {
caption: qsTr("Buffer Blit")
width: parent.width
SectionLayout {
Label {
text: qsTr("Source")
tooltip: qsTr("Source buffer for the buffer blit.")
}
SecondColumnLayout {
IdComboBox {
typeFilter: "QtQuick3D.Buffer"
Layout.fillWidth: true
backendValue: backendValues.source
}
}
Label {
text: qsTr("Destination")
tooltip: qsTr("Destination buffer for the buffer blit.")
}
SecondColumnLayout {
IdComboBox {
typeFilter: "QtQuick3D.Buffer"
Layout.fillWidth: true
backendValue: backendValues.destination
}
}
}
}
}
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
BufferBlitSection {
width: parent.width
}
}
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
Section {
caption: qsTr("Buffer Input")
width: parent.width
SectionLayout {
Label {
text: qsTr("Buffer")
tooltip: qsTr("Input buffer for a pass.")
}
SecondColumnLayout {
IdComboBox {
typeFilter: "QtQuick3D.Buffer"
Layout.fillWidth: true
backendValue: backendValues.buffer
}
}
Label {
text: qsTr("Parameter")
tooltip: qsTr("Buffer input buffer name in the shader.")
}
SecondColumnLayout {
LineEdit {
backendValue: backendValues.param
Layout.fillWidth: true
showTranslateCheckBox: false
}
}
}
}
}
/****************************************************************************
**
** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of Qt Quick 3D.
**
** $QT_BEGIN_LICENSE:GPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 3 or (at your option) any later version
** approved by the KDE Free Qt Foundation. The licenses are as published by
** the Free Software Foundation and appearing in the file LICENSE.GPL3
** included in the packaging of this file. Please review the following
** information to ensure the GNU General Public License requirements will
** be met: https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
import QtQuick 2.15
import HelperWidgets 2.0
import QtQuick.Layouts 1.12
Column {
width: parent.width
BufferInputSection {
width: parent.width
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment