Particle3DSection.qml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  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("Particle")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Max Amount")
  13. tooltip: qsTr("Sets the maximum amount of particles that can exist at the same time.")
  14. }
  15. SecondColumnLayout {
  16. SpinBox {
  17. minimumValue: 0
  18. maximumValue: 999999
  19. decimals: 0
  20. backendValue: backendValues.maxAmount
  21. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  22. + StudioTheme.Values.actionIndicatorWidth
  23. }
  24. ExpandingSpacer {}
  25. }
  26. PropertyLabel {
  27. text: qsTr("Color")
  28. tooltip: qsTr("Sets the base color that is used for colorizing the particles.")
  29. }
  30. ColorEditor {
  31. backendValue: backendValues.color
  32. supportGradient: false
  33. }
  34. PropertyLabel {
  35. text: qsTr("Color Variation")
  36. tooltip: qsTr("Sets the color variation that is used for colorizing the particles.")
  37. }
  38. SecondColumnLayout {
  39. SpinBox {
  40. minimumValue: 0
  41. maximumValue: 1
  42. decimals: 2
  43. stepSize: 0.01
  44. backendValue: backendValues.colorVariation_x
  45. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  46. + StudioTheme.Values.actionIndicatorWidth
  47. }
  48. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  49. ControlLabel {
  50. text: "X"
  51. color: StudioTheme.Values.theme3DAxisXColor
  52. }
  53. ExpandingSpacer {}
  54. }
  55. PropertyLabel {}
  56. SecondColumnLayout {
  57. SpinBox {
  58. minimumValue: 0
  59. maximumValue: 1
  60. decimals: 2
  61. stepSize: 0.01
  62. backendValue: backendValues.colorVariation_y
  63. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  64. + StudioTheme.Values.actionIndicatorWidth
  65. }
  66. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  67. ControlLabel {
  68. text: "Y"
  69. color: StudioTheme.Values.theme3DAxisYColor
  70. }
  71. ExpandingSpacer {}
  72. }
  73. PropertyLabel {}
  74. SecondColumnLayout {
  75. SpinBox {
  76. minimumValue: 0
  77. maximumValue: 1
  78. decimals: 2
  79. stepSize: 0.01
  80. backendValue: backendValues.colorVariation_z
  81. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  82. + StudioTheme.Values.actionIndicatorWidth
  83. }
  84. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  85. ControlLabel {
  86. text: "Z"
  87. color: StudioTheme.Values.theme3DAxisZColor
  88. }
  89. ExpandingSpacer {}
  90. }
  91. PropertyLabel {}
  92. SecondColumnLayout {
  93. SpinBox {
  94. minimumValue: -9999999
  95. maximumValue: 9999999
  96. decimals: 2
  97. backendValue: backendValues.colorVariation_w
  98. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  99. + StudioTheme.Values.actionIndicatorWidth
  100. }
  101. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  102. ControlLabel {
  103. text: "W"
  104. color: StudioTheme.Values.themeTextColor // TODO theme3DAxisWColor
  105. }
  106. ExpandingSpacer {}
  107. }
  108. PropertyLabel {
  109. text: qsTr("Unified Color Variation")
  110. tooltip: qsTr("Sets if the colorVariation should be applied uniformly for all the color channels.")
  111. }
  112. SecondColumnLayout {
  113. CheckBox {
  114. id: unifiedColorVariationCheckBox
  115. text: backendValues.unifiedColorVariation.valueToString
  116. backendValue: backendValues.unifiedColorVariation
  117. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  118. + StudioTheme.Values.actionIndicatorWidth
  119. }
  120. ExpandingSpacer {}
  121. }
  122. PropertyLabel {
  123. text: qsTr("Fade In Effect")
  124. tooltip: qsTr("Sets the fading effect used when the particles appear.")
  125. }
  126. SecondColumnLayout {
  127. ComboBox {
  128. scope: "Particle3D"
  129. model: ["FadeNone", "FadeOpacity", "FadeScale"]
  130. backendValue: backendValues.fadeInEffect
  131. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  132. + StudioTheme.Values.actionIndicatorWidth
  133. }
  134. ExpandingSpacer {}
  135. }
  136. PropertyLabel {
  137. text: qsTr("Fade Out Effect")
  138. tooltip: qsTr("Sets the fading effect used when the particles reach their lifeSpan and disappear.")
  139. }
  140. SecondColumnLayout {
  141. ComboBox {
  142. scope: "Particle3D"
  143. model: ["FadeNone", "FadeOpacity", "FadeScale"]
  144. backendValue: backendValues.fadeOutEffect
  145. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  146. + StudioTheme.Values.actionIndicatorWidth
  147. }
  148. ExpandingSpacer {}
  149. }
  150. PropertyLabel {
  151. text: qsTr("Fade In Duration")
  152. tooltip: qsTr("Sets the duration in milliseconds for the fading in effect.")
  153. }
  154. SecondColumnLayout {
  155. SpinBox {
  156. minimumValue: 0
  157. maximumValue: 999999
  158. decimals: 0
  159. backendValue: backendValues.fadeInDuration
  160. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  161. + StudioTheme.Values.actionIndicatorWidth
  162. }
  163. ExpandingSpacer {}
  164. }
  165. PropertyLabel {
  166. text: qsTr("Fade Out Duration")
  167. tooltip: qsTr("Sets the duration in milliseconds for the fading out effect.")
  168. }
  169. SecondColumnLayout {
  170. SpinBox {
  171. minimumValue: 0
  172. maximumValue: 999999
  173. decimals: 0
  174. backendValue: backendValues.fadeOutDuration
  175. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  176. + StudioTheme.Values.actionIndicatorWidth
  177. }
  178. ExpandingSpacer {}
  179. }
  180. PropertyLabel {
  181. text: qsTr("Align Mode")
  182. tooltip: qsTr("Sets the align mode used for the particles. Particle alignment means the direction that particles face.")
  183. }
  184. SecondColumnLayout {
  185. ComboBox {
  186. scope: "Particle3D"
  187. model: ["AlignNone", "AlignTowardsTarget", "AlignTowardsStartVelocity"]
  188. backendValue: backendValues.alignMode
  189. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  190. + StudioTheme.Values.actionIndicatorWidth
  191. }
  192. ExpandingSpacer {}
  193. }
  194. PropertyLabel {
  195. text: qsTr("Align Target Position")
  196. tooltip: qsTr("Sets the position particles are aligned to. This property has effect only when the alignMode is set to Particle3D.AlignTowardsTarget.")
  197. }
  198. SecondColumnLayout {
  199. SpinBox {
  200. minimumValue: -9999999
  201. maximumValue: 9999999
  202. decimals: 2
  203. backendValue: backendValues.alignTargetPosition_x
  204. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  205. + StudioTheme.Values.actionIndicatorWidth
  206. }
  207. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  208. ControlLabel {
  209. text: "X"
  210. color: StudioTheme.Values.theme3DAxisXColor
  211. }
  212. ExpandingSpacer {}
  213. }
  214. PropertyLabel {}
  215. SecondColumnLayout {
  216. SpinBox {
  217. minimumValue: -9999999
  218. maximumValue: 9999999
  219. decimals: 2
  220. backendValue: backendValues.alignTargetPosition_y
  221. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  222. + StudioTheme.Values.actionIndicatorWidth
  223. }
  224. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  225. ControlLabel {
  226. text: "Y"
  227. color: StudioTheme.Values.theme3DAxisYColor
  228. }
  229. ExpandingSpacer {}
  230. }
  231. PropertyLabel {}
  232. SecondColumnLayout {
  233. SpinBox {
  234. minimumValue: -9999999
  235. maximumValue: 9999999
  236. decimals: 2
  237. backendValue: backendValues.alignTargetPosition_z
  238. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  239. + StudioTheme.Values.actionIndicatorWidth
  240. }
  241. Spacer { implicitWidth: StudioTheme.Values.controlLabelGap }
  242. ControlLabel {
  243. text: "Z"
  244. color: StudioTheme.Values.theme3DAxisZColor
  245. }
  246. ExpandingSpacer {}
  247. }
  248. PropertyLabel {
  249. text: qsTr("Has Transparency")
  250. tooltip: qsTr("Sets if the particle has any transparency and should be blended with the background.")
  251. }
  252. SecondColumnLayout {
  253. CheckBox {
  254. id: hasTransparencyCheckBox
  255. text: backendValues.hasTransparency.valueToString
  256. backendValue: backendValues.hasTransparency
  257. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  258. + StudioTheme.Values.actionIndicatorWidth
  259. }
  260. ExpandingSpacer {}
  261. }
  262. PropertyLabel {
  263. text: qsTr("Sort Mode")
  264. tooltip: qsTr("Sets the sort mode used for the particles.")
  265. }
  266. SecondColumnLayout {
  267. ComboBox {
  268. scope: "Particle3D"
  269. model: ["SortNone", "SortNewest", "SortOldest", "SortDistance"]
  270. backendValue: backendValues.sortMode
  271. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  272. + StudioTheme.Values.actionIndicatorWidth
  273. }
  274. ExpandingSpacer {}
  275. }
  276. }
  277. }