| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557 |
- // 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("Particle Emitter")
- width: parent.width
- SectionLayout {
- PropertyLabel {
- text: qsTr("System")
- tooltip: qsTr("Sets the ParticleSystem3D for the emitter. If system is direct parent of the emitter, this property does not need to be defined.")
- }
- SecondColumnLayout {
- ItemFilterComboBox {
- typeFilter: "QtQuick3D.Particles3D.ParticleSystem3D"
- backendValue: backendValues.system
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Emit Bursts")
- tooltip: qsTr("Sets a list of EmitBurst3D elements to declaratively define bursts.")
- Layout.alignment: Qt.AlignTop
- Layout.topMargin: 5
- }
- SecondColumnLayout {
- EditableListView {
- backendValue: backendValues.emitBursts
- model: backendValues.emitBursts.expressionAsList
- Layout.fillWidth: true
- typeFilter: "QtQuick3D.Particles3D.EmitBurst3D"
- onAdd: function(value) { backendValues.emitBursts.idListAdd(value) }
- onRemove: function(idx) { backendValues.emitBursts.idListRemove(idx) }
- onReplace: function (idx, value) { backendValues.emitBursts.idListReplace(idx, value) }
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Velocity")
- tooltip: qsTr("Sets a starting velocity for emitted particles.")
- }
- SecondColumnLayout {
- ItemFilterComboBox {
- typeFilter: "QQuick3DParticleDirection"
- backendValue: backendValues.velocity
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Particle")
- tooltip: qsTr("Sets the logical particle which this emitter emits.")
- }
- SecondColumnLayout {
- ItemFilterComboBox {
- typeFilter: "QtQuick3D.Particles3D.Particle3D"
- backendValue: backendValues.particle
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Enabled")
- tooltip: qsTr("If enabled is set to false, this emitter will not emit any particles.")
- }
- SecondColumnLayout {
- CheckBox {
- id: enabledCheckBox
- text: backendValues.enabled.valueToString
- backendValue: backendValues.enabled
- implicitWidth: StudioTheme.Values.twoControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Shape")
- tooltip: qsTr("Sets optional shape for the emitting area.")
- }
- SecondColumnLayout {
- ItemFilterComboBox {
- typeFilter: "QQuick3DParticleAbstractShape"
- backendValue: backendValues.shape
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Emit Rate")
- tooltip: qsTr("Sets the constant emitting rate in particles per second.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: 0
- maximumValue: 999999
- decimals: 2
- backendValue: backendValues.emitRate
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Life Span")
- tooltip: qsTr("Sets the lifespan of a single particle in milliseconds.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: 0
- maximumValue: 999999
- decimals: 0
- backendValue: backendValues.lifeSpan
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Life Span Variation")
- tooltip: qsTr("Sets the lifespan variation of a single particle in milliseconds.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -999999
- maximumValue: 999999
- decimals: 0
- backendValue: backendValues.lifeSpanVariation
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Particle Scale")
- tooltip: qsTr("Sets the scale multiplier of the particles at the beginning")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -999999
- maximumValue: 999999
- decimals: 2
- backendValue: backendValues.particleScale
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Particle End Scale")
- tooltip: qsTr("Sets the scale multiplier of the particles at the end of particle lifeSpan.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -999999
- maximumValue: 999999
- decimals: 2
- backendValue: backendValues.particleEndScale
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Scale Variation")
- tooltip: qsTr("Sets the scale variation of the particles.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -999999
- maximumValue: 999999
- decimals: 2
- backendValue: backendValues.particleScaleVariation
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("End Scale Variation")
- tooltip: qsTr("Sets the scale variation of the particles in the end.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -999999
- maximumValue: 999999
- decimals: 2
- backendValue: backendValues.particleEndScaleVariation
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- PropertyLabel {
- text: qsTr("Depth Bias")
- tooltip: qsTr("Sets the depth bias of the emitter. Depth bias is added to the object distance from camera when sorting objects.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -999999
- maximumValue: 999999
- decimals: 2
- backendValue: backendValues.depthBias
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- ExpandingSpacer {}
- }
- }
- }
- Section {
- width: parent.width
- caption: qsTr("Particle Rotation")
- ColumnLayout {
- spacing: StudioTheme.Values.transform3DSectionSpacing
- SectionLayout {
- PropertyLabel {
- text: qsTr("Rotation")
- tooltip: qsTr("Sets the rotation of the particles in the beginning. Rotation is defined as degrees in euler angles.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -9999999
- maximumValue: 9999999
- decimals: 2
- backendValue: backendValues.particleRotation_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.particleRotation_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.particleRotation_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("Variation")
- tooltip: qsTr("Sets the rotation variation of the particles in the beginning. Rotation variation is defined as degrees in euler angles.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -9999999
- maximumValue: 9999999
- decimals: 2
- backendValue: backendValues.particleRotationVariation_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.particleRotationVariation_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.particleRotationVariation_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("Velocity")
- tooltip: qsTr("Sets the rotation velocity of the particles in the beginning. Rotation velocity is defined as degrees per second in euler angles.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -9999999
- maximumValue: 9999999
- decimals: 2
- backendValue: backendValues.particleRotationVelocity_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.particleRotationVelocity_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.particleRotationVelocity_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("Velocity Variation")
- tooltip: qsTr("Sets the rotation velocity variation of the particles. Rotation velocity variation is defined as degrees per second in euler angles.")
- }
- SecondColumnLayout {
- SpinBox {
- minimumValue: -9999999
- maximumValue: 9999999
- decimals: 2
- backendValue: backendValues.particleRotationVelocityVariation_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.particleRotationVelocityVariation_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.particleRotationVelocityVariation_z
- implicitWidth: StudioTheme.Values.singleControlColumnWidth
- + StudioTheme.Values.actionIndicatorWidth
- }
- Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
- ControlLabel {
- text: "Z"
- color: StudioTheme.Values.theme3DAxisZColor
- }
- ExpandingSpacer {}
- }
- }
- }
- }
- }
|