From 5c6de69e0ef556f71fb3500591fd90a4a8490246 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Fri, 12 May 2023 12:22:39 +0200 Subject: [PATCH] Hide `FallOffExponent` when light is using inverse squared falloff #1094 --- Source/Engine/Level/Actors/PointLight.h | 5 ++--- Source/Engine/Level/Actors/SpotLight.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/Engine/Level/Actors/PointLight.h b/Source/Engine/Level/Actors/PointLight.h index 43f0e7d06..d3e170a03 100644 --- a/Source/Engine/Level/Actors/PointLight.h +++ b/Source/Engine/Level/Actors/PointLight.h @@ -33,7 +33,7 @@ public: /// /// Controls the radial falloff of light when UseInverseSquaredFalloff is disabled. /// - API_FIELD(Attributes="EditorOrder(13), DefaultValue(8.0f), EditorDisplay(\"Light\"), Limit(2, 16, 0.01f)") + API_FIELD(Attributes="EditorOrder(13), DefaultValue(8.0f), EditorDisplay(\"Light\"), Limit(2, 16, 0.01f), VisibleIf(nameof(UseInverseSquaredFalloff), true)") float FallOffExponent = 8.0f; /// @@ -62,9 +62,8 @@ public: public: /// - /// Computes light brightness value + /// Computes light brightness value. /// - /// Brightness float ComputeBrightness() const; /// diff --git a/Source/Engine/Level/Actors/SpotLight.h b/Source/Engine/Level/Actors/SpotLight.h index 547a54e3c..6bb0daf8d 100644 --- a/Source/Engine/Level/Actors/SpotLight.h +++ b/Source/Engine/Level/Actors/SpotLight.h @@ -32,7 +32,7 @@ public: /// /// Controls the radial falloff of light when UseInverseSquaredFalloff is disabled. /// - API_FIELD(Attributes="EditorOrder(13), DefaultValue(8.0f), EditorDisplay(\"Light\"), Limit(2, 16, 0.01f)") + API_FIELD(Attributes="EditorOrder(13), DefaultValue(8.0f), EditorDisplay(\"Light\"), Limit(2, 16, 0.01f), VisibleIf(nameof(UseInverseSquaredFalloff), true)") float FallOffExponent = 8.0f; ///