InstancingSection.qml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. // Copyright (C) 2023 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("Instancing")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Depth Sorting")
  13. tooltip: qsTr("Enable depth sorting for instanced objects.")
  14. }
  15. SecondColumnLayout {
  16. CheckBox {
  17. text: backendValues.depthSortingEnabled.valueToString
  18. backendValue: backendValues.depthSortingEnabled
  19. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  20. + StudioTheme.Values.actionIndicatorWidth
  21. }
  22. ExpandingSpacer {}
  23. }
  24. PropertyLabel {
  25. text: qsTr("Has Transparency")
  26. tooltip: qsTr("Set this to true if the instancing table contains alpha values that should be used when rendering the model.")
  27. }
  28. SecondColumnLayout {
  29. CheckBox {
  30. text: backendValues.hasTransparency.valueToString
  31. backendValue: backendValues.hasTransparency
  32. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  33. + StudioTheme.Values.actionIndicatorWidth
  34. }
  35. ExpandingSpacer {}
  36. }
  37. PropertyLabel {
  38. text: qsTr("Instance Count")
  39. tooltip: qsTr("Sets a limit on the number of instances that can be rendered regardless of the number of instances in the instancing table.")
  40. }
  41. SecondColumnLayout {
  42. SpinBox {
  43. minimumValue: -1
  44. maximumValue: 9999999
  45. decimals: 0
  46. stepSize: 1
  47. backendValue: backendValues.instanceCountOverride
  48. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  49. + StudioTheme.Values.actionIndicatorWidth
  50. }
  51. ExpandingSpacer {}
  52. }
  53. }
  54. }