PassSection.qml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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("Pass")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Commands")
  13. tooltip: qsTr("Sets the render commands of the pass.")
  14. Layout.alignment: Qt.AlignTop
  15. Layout.topMargin: 5
  16. }
  17. SecondColumnLayout {
  18. EditableListView {
  19. backendValue: backendValues.commands
  20. model: backendValues.commands.expressionAsList
  21. Layout.fillWidth: true
  22. typeFilter: "QtQuick3D.Command"
  23. onAdd: function(value) { backendValues.commands.idListAdd(value) }
  24. onRemove: function(idx) { backendValues.commands.idListRemove(idx) }
  25. onReplace: function (idx, value) { backendValues.commands.idListReplace(idx, value) }
  26. }
  27. ExpandingSpacer {}
  28. }
  29. PropertyLabel {
  30. text: qsTr("Buffer")
  31. tooltip: qsTr("Sets the output buffer for the pass.")
  32. }
  33. SecondColumnLayout {
  34. ItemFilterComboBox {
  35. typeFilter: "QtQuick3D.Buffer"
  36. backendValue: backendValues.output
  37. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  38. + StudioTheme.Values.actionIndicatorWidth
  39. }
  40. ExpandingSpacer {}
  41. }
  42. PropertyLabel {
  43. text: qsTr("Shaders")
  44. tooltip: qsTr("Sets the shaders for the pass.")
  45. Layout.alignment: Qt.AlignTop
  46. Layout.topMargin: 5
  47. }
  48. SecondColumnLayout {
  49. EditableListView {
  50. backendValue: backendValues.shaders
  51. model: backendValues.shaders.expressionAsList
  52. Layout.fillWidth: true
  53. typeFilter: "QtQuick3D.Shader"
  54. onAdd: function(value) { backendValues.shaders.idListAdd(value) }
  55. onRemove: function(idx) { backendValues.shaders.idListRemove(idx) }
  56. onReplace: function (idx, value) { backendValues.shaders.idListReplace(idx, value) }
  57. }
  58. ExpandingSpacer {}
  59. }
  60. }
  61. }