Fix tray visibility and message reception issues
Some checks failed
build / build-win64 (push) Waiting to run
build / build-macos (push) Waiting to run
build / build-pip (push) Failing after 16s

- Disable sound initialization to prevent hanging
- Add missing import re in utils.py
- Fix settings loading for QSettings
- Update file paths to use PROJECT_ROOT
- Revert to working API paths and listener from commit efdc63e
This commit is contained in:
kdusek
2025-12-07 22:39:07 +01:00
parent 7b695d7b7f
commit 5138303016
4060 changed files with 579123 additions and 23 deletions

View File

@@ -0,0 +1,350 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
width: parent.width
caption: qsTr("Visibility")
SectionLayout {
PropertyLabel {
text: qsTr("Visibility")
tooltip: qsTr("Sets the local visibility of the node.")
}
SecondColumnLayout {
// ### should be a slider
CheckBox {
text: qsTr("Visible")
backendValue: backendValues.visible
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Opacity")
tooltip: qsTr("Sets the local opacity value of the node.")
}
SecondColumnLayout {
// ### should be a slider
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.opacity
sliderIndicatorVisible: true
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
Section {
id: transformSection
width: parent.width
caption: qsTr("Transform")
ColumnLayout {
spacing: StudioTheme.Values.transform3DSectionSpacing
SectionLayout {
PropertyLabel {
text: qsTr("Translation")
tooltip: qsTr("Sets the translation of the node.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.x
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.y
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.z
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
SectionLayout {
PropertyLabel {
text: qsTr("Rotation")
tooltip: qsTr("Sets the rotation of the node in degrees.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.eulerRotation_x
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.eulerRotation_y
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.eulerRotation_z
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
SectionLayout {
PropertyLabel {
text: qsTr("Scale")
tooltip: qsTr("Sets the scale of the node.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.scale_x
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.scale_y
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.scale_z
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
SectionLayout {
PropertyLabel {
text: qsTr("Pivot")
tooltip: qsTr("Sets the pivot of the node.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.pivot_x
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.pivot_y
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.pivot_z
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
}
}
}

View File

@@ -0,0 +1,48 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
width: parent.width
caption: qsTr("Runtime Loader")
SectionLayout {
PropertyLabel {
text: qsTr("Source")
tooltip: qsTr("Sets the URL of the 3D asset to import at runtime.")
}
SecondColumnLayout {
UrlChooser {
backendValue: backendValues.source
filter: "*.*"
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Instancing")
tooltip: qsTr("If this property is set, the imported model will not be rendered normally. Instead, a number of instances of the model will be rendered, as defined by the instance table.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.Instancing"
backendValue: backendValues.instancing
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,18 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
RuntimeLoaderSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,21 @@
MetaInfo {
Type {
name: "QtQuick3D.AssetUtils.RuntimeLoader"
icon: "images/runtimeloader16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Runtime Loader"
category: "AssetUtils"
libraryIcon: "images/runtimeloader.png"
version: "6.2"
requiredImport: "QtQuick3D.AssetUtils"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 253 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 499 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 744 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -0,0 +1,99 @@
import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by qmltyperegistrar.
Module {
Component {
file: "private/qquick3druntimeloader_p.h"
lineNumber: 31
name: "QQuick3DRuntimeLoader"
accessSemantics: "reference"
prototype: "QQuick3DNode"
exports: [
"QtQuick3D.AssetUtils/RuntimeLoader 6.2",
"QtQuick3D.AssetUtils/RuntimeLoader 6.7"
]
exportMetaObjectRevisions: [1538, 1543]
Enum {
name: "Status"
isScoped: true
lineNumber: 59
values: ["Empty", "Success", "Error"]
}
Property {
name: "source"
type: "QUrl"
read: "source"
write: "setSource"
notify: "sourceChanged"
index: 0
lineNumber: 38
}
Property {
name: "status"
type: "Status"
read: "status"
notify: "statusChanged"
index: 1
lineNumber: 39
isReadonly: true
}
Property {
name: "errorString"
type: "QString"
read: "errorString"
notify: "errorStringChanged"
index: 2
lineNumber: 40
isReadonly: true
}
Property {
name: "bounds"
type: "QQuick3DBounds3"
read: "bounds"
notify: "boundsChanged"
index: 3
lineNumber: 41
isReadonly: true
}
Property {
name: "instancing"
type: "QQuick3DInstancing"
isPointer: true
read: "instancing"
write: "setInstancing"
notify: "instancingChanged"
index: 4
lineNumber: 42
}
Property {
name: "supportedExtensions"
revision: 1543
type: "QStringList"
read: "supportedExtensions"
index: 5
lineNumber: 43
isReadonly: true
isPropertyConstant: true
}
Property {
name: "supportedMimeTypes"
revision: 1543
type: "QMimeType"
isList: true
read: "supportedMimeTypes"
index: 6
lineNumber: 45
isReadonly: true
isPropertyConstant: true
}
Signal { name: "sourceChanged"; lineNumber: 69 }
Signal { name: "statusChanged"; lineNumber: 70 }
Signal { name: "errorStringChanged"; lineNumber: 71 }
Signal { name: "boundsChanged"; lineNumber: 72 }
Signal { name: "instancingChanged"; lineNumber: 73 }
}
}

View File

@@ -0,0 +1,10 @@
module QtQuick3D.AssetUtils
linktarget Qt6::qtquick3dassetutilsplugin
optional plugin qtquick3dassetutilsplugin
classname QtQuick3DAssetUtilsPlugin
designersupported
typeinfo plugins.qmltypes
depends QtQuick3D auto
prefer :/qt-project.org/imports/QtQuick3D/AssetUtils/
depends QtQuick

View File

@@ -0,0 +1,22 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property vector3d bottomColor: Qt.vector3d(0.0, 0.0, 0.0)
property vector3d topColor: Qt.vector3d(1.0, 1.0, 1.0)
Shader {
id: additivecolorgradient
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/additivecolorgradient.frag"
}
passes: [
Pass {
shaders: [ additivecolorgradient ]
}
]
}

View File

@@ -0,0 +1,21 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real amount: 0.01
Shader {
id: blur
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/blur.frag"
}
passes: [
Pass {
shaders: [ blur ]
}
]
}

View File

@@ -0,0 +1,37 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property TextureInput noiseSample: TextureInput {
texture: Texture {
tilingModeHorizontal: Texture.Repeat
tilingModeVertical: Texture.Repeat
source: "qrc:/qtquick3deffects/maps/brushnoise.png"
}
}
property real brushLength: 1.0 // 0 - 3
property real brushSize: 100.0 // 10 - 200
property real brushAngle: 45.0
readonly property real sinAlpha: Math.sin(degrees_to_radians(brushAngle))
readonly property real cosAlpha: Math.cos(degrees_to_radians(brushAngle))
function degrees_to_radians(degrees) {
var pi = Math.PI;
return degrees * (pi/180);
}
Shader {
id: brushstrokes
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/brushstrokes.frag"
}
passes: [
Pass {
shaders: [ brushstrokes ]
}
]
}

View File

@@ -0,0 +1,29 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property TextureInput maskTexture: TextureInput {
texture: Texture {
source: "qrc:/qtquick3deffects/maps/white.png"
tilingModeHorizontal: Texture.Repeat
tilingModeVertical: Texture.Repeat
}
}
property real aberrationAmount: 50
property real focusDepth: 600
Shader {
id: chromaticAberration
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/chromaticaberration.frag"
}
passes: [
Pass {
shaders: [ chromaticAberration ]
}
]
}

View File

@@ -0,0 +1,24 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real redStrength: 1.0 // 0 - 2
property real greenStrength: 1.5 // 0 - 2
property real blueStrength: 1.0 // 0 - 2
property real saturation: 0.0 // -1 - 1
Shader {
id: colormaster
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/colormaster.frag"
}
passes: [
Pass {
shaders: [ colormaster ]
}
]
}

View File

@@ -0,0 +1,65 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
readonly property TextureInput sourceSampler: TextureInput {
texture: Texture {}
}
property real focusDistance: 600
property real focusRange: 100
property real blurAmount: 4
Shader {
id: downsampleVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/downsample.vert"
}
Shader {
id: downsampleFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/downsample.frag"
}
Shader {
id: blurVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/depthoffieldblur.vert"
}
Shader {
id: blurFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/depthoffieldblur.frag"
}
Buffer {
id: downsampleBuffer
name: "downsampleBuffer"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
sizeMultiplier: 0.5
}
passes: [
Pass {
shaders: [ downsampleVert, downsampleFrag ]
output: downsampleBuffer
},
Pass {
shaders: [ blurVert, blurFrag ]
commands: [
// INPUT is the texture for downsampleBuffer
BufferInput {
buffer: downsampleBuffer
},
// the actual input texture is exposed as sourceSampler
BufferInput {
sampler: "sourceSampler"
}
]
}
]
}

View File

@@ -0,0 +1,21 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real amount: 0.5
Shader {
id: desaturate
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/desaturate.frag"
}
passes: [
Pass {
shaders: [ desaturate ]
}
]
}

View File

@@ -0,0 +1,31 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real radius: 100.0 // 0 - 100
property real distortionWidth: 10.0 // 2 - 100
property real distortionHeight: 10.0 // 0 - 100
property real distortionPhase: 0.0 // 0 - 360
property vector2d center: Qt.vector2d(0.5, 0.5)
Shader {
id: distortionVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/distortion.vert"
}
Shader {
id: distortionFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/distortionripple.frag"
}
passes: [
Pass {
shaders: [ distortionVert, distortionFrag ]
}
]
}

View File

@@ -0,0 +1,29 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real radius: 0.25 // 0 - 1
property real distortionHeight: 0.5 // -1 - 1
property vector2d center: Qt.vector2d(0.5, 0.5)
Shader {
id: distortionVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/distortion.vert"
}
Shader {
id: distortionFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/distortionsphere.frag"
}
passes: [
Pass {
shaders: [ distortionVert, distortionFrag ]
}
]
}

View File

@@ -0,0 +1,29 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real radius: 0.25 // 0 - 1
property real distortionStrength: 1.0 // -10 - 10
property vector2d center: Qt.vector2d(0.5, 0.5)
Shader {
id: distortionVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/distortion.vert"
}
Shader {
id: distortionFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/distortionspiral.frag"
}
passes: [
Pass {
shaders: [ distortionVert, distortionFrag ]
}
]
}

View File

@@ -0,0 +1,27 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real edgeStrength: 0.5 // 0 - 1
Shader {
id: edgeVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/edgedetect.vert"
}
Shader {
id: edgeFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/edgedetect.frag"
}
passes: [
Pass {
shaders: [ edgeVert, edgeFrag ]
}
]
}

View File

@@ -0,0 +1,21 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real amount: 0.003 // 0 - 0.01
Shader {
id: emboss
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/emboss.frag"
}
passes: [
Pass {
shaders: [ emboss ]
}
]
}

View File

@@ -0,0 +1,22 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property bool flipHorizontally: true
property bool flipVertically: true
Shader {
id: flip
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/flip.frag"
}
passes: [
Pass {
shaders: [ flip ]
}
]
}

View File

@@ -0,0 +1,50 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
readonly property TextureInput sprite: TextureInput {
texture: Texture {}
}
Shader {
id: rgbl
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/fxaaRgbl.frag"
}
Shader {
id: blur
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/fxaaBlur.frag"
}
Buffer {
id: rgblBuffer
name: "rgbl_buffer"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.None // aka frame
}
passes: [
Pass {
shaders: [ rgbl ]
output: rgblBuffer
},
Pass {
shaders: [ blur ]
commands: [
// INPUT is the texture for rgblBuffer
BufferInput {
buffer: rgblBuffer
},
// the actual input texture is exposed as sprite
BufferInput {
sampler: "sprite"
}
]
}
]
}

View File

@@ -0,0 +1,48 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real amount: 2 // 0 - 10
Shader {
id: vertical
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/blurvertical.vert"
}
Shader {
id: horizontal
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/blurhorizontal.vert"
}
Shader {
id: gaussianblur
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/gaussianblur.frag"
}
Buffer {
id: tempBuffer
name: "tempBuffer"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.None // aka frame
}
passes: [
Pass {
shaders: [ horizontal, gaussianblur ]
output: tempBuffer
},
Pass {
shaders: [ vertical, gaussianblur ]
commands: [
BufferInput {
buffer: tempBuffer
}
]
}
]
}

View File

@@ -0,0 +1,127 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
readonly property TextureInput downsample2: TextureInput {
texture: Texture {}
}
readonly property TextureInput downsample4: TextureInput {
texture: Texture {}
}
property real gamma: 1 // 0.1 - 4
property real exposure: 0 // -9 - 9
readonly property real exposureExp2: Math.pow(2, exposure)
property real bloomThreshold: 1
property real blurFalloff: 0 // 0 - 10
readonly property real negativeBlurFalloffExp2: Math.pow(2, -blurFalloff)
property real tonemappingLerp: 1 // 0 - 1
property real channelThreshold: 1
readonly property real poissonRotation: 0
readonly property real poissonDistance: 4
Shader {
id: luminosityVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/luminosity.vert"
}
Shader {
id: luminosityFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/luminosity.frag"
}
Shader {
id: blurVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/poissonblur.vert"
}
Shader {
id: blurFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/poissonblur.frag"
}
Shader {
id: combiner
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/combiner.frag"
}
Buffer {
id: luminosity_buffer2
name: "luminosity_buffer2"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.None
sizeMultiplier: 0.5
}
Buffer {
id: downsample_buffer2
name: "downsample_buffer2"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.None
sizeMultiplier: 0.5
}
Buffer {
id: downsample_buffer4
name: "downsample_buffer4"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.None
sizeMultiplier: 0.25
}
passes: [
Pass {
shaders: [ luminosityVert, luminosityFrag ]
output: downsample_buffer2
},
Pass {
shaders: [ luminosityVert, luminosityFrag ]
commands: BufferInput {
buffer: downsample_buffer2
}
output: luminosity_buffer2
},
Pass {
shaders: [ blurVert, blurFrag ]
commands: BufferInput {
buffer: luminosity_buffer2
}
output: downsample_buffer2
},
Pass {
shaders: [ blurVert, blurFrag ]
commands: [
SetUniformValue {
target: "poissonRotation"
value: 0.62831
},
BufferInput {
buffer: luminosity_buffer2
}
]
output: downsample_buffer4
},
Pass {
shaders: [ combiner ]
commands: [
BufferInput {
sampler: "downsample2"
buffer: downsample_buffer2
},
BufferInput {
sampler: "downsample4"
buffer: downsample_buffer4
}
]
}
]
}

View File

@@ -0,0 +1,107 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
id: effectRoot
// there are only here to get the sampler2Ds declared in the shader
readonly property TextureInput sprite: TextureInput {
texture: Texture {}
}
readonly property TextureInput glowSampler: TextureInput {
texture: Texture {}
}
property real fadeAmount: 0.25 // 0 - 1
property real blurQuality: 0.25 // 0.1 - 1.0
Shader {
id: vblurVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/motionblurvertical.vert"
}
Shader {
id: vblurFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/motionblurvertical.frag"
}
Shader {
id: hblurVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/motionblurhorizontal.vert"
}
Shader {
id: hblurFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/motionblurhorizontal.frag"
}
Shader {
id: blend
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/blend.frag"
}
Buffer {
id: glowBuffer
name: "glowBuffer"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Nearest
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.SceneLifetime
sizeMultiplier: effectRoot.blurQuality
}
Buffer {
id: tempBuffer
name: "tempBuffer"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.None
sizeMultiplier: effectRoot.blurQuality
}
passes: [
Pass {
shaders: [ hblurVert, hblurFrag ]
commands: [
BufferInput {
// Expose the initially empty glowBuffer texture under the
// sampler2D glowSampler in the shader. Note the
// SceneLifetime and that the next pass writes to the same
// texture (accumulate).
sampler: "glowSampler"
buffer: glowBuffer
}
]
output: tempBuffer
},
Pass {
shaders: [ vblurVert, vblurFrag ]
commands: [
// the texture for tempBuffer will be INPUT in this pass
BufferInput {
buffer: tempBuffer
}
]
output: glowBuffer
},
Pass {
shaders: [ blend ]
commands: [
// the texture for glowBuffer will be INPUT in this pass
BufferInput {
buffer: glowBuffer
},
// the input texture (that would normally be INPUT) for this pass is exposed to the shader as sprite
BufferInput {
sampler: "sprite"
}
]
}
]
}

View File

@@ -0,0 +1,8 @@
import QtQuick.tooling 1.2
// This file describes the plugin-supplied types contained in the library.
// It is used for QML tooling purposes only.
//
// This file was auto-generated by qmltyperegistrar.
Module {}

View File

@@ -0,0 +1,37 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real shoulderSlope: 1.0 // 0.0 - 3.0
property real shoulderEmphasis: 0 // -1.0 - 1.0
property real toeSlope: 1.0 // 0.0 - 3.0
property real toeEmphasis: 0 // -1.0 - 1.0
property real contrastBoost: 0 // -1.0 - 2.0
property real saturationLevel: 1 // 0.0 - 2.0
property real gammaValue: 2.2 // 0.1 - 8.0
property bool useExposure: false
property real whitePoint: 1.0 // 0.01 - 128.0
property real exposureValue: 1.0 // 0.01 - 16.0
Shader {
id: tonemapShader
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/scurvetonemap.frag"
}
Buffer {
// LDR output
id: defaultOutput
format: Buffer.RGBA8
}
passes: [
Pass {
shaders: [ tonemapShader ]
output: defaultOutput
}
]
}

View File

@@ -0,0 +1,30 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property TextureInput noiseSample: TextureInput {
texture: Texture {
tilingModeHorizontal: Texture.Repeat
tilingModeVertical: Texture.Repeat
source: "qrc:/qtquick3deffects/maps/brushnoise.png"
}
}
property real amount: 10.0 // 0 - 127
property int direction: 0 // 0 = both, 1 = horizontal, 2 = vertical
property bool randomize: true
Shader {
id: scatter
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/scatter.frag"
}
passes: [
Pass {
shaders: [ scatter ]
}
]
}

View File

@@ -0,0 +1,68 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
readonly property TextureInput sourceSampler: TextureInput {
texture: Texture {}
}
property real focusPosition: 0.5 // 0 - 1
property real focusWidth: 0.2 // 0 - 1
property real blurAmount: 4 // 0 - 10
property bool isVertical: false
property bool isInverted: false
Shader {
id: downsampleVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/downsample.vert"
}
Shader {
id: downsampleFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/downsampletiltshift.frag"
}
Shader {
id: blurVert
stage: Shader.Vertex
shader: "qrc:/qtquick3deffects/shaders/poissonblurtiltshift.vert"
}
Shader {
id: blurFrag
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/poissonblurtiltshift.frag"
}
Buffer {
id: downsampleBuffer
name: "downsampleBuffer"
format: Buffer.RGBA8
textureFilterOperation: Buffer.Linear
textureCoordOperation: Buffer.ClampToEdge
bufferFlags: Buffer.None
sizeMultiplier: 0.5
}
passes: [
Pass {
shaders: [ downsampleVert, downsampleFrag ]
output: downsampleBuffer
},
Pass {
shaders: [ blurVert, blurFrag ]
commands: [
// INPUT is the texture for downsampleBuffer
BufferInput {
buffer: downsampleBuffer
},
// the pass' input texture is exposed as sourceSampler
BufferInput {
sampler: "sourceSampler"
}
]
}
]
}

