diff --git a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py index 59a07cf7bc..400349c5ee 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/atom_utils/atom_constants.py @@ -18,6 +18,12 @@ LIGHT_TYPES = { 'simple_spot': 7, } +# Attenuation Radius Mode options for the Light component. +ATTENUATION_RADIUS_MODE = { + 'automatic': 1, + 'explicit': 0, +} + class AtomComponentProperties: """ @@ -249,7 +255,14 @@ class AtomComponentProperties: def light(property: str = 'name') -> str: """ Light component properties. + - 'Attenuation Radius Mode' controls whether the attenuation radius is calculated automatically or explicitly. + - 'Color' the RGB value to set for the color of the light. + - 'Enable shadow' toggle for enabling shadows for the light. + - 'Enable shutters' toggle for enabling shutters for the light. + - 'Inner angle' inner angle value for the shutters (in degrees) + - 'Intensity' the intensity of the light in the set photometric unit (float with no ceiling). - 'Light type' from atom_constants.py LIGHT_TYPES + - 'Outer angle' outer angle value for the shutters (in degrees) :param property: From the last element of the property tree path. Default 'name' for component name string. :return: Full property path OR component name if no property specified. """ diff --git a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py index 03f842f9b4..a56c72e46c 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/tests/hydra_AtomGPU_AreaLightScreenshotTest.py @@ -78,7 +78,7 @@ def AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages(): from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.utils import Report, Tracer, TestHelper - from Atom.atom_utils.atom_constants import AtomComponentProperties, LIGHT_TYPES + from Atom.atom_utils.atom_constants import AtomComponentProperties, ATTENUATION_RADIUS_MODE, LIGHT_TYPES from Atom.atom_utils.atom_component_helper import ( initial_viewport_setup, create_basic_atom_rendering_scene, enter_exit_game_mode_take_screenshot) @@ -138,10 +138,12 @@ def AtomGPU_LightComponent_AreaLightScreenshotsMatchGoldenImages(): light_component.get_component_property_value(AtomComponentProperties.light('Intensity')) == 0.0) # 7. Set the Attenuation Radius Mode property of the Light component to 1 (automatic). - light_component.set_component_property_value(AtomComponentProperties.light('Attenuation Radius Mode'), 1) + light_component.set_component_property_value( + AtomComponentProperties.light('Attenuation Radius Mode'), ATTENUATION_RADIUS_MODE['automatic']) Report.result( Tests.light_component_attenuation_radius_property_set, - light_component.get_component_property_value(AtomComponentProperties.light('Attenuation Radius Mode')) == 1) + light_component.get_component_property_value( + AtomComponentProperties.light('Attenuation Radius Mode')) == ATTENUATION_RADIUS_MODE['automatic']) # 8. Enter game mode and take a screenshot then exit game mode. enter_exit_game_mode_take_screenshot("AreaLight_2.ppm", Tests.enter_game_mode, Tests.exit_game_mode)