SpriteParticle3DSection.qml 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. // Copyright (C) 2021 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
  3. import QtQuick 2.15
  4. import QtQuick.Layouts 1.15
  5. import HelperWidgets 2.0
  6. import StudioTheme 1.0 as StudioTheme
  7. Section {
  8. caption: qsTr("Sprite Particle")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Blend Mode")
  13. tooltip: qsTr("Sets the blending mode used for rendering the particles.")
  14. }
  15. SecondColumnLayout {
  16. ComboBox {
  17. scope: "SpriteParticle3D"
  18. model: ["SourceOver", "Screen", "Multiply"]
  19. backendValue: backendValues.blendMode
  20. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  21. + StudioTheme.Values.actionIndicatorWidth
  22. }
  23. ExpandingSpacer {}
  24. }
  25. PropertyLabel {
  26. text: qsTr("Casts Reflections")
  27. tooltip: qsTr("Enables reflection probes to reflect sprite particles.")
  28. }
  29. SecondColumnLayout {
  30. CheckBox {
  31. id: castsReflectionsCheckBox
  32. text: backendValues.castsReflections.valueToString
  33. backendValue: backendValues.castsReflections
  34. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  35. + StudioTheme.Values.actionIndicatorWidth
  36. }
  37. ExpandingSpacer {}
  38. }
  39. PropertyLabel {
  40. text: qsTr("Sprite")
  41. tooltip: qsTr("Sets the Texture used for the particles.")
  42. }
  43. SecondColumnLayout {
  44. ItemFilterComboBox {
  45. typeFilter: "QtQuick3D.Texture"
  46. backendValue: backendValues.sprite
  47. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  48. + StudioTheme.Values.actionIndicatorWidth
  49. }
  50. ExpandingSpacer {}
  51. }
  52. PropertyLabel {
  53. text: qsTr("Sprite Sequence")
  54. tooltip: qsTr("Sets the sprite sequence properties for the particle.")
  55. }
  56. SecondColumnLayout {
  57. ItemFilterComboBox {
  58. typeFilter: "QtQuick3D.Particles3D.SpriteSequence3D"
  59. backendValue: backendValues.spriteSequence
  60. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  61. + StudioTheme.Values.actionIndicatorWidth
  62. }
  63. ExpandingSpacer {}
  64. }
  65. PropertyLabel {
  66. text: qsTr("Billboard")
  67. tooltip: qsTr("Sets if the particle texture should always be aligned face towards the screen.")
  68. }
  69. SecondColumnLayout {
  70. CheckBox {
  71. id: billboardCheckBox
  72. text: backendValues.billboard.valueToString
  73. backendValue: backendValues.billboard
  74. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  75. + StudioTheme.Values.actionIndicatorWidth
  76. }
  77. ExpandingSpacer {}
  78. }
  79. PropertyLabel {
  80. text: qsTr("Particle Scale")
  81. tooltip: qsTr("Sets the scale multiplier of the particles.")
  82. }
  83. SecondColumnLayout {
  84. SpinBox {
  85. minimumValue: -999999
  86. maximumValue: 999999
  87. decimals: 2
  88. backendValue: backendValues.particleScale
  89. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  90. + StudioTheme.Values.actionIndicatorWidth
  91. }
  92. ExpandingSpacer {}
  93. }
  94. PropertyLabel {
  95. text: qsTr("Color Table")
  96. tooltip: qsTr("Sets the Texture used for coloring the particles.")
  97. }
  98. SecondColumnLayout {
  99. ItemFilterComboBox {
  100. typeFilter: "QtQuick3D.Texture"
  101. backendValue: backendValues.colorTable
  102. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  103. + StudioTheme.Values.actionIndicatorWidth
  104. }
  105. ExpandingSpacer {}
  106. }
  107. PropertyLabel {
  108. text: qsTr("Lights")
  109. tooltip: qsTr("Sets the lights used for the particles.")
  110. Layout.alignment: Qt.AlignTop
  111. Layout.topMargin: 5
  112. }
  113. SecondColumnLayout {
  114. EditableListView {
  115. backendValue: backendValues.lights
  116. model: backendValues.lights.expressionAsList
  117. Layout.fillWidth: true
  118. typeFilter: "QtQuick3D.Light"
  119. onAdd: function(value) { backendValues.lights.idListAdd(value) }
  120. onRemove: function(idx) { backendValues.lights.idListRemove(idx) }
  121. onReplace: function (idx, value) { backendValues.lights.idListReplace(idx, value) }
  122. }
  123. ExpandingSpacer {}
  124. }
  125. PropertyLabel {
  126. text: qsTr("Offset")
  127. }
  128. SecondColumnLayout {
  129. SpinBox {
  130. maximumValue: 999999
  131. minimumValue: -999999
  132. decimals: 2
  133. stepSize: 0.1
  134. backendValue: backendValues.offsetX
  135. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  136. + StudioTheme.Values.actionIndicatorWidth
  137. }
  138. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  139. ControlLabel {
  140. text: "X"
  141. tooltip: qsTr("Offsets the X coordinate.")
  142. }
  143. Spacer { implicitWidth: StudioTheme.Values.controlGap }
  144. SpinBox {
  145. maximumValue: 999999
  146. minimumValue: -999999
  147. decimals: 2
  148. stepSize: 0.1
  149. backendValue: backendValues.offsetY
  150. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  151. + StudioTheme.Values.actionIndicatorWidth
  152. }
  153. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  154. ControlLabel {
  155. text: "Y"
  156. tooltip: qsTr("Offsets the Y coordinate.")
  157. }
  158. ExpandingSpacer {}
  159. }
  160. }
  161. }