View File

@@ -0,0 +1,23 @@
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Effect {
property real vignetteStrength: 15 // 0 - 15
property vector3d vignetteColor: Qt.vector3d(0.5, 0.5, 0.5)
property real vignetteRadius: 0.35 // 0 - 5
Shader {
id: vignette
stage: Shader.Fragment
shader: "qrc:/qtquick3deffects/shaders/vignette.frag"
}
passes: [
Pass {
shaders: [ vignette ]
}
]
}

View File

@@ -0,0 +1,29 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Section {
caption: qsTr("Additive Color Gradient")
width: parent.width
SectionLayout {
PropertyLabel { text: qsTr("Top Color") }
ColorEditor {
backendValue: backendValues.topColor
supportGradient: false
isVector3D: true
}
PropertyLabel { text: qsTr("Bottom Color") }
ColorEditor {
backendValue: backendValues.bottomColor
supportGradient: false
isVector3D: true
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
AdditiveColorGradientSection {
width: parent.width
}
}

View File

@@ -0,0 +1,33 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Blur")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Amount")
tooltip: qsTr("Strength of the blur.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 0.1
decimals: 3
stepSize: 0.01
backendValue: backendValues.amount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
BlurSection {
width: parent.width
}
}

View File

@@ -0,0 +1,97 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
caption: qsTr("Noise")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Noise Sample Texture")
tooltip: qsTr("Defines a texture for noise samples.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.Texture"
backendValue: backendValues.noiseSample_texture
defaultItem: qsTr("Default")
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
Section {
caption: qsTr("Brush")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Length")
tooltip: qsTr("Length of the brush.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 3
decimals: 2
stepSize: 0.1
backendValue: backendValues.brushLength
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Size")
tooltip: qsTr("Size of the brush.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 10
maximumValue: 200
decimals: 0
backendValue: backendValues.brushSize
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Angle")
tooltip: qsTr("Angle of the brush")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 360
decimals: 0
backendValue: backendValues.brushAngle
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
BrushStrokesSection {
width: parent.width
}
}

View File

@@ -0,0 +1,78 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
caption: qsTr("Mask")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Mask Texture")
tooltip: qsTr("Defines a texture for mask.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.Texture"
backendValue: backendValues.maskTexture_texture
defaultItem: qsTr("Default")
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
Section {
caption: qsTr("Aberration")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Amount")
tooltip: qsTr("Amount of aberration.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -1000
maximumValue: 1000
decimals: 0
backendValue: backendValues.aberrationAmount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Focus Depth")
tooltip: qsTr("Focus depth of the aberration.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 10000
decimals: 0
backendValue: backendValues.focusDepth
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
ChromaticAberrationSection {
width: parent.width
}
}

View File

@@ -0,0 +1,90 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Colors")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Red Strength")
tooltip: qsTr("Red strength.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 2
decimals: 2
stepSize: 0.1
backendValue: backendValues.redStrength
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Green Strength")
tooltip: qsTr("Green strength.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 2
decimals: 2
stepSize: 0.1
backendValue: backendValues.greenStrength
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Blue Strength")
tooltip: qsTr("Blue strength.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 2
decimals: 2
stepSize: 0.1
backendValue: backendValues.blueStrength
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Saturation")
tooltip: qsTr("Color saturation.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -1
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.saturation
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
ColorMasterSection {
width: parent.width
}
}

View File

@@ -0,0 +1,68 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Blur")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Blur Amount")
tooltip: qsTr("Amount of blur.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 50
decimals: 2
backendValue: backendValues.blurAmount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Focus Distance")
tooltip: qsTr("Focus distance of the blur.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 5000
decimals: 0
backendValue: backendValues.focusDistance
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Focus Range")
tooltip: qsTr("Focus range of the blur.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 5000
decimals: 0
backendValue: backendValues.focusRange
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
DepthOfFieldHQBlurSection {
width: parent.width
}
}

View File

@@ -0,0 +1,33 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Desaturate")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Amount")
tooltip: qsTr("Strength of the desaturate.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -1
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.amount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
DesaturateSection {
width: parent.width
}
}

View File

@@ -0,0 +1,127 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Distortion")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Radius")
tooltip: qsTr("Radius of the effect.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 100
decimals: 2
backendValue: backendValues.radius
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Width")
tooltip: qsTr("Width of the distortion.")
}
SecondColumnLayout {
SpinBox {
maximumValue: 100
minimumValue: 2
decimals: 2
backendValue: backendValues.distortionWidth
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Height")
tooltip: qsTr("Height of the distortion.")
}
SecondColumnLayout {
SpinBox {
maximumValue: 100
minimumValue: 0
decimals: 2
backendValue: backendValues.distortionHeight
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Phase")
tooltip: qsTr("Phase of the distortion.")
}
SecondColumnLayout {
SpinBox {
maximumValue: 360
minimumValue: 0
decimals: 0
backendValue: backendValues.distortionPhase
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Center")
tooltip: qsTr("Center of the distortion.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.center_x
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel { text: "X" }
Spacer { implicitWidth: StudioTheme.Values.controlGap }
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.center_y
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel { text: "Y" }
Spacer { implicitWidth: StudioTheme.Values.controlGap }
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
DistortionRippleSection {
width: parent.width
}
}

View File

@@ -0,0 +1,93 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Distortion")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Radius")
tooltip: qsTr("Radius of the effect.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.radius
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Height")
tooltip: qsTr("Height of the distortion.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -1
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.distortionHeight
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Center")
tooltip: qsTr("Center of the distortion.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.center_x
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel { text: "X" }
Spacer { implicitWidth: StudioTheme.Values.controlGap }
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.center_y
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel { text: "Y" }
Spacer { implicitWidth: StudioTheme.Values.controlGap }
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
DistortionSphereSection {
width: parent.width
}
}

View File

@@ -0,0 +1,92 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Distortion")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Radius")
tooltip: qsTr("Radius of the effect.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.radius
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Strength")
tooltip: qsTr("Strength of the distortion.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -10
maximumValue: 10
decimals: 2
backendValue: backendValues.distortionStrength
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Center")
tooltip: qsTr("Center of the distortion.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.center_x
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel { text: "X" }
Spacer { implicitWidth: StudioTheme.Values.controlGap }
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.center_y
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel { text: "Y" }
Spacer { implicitWidth: StudioTheme.Values.controlGap }
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
DistortionSpiralSection {
width: parent.width
}
}

View File

@@ -0,0 +1,33 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Edge")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Strength")
tooltip: qsTr("Strength of the edge.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.edgeStrength
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
EdgeDetectSection {
width: parent.width
}
}

View File

@@ -0,0 +1,33 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Emboss")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Amount")
tooltip: qsTr("Strength of the emboss.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 0.01
decimals: 4
stepSize: 0.001
backendValue: backendValues.amount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
EmbossSection {
width: parent.width
}
}

View File

@@ -0,0 +1,46 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Flip")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Horizontal")
tooltip: qsTr("Flip horizontally.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.flipHorizontally.valueToString
backendValue: backendValues.flipHorizontally
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Vertical")
tooltip: qsTr("Flip vertically.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.flipVertically.valueToString
backendValue: backendValues.flipVertically
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
FlipSection {
width: parent.width
}
}

View File

@@ -0,0 +1,12 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
// Fxaa effect has no modifiable properties
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
FxaaSection {
width: parent.width
}
}

View File

@@ -0,0 +1,32 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Blur")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Amount")
tooltip: qsTr("Strength of the blur.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 10
decimals: 2
backendValue: backendValues.amount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
GaussianBlurSection {
width: parent.width
}
}

View File

@@ -0,0 +1,126 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Tonemap")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Gamma")
tooltip: qsTr("Amount of gamma.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.1
maximumValue: 4
decimals: 2
stepSize: 0.1
backendValue: backendValues.gamma
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Exposure")
tooltip: qsTr("Amount of exposure.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -9
maximumValue: 9
decimals: 2
backendValue: backendValues.exposure
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Blur Falloff")
tooltip: qsTr("Amount of blur falloff.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 10
decimals: 2
backendValue: backendValues.blurFalloff
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Tonemapping Lerp")
tooltip: qsTr("Tonemapping linear interpolation value.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.tonemappingLerp
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Bloom Threshold")
tooltip: qsTr("Bloom color threshold value.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 3
stepSize: 0.1
backendValue: backendValues.bloomThreshold
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Channel Threshold")
tooltip: qsTr("Channel color threshold value.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 3
stepSize: 0.1
backendValue: backendValues.channelThreshold
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
HDRBloomTonemapSection {
width: parent.width
}
}

View File

@@ -0,0 +1,52 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Blur")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Fade Amount")
tooltip: qsTr("Specifies how much the blur fades away each frame.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.fadeAmount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Quality")
tooltip: qsTr("Blur quality.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.1
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.blurQuality
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
MotionBlurSection {
width: parent.width
}
}

View File

@@ -0,0 +1,210 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
caption: qsTr("Curve")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Shoulder Slope")
tooltip: qsTr("Set the slope of the curve shoulder.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 3
decimals: 2
stepSize: 0.1
backendValue: backendValues.shoulderSlope
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Shoulder Emphasis")
tooltip: qsTr("Set the emphasis of the curve shoulder.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -1
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.shoulderEmphasis
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Toe Slope")
tooltip: qsTr("Set the slope of the curve toe.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 3
decimals: 2
stepSize: 0.1
backendValue: backendValues.toeSlope
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Toe Emphasis")
tooltip: qsTr("Set the emphasis of the curve toe.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -1
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.toeEmphasis
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
Section {
caption: qsTr("Color")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Contrast Boost")
tooltip: qsTr("Set the contrast boost amount.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -1
maximumValue: 2
decimals: 2
stepSize: 0.1
backendValue: backendValues.contrastBoost
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Saturation Level")
tooltip: qsTr("Set the color saturation level.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 2
decimals: 2
stepSize: 0.1
backendValue: backendValues.saturationLevel
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Gamma")
tooltip: qsTr("Set the gamma value.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.1
maximumValue: 8
decimals: 2
stepSize: 0.1
backendValue: backendValues.gammaValue
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Use Exposure")
tooltip: qsTr("Specifies if the exposure or white point should be used.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.useExposure.valueToString
backendValue: backendValues.useExposure
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("White Point")
tooltip: qsTr("Set the white point value.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.01
maximumValue: 128
decimals: 2
backendValue: backendValues.whitePoint
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Exposure")
tooltip: qsTr("Set the exposure value.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.01
maximumValue: 16
decimals: 2
backendValue: backendValues.exposureValue
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
SCurveTonemapSection {
width: parent.width
}
}

View File

@@ -0,0 +1,94 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
caption: qsTr("Noise")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Noise Sample Texture")
tooltip: qsTr("Defines a texture for noise samples.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.Texture"
backendValue: backendValues.noiseSample_texture
defaultItem: qsTr("Default")
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
Section {
caption: qsTr("Scatter")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Amount")
tooltip: qsTr("Amount of scatter.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 127
decimals: 2
backendValue: backendValues.amount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Direction")
tooltip: qsTr("Direction of scatter. 0 = both, 1 = horizontal, 2 = vertical.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 2
decimals: 0
backendValue: backendValues.direction
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Randomize")
tooltip: qsTr("Specifies if the scatter is random.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.randomize.valueToString
backendValue: backendValues.randomize
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
ScatterSection {
width: parent.width
}
}

View File

@@ -0,0 +1,102 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Tilt Shift")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Focus Position")
tooltip: qsTr("Set the focus position.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.focusPosition
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Focus Width")
tooltip: qsTr("Set the focus width.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.focusWidth
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Blur Amount")
tooltip: qsTr("Set the blur amount.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 10
decimals: 2
backendValue: backendValues.blurAmount
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Vertical")
tooltip: qsTr("Specifies if the tilt shift is vertical.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.isVertical.valueToString
backendValue: backendValues.isVertical
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Inverted")
tooltip: qsTr("Specifies if the tilt shift is inverted.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.isInverted.valueToString
backendValue: backendValues.isInverted
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
TiltShiftSection {
width: parent.width
}
}

View File

@@ -0,0 +1,59 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Section {
caption: qsTr("Vignette")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Strength")
tooltip: qsTr("Set the vignette strength.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 15
decimals: 2
backendValue: backendValues.vignetteStrength
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Radius")
tooltip: qsTr("Set the vignette radius.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 5
decimals: 2
stepSize: 0.1
backendValue: backendValues.vignetteRadius
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel { text: qsTr("Vignette Color") }
ColorEditor {
backendValue: backendValues.vignetteColor
supportGradient: false
isVector3D: true
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
VignetteSection {
width: parent.width
}
}

View File

@@ -0,0 +1,401 @@
MetaInfo {
Type {
name: "QtQuick3D.Effects.AdditiveColorGradient"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Additive Color Gradient"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Blur"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Blur"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.BrushStrokes"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Brush Strokes"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.ChromaticAberration"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Chromatic Aberration"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.ColorMaster"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Color Master"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.DepthOfFieldHQBlur"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Depth of Field HQ Blur"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Desaturate"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Desaturate"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.DistortionRipple"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Distortion Ripple"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.DistortionSphere"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Distortion Sphere"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.DistortionSpiral"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Distortion Spiral"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.EdgeDetect"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Edge Detect"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Emboss"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Emboss"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Flip"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Flip"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Fxaa"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Fxaa"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.GaussianBlur"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Gaussian Blur"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.HDRBloomTonemap"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "HDR Bloom Tonemap"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.MotionBlur"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Motion Blur"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Scatter"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Scatter"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.SCurveTonemap"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "SCurve Tonemap"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.TiltShift"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Tilt Shift"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
Type {
name: "QtQuick3D.Effects.Vignette"
icon: "images/effect16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Vignette"
category: "Qt Quick 3D Effects"
libraryIcon: "images/effect.png"
version: "1.0"
requiredImport: "QtQuick3D.Effects"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 411 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 321 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 714 B

View File

@@ -0,0 +1,32 @@
module QtQuick3D.Effects
linktarget Qt6::qtquick3deffectplugin
optional plugin qtquick3deffectplugin
classname QtQuick3DEffectPlugin
designersupported
typeinfo Quick3DEffects.qmltypes
depends QtQuick3D auto
depends QtQuick.Window auto
prefer :/qt-project.org/imports/QtQuick3D/Effects/
Vignette 6.0 Vignette.qml
TiltShift 6.0 TiltShift.qml
SCurveTonemap 6.0 SCurveTonemap.qml
Scatter 6.0 Scatter.qml
MotionBlur 6.0 MotionBlur.qml
HDRBloomTonemap 6.0 HDRBloomTonemap.qml
GaussianBlur 6.0 GaussianBlur.qml
Fxaa 6.0 Fxaa.qml
Flip 6.0 Flip.qml
Emboss 6.0 Emboss.qml
EdgeDetect 6.0 EdgeDetect.qml
DistortionSpiral 6.0 DistortionSpiral.qml
DistortionSphere 6.0 DistortionSphere.qml
DistortionRipple 6.0 DistortionRipple.qml
Desaturate 6.0 Desaturate.qml
DepthOfFieldHQBlur 6.0 DepthOfFieldHQBlur.qml
ColorMaster 6.0 ColorMaster.qml
ChromaticAberration 6.0 ChromaticAberration.qml
BrushStrokes 6.0 BrushStrokes.qml
Blur 6.0 Blur.qml
AdditiveColorGradient 6.0 AdditiveColorGradient.qml
depends QtQuick

View File

@@ -0,0 +1,93 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Node {
id: axisGrid_obj
property alias gridColor: gridMaterial.diffuseColor
property alias gridOpacity: gridMaterial.opacity
property alias enableXZGrid: gridXZ.visible
property alias enableXYGrid: gridXY.visible
property alias enableYZGrid: gridYZ.visible
property bool enableAxisLines: true
// Axis Lines
Model {
id: xAxis
source: "#Cube"
position: Qt.vector3d(5000, 0, 0)
scale: Qt.vector3d(100, .05, .05)
visible: axisGrid_obj.enableAxisLines
materials: DefaultMaterial {
lighting: DefaultMaterial.NoLighting
diffuseColor: "red"
}
}
Model {
id: yAxis
source: "#Cube"
position: Qt.vector3d(0, 5000, 0)
scale: Qt.vector3d(0.05, 100, 0.05)
visible: axisGrid_obj.enableAxisLines
materials: DefaultMaterial {
lighting: DefaultMaterial.NoLighting
diffuseColor: "green"
}
}
Model {
id: zAxis
source: "#Cube"
position: Qt.vector3d(0, 0, 5000)
scale: Qt.vector3d(0.05, 0.05, 100)
visible: axisGrid_obj.enableAxisLines
materials: DefaultMaterial {
lighting: DefaultMaterial.NoLighting
diffuseColor: "blue"
}
}
// Grid Lines
DefaultMaterial {
id: gridMaterial
lighting: DefaultMaterial.NoLighting
opacity: 0.5
diffuseColor: Qt.rgba(0.8, 0.8, 0.8, 1)
}
Model {
id: gridXZ
source: "meshes/axisGrid.mesh"
scale: Qt.vector3d(100, 100, 100)
materials: [
gridMaterial
]
}
Model {
id: gridXY
visible: false
source: "meshes/axisGrid.mesh"
scale: Qt.vector3d(100, 100, 100)
eulerRotation: Qt.vector3d(90, 0, 0)
materials: [
gridMaterial
]
}
Model {
id: gridYZ
visible: false
source: "meshes/axisGrid.mesh"
scale: Qt.vector3d(100, 100, 100)
eulerRotation: Qt.vector3d(0, 0, 90)
materials: [
gridMaterial
]
}
}

View File

@@ -0,0 +1,549 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick3D
import QtQuick3D.Helpers.impl
Pane {
id: root
property var source: null
property bool resourceDetailsVisible: false
opacity: 0.9
ColumnLayout {
id: layout
RowLayout {
Label {
Layout.fillWidth: true
text: root.source.renderStats.fps + " FPS"
font.pointSize: 14
}
Label {
text: "Details"
}
CheckBox {
checked: root.resourceDetailsVisible
onCheckedChanged: {
resourceDetailsVisible = checked;
}
}
}
component TimeLabel : RowLayout {
id: timeLabel
property alias text: label.text
property real value: 0.0
Label {
id: label
Layout.fillWidth: true
text: "Frame: "
}
Label {
text: timeLabel.value.toFixed(3) + "ms"
}
}
TimeLabel {
text: "Frame: "
value: root.source.renderStats.frameTime
}
TimeLabel {
text: " Sync: "
value: root.source.renderStats.syncTime
}
TimeLabel {
text: " Prep: "
value: root.source.renderStats.renderPrepareTime
}
TimeLabel {
text: " Render: "
value: root.source.renderStats.renderTime
}
TimeLabel {
text: "Max: "
value: root.source.renderStats.maxFrameTime
}
TimeLabel {
text: "GPU: "
value: root.source.renderStats.lastCompletedGpuTime
visible: root.source.renderStats.lastCompletedGpuTime > 0
}
Page {
Layout.fillWidth: true
Layout.minimumWidth: 530
visible: root.resourceDetailsVisible
header: TabBar {
id: tabBar
TabButton {
text: "Summary"
}
TabButton {
text: "Passes"
}
TabButton {
text: "Textures"
}
TabButton {
text: "Meshes"
}
TabButton {
text: "Tools"
}
TabButton {
text: "Shadows"
}
}
StackLayout {
anchors.fill: parent
anchors.margins: 10
currentIndex: tabBar.currentIndex
Pane {
id: summaryPane
ColumnLayout {
Label {
text: "Graphics API: " + root.source.renderStats.graphicsApiName
visible: root.resourceDetailsVisible
}
Label {
text: root.source.renderStats.renderPassCount + " render passes"
visible: root.resourceDetailsVisible
}
Label {
text: root.source.renderStats.drawCallCount + " draw calls"
visible: root.resourceDetailsVisible
}
Label {
text: root.source.renderStats.drawVertexCount + " vertices"
visible: root.resourceDetailsVisible
}
Label {
text: "Image assets: " + (root.source.renderStats.imageDataSize / 1024).toFixed(2) + " KB"
visible: root.resourceDetailsVisible
}
Label {
text: "Mesh assets: " + (root.source.renderStats.meshDataSize / 1024).toFixed(2) + " KB"
visible: root.resourceDetailsVisible
}
Label {
text: "Pipelines: " + root.source.renderStats.pipelineCount
visible: root.resourceDetailsVisible
}
Label {
text: "Material build time: " + root.source.renderStats.materialGenerationTime + " ms"
visible: root.resourceDetailsVisible
}
Label {
text: "Effect build time: " + root.source.renderStats.effectGenerationTime + " ms"
visible: root.resourceDetailsVisible
}
Label {
text: "Pipeline build time: " + root.source.renderStats.pipelineCreationTime + " ms"
visible: root.resourceDetailsVisible
}
Label {
text: root.source.renderStats.vmemAllocCount + " vmem allocs with " + root.source.renderStats.vmemUsedBytes + " bytes"
visible: root.resourceDetailsVisible && root.source.renderStats.vmemAllocCount > 0
}
}
}
Pane {
id: passesPane
RenderStatsPassesModel {
id: passesModel
passData: root.source.renderStats.renderPassDetails
}
ColumnLayout {
anchors.fill: parent
spacing: 0
HorizontalHeaderView {
syncView: passesTableView
resizableColumns: false // otherwise QTBUG-111013 happens
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.VerticalFlick
}
ListModel {
id: passesHeaderModel
ListElement {
columnWidth: 300 // name
}
ListElement {
columnWidth: 80 // size
}
ListElement {
columnWidth: 60 // vertices
}
ListElement {
columnWidth: 60 // draw calls
}
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
TableView {
id: passesTableView
anchors.fill: parent
// name, size, vertices, draw calls
property var columnFactors: [58, 14, 12, 12]; // == 96, leave space for the scrollbar
columnWidthProvider: function (column) {
return passesPane.width * (columnFactors[column] / 100.0);
}
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.VerticalFlick
ScrollBar.vertical: ScrollBar {
parent: passesTableView.parent
anchors.top: passesTableView.top
anchors.bottom: passesTableView.bottom
anchors.left: passesTableView.right
}
clip: true
model: passesModel
columnSpacing: 1
rowSpacing: 1
implicitWidth: parent.width + columnSpacing
implicitHeight: parent.height + rowSpacing
delegate: CustomTableItemDelegate {
required property string display
text: display
color: TableView.view.palette.base
textColor: TableView.view.palette.text
}
}
}
}
}
Pane {
id: texturesPane
RenderStatsTexturesModel {
id: texturesModel
textureData: root.source.renderStats.textureDetails
}
ColumnLayout {
anchors.fill: parent
spacing: 0
HorizontalHeaderView {
syncView: texturesTableView
resizableColumns: false // otherwise QTBUG-111013 happens
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.VerticalFlick
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
TableView {
id: texturesTableView
anchors.fill: parent
// name, size, format, miplevels, flags
property var columnFactors: [48, 12, 12, 12, 12]; // == 96, leave space for the scrollbar
columnWidthProvider: function (column) {
return texturesPane.width * (columnFactors[column] / 100.0);
}
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.VerticalFlick
ScrollBar.vertical: ScrollBar {
parent: texturesTableView.parent
anchors.top: texturesTableView.top
anchors.bottom: texturesTableView.bottom
anchors.left: texturesTableView.right
}
ScrollBar.horizontal: ScrollBar { }
clip: true
model: texturesModel
columnSpacing: 1
rowSpacing: 1
implicitWidth: parent.width + columnSpacing
implicitHeight: parent.height + rowSpacing
delegate: CustomTableItemDelegate {
required property string display
text: display
color: TableView.view.palette.base
textColor: TableView.view.palette.text
}
}
}
}
}
Pane {
id: meshesPane
RenderStatsMeshesModel {
id: meshesModel
meshData: root.source.renderStats.meshDetails
}
ColumnLayout {
anchors.fill: parent
spacing: 0
HorizontalHeaderView {
syncView: meshesTableView
resizableColumns: false // otherwise QTBUG-111013 happens
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.VerticalFlick
}
Item {
Layout.fillHeight: true
Layout.fillWidth: true
TableView {
id: meshesTableView
anchors.fill: parent
// name, submeshes, vertices, vbufsize, ibufsize
property var columnFactors: [48, 12, 12, 12, 12]; // == 96, leave space for the scrollbar
columnWidthProvider: function (column) {
return meshesPane.width * (columnFactors[column] / 100.0);
}
boundsBehavior: Flickable.StopAtBounds
flickableDirection: Flickable.VerticalFlick
ScrollBar.vertical: ScrollBar {
parent: meshesTableView.parent
anchors.top: meshesTableView.top
anchors.bottom: meshesTableView.bottom
anchors.left: meshesTableView.right
}
clip: true
model: meshesModel
columnSpacing: 1
rowSpacing: 1
implicitWidth: parent.width + columnSpacing
implicitHeight: parent.height + rowSpacing
delegate: CustomTableItemDelegate {
required property string display
text: display
color: TableView.view.palette.base
textColor: TableView.view.palette.text
}
}
}
}
}
Pane {
id: visualizePane
ColumnLayout {
id: visCtrCol
width: parent.width
CheckBox {
text: "Wireframe mode"
onCheckedChanged: root.source.environment.debugSettings.wireframeEnabled = checked
}
RowLayout {
Label {
text: "Material override"
}
ComboBox {
id: materialOverrideComboBox
textRole: "text"
valueRole: "value"
implicitContentWidthPolicy: ComboBox.WidestText
onActivated: root.source.environment.debugSettings.materialOverride = currentValue
Component.onCompleted: materialOverrideComboBox.currentIndex = materialOverrideComboBox.indexOfValue(root.source.environment.debugSettings.materialOverride)
model: [
{ value: DebugSettings.None, text: "None"},
{ value: DebugSettings.BaseColor, text: "Base Color"},
{ value: DebugSettings.Roughness, text: "Roughness"},
{ value: DebugSettings.Metalness, text: "Metalness"},
{ value: DebugSettings.Diffuse, text: "Diffuse"},
{ value: DebugSettings.Specular, text: "Specular"},
{ value: DebugSettings.ShadowOcclusion, text: "Shadow Occlusion"},
{ value: DebugSettings.Emission, text: "Emission"},
{ value: DebugSettings.AmbientOcclusion, text: "Ambient Occlusion"},
{ value: DebugSettings.Normals, text: "Normals"},
{ value: DebugSettings.Tangents, text: "Tangents"},
{ value: DebugSettings.Binormals, text: "Binormals"},
{ value: DebugSettings.F0, text: "F0"}
]
}
}
RowLayout {
spacing: 20
Button {
text: "Release cached resources"
onClicked: root.source.renderStats.releaseCachedResources()
}
Button {
text: "Bake lightmap"
onClicked: root.source.bakeLightmap()
}
Button {
text: "Denoise lightmap"
onClicked: root.source.denoiseLightmap()
}
}
RowLayout {
Label {
text: "Render mode override"
}
ComboBox {
id: renderModeOverrideComboBox
textRole: "text"
valueRole: "value"
implicitContentWidthPolicy: ComboBox.WidestText
onActivated: root.source.renderMode = currentValue
Component.onCompleted: renderModeOverrideComboBox.currentIndex = renderModeOverrideComboBox.indexOfValue(root.source.renderMode)
model: [
{ value: View3D.Offscreen, text: "Offscreen" },
{ value: View3D.Underlay, text: "Underlay" },
{ value: View3D.Overlay, text: "Overlay" },
{ value: View3D.Inline, text: "Inline" }
]
}
}
Label {
text: "View3D logical size is " + root.source.width + "x" + root.source.height
}
Label {
text: "Backing texture pixel size is " + root.source.effectiveTextureSize.width + "x" + root.source.effectiveTextureSize.height
visible: root.source.renderMode === View3D.Offscreen
}
RowLayout {
CheckBox {
id: explicitTextureSizeCheckBox
visible: root.source.renderMode === View3D.Offscreen
text: "Explicit backing texture size"
property real aspectRatio: root.source.width / root.source.height
onCheckedChanged: updateSize()
function updateSize() {
if (!explicitTextureSizeCheckBox.checked) {
root.source.explicitTextureWidth = 0;
root.source.explicitTextureHeight = 0;
return;
}
var newWidth = explicitWidthSlider.value;
var newHeight = explicitHeightSlider.value;
if (keepAspectRatioCheckBox.checked) {
var aspectRatio = explicitTextureSizeCheckBox.aspectRatio;
if (newHeight * aspectRatio <= newWidth)
newWidth = newHeight * aspectRatio;
else
newHeight = newWidth * (1.0 / aspectRatio);
}
root.source.explicitTextureWidth = newWidth;
root.source.explicitTextureHeight = newHeight;
}
Connections {
target: root.source
function onWidthChanged() { explicitTextureSizeCheckBox.updateSize() }
function onHeightChanged() { explicitTextureSizeCheckBox.updateSize() }
}
}
CheckBox {
id: keepAspectRatioCheckBox
visible: root.source.renderMode === View3D.Offscreen && explicitTextureSizeCheckBox.checked
text: "Keep aspect ratio (" + explicitTextureSizeCheckBox.aspectRatio.toFixed(2) + ")"
checked: false
onCheckedChanged: explicitTextureSizeCheckBox.updateSize()
}
}
RowLayout {
visible: root.source.renderMode === View3D.Offscreen && explicitTextureSizeCheckBox.checked
Label {
text: "Width: " + explicitWidthSlider.value.toFixed(0) + " px"
}
Slider {
id: explicitWidthSlider
from: 16
to: 4096
value: 1280
onValueChanged: explicitTextureSizeCheckBox.updateSize()
Layout.maximumWidth: 120
}
Label {
text: "Height: " + explicitHeightSlider.value.toFixed(0) + " px"
}
Slider {
id: explicitHeightSlider
from: 16
to: 4096
value: 720
onValueChanged: explicitTextureSizeCheckBox.updateSize()
Layout.maximumWidth: 120
}
}
}
}
Pane {
id: shadowsPane
ColumnLayout {
width: parent.width
CheckBox {
text: "Draw directional light shadow bounding boxes"
checked: root.source.environment.debugSettings.drawDirectionalLightShadowBoxes
onCheckedChanged: root.source.environment.debugSettings.drawDirectionalLightShadowBoxes = checked
}
CheckBox {
text: "Draw point light shadow bounding boxes"
checked: root.source.environment.debugSettings.drawPointLightShadowBoxes
onCheckedChanged: root.source.environment.debugSettings.drawPointLightShadowBoxes = checked
}
CheckBox {
text: "Draw shadow casting bounding box"
checked: root.source.environment.debugSettings.drawShadowCastingBounds
onCheckedChanged: root.source.environment.debugSettings.drawShadowCastingBounds = checked
}
CheckBox {
text: "Draw shadow receiving bounding box"
checked: root.source.environment.debugSettings.drawShadowReceivingBounds
onCheckedChanged: root.source.environment.debugSettings.drawShadowReceivingBounds = checked
}
CheckBox {
text: "Draw cascades"
checked: root.source.environment.debugSettings.drawCascades
onCheckedChanged: root.source.environment.debugSettings.drawCascades = checked
}
CheckBox {
text: "Draw scene cascade intersection"
checked: root.source.environment.debugSettings.drawSceneCascadeIntersection
onCheckedChanged: root.source.environment.debugSettings.drawSceneCascadeIntersection = checked
}
CheckBox {
text: "Disable Shadow Camera Update"
checked: root.source.environment.debugSettings.disableShadowCameraUpdate
onCheckedChanged: root.source.environment.debugSettings.disableShadowCameraUpdate = checked
}
}
}
}
}
}
component CustomTableItemDelegate : Rectangle {
property alias text: textLabel.text
property alias textColor: textLabel.color
implicitWidth: 100
implicitHeight: textLabel.implicitHeight + 4
color: palette.base
Label {
id: textLabel
anchors.centerIn: parent
color: palette.text
}
}
function syncVisible() {
if (source) {
source.renderStats.extendedDataCollectionEnabled = visible && resourceDetailsVisible;
if (source.renderStats.extendedDataCollectionEnabled)
source.update();
}
}
Component.onCompleted: syncVisible()
onSourceChanged: syncVisible()
onVisibleChanged: syncVisible()
onResourceDetailsVisibleChanged: syncVisible()
}

View File

@@ -0,0 +1,100 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D.Helpers.impl
SceneEffectEnvironment {
id: sceneEnvironment
// Depth of Field Effect
property alias depthOfFieldEnabled: dofBlurEffect.enabled
property alias depthOfFieldFocusDistance: dofBlurEffect.focusDistance
property alias depthOfFieldFocusRange: dofBlurEffect.focusRange
property alias depthOfFieldBlurAmount: dofBlurEffect.blurAmount
// Tonemapper
property alias exposure: sceneEffect.exposure
property alias whitePoint: sceneEffect.white
property alias ditheringEnabled: sceneEffect.ditheringEnabled
property alias sharpnessAmount: sceneEffect.sharpnessAmount
// FXAA
property alias fxaaEnabled: sceneEffect.applyFXAA
// Adjustments
property alias colorAdjustmentsEnabled: sceneEffect.colorAdjustmentsEnabled
property alias adjustmentBrightness: sceneEffect.adjustmentBrightness
property alias adjustmentContrast: sceneEffect.adjustmentContrast
property alias adjustmentSaturation: sceneEffect.adjustmentSaturation
// Color Grading Effect
property alias lutEnabled: sceneEffect.enableLut
property alias lutSize: sceneEffect.lutSize
property alias lutFilterAlpha: sceneEffect.lutFilterAlpha
property alias lutTexture: sceneEffect.lutTextureAlias
// Glow Effect
enum GlowBlendMode {
Additive,
Screen,
SoftLight, // Default
Replace
}
enum GlowLevel {
One = 0x1,
Two = 0x2,
Three = 0x4,
Four = 0x8,
Five = 0x10,
Six = 0x20,
Seven = 0x40
}
property alias glowEnabled: sceneEffect.isGlowEnabled
property alias glowQualityHigh: sceneEffect.glowQualityHigh
property alias glowUseBicubicUpscale: sceneEffect.glowUseBicubicUpscale
property alias glowStrength: sceneEffect.glowStrength
property alias glowIntensity: sceneEffect.glowIntensity
property alias glowBloom: sceneEffect.glowBloom
property alias glowBlendMode: sceneEffect.glowBlendMode
property alias glowHDRMaximumValue: sceneEffect.glowHDRMaximumValue
property alias glowHDRScale: sceneEffect.glowHDRScale
property alias glowHDRMinimumValue: sceneEffect.glowHDRMinimumValue
property alias glowLevel: sceneEffect.glowLevel
// Vignette
property alias vignetteEnabled: sceneEffect.vignetteEnabled
property alias vignetteStrength: sceneEffect.vignetteStrength
property alias vignetteColor: sceneEffect.vignetteColor
property alias vignetteRadius: sceneEffect.vignetteRadius
// Lens Flare
property alias lensFlareEnabled: sceneEffect.lensFlareEnabled
property alias lensFlareBloomScale: sceneEffect.lensFlareBloomScale
property alias lensFlareBloomBias: sceneEffect.lensFlareBloomBias
property alias lensFlareGhostDispersal: sceneEffect.lensFlareGhostDispersal
property alias lensFlareGhostCount: sceneEffect.lensFlareGhostCount
property alias lensFlareHaloWidth: sceneEffect.lensFlareHaloWidth
property alias lensFlareStretchToAspect: sceneEffect.lensFlareStretchToAspect
property alias lensFlareDistortion: sceneEffect.lensFlareDistortion
property alias lensFlareBlurAmount: sceneEffect.lensFlareBlurAmount
property alias lensFlareApplyDirtTexture: sceneEffect.lensFlareApplyDirtTexture
property alias lensFlareApplyStarburstTexture: sceneEffect.lensFlareApplyStarburstTexture
property alias lensFlareCameraDirection: sceneEffect.lensFlareCameraDirection
property alias lensFlareLensColorTexture: sceneEffect.lensColorTextureAlias
property alias lensFlareLensDirtTexture: sceneEffect.lensDirtTextureAlias
property alias lensFlareLensStarburstTexture: sceneEffect.starburstTextureAlias
DepthOfFieldBlur {
id: dofBlurEffect
environment: sceneEnvironment
}
SceneEffect {
id: sceneEffect
environment: sceneEnvironment
tonemapMode: sceneEnvironment.tonemapMode
}
}

View File

@@ -0,0 +1,80 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Node {
id: root
required property Camera camera
required property var distances
property real fadeDistance: 0.0
onChildrenChanged: {
// Add distance threshold values to instanced children
var distIndex = 0; // Handle distance index separately to allow non-node children
for (var i = 0; i < children.length; i++) {
if (!(children[i] instanceof Model) || !children[i].instancing)
continue;
if (distIndex - 1 >= 0)
children[i].instancingLodMin = distances[distIndex - 1];
if (distances.length > distIndex)
children[i].instancingLodMax = distances[distIndex];
distIndex++;
}
}
function update() {
var distIndex = 0; // Handle distance index separately to allow non-node children
for (var i = 0; i < root.children.length; i++) {
var node = root.children[i];
if (!(node instanceof Node))
continue;
if (node instanceof Model && node.instancing)
continue;
if (distIndex > distances.length)
break;
// Hide all nodes by default
node.visible = false;
var minThreshold = 0;
var maxThreshold = -1;
if (distIndex - 1 >= 0)
minThreshold = distances[distIndex - 1] - fadeDistance;
if (distances.length > distIndex)
maxThreshold = distances[distIndex] + fadeDistance;
// Show nodes that are inside the minimum and maximum distance thresholds
var distance = node.scenePosition.minus(camera.scenePosition).length();
if (distance >= minThreshold && (maxThreshold < 0 || distance < maxThreshold))
node.visible = true;
// Fade models by adjusting opacity if fadeDistance is set
if (children[i] instanceof Model && fadeDistance > 0) {
var fadeAlpha = -(minThreshold - distance) / fadeDistance;
if (fadeAlpha > 1.0 && maxThreshold > 0)
fadeAlpha = (maxThreshold - distance) / fadeDistance;
children[i].opacity = fadeAlpha;
}
distIndex++;
}
}
Component.onCompleted: {
root.update()
}
Connections {
target: root.camera
function onScenePositionChanged() {
root.update()
}
}
}

View File

@@ -0,0 +1,231 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Item {
id: root
required property Node origin
required property Camera camera
property real xSpeed: 0.1
property real ySpeed: 0.1
property bool xInvert: false
property bool yInvert: true
property bool mouseEnabled: true
property bool panEnabled: true
property bool automaticClipping: true
property alias acceptedButtons: dragHandler.acceptedButtons
readonly property bool inputsNeedProcessing: status.useMouse || status.isPanning
implicitWidth: parent.width
implicitHeight: parent.height
Connections {
enabled: root.automaticClipping
target: root.camera
function onZChanged() {
// Adjust near/far values based on distance
let distance = root.camera.z
if (distance < 1) {
root.camera.clipNear = 0.01
root.camera.clipFar = 100
if (root.camera.z === 0) {
console.warn("camera z set to 0, setting it to near clip")
root.camera.z = root.camera.clipNear
}
} else if (distance < 100) {
root.camera.clipNear = 0.1
root.camera.clipFar = 1000
} else {
root.camera.clipNear = 1
root.camera.clipFar = 10000
}
}
}
DragHandler {
id: dragHandler
target: null
enabled: root.mouseEnabled
acceptedModifiers: Qt.NoModifier
onCentroidChanged: {
root.mouseMoved(Qt.vector2d(centroid.position.x, centroid.position.y), false);
}
onActiveChanged: {
if (active)
root.mousePressed(Qt.vector2d(centroid.position.x, centroid.position.y));
else
root.mouseReleased(Qt.vector2d(centroid.position.x, centroid.position.y));
}
}
DragHandler {
id: ctrlDragHandler
target: null
enabled: root.mouseEnabled && root.panEnabled
acceptedButtons: root.acceptedButtons
acceptedModifiers: Qt.ControlModifier
onCentroidChanged: {
root.panEvent(Qt.vector2d(centroid.position.x, centroid.position.y));
}
onActiveChanged: {
if (active)
root.startPan(Qt.vector2d(centroid.position.x, centroid.position.y));
else
root.endPan();
}
}
PinchHandler {
id: pinchHandler
target: null
enabled: root.mouseEnabled
onTranslationChanged: (delta) => {
if (!root.panEnabled)
return;
delta.x = -(delta.x / root.width) * root.camera.z;
delta.y = (delta.y / root.height) * root.camera.z;
let movement = Qt.vector3d(0, 0, 0)
// X Movement
let xDirection = root.origin.right
movement = movement.plus(Qt.vector3d(xDirection.x * delta.x,
xDirection.y * delta.x,
xDirection.z * delta.x));
// Y Movement
let yDirection = root.origin.up
movement = movement.plus(Qt.vector3d(yDirection.x * delta.y,
yDirection.y * delta.y,
yDirection.z * delta.y));
root.origin.position = root.origin.position.plus(movement)
}
onScaleChanged: (delta) => {
root.camera.z = root.camera.z * (1 / delta)
}
}
TapHandler {
acceptedButtons: root.acceptedButtons
onTapped: root.forceActiveFocus() // qmllint disable signal-handler-parameters
}
WheelHandler {
id: wheelHandler
orientation: Qt.Vertical
target: null
enabled: root.mouseEnabled
acceptedDevices: PointerDevice.Mouse | PointerDevice.TouchPad
onWheel: event => {
let delta = -event.angleDelta.y * 0.01;
root.camera.z += root.camera.z * 0.1 * delta
}
}
function mousePressed(newPos) {
root.forceActiveFocus()
status.currentPos = newPos
status.lastPos = newPos
status.useMouse = true;
}
function mouseReleased(newPos) {
status.useMouse = false;
}
function mouseMoved(newPos: vector2d) {
status.currentPos = newPos;
}
function startPan(pos: vector2d) {
status.isPanning = true;
status.currentPanPos = pos;
status.lastPanPos = pos;
}
function endPan() {
status.isPanning = false;
}
function panEvent(newPos: vector2d) {
status.currentPanPos = newPos;
}
FrameAnimation {
id: updateTimer
running: root.inputsNeedProcessing
onTriggered: status.processInput(frameTime * 100)
}
QtObject {
id: status
property bool useMouse: false
property bool isPanning: false
property vector2d lastPos: Qt.vector2d(0, 0)
property vector2d lastPanPos: Qt.vector2d(0, 0)
property vector2d currentPos: Qt.vector2d(0, 0)
property vector2d currentPanPos: Qt.vector2d(0, 0)
function negate(vector) {
return Qt.vector3d(-vector.x, -vector.y, -vector.z)
}
function processInput(frameDelta) {
if (useMouse) {
// Get the delta
var rotationVector = root.origin.eulerRotation;
var delta = Qt.vector2d(lastPos.x - currentPos.x,
lastPos.y - currentPos.y);
// rotate x
var rotateX = delta.x * root.xSpeed * frameDelta
if (root.xInvert)
rotateX = -rotateX;
rotationVector.y += rotateX;
// rotate y
var rotateY = delta.y * -root.ySpeed * frameDelta
if (root.yInvert)
rotateY = -rotateY;
rotationVector.x += rotateY;
root.origin.setEulerRotation(rotationVector);
lastPos = currentPos;
}
if (isPanning) {
let delta = currentPanPos.minus(lastPanPos);
delta.x = -delta.x
delta.x = (delta.x / root.width) * root.camera.z * frameDelta
delta.y = (delta.y / root.height) * root.camera.z * frameDelta
let velocity = Qt.vector3d(0, 0, 0)
// X Movement
let xDirection = root.origin.right
velocity = velocity.plus(Qt.vector3d(xDirection.x * delta.x,
xDirection.y * delta.x,
xDirection.z * delta.x));
// Y Movement
let yDirection = root.origin.up
velocity = velocity.plus(Qt.vector3d(yDirection.x * delta.y,
yDirection.y * delta.y,
yDirection.z * delta.y));
root.origin.position = root.origin.position.plus(velocity)
lastPanPos = currentPanPos
}
}
}
}

View File

@@ -0,0 +1,290 @@
// Copyright (C) 2019 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick3D
Item {
id: root
property Node controlledObject: undefined
property real speed: 1
property real shiftSpeed: 3
property real forwardSpeed: 5
property real backSpeed: 5
property real rightSpeed: 5
property real leftSpeed: 5
property real upSpeed: 5
property real downSpeed: 5
property real xSpeed: 0.1
property real ySpeed: 0.1
property bool xInvert: false
property bool yInvert: true
property bool mouseEnabled: true
property bool keysEnabled: true
readonly property bool inputsNeedProcessing: status.moveForward | status.moveBack
| status.moveLeft | status.moveRight
| status.moveUp | status.moveDown
| status.useMouse
property alias acceptedButtons: dragHandler.acceptedButtons
implicitWidth: parent.width
implicitHeight: parent.height
focus: keysEnabled
DragHandler {
id: dragHandler
target: null
enabled: root.mouseEnabled
onCentroidChanged: {
root.mouseMoved(Qt.vector2d(centroid.position.x, centroid.position.y));
}
onActiveChanged: {
if (active)
root.mousePressed(Qt.vector2d(centroid.position.x, centroid.position.y));
else
root.mouseReleased(Qt.vector2d(centroid.position.x, centroid.position.y));
}
}
TapHandler {
acceptedButtons: dragHandler.acceptedButtons
onTapped: root.forceActiveFocus() // qmllint disable signal-handler-parameters
}
Keys.onPressed: (event)=> { if (keysEnabled && !event.isAutoRepeat) handleKeyPress(event) }
Keys.onReleased: (event)=> { if (keysEnabled && !event.isAutoRepeat) handleKeyRelease(event) }
function mousePressed(newPos) {
root.forceActiveFocus()
status.currentPos = newPos
status.lastPos = newPos
status.useMouse = true;
}
function mouseReleased(newPos) {
status.useMouse = false;
}
function mouseMoved(newPos) {
status.currentPos = newPos;
}
function forwardPressed() {
status.moveForward = true
status.moveBack = false
}
function forwardReleased() {
status.moveForward = false
}
function backPressed() {
status.moveBack = true
status.moveForward = false
}
function backReleased() {
status.moveBack = false
}
function rightPressed() {
status.moveRight = true
status.moveLeft = false
}
function rightReleased() {
status.moveRight = false
}
function leftPressed() {
status.moveLeft = true
status.moveRight = false
}
function leftReleased() {
status.moveLeft = false
}
function upPressed() {
status.moveUp = true
status.moveDown = false
}
function upReleased() {
status.moveUp = false
}
function downPressed() {
status.moveDown = true
status.moveUp = false
}
function downReleased() {
status.moveDown = false
}
function shiftPressed() {
status.shiftDown = true
}
function shiftReleased() {
status.shiftDown = false
}
function handleKeyPress(event)
{
switch (event.key) {
case Qt.Key_W:
case Qt.Key_Up:
forwardPressed();
break;
case Qt.Key_S:
case Qt.Key_Down:
backPressed();
break;
case Qt.Key_A:
case Qt.Key_Left:
leftPressed();
break;
case Qt.Key_D:
case Qt.Key_Right:
rightPressed();
break;
case Qt.Key_R:
case Qt.Key_PageUp:
upPressed();
break;
case Qt.Key_F:
case Qt.Key_PageDown:
downPressed();
break;
case Qt.Key_Shift:
shiftPressed();
break;
}
}
function handleKeyRelease(event)
{
switch (event.key) {
case Qt.Key_W:
case Qt.Key_Up:
forwardReleased();
break;
case Qt.Key_S:
case Qt.Key_Down:
backReleased();
break;
case Qt.Key_A:
case Qt.Key_Left:
leftReleased();
break;
case Qt.Key_D:
case Qt.Key_Right:
rightReleased();
break;
case Qt.Key_R:
case Qt.Key_PageUp:
upReleased();
break;
case Qt.Key_F:
case Qt.Key_PageDown:
downReleased();
break;
case Qt.Key_Shift:
shiftReleased();
break;
}
}
FrameAnimation {
id: updateTimer
running: root.inputsNeedProcessing
onTriggered: status.processInput(frameTime * 100)
}
QtObject {
id: status
property bool moveForward: false
property bool moveBack: false
property bool moveLeft: false
property bool moveRight: false
property bool moveUp: false
property bool moveDown: false
property bool shiftDown: false
property bool useMouse: false
property vector2d lastPos: Qt.vector2d(0, 0)
property vector2d currentPos: Qt.vector2d(0, 0)
function updatePosition(vector, speed, position)
{
if (shiftDown)
speed *= root.shiftSpeed;
else
speed *= root.speed
var direction = vector;
var velocity = Qt.vector3d(direction.x * speed,
direction.y * speed,
direction.z * speed);
controlledObject.position = Qt.vector3d(position.x + velocity.x,
position.y + velocity.y,
position.z + velocity.z);
}
function negate(vector) {
return Qt.vector3d(-vector.x, -vector.y, -vector.z)
}
function processInput(frameDelta) {
if (root.controlledObject == undefined)
return;
if (moveForward)
updatePosition(root.controlledObject.forward, root.forwardSpeed * frameDelta, root.controlledObject.position);
else if (moveBack)
updatePosition(negate(root.controlledObject.forward), root.backSpeed * frameDelta, root.controlledObject.position);
if (moveRight)
updatePosition(root.controlledObject.right, root.rightSpeed * frameDelta, root.controlledObject.position);
else if (moveLeft)
updatePosition(negate(root.controlledObject.right), root.leftSpeed * frameDelta, root.controlledObject.position);
if (moveDown)
updatePosition(negate(root.controlledObject.up), root.downSpeed * frameDelta, root.controlledObject.position);
else if (moveUp)
updatePosition(root.controlledObject.up, root.upSpeed * frameDelta, root.controlledObject.position);
if (useMouse) {
// Get the delta
var rotationVector = root.controlledObject.eulerRotation;
var delta = Qt.vector2d(lastPos.x - currentPos.x,
lastPos.y - currentPos.y);
// rotate x
var rotateX = delta.x * xSpeed * frameDelta
if (xInvert)
rotateX = -rotateX;
rotationVector.y += rotateX;
// rotate y
var rotateY = delta.y * -ySpeed * frameDelta
if (yInvert)
rotateY = -rotateY;
rotationVector.x += rotateY;
controlledObject.setEulerRotation(rotationVector);
lastPos = currentPos;
}
}
}
}

View File

@@ -0,0 +1,112 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
width: parent.width
caption: qsTr("Axis Helper")
SectionLayout {
PropertyLabel {
text: qsTr("Axis Lines")
tooltip: qsTr("Show colored axis indicator lines.")
}
SecondColumnLayout {
CheckBox {
text: qsTr("Enabled")
backendValue: backendValues.enableAxisLines
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("XY Grid")
tooltip: qsTr("Show grid on XY plane.")
}
SecondColumnLayout {
CheckBox {
text: qsTr("Enabled")
backendValue: backendValues.enableXYGrid
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("XZ Grid")
tooltip: qsTr("Show grid on XZ plane.")
}
SecondColumnLayout {
CheckBox {
text: qsTr("Enabled")
backendValue: backendValues.enableXZGrid
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("YZ Grid")
tooltip: qsTr("Show grid on YZ plane.")
}
SecondColumnLayout {
CheckBox {
text: qsTr("Enabled")
backendValue: backendValues.enableYZGrid
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Grid Opacity")
tooltip: qsTr("Sets the opacity of the visible grids.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.1
backendValue: backendValues.gridOpacity
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Grid Color")
tooltip: qsTr("Sets the color of the visible grids.")
}
ColorEditor {
backendValue: backendValues.gridColor
supportGradient: false
}
}
}
}

View File

@@ -0,0 +1,18 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
AxisHelperSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,50 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
width: parent.width
caption: qsTr("Debug View")
SectionLayout {
PropertyLabel {
text: qsTr("Source View")
tooltip: qsTr("Sets the source View3D item to show render statistics for.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.View3D"
backendValue: backendValues.source
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Detailed Mode")
tooltip: qsTr("Enables detailed mode, which shows more detailed resource usage statistics.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.resourceDetailsVisible.valueToString
backendValue: backendValues.resourceDetailsVisible
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
DebugViewSection {
width: parent.width
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
ExtendedSceneEnvironmentSection {
width: parent.width
}
}

View File

@@ -0,0 +1,92 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
width: parent.width
caption: qsTr("Grid Geometry")
SectionLayout {
PropertyLabel {
text: qsTr("Horizontal Lines")
tooltip: qsTr("Sets the number of horizontal lines in the grid.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 999999
decimals: 0
backendValue: backendValues.horizontalLines
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Vertical Lines")
tooltip: qsTr("Sets the number of vertical lines in the grid.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 999999
decimals: 0
backendValue: backendValues.verticalLines
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Horizontal Step")
tooltip: qsTr("Sets the space between horizontal lines.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 999999
decimals: 2
stepSize: 0.1
backendValue: backendValues.horizontalStep
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Vertical Step")
tooltip: qsTr("Sets the space between vertical lines.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 999999
decimals: 2
stepSize: 0.1
backendValue: backendValues.verticalStep
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
GridGeometrySection {
width: parent.width
}
}

View File

@@ -0,0 +1,122 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
width: parent.width
caption: qsTr("Height Field Geometry")
ColumnLayout {
spacing: StudioTheme.Values.transform3DSectionSpacing
SectionLayout {
PropertyLabel {
text: qsTr("Extents")
tooltip: qsTr("Sets the dimensions of a box contain the geometry.")
}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.extents_x
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.extents_y
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.extents_z
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
SectionLayout {
PropertyLabel {
text: qsTr("Source")
tooltip: qsTr("Sets the location of an image file containing the heightmap data.")
}
SecondColumnLayout {
UrlChooser {
backendValue: backendValues.source
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Smooth Shading")
tooltip: qsTr("Sets whether the height map is shown with smooth shading or with hard angles between the squares of the map.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.smoothShading.valueToString
backendValue: backendValues.smoothShading
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}
}

View File

@@ -0,0 +1,14 @@
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
Column {
width: parent.width
HeightFieldGeometrySection {
width: parent.width
}
}

View File

@@ -0,0 +1,61 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick 2.15
import QtQuick.Layouts 1.15
import HelperWidgets 2.0
import StudioTheme 1.0 as StudioTheme
Column {
width: parent.width
Section {
width: parent.width
caption: qsTr("Infinite Grid")
SectionLayout {
PropertyLabel {
text: qsTr("Visible")
tooltip: qsTr("Sets whether the infinite grid is visible.")
}
CheckBox {
text: backendValues.visible.valueToString
backendValue: backendValues.visible
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
PropertyLabel {
text: qsTr("Axis Lines")
tooltip: qsTr("Sets whether the axis lines are visible.")
}
CheckBox {
text: backendValues.gridAxes ? qsTr("On") : qsTr("Off")
backendValue: backendValues.gridAxes
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
PropertyLabel {
text: qsTr("Grid Interval")
tooltip: qsTr("Sets the distance between grid lines.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 9999999
decimals: 2
stepSize: 0.1
backendValue: backendValues.gridInterval
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More