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,91 @@
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/qcapsulegeometry_p.h"
lineNumber: 22
name: "CapsuleGeometryPhysics"
accessSemantics: "reference"
prototype: "QQuick3DGeometry"
exports: [
"QtQuick3D.Physics.Helpers/CapsuleGeometry 6.0",
"QtQuick3D.Physics.Helpers/CapsuleGeometry 6.7"
]
exportMetaObjectRevisions: [1536, 1543]
Property {
name: "enableNormals"
type: "bool"
read: "enableNormals"
write: "setEnableNormals"
notify: "enableNormalsChanged"
index: 0
lineNumber: 26
}
Property {
name: "enableUV"
type: "bool"
read: "enableUV"
write: "setEnableUV"
notify: "enableUVChanged"
index: 1
lineNumber: 28
}
Property {
name: "longitudes"
type: "int"
read: "longitudes"
write: "setLongitudes"
notify: "longitudesChanged"
index: 2
lineNumber: 30
}
Property {
name: "latitudes"
type: "int"
read: "latitudes"
write: "setLatitudes"
notify: "latitudesChanged"
index: 3
lineNumber: 31
}
Property {
name: "rings"
type: "int"
read: "rings"
write: "setRings"
notify: "ringsChanged"
index: 4
lineNumber: 32
}
Property {
name: "height"
type: "float"
read: "height"
write: "setHeight"
notify: "heightChanged"
index: 5
lineNumber: 33
}
Property {
name: "diameter"
type: "float"
read: "diameter"
write: "setDiameter"
notify: "diameterChanged"
index: 6
lineNumber: 34
}
Signal { name: "enableNormalsChanged"; lineNumber: 61 }
Signal { name: "enableUVChanged"; lineNumber: 62 }
Signal { name: "longitudesChanged"; lineNumber: 63 }
Signal { name: "latitudesChanged"; lineNumber: 64 }
Signal { name: "ringsChanged"; lineNumber: 65 }
Signal { name: "heightChanged"; lineNumber: 66 }
Signal { name: "diameterChanged"; lineNumber: 67 }
}
}

View File

@@ -0,0 +1,12 @@
module QtQuick3D.Physics.Helpers
linktarget Qt6::qtquick3dphysicshelpersplugin
optional plugin qtquick3dphysicshelpersplugin
classname QtQuick3DPhysicsHelpersPlugin
typeinfo plugins.qmltypes
depends QtQuick3D.Physics auto
depends QtQuick3D auto
depends QtQuick auto
depends QtQuick3D
prefer :/qt-project.org/imports/QtQuick3D/Physics/Helpers/
depends QtQuick

View File

