AbstractLightSection.qml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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. Column {
  8. width: parent.width
  9. Section {
  10. caption: qsTr("Light")
  11. width: parent.width
  12. SectionLayout {
  13. PropertyLabel {
  14. text: qsTr("Color")
  15. tooltip: qsTr("Sets the color applied to models illuminated by this light.")
  16. }
  17. ColorEditor {
  18. backendValue: backendValues.color
  19. supportGradient: false
  20. }
  21. PropertyLabel {
  22. text: qsTr("Ambient Color")
  23. tooltip: qsTr("Sets the ambient color applied to materials before being lit by this light.")
  24. }
  25. ColorEditor {
  26. backendValue: backendValues.ambientColor
  27. supportGradient: false
  28. }
  29. PropertyLabel {
  30. text: qsTr("Brightness")
  31. tooltip: qsTr("Sets an overall multiplier for this light’s effects.")
  32. }
  33. SecondColumnLayout {
  34. SpinBox {
  35. minimumValue: 0
  36. maximumValue: 9999999
  37. decimals: 2
  38. stepSize: 0.01
  39. backendValue: backendValues.brightness
  40. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  41. + StudioTheme.Values.actionIndicatorWidth
  42. }
  43. ExpandingSpacer {}
  44. }
  45. PropertyLabel {
  46. text: qsTr("Scope")
  47. tooltip: qsTr("Sets a Node in the scene to be the scope of this light. Only that node and it's children are affected by this light.")
  48. }
  49. SecondColumnLayout {
  50. ItemFilterComboBox {
  51. typeFilter: "QtQuick3D.Node"
  52. backendValue: backendValues.scope
  53. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  54. + StudioTheme.Values.actionIndicatorWidth
  55. }
  56. ExpandingSpacer {}
  57. }
  58. PropertyLabel {
  59. text: qsTr("Bake Mode")
  60. tooltip: qsTr("Controls if the light is active in baked lighting, such as when generating lightmaps.")
  61. }
  62. SecondColumnLayout {
  63. ComboBox {
  64. scope: "Light"
  65. model: ["BakeModeDisabled", "BakeModeIndirect", "BakeModeAll"]
  66. backendValue: backendValues.bakeMode
  67. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  68. + StudioTheme.Values.actionIndicatorWidth
  69. }
  70. ExpandingSpacer {}
  71. }
  72. }
  73. }
  74. ShadowSection {
  75. width: parent.width
  76. }
  77. NodeSection {
  78. width: parent.width
  79. }
  80. }