@@ -0,0 +1,85 @@
// 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
Section {
caption: qsTr("Box Shape")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Extents")
tooltip: qsTr("The extents of the box shape in the X, Y and Z directions.")
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.extents_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.extents_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.extents_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,22 @@
// 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
BoxShapeSection {
width: parent.width
}
CollisionShapeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,50 @@
// 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
Section {
caption: qsTr("Capsule Shape")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Diameter")
tooltip: qsTr("Sets the diameter of the capsule.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.diameter
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Height")
tooltip: qsTr("Sets the height of the capsule.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.height
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,22 @@
// 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
CapsuleShapeSection {
width: parent.width
}
CollisionShapeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,188 @@
// 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
Section {
caption: qsTr("Character Controller")
width: parent.width
SectionLayout {
PropertyLabel {
text: "Gravity"
tooltip: "The gravitational acceleration that applies to the character."
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.gravity_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.gravity_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.gravity_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Movement"
tooltip: "The controlled motion of the character."
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.movement_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.movement_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.movement_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Mid Air Control"
tooltip: "Enables movement property to have an effect when the character is in free fall."
}
SecondColumnLayout {
CheckBox {
text: backendValues.midAirControl.valueToString
backendValue: backendValues.midAirControl
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Enable ShapeHit Callback"
tooltip: "Enables the shapeHit callback for this character controller."
}
SecondColumnLayout {
CheckBox {
text: backendValues.midAirControl.valueToString
backendValue: backendValues.midAirControl
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,26 @@
// 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
CharacterControllerSection {
width: parent.width
}
PhysicsBodySection {
width: parent.width
}
PhysicsNodeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,34 @@
// 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("Collision Shape")
SectionLayout {
PropertyLabel {
text: qsTr("Debug Draw")
tooltip: qsTr("Draws the collision shape in the scene view.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.enableDebugDraw.valueToString
backendValue: backendValues.enableDebugDraw
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,30 @@
// 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
Section {
caption: qsTr("Convex Mesh Shape")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Source")
tooltip: qsTr("Defines the location of the mesh file used to define the shape.")
}
SecondColumnLayout {
UrlChooser {
id: sourceUrlChooser
backendValue: backendValues.source
filter: "*.mesh"
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,22 @@
// 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
ConvexMeshShapeSection {
width: parent.width
}
CollisionShapeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,658 @@
// 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 {
width: parent.width
caption: qsTr("Dynamic Rigid Body")
SectionLayout {
id: baseSectionLayout
property bool isDefaultDensityMode: massModeComboBox.currentIndex === 0
property bool isCustomDensityMode: massModeComboBox.currentIndex === 1
property bool isMassMode: massModeComboBox.currentIndex === 2
property bool isMassAndInertiaTensorMode: massModeComboBox.currentIndex === 3
property bool isMassAndInertiaMatrixMode: massModeComboBox.currentIndex === 4
PropertyLabel {
text: "Mass Mode"
tooltip: "Describes how mass and inertia are calculated for this body."
}
SecondColumnLayout {
ComboBox {
id: massModeComboBox
scope: "DynamicRigidBody"
model: ["DefaultDensity", "CustomDensity", "Mass", "MassAndInertiaTensor", "MassAndInertiaMatrix"]
backendValue: backendValues.massMode
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
visible: baseSectionLayout.isMassAndInertiaMatrixMode || baseSectionLayout.isMassAndInertiaTensorMode
}
SecondColumnLayout {
visible: baseSectionLayout.isMassAndInertiaMatrixMode || baseSectionLayout.isMassAndInertiaTensorMode
Item {
// spacer for the always hiden action indicator
width: StudioTheme.Values.actionIndicatorWidth
}
Label {
text: qsTr("Tensor and Matrix modes require QML code.")
Layout.fillWidth: true
Layout.preferredWidth: StudioTheme.Values.singleControlColumnWidth
Layout.minimumWidth: StudioTheme.Values.singleControlColumnWidth
Layout.maximumWidth: StudioTheme.Values.singleControlColumnWidth
}
}
PropertyLabel {
visible: !baseSectionLayout.isDefaultDensityMode && !baseSectionLayout.isCustomDensityMode
text: "Mass"
tooltip: "The mass of the body."
}
SecondColumnLayout {
visible: !baseSectionLayout.isDefaultDensityMode && !baseSectionLayout.isCustomDensityMode
SpinBox {
minimumValue: 0
maximumValue: 9999999
decimals: 2
stepSize: 0.01
backendValue: backendValues.mass
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
visible: baseSectionLayout.isCustomDensityMode
text: "Density"
tooltip: "The density of the body."
}
SecondColumnLayout {
visible: baseSectionLayout.isCustomDensityMode
SpinBox {
minimumValue: -1
maximumValue: 9999999
decimals: 2
stepSize: 0.01
backendValue: backendValues.density
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Enable Gravity"
tooltip: "Sets if the body affected by gravity."
}
SecondColumnLayout {
CheckBox {
text: backendValues.gravityEnabled.valueToString
backendValue: backendValues.gravityEnabled
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Linear Axis Lock"
tooltip: "Lock the linear axis of the body."
}
SecondColumnLayout {
ActionIndicator {
id: linearAxisLockController
icon.color: extFuncLogic.color
icon.text: extFuncLogic.glyph
onClicked: extFuncLogic.show()
forceVisible: extFuncLogic.menuVisible
visible: true
property var enableLockX: { "value": false, "isInModel": false}
property var enableLockY: { "value": false, "isInModel": false}
property var enableLockZ: { "value": false, "isInModel": false}
property variant backendValue: backendValues.linearAxisLock
property variant valueFromBackend: backendValue === undefined ? 0 : backendValue.value
property bool blockLocks: false
onBackendValueChanged: evaluateLocks()
onValueFromBackendChanged: evaluateLocks()
Connections {
target: modelNodeBackend
function onSelectionChanged() {
evaluateLevels()
}
}
Component.onCompleted: evaluateLocks()
function evaluateLocks() {
blockLocks = true
enableLockX = { "value": valueFromBackend & 1, "isInModel": false}
enableLockY = { "value": valueFromBackend & 2, "isInModel": false}
enableLockZ = { "value": valueFromBackend & 4, "isInModel": false}
blockLocks = false
}
function composeExpressionString() {
if (blockLocks)
return
let expressionStr = "";
if (enableLockX.value || enableLockY.value || enableLockY.value) {
if (enableLockX.value)
expressionStr += " | DynamicRigidBody.LockX";
if (enableLockY.value)
expressionStr += " | DynamicRigidBody.LockY";
if (enableLockZ.value)
expressionStr += " | DynamicRigidBody.LockZ";
expressionStr = expressionStr.substring(3);
backendValue.expression = expressionStr
} else {
expressionStr = "DynamicRigidBody.None";
backendValue.expression = expressionStr
}
}
ExtendedFunctionLogic {
id: extFuncLogic
backendValue: backendValues.linearAxisLock
onReseted: {
linearAxisLockController.enableLockX = { "value": false, "isInModel": false}
linearAxisLockController.enableLockY = { "value": false, "isInModel": false}
linearAxisLockController.enableLockZ = { "value": false, "isInModel": false}
linearAxisLockController.evaluateLocks()
}
}
}
}
PropertyLabel {
// spacer
}
SecondColumnLayout {
Item {
// spacer for the always hiden action indicator
width: StudioTheme.Values.actionIndicatorWidth
}
CheckBox {
text: qsTr("Lock X")
backendValue: linearAxisLockController.enableLockX
actionIndicatorVisible: false
onCheckedChanged: linearAxisLockController.composeExpressionString()
implicitWidth: StudioTheme.Values.twoControlColumnWidth
}
ExpandingSpacer {}
}
PropertyLabel {
// spacer
}
SecondColumnLayout {
Item {
// spacer for the always hiden action indicator
width: StudioTheme.Values.actionIndicatorWidth
}
CheckBox {
text: qsTr("Lock Y")
backendValue: linearAxisLockController.enableLockY
actionIndicatorVisible: false
onCheckedChanged: linearAxisLockController.composeExpressionString()
implicitWidth: StudioTheme.Values.twoControlColumnWidth
}
ExpandingSpacer {}
}
PropertyLabel {
// spacer
}
SecondColumnLayout {
Item {
// spacer for the always hiden action indicator
width: StudioTheme.Values.actionIndicatorWidth
}
CheckBox {
text: qsTr("Lock Z")
backendValue: linearAxisLockController.enableLockZ
actionIndicatorVisible: false
onCheckedChanged: linearAxisLockController.composeExpressionString()
implicitWidth: StudioTheme.Values.twoControlColumnWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Angular Axis Lock"
tooltip: "Lock the angular axis of the body."
}
SecondColumnLayout {
ActionIndicator {
id: angularAxisLockController
icon.color: extFuncLogicAngular.color
icon.text: extFuncLogicAngular.glyph
onClicked: extFuncLogicAngular.show()
forceVisible: extFuncLogic.menuVisible
visible: true
property var enableLockX: { "value": false, "isInModel": false}
property var enableLockY: { "value": false, "isInModel": false}
property var enableLockZ: { "value": false, "isInModel": false}
property variant backendValue: backendValues.angularAxisLock
property variant valueFromBackend: backendValue === undefined ? 0 : backendValue.value
property bool blockLocks: false
onBackendValueChanged: evaluateLocks()
onValueFromBackendChanged: evaluateLocks()
Connections {
target: modelNodeBackend
function onSelectionChanged() {
evaluateLevels()
}
}
Component.onCompleted: evaluateLocks()
function evaluateLocks() {
blockLocks = true
enableLockX = { "value": valueFromBackend & 1, "isInModel": false}
enableLockY = { "value": valueFromBackend & 2, "isInModel": false}
enableLockZ = { "value": valueFromBackend & 4, "isInModel": false}
blockLocks = false
}
function composeExpressionString() {
if (blockLocks)
return
let expressionStr = "";
if (enableLockX.value || enableLockY.value || enableLockY.value) {
if (enableLockX.value)
expressionStr += " | DynamicRigidBody.LockX";
if (enableLockY.value)
expressionStr += " | DynamicRigidBody.LockY";
if (enableLockZ.value)
expressionStr += " | DynamicRigidBody.LockZ";
expressionStr = expressionStr.substring(3);
backendValue.expression = expressionStr
} else {
expressionStr = "DynamicRigidBody.None";
backendValue.expression = expressionStr
}
}
ExtendedFunctionLogic {
id: extFuncLogicAngular
backendValue: backendValues.angularAxisLock
onReseted: {
angularAxisLockController.enableLockX = { "value": false, "isInModel": false}
angularAxisLockController.enableLockY = { "value": false, "isInModel": false}
angularAxisLockController.enableLockZ = { "value": false, "isInModel": false}
angularAxisLockController.evaluateLocks()
}
}
}
}
PropertyLabel {
// spacer
}
SecondColumnLayout {
Item {
// spacer for the always hiden action indicator
width: StudioTheme.Values.actionIndicatorWidth
}
CheckBox {
text: qsTr("Lock X")
backendValue: angularAxisLockController.enableLockX
actionIndicatorVisible: false
onCheckedChanged: angularAxisLockController.composeExpressionString()
implicitWidth: StudioTheme.Values.twoControlColumnWidth
}
ExpandingSpacer {}
}
PropertyLabel {
// spacer
}
SecondColumnLayout {
Item {
// spacer for the always hiden action indicator
width: StudioTheme.Values.actionIndicatorWidth
}
CheckBox {
text: qsTr("Lock Y")
backendValue: angularAxisLockController.enableLockY
actionIndicatorVisible: false
onCheckedChanged: angularAxisLockController.composeExpressionString()
implicitWidth: StudioTheme.Values.twoControlColumnWidth
}
ExpandingSpacer {}
}
PropertyLabel {
// spacer
}
SecondColumnLayout {
Item {
// spacer for the always hiden action indicator
width: StudioTheme.Values.actionIndicatorWidth
}
CheckBox {
text: qsTr("Lock Z")
backendValue: angularAxisLockController.enableLockZ
actionIndicatorVisible: false
onCheckedChanged: angularAxisLockController.composeExpressionString()
implicitWidth: StudioTheme.Values.twoControlColumnWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Is Kinematic"
tooltip: "Kinematic objects are not influenced by external forces and can be seen as an object of infinite mass."
}
SecondColumnLayout {
CheckBox {
id: isKinematicCheckBox
text: backendValues.isKinematic.valueToString
backendValue: backendValues.isKinematic
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
text: "Kinematic Position"
tooltip: "The position of the kinematic object."
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicPosition_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicPosition_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicPosition_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
text: "Kinematic Rotation"
tooltip: "The rotation of the kinematic object."
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicEulerRotation_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicEulerRotation_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicEulerRotation_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
text: "Kinematic Pivot"
tooltip: "The pivot point of the kinematic object."
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicPivot_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicPivot_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
visible: isKinematicCheckBox.checked
}
SecondColumnLayout {
visible: isKinematicCheckBox.checked
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.kinematicPivot_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
}
}
// Other Properties Not covered by the UI
// QVector3D inertiaTensor
// QVector3D centerOfMassPosition
// QQuaternion centerOfMassRotation
// List<float> inertiaMatrix (9 floats for a Mat3x3)

View File

@@ -0,0 +1,26 @@
// 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
DynamicRigidBodySection {
width: parent.width
}
PhysicsBodySection {
width: parent.width
}
PhysicsNodeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,98 @@
// 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
Section {
caption: qsTr("Height Field Shape")
width: parent.width
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("Extents")
tooltip: qsTr("The extents of the height field shape in the X, Y and Z directions.")
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.extents_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.extents_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.extents_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,22 @@
// 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
HeightFieldShapeSection {
width: parent.width
}
CollisionShapeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,350 @@
// 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("Node")
SectionLayout {
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 {}
}
PropertyLabel {
text: qsTr("Visibility")
tooltip: qsTr("Sets the local visibility of the node.")
}
SecondColumnLayout {
// ### should be a slider
CheckBox {
text: qsTr("Is Visible")
backendValue: backendValues.visible
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ 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 {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.z
}
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 {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.eulerRotation_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.eulerRotation_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.eulerRotation_z
}
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 {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.scale_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.scale_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.scale_z
}
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 {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.pivot_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.pivot_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.pivot_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
}
}
}
}

View File

@@ -0,0 +1,34 @@
// 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 {
caption: qsTr("Physics Body")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Physics Material")
tooltip: qsTr("The physics material of the body.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.Physics.PhysicsMaterial"
backendValue: backendValues.physicsMaterial
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,69 @@
// 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
Section {
caption: qsTr("Physics Material")
width: parent.width
SectionLayout {
PropertyLabel {
text: "Static Friction"
tooltip: "The friction coefficient of the material when it is not moving."
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 9999999
decimals: 2
stepSize: 0.01
backendValue: backendValues.staticFriction
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Dynamic Friction"
tooltip: "The friction coefficient of the material when it is moving."
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 9999999
decimals: 2
stepSize: 0.01
backendValue: backendValues.dynamicFriction
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: "Restitution"
tooltip: "The coefficient of restitution of the material."
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 1
decimals: 2
stepSize: 0.01
sliderIndicatorVisible: true
backendValue: backendValues.restitution
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,13 @@
// 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
PhysicsMaterialSection {
width: parent.width
}
}

View File

@@ -0,0 +1,103 @@
// 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("Physics Node")
SectionLayout {
PropertyLabel {
text: qsTr("Collision Shapes")
Layout.alignment: Qt.AlignTop
Layout.topMargin: 5
}
SecondColumnLayout {
EditableListView {
backendValue: backendValues.collisionShapes
model: backendValues.collisionShapes.expressionAsList
Layout.fillWidth: true
typeFilter: "QtQuick3D.Physics.CollisionShape"
onAdd: function(value) { backendValues.collisionShapes.idListAdd(value) }
onRemove: function(idx) { backendValues.collisionShapes.idListRemove(idx) }
onReplace: function (idx, value) { backendValues.collisionShapes.idListReplace(idx, value) }
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Receive Contact Reports")
tooltip: qsTr("Determines whether this body will receive contact reports when colliding with other bodies.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.receiveContactReports.valueToString
backendValue: backendValues.receiveContactReports
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Send Contact Reports")
tooltip: qsTr("Determines whether this body will send contact reports when colliding with other bodies.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.sendContactReports.valueToString
backendValue: backendValues.sendContactReports
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Receive Trigger Reports")
tooltip: qsTr("Determines whether this body will receive reports when entering or leaving a trigger body.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.receiveTriggerReports.valueToString
backendValue: backendValues.receiveTriggerReports
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
PropertyLabel {
text: qsTr("Send Trigger Reports")
tooltip: qsTr("Determines whether this body will send contact reports when colliding with other bodies.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.sendTriggerReports.valueToString
backendValue: backendValues.sendTriggerReports
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}
}

View File

@@ -0,0 +1,266 @@
// 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
Section {
caption: qsTr("Physics World")
width: parent.width
SectionLayout {
// Q_PROPERTY(QQuick3DNode *scene
PropertyLabel {
text: qsTr("Scene")
tooltip: qsTr("The scene node to which the physics world is attached.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.Node"
backendValue: backendValues.scene
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(QQuick3DNode *viewport
PropertyLabel {
text: qsTr("Viewport")
tooltip: qsTr("The node to which the debug geometry of the physics world is added.")
}
SecondColumnLayout {
ItemFilterComboBox {
typeFilter: "QtQuick3D.Node"
backendValue: backendValues.viewport
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(bool running)
PropertyLabel {
text: qsTr("Running")
tooltip: qsTr("Whether the physics world is running.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.running.valueToString
backendValue: backendValues.running
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(bool forceDebugDraw
PropertyLabel {
text: qsTr("Force Debug Draw")
tooltip: qsTr("Whether to force debug drawing of the physics world.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.forceDebugDraw.valueToString
backendValue: backendValues.forceDebugDraw
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(bool enableCCD
PropertyLabel {
text: qsTr("CCD")
tooltip: qsTr("Whether to enable continuous collision detection.")
}
SecondColumnLayout {
CheckBox {
text: backendValues.enableCCD.valueToString
backendValue: backendValues.enableCCD
implicitWidth: StudioTheme.Values.twoControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(QVector3D gravity)
PropertyLabel {
text: qsTr("Gravity")
tooltip: qsTr("The gravity vector.")
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.gravity_x
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "X"
color: StudioTheme.Values.theme3DAxisXColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.gravity_y
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Y"
color: StudioTheme.Values.theme3DAxisYColor
}
ExpandingSpacer {}
}
PropertyLabel {
}
SecondColumnLayout {
SpinBox {
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
minimumValue: -9999999
maximumValue: 9999999
decimals: 2
backendValue: backendValues.gravity_z
}
Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
ControlLabel {
text: "Z"
color: StudioTheme.Values.theme3DAxisZColor
}
ExpandingSpacer {}
}
// Q_PROPERTY(float typicalLength)
PropertyLabel {
text: qsTr("Typical Length")
tooltip: qsTr("The typical length of objects in the scene.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.00001
maximumValue: 9999999
decimals: 5
backendValue: backendValues.typicalLength
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(float typicalSpeed
PropertyLabel {
text: qsTr("Typical Speed")
tooltip: qsTr("The typical speed of objects in the scene.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.00001
maximumValue: 9999999
decimals: 5
backendValue: backendValues.typicalSpeed
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(float defaultDensity)
PropertyLabel {
text: qsTr("Default Density")
tooltip: qsTr("The default density of objects in the scene.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.00001
maximumValue: 9999999
decimals: 5
backendValue: backendValues.defaultDensity
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(float minimumTimestep)
PropertyLabel {
text: qsTr("Min Timestep")
tooltip: qsTr("Defines the minimum simulation timestep in milliseconds.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.001
maximumValue: 9999999
decimals: 3
backendValue: backendValues.minimumTimestep
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
// Q_PROPERTY(float maximumTimestep)
PropertyLabel {
text: qsTr("Max Timestep")
tooltip: qsTr("Defines the maximum simulation timestep in milliseconds.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0.001
maximumValue: 9999999
decimals: 3
backendValue: backendValues.maximumTimestep
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

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
PhysicsWorldSection {
width: parent.width
}
}

View File

@@ -0,0 +1,18 @@
// 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
CollisionShapeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,32 @@
// 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
Section {
caption: qsTr("Sphere Shape")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Diameter")
tooltip: qsTr("Sets the diameter of the capsule.")
}
SecondColumnLayout {
SpinBox {
minimumValue: 0
maximumValue: 9999999
decimals: 3
backendValue: backendValues.diameter
implicitWidth: StudioTheme.Values.singleControlColumnWidth
+ StudioTheme.Values.actionIndicatorWidth
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,22 @@
// 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
SphereShapeSection {
width: parent.width
}
CollisionShapeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,22 @@
// 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
PhysicsBodySection {
width: parent.width
}
PhysicsNodeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,30 @@
// 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
Section {
caption: qsTr("Triangle Mesh Shape")
width: parent.width
SectionLayout {
PropertyLabel {
text: qsTr("Source")
tooltip: qsTr("Defines the location of the mesh file used to define the shape.")
}
SecondColumnLayout {
UrlChooser {
id: sourceUrlChooser
backendValue: backendValues.source
filter: "*.mesh"
}
ExpandingSpacer {}
}
}
}

View File

@@ -0,0 +1,22 @@
// 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
TriangleMeshShapeSection {
width: parent.width
}
CollisionShapeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

View File

@@ -0,0 +1,18 @@
// 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
PhysicsNodeSection {
width: parent.width
}
NodeSection {
width: parent.width
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 771 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 831 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 873 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 735 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 716 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 792 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -0,0 +1,261 @@
MetaInfo {
Type {
name: "QtQuick3D.Physics.PhysicsWorld"
icon: "images/physicsworld16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Physics World"
category: "Components"
libraryIcon: "images/physicsworld.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.TriggerBody"
icon: "images/triggerbody16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Trigger Body"
category: "Collision Bodies"
libraryIcon: "images/triggerbody.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.StaticRigidBody"
icon: "images/staticrigidbody16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Static Rigid Body"
category: "Collision Bodies"
libraryIcon: "images/staticrigidbody.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.DynamicRigidBody"
icon: "images/dynamicrigidbody16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Dynamic Rigid Body"
category: "Collision Bodies"
libraryIcon: "images/dynamicrigidbody.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.PhysicsMaterial"
icon: "images/physicsmaterial16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: false
}
ItemLibraryEntry {
name: "Physics Material"
category: "Components"
libraryIcon: "images/physicsmaterial.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.BoxShape"
icon: "images/boxshape16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Box Shape"
category: "Collision Shapes"
libraryIcon: "images/boxshape.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.CapsuleShape"
icon: "images/capsuleshape16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Capsule Shape"
category: "Collision Shapes"
libraryIcon: "images/capsuleshape.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.ConvexMeshShape"
icon: "images/convexmeshshape16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Convex Mesh Shape"
category: "Collision Shapes"
libraryIcon: "images/convexmeshshape.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.HeightFieldShape"
icon: "images/heightfieldshape16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Height Field Shape"
category: "Collision Shapes"
libraryIcon: "images/heightfieldshape.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.PlaneShape"
icon: "images/planeshape16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Plane Shape"
category: "Collision Shapes"
libraryIcon: "images/planeshape.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.SphereShape"
icon: "images/sphereshape16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Sphere Shape"
category: "Collision Shapes"
libraryIcon: "images/sphereshape.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.TriangleMeshShape"
icon: "images/trianglemeshshape16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Triangle Mesh Shape"
category: "Collision Shapes"
libraryIcon: "images/trianglemeshshape.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
Type {
name: "QtQuick3D.Physics.CharacterController"
icon: "images/charactercontroller16.png"
Hints {
visibleInNavigator: true
canBeDroppedInNavigator: true
canBeDroppedInFormEditor: false
canBeDroppedInView3D: true
}
ItemLibraryEntry {
name: "Character Controller"
category: "Collision Bodies"
libraryIcon: "images/charactercontroller.png"
version: "6.5"
requiredImport: "QtQuick3D.Physics"
}
}
}

View File

@@ -0,0 +1,10 @@
module QtQuick3D.Physics
linktarget Qt6::qquick3dphysicsplugin
plugin qquick3dphysicsplugin
classname QtQuick3DPhysicsPlugin
designersupported
typeinfo plugins.qmltypes
depends QtQuick3D
prefer :/qt-project.org/imports/QtQuick3D/Physics/
depends QtQuick