Gradient Signal automation optimizations with TestAutomationBase/parallelization (#3316)

* GradientSignal automation optimizations with TestAutomationBase/parallelization
* Changing Gradient Signal test registration to use TestAutomationBase

Signed-off-by: jckand-amzn <jckand@amazon.com>
monroegm-disable-blank-issue-2
jckand-amzn 4 years ago committed by GitHub
parent 1a430755df
commit e67485b51f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -157,7 +157,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
NAME AutomatedTesting::GradientSignalTests_Periodic NAME AutomatedTesting::GradientSignalTests_Periodic
TEST_SERIAL TEST_SERIAL
TEST_SUITE periodic TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/gradient_signal PATH ${CMAKE_CURRENT_LIST_DIR}/gradient_signal/test_GradientSignal_Periodic.py
RUNTIME_DEPENDENCIES RUNTIME_DEPENDENCIES
AZ::AssetProcessor AZ::AssetProcessor
Legacy::Editor Legacy::Editor

@ -4,124 +4,118 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
def GradientGenerators_Incompatibilities():
import azlmbr.bus as bus """
import azlmbr.editor as editor Summary:
import azlmbr.entity as entity This test verifies that components are disabled when conflicting components are present on the same entity.
import azlmbr.paths
Expected Behavior:
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests')) Gradient Generator components are incompatible with Vegetation area components.
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper Test Steps:
1) Open a simple level
2) Create a new entity in the level
class TestGradientGeneratorIncompatibilities(EditorTestHelper): 3) Add each Gradient Generator component to an entity, and add a Vegetation Area component to the same entity
def __init__(self): 4) Verify that components are only enabled when entity is free of a conflicting component
EditorTestHelper.__init__(self, log_prefix="GradientGeneratorIncompatibilities", args=["level"])
Note:
def run_test(self): - This test file must be called from the Open 3D Engine Editor command terminal
""" - Any passed and failed tests are written to the Editor.log file.
Summary: Parsing the file or running a log_monitor are required to observe the test results.
This test verifies that components are disabled when conflicting components are present on the same entity.
:return: None
Expected Behavior: """
Gradient Generator components are incompatible with Vegetation area components.
import azlmbr.bus as bus
Test Steps: import azlmbr.editor as editor
1) Create a new level import azlmbr.entity as entity
2) Create a new entity in the level
3) Add each Gradient Generator component to an entity, and add a Vegetation Area component to the same entity import editor_python_test_tools.hydra_editor_utils as hydra
4) Verify that components are only enabled when entity is free of a conflicting component from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
Note:
- This test file must be called from the Open 3D Engine Editor command terminal gradient_generators = [
- Any passed and failed tests are written to the Editor.log file. 'Altitude Gradient',
Parsing the file or running a log_monitor are required to observe the test results. 'Constant Gradient',
'FastNoise Gradient',
:return: None 'Image Gradient',
""" 'Perlin Noise Gradient',
'Random Noise Gradient',
gradient_generators = [ 'Shape Falloff Gradient',
'Altitude Gradient', 'Slope Gradient',
'Constant Gradient', 'Surface Mask Gradient'
'FastNoise Gradient', ]
'Image Gradient', require_transform_modifiers = [
'Perlin Noise Gradient', 'FastNoise Gradient',
'Random Noise Gradient', 'Image Gradient',
'Shape Falloff Gradient', 'Perlin Noise Gradient',
'Slope Gradient', 'Random Noise Gradient'
'Surface Mask Gradient' ]
] vegetation_areas = [
require_transform_modifiers = [ 'Vegetation Layer Spawner',
'FastNoise Gradient', 'Vegetation Layer Blender',
'Image Gradient', 'Vegetation Layer Blocker',
'Perlin Noise Gradient', 'Vegetation Layer Blocker (Mesh)'
'Random Noise Gradient' ]
] area_dependencies = {
vegetation_areas = [ 'Vegetation Layer Spawner': 'Vegetation Asset List',
'Vegetation Layer Spawner', 'Vegetation Layer Blocker (Mesh)': 'Mesh'
'Vegetation Layer Blender', }
'Vegetation Layer Blocker',
'Vegetation Layer Blocker (Mesh)' # Open an existing simple level
] helper.init_idle()
area_dependencies = { helper.open_level("Physics", "Base")
'Vegetation Layer Spawner': 'Vegetation Asset List',
'Vegetation Layer Blocker (Mesh)': 'Mesh' # For every gradient generator component, verify that they are incompatible
} # which each vegetation area component
for component_name in gradient_generators:
# Create a new empty level for vegetation_area_name in vegetation_areas:
self.test_success = self.create_level( # Create a new Entity in the level
self.args["level"], entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
heightmap_resolution=1024,
heightmap_meters_per_pixel=1, # Most of these need a shape, so use a Box Shape
terrain_texture_resolution=4096, hydra.add_component('Box Shape', entity_id)
use_terrain=False,
) # Add the specific vegetation area dependencies (if necessary)
if vegetation_area_name in area_dependencies:
# For every gradient generator component, verify that they are incompatible hydra.add_component(area_dependencies[vegetation_area_name], entity_id)
# which each vegetation area component
for component_name in gradient_generators: # Add the vegetation area component we are validating against, then add the
for vegetation_area_name in vegetation_areas: # gradient generator afterwards, so that the gradient generator will actually
# Create a new Entity in the level # be disabled (if it was present before, it would only get deactivated instead of disabled
entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId()) # by the vegetation area)
area_component = hydra.add_component(vegetation_area_name, entity_id)
# Most of these need a shape, so use a Box Shape gradient_component = hydra.add_component(component_name, entity_id)
hydra.add_component('Box Shape', entity_id)
# Verify the gradient generator component is disabled since the vegetation area is incompatible
# Add the specific vegetation area dependencies (if necessary) active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
if vegetation_area_name in area_dependencies: component_is_disabled = (
hydra.add_component(area_dependencies[vegetation_area_name], entity_id) f"{component_name} is disabled before removing {vegetation_area_name} component",
f"{component_name} is unexpectedly enabled before removing {vegetation_area_name} component"
# Add the vegetation area component we are validating against, then add the )
# gradient generator afterwards, so that the gradient generator will actually Report.result(component_is_disabled, not active)
# be disabled (if it was present before, it would only get deactivated instead of disabled
# by the vegetation area) # Remove the vegetation area component
area_component = hydra.add_component(vegetation_area_name, entity_id) editor.EditorComponentAPIBus(bus.Broadcast, 'RemoveComponents', [area_component])
gradient_component = hydra.add_component(component_name, entity_id)
# Add required dependencies for our gradient generators after the vegetation
# Verify the gradient generator component is disabled since the vegetation area is incompatible # area has been removed, because the transform modifier is also incompatible
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component) # with the vegetation areas
self.test_success = self.test_success and not active if component_name in require_transform_modifiers:
if not active: hydra.add_component('Gradient Transform Modifier', entity_id)
self.log(f"{component_name} is disabled before removing {vegetation_area_name} component")
# Verify the gradient generator component is enabled now that the vegetation area is gone
# Remove the vegetation area component active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
editor.EditorComponentAPIBus(bus.Broadcast, 'RemoveComponents', [area_component]) component_is_enabled = (
f"{component_name} is enabled after removing {vegetation_area_name} component",
# Add required dependencies for our gradient generators after the vegetation f"{component_name} is unexpectedly disabled after removing {vegetation_area_name} component"
# area has been removed, because the transform modifier is also incompatible )
# with the vegetation areas Report.result(component_is_enabled, active)
if component_name in require_transform_modifiers:
hydra.add_component('Gradient Transform Modifier', entity_id)
if __name__ == "__main__":
# Verify the gradient generator component is enabled now that the vegetation area is gone
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component) from editor_python_test_tools.utils import Report
self.test_success = self.test_success and active Report.start_test(GradientGenerators_Incompatibilities)
if active:
self.log(f"{component_name} is enabled after removing {vegetation_area_name} component")
test = TestGradientGeneratorIncompatibilities()
test.run()

@ -4,164 +4,162 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.entity as entity
import azlmbr.paths
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests'))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class TestGradientModifiersIncompatibilities(EditorTestHelper):
def __init__(self):
EditorTestHelper.__init__(self, log_prefix="GradientModifiersIncompatibilities", args=["level"])
def run_test(self):
"""
Summary:
This test verifies that components are disabled when conflicting components are present on the same entity.
Expected Behavior:
Gradient Modifier components are incompatible with Vegetation area components.
Test Steps:
1) Create a new level
2) Create a new entity in the level
3) Add each Gradient Modifier component to an entity, and add a Vegetation Area component to the same entity
4) Verify that components are only enabled when entity is free of a conflicting component
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
gradient_generators = [
'Altitude Gradient',
'Constant Gradient',
'FastNoise Gradient',
'Image Gradient',
'Perlin Noise Gradient',
'Random Noise Gradient',
'Shape Falloff Gradient',
'Slope Gradient',
'Surface Mask Gradient'
]
require_transform_modifiers = [
'FastNoise Gradient',
'Image Gradient',
'Perlin Noise Gradient',
'Random Noise Gradient'
]
gradient_modifiers = [
'Dither Gradient Modifier',
'Gradient Mixer',
'Invert Gradient Modifier',
'Levels Gradient Modifier',
'Posterize Gradient Modifier',
'Smooth-Step Gradient Modifier',
'Threshold Gradient Modifier'
]
vegetation_areas = [
'Vegetation Layer Spawner',
'Vegetation Layer Blender',
'Vegetation Layer Blocker',
'Vegetation Layer Blocker (Mesh)'
]
area_dependencies = {
'Vegetation Layer Spawner': 'Vegetation Asset List',
'Vegetation Layer Blocker (Mesh)': 'Mesh'
}
# Create a new empty level
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=1024,
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096,
use_terrain=False,
)
# For every gradient modifier component, verify that they are incompatible
# which each vegetation area and gradient generator/modifier component
all_gradients = gradient_modifiers + gradient_generators
for component_name in gradient_modifiers:
for vegetation_area_name in vegetation_areas:
# Create a new Entity in the level
entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
# Most of these need a shape, so use a Box Shape
hydra.add_component('Box Shape', entity_id)
# Add the specific vegetation area dependencies (if necessary)
if vegetation_area_name in area_dependencies:
hydra.add_component(area_dependencies[vegetation_area_name], entity_id)
# Add the vegetation area component we are validating against, then add the
# gradient modifier afterwards, so that the gradient modifier will actually
# be disabled (if it was present before, it would only get deactivated instead of disabled
# by the vegetation area)
area_component = hydra.add_component(vegetation_area_name, entity_id)
gradient_component = hydra.add_component(component_name, entity_id)
# Verify the gradient modifier component is disabled since the vegetation area is incompatible
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
self.test_success = self.test_success and not active
if not active:
self.log("{gradient} is disabled before removing {vegetation_area} component".format(gradient=component_name, vegetation_area=vegetation_area_name))
# Remove the vegetation area component
editor.EditorComponentAPIBus(bus.Broadcast, 'RemoveComponents', [area_component])
# Verify the gradient modifier component is enabled now that the vegetation area is gone
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
self.test_success = self.test_success and active
if active:
self.log("{gradient} is enabled after removing {vegetation_area} component".format(gradient=component_name, vegetation_area=vegetation_area_name))
for gradient_name in all_gradients:
# Create a new Entity in the level
entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
# Most of these need a shape, so use a Box Shape
hydra.add_component('Box Shape', entity_id)
# Add the specific gradient generator dependencies (if necessary)
conflicting_components = []
if gradient_name in require_transform_modifiers:
component = hydra.add_component('Gradient Transform Modifier', entity_id)
conflicting_components.append(component)
# Add the gradient component we are validating against, then add the
# gradient modifier afterwards, so that the gradient modifier will actually
# be disabled (if it was present before, it would only get deactivated instead of disabled
# by the other gradient)
component = hydra.add_component(gradient_name, entity_id)
conflicting_components.append(component)
gradient_component = hydra.add_component(component_name, entity_id)
# Verify the gradient modifier component is disabled since the other gradient is incompatible
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
self.test_success = self.test_success and not active
if not active:
self.log("{gradient} is disabled before removing {conflicting_gradient} component".format(gradient=component_name, conflicting_gradient=gradient_name))
# Remove the conflicting gradient component (and transform modifier if it was added)
editor.EditorComponentAPIBus(bus.Broadcast, 'RemoveComponents', conflicting_components)
# Verify the gradient modifier component is enabled now that the other gradient is gone
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
self.test_success = self.test_success and active
if active:
self.log("{gradient} is enabled after removing {conflicting_gradient} component".format(gradient=component_name, conflicting_gradient=gradient_name))
def GradientModifiers_Incompatibilities():
"""
Summary:
This test verifies that components are disabled when conflicting components are present on the same entity.
Expected Behavior:
Gradient Modifier components are incompatible with Vegetation area components.
Test Steps:
1) Open a simple level
2) Create a new entity in the level
3) Add each Gradient Modifier component to an entity, and add a Vegetation Area component to the same entity
4) Verify that components are only enabled when entity is free of a conflicting component
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.entity as entity
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
gradient_generators = [
'Altitude Gradient',
'Constant Gradient',
'FastNoise Gradient',
'Image Gradient',
'Perlin Noise Gradient',
'Random Noise Gradient',
'Shape Falloff Gradient',
'Slope Gradient',
'Surface Mask Gradient'
]
require_transform_modifiers = [
'FastNoise Gradient',
'Image Gradient',
'Perlin Noise Gradient',
'Random Noise Gradient'
]
gradient_modifiers = [
'Dither Gradient Modifier',
'Gradient Mixer',
'Invert Gradient Modifier',
'Levels Gradient Modifier',
'Posterize Gradient Modifier',
'Smooth-Step Gradient Modifier',
'Threshold Gradient Modifier'
]
vegetation_areas = [
'Vegetation Layer Spawner',
'Vegetation Layer Blender',
'Vegetation Layer Blocker',
'Vegetation Layer Blocker (Mesh)'
]
area_dependencies = {
'Vegetation Layer Spawner': 'Vegetation Asset List',
'Vegetation Layer Blocker (Mesh)': 'Mesh'
}
# Open an existing simple level
helper.init_idle()
helper.open_level("Physics", "Base")
# For every gradient modifier component, verify that they are incompatible
# which each vegetation area and gradient generator/modifier component
all_gradients = gradient_modifiers + gradient_generators
for component_name in gradient_modifiers:
for vegetation_area_name in vegetation_areas:
# Create a new Entity in the level
entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
# Most of these need a shape, so use a Box Shape
hydra.add_component('Box Shape', entity_id)
# Add the specific vegetation area dependencies (if necessary)
if vegetation_area_name in area_dependencies:
hydra.add_component(area_dependencies[vegetation_area_name], entity_id)
# Add the vegetation area component we are validating against, then add the
# gradient modifier afterwards, so that the gradient modifier will actually
# be disabled (if it was present before, it would only get deactivated instead of disabled
# by the vegetation area)
area_component = hydra.add_component(vegetation_area_name, entity_id)
gradient_component = hydra.add_component(component_name, entity_id)
# Verify the gradient modifier component is disabled since the vegetation area is incompatible
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
component_is_disabled = (
f"{component_name} is disabled before removing {vegetation_area_name} component",
f"{component_name} is unexpectedly enabled before removing {vegetation_area_name} component"
)
Report.result(component_is_disabled, not active)
# Remove the vegetation area component
editor.EditorComponentAPIBus(bus.Broadcast, 'RemoveComponents', [area_component])
# Verify the gradient modifier component is enabled now that the vegetation area is gone
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
component_is_enabled = (
f"{component_name} is enabled after removing {vegetation_area_name} component",
f"{component_name} is unexpectedly disabled after removing {vegetation_area_name} component"
)
Report.result(component_is_enabled, active)
for gradient_name in all_gradients:
# Create a new Entity in the level
entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
# Most of these need a shape, so use a Box Shape
hydra.add_component('Box Shape', entity_id)
# Add the specific gradient generator dependencies (if necessary)
conflicting_components = []
if gradient_name in require_transform_modifiers:
component = hydra.add_component('Gradient Transform Modifier', entity_id)
conflicting_components.append(component)
test = TestGradientModifiersIncompatibilities() # Add the gradient component we are validating against, then add the
test.run() # gradient modifier afterwards, so that the gradient modifier will actually
# be disabled (if it was present before, it would only get deactivated instead of disabled
# by the other gradient)
component = hydra.add_component(gradient_name, entity_id)
conflicting_components.append(component)
gradient_component = hydra.add_component(component_name, entity_id)
# Verify the gradient modifier component is disabled since the other gradient is incompatible
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
component_is_disabled = (
f"{component_name} is disabled before removing {gradient_name} component",
f"{component_name} is unexpectedly enabled before removing {gradient_name} component"
)
Report.result(component_is_disabled, not active)
# Remove the conflicting gradient component (and transform modifier if it was added)
editor.EditorComponentAPIBus(bus.Broadcast, 'RemoveComponents', conflicting_components)
# Verify the gradient modifier component is enabled now that the other gradient is gone
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_component)
component_is_enabled = (
f"{component_name} is enabled after removing {gradient_name} component",
f"{component_name} is unexpectedly disabled after removing {gradient_name} component"
)
Report.result(component_is_enabled, active)
if __name__ == "__main__":
from editor_python_test_tools.utils import Report
Report.start_test(GradientModifiers_Incompatibilities)

@ -5,129 +5,125 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.math as math
import azlmbr.paths
import azlmbr.entity as EntityId
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests'))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class TestGradientPreviewSettings(EditorTestHelper):
def __init__(self):
EditorTestHelper.__init__(self, log_prefix="GradientPreviewSettings_ClearPinnedEntity", args=["level"])
def run_test(self):
"""
Summary:
A temporary level is created. An entity for each test case is created and added with the corresponding
components to verify if the gradient transform is set to the world origin.
Expected Behavior:
1) Preview image updates to reflect change in transform of the gradient sampler.
2) New Preview Position property is exposed, and set to 0,0,0 (world origin).
3) Preview Size is set to 1,1,1 by default.
Test Steps:
1) Open level
2) Create entity with Random Noise gradient and verify gradient position after clearing pinned entity
3) Create entity with Levels Gradient Modifier and verify gradient position after clearing pinned entity
4) Create entity with Posterize Gradient Modifier and verify gradient position after clearing pinned entity
5) Create entity with Smooth-Step Gradient Modifier and verify gradient position after clearing pinned entity
6) Create entity with Threshold Gradient Modifier and verify gradient position after clearing pinned entity
7) Create entity with FastNoise Gradient and verify gradient position after clearing pinned entity
8) Create entity with Dither Gradient Modifier and verify gradient position after clearing pinned entity
9) Create entity with Invert Gradient Modifier and verify gradient position after clearing pinned entity
10) Create entity with Perlin Noise Gradient and verify gradient position after clearing pinned entity
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
WORLD_ORIGIN = math.Vector3(0.0, 0.0, 0.0)
EXPECTED_SIZE = math.Vector3(1.0, 1.0, 1.0)
CLOSE_THRESHOLD = sys.float_info.min
def create_entity(enity_name, components_to_add):
entity_position = math.Vector3(125.0, 136.0, 32.0)
entity_id = editor.ToolsApplicationRequestBus(
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId()
)
entity = hydra.Entity(enity_name, entity_id)
if entity_id.IsValid():
print(f"{enity_name} entity Created")
entity.components = []
for component in components_to_add:
entity.components.append(hydra.add_component(component, entity_id))
return entity
def clear_entityid_check_position(entity_name, components_to_add, check_preview_size=False):
entity = create_entity(entity_name, components_to_add)
hydra.get_set_test(entity, 0, "Preview Settings|Pin Preview to Shape", EntityId.EntityId())
preview_position = hydra.get_component_property_value(
entity.components[0], "Preview Settings|Preview Position"
)
if preview_position.IsClose(WORLD_ORIGIN, CLOSE_THRESHOLD):
print(f"{entity_name} --- Preview Position set to world origin")
if check_preview_size:
preview_size = hydra.get_component_property_value(entity.components[0], "Preview Settings|Preview Size")
if preview_size.IsClose(EXPECTED_SIZE, CLOSE_THRESHOLD):
print(f"{entity_name} --- Preview Size set to (1, 1, 1)")
return entity
# 1) Open level
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=1024,
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096,
use_terrain=False,
)
# 2) Create entity with Random Noise gradient and verify gradient position after clearing pinned entity def GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin():
clear_entityid_check_position( """
"Random Noise Gradient", ["Random Noise Gradient", "Gradient Transform Modifier", "Box Shape"], True Summary:
A temporary level is created. An entity for each test case is created and added with the corresponding
components to verify if the gradient transform is set to the world origin.
Expected Behavior:
1) Preview image updates to reflect change in transform of the gradient sampler.
2) New Preview Position property is exposed, and set to 0,0,0 (world origin).
3) Preview Size is set to 1,1,1 by default.
Test Steps:
1) Open level
2) Create entity with Random Noise gradient and verify gradient position after clearing pinned entity
3) Create entity with Levels Gradient Modifier and verify gradient position after clearing pinned entity
4) Create entity with Posterize Gradient Modifier and verify gradient position after clearing pinned entity
5) Create entity with Smooth-Step Gradient Modifier and verify gradient position after clearing pinned entity
6) Create entity with Threshold Gradient Modifier and verify gradient position after clearing pinned entity
7) Create entity with FastNoise Gradient and verify gradient position after clearing pinned entity
8) Create entity with Dither Gradient Modifier and verify gradient position after clearing pinned entity
9) Create entity with Invert Gradient Modifier and verify gradient position after clearing pinned entity
10) Create entity with Perlin Noise Gradient and verify gradient position after clearing pinned entity
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
import sys
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.math as math
import azlmbr.entity as EntityId
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
WORLD_ORIGIN = math.Vector3(0.0, 0.0, 0.0)
EXPECTED_SIZE = math.Vector3(1.0, 1.0, 1.0)
CLOSE_THRESHOLD = sys.float_info.min
def create_entity(entity_name, components_to_add):
entity_position = math.Vector3(125.0, 136.0, 32.0)
entity_id = editor.ToolsApplicationRequestBus(
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId()
) )
entity = hydra.Entity(entity_name, entity_id)
if entity_id.IsValid():
print(f"{entity_name} entity Created")
entity.components = []
for component in components_to_add:
entity.components.append(hydra.add_component(component, entity_id))
return entity
def clear_entityid_check_position(entity_name, components_to_add, check_preview_size=False):
entity = create_entity(entity_name, components_to_add)
hydra.get_set_test(entity, 0, "Preview Settings|Pin Preview to Shape", EntityId.EntityId())
preview_position = hydra.get_component_property_value(
entity.components[0], "Preview Settings|Preview Position"
)
preview_set_to_origin = (
f"{entity_name}: Preview Position set to world origin",
f"{entity_name}: Preview Position set to unexpected coords"
)
Report.result(preview_set_to_origin, preview_position.IsClose(WORLD_ORIGIN, CLOSE_THRESHOLD))
if check_preview_size:
preview_size = hydra.get_component_property_value(entity.components[0], "Preview Settings|Preview Size")
preview_size_default_set = (
f"{entity_name}: Preview Size set as expected",
f"{entity_name}: Preview Size set to unexpected value. Expected {EXPECTED_SIZE}, Found {preview_size}"
)
Report.result(preview_size_default_set, preview_size.IsClose(EXPECTED_SIZE, CLOSE_THRESHOLD))
return entity
# 3) Create entity with Levels Gradient Modifier and verify gradient position after clearing pinned entity # 1) Open an existing simple level
clear_entityid_check_position("Levels Gradient Modifier", ["Levels Gradient Modifier"]) helper.init_idle()
helper.open_level("Physics", "Base")
# 4) Create entity with Posterize Gradient Modifier and verify gradient position after clearing pinned entity # 2) Create entity with Random Noise gradient and verify gradient position after clearing pinned entity
clear_entityid_check_position("Posterize Gradient Modifier", ["Posterize Gradient Modifier"]) clear_entityid_check_position(
"Random Noise Gradient", ["Random Noise Gradient", "Gradient Transform Modifier", "Box Shape"], True
)
# 5) Create entity with Smooth-Step Gradient Modifier and verify gradient position after clearing pinned entity # 3) Create entity with Levels Gradient Modifier and verify gradient position after clearing pinned entity
clear_entityid_check_position("Smooth-Step Gradient Modifier", ["Smooth-Step Gradient Modifier"]) clear_entityid_check_position("Levels Gradient Modifier", ["Levels Gradient Modifier"])
# 6) Create entity with Threshold Gradient Modifier and verify gradient position after clearing pinned entity # 4) Create entity with Posterize Gradient Modifier and verify gradient position after clearing pinned entity
clear_entityid_check_position("Threshold Gradient Modifier", ["Threshold Gradient Modifier"]) clear_entityid_check_position("Posterize Gradient Modifier", ["Posterize Gradient Modifier"])
# 7) Create entity with FastNoise Gradient and verify gradient position after clearing pinned entity # 5) Create entity with Smooth-Step Gradient Modifier and verify gradient position after clearing pinned entity
clear_entityid_check_position( clear_entityid_check_position("Smooth-Step Gradient Modifier", ["Smooth-Step Gradient Modifier"])
"FastNoise Gradient", ["FastNoise Gradient", "Gradient Transform Modifier", "Box Shape"], True
)
# 8) Create entity with Dither Gradient Modifier and verify gradient position after clearing pinned entity # 6) Create entity with Threshold Gradient Modifier and verify gradient position after clearing pinned entity
clear_entityid_check_position("Dither Gradient Modifier", ["Dither Gradient Modifier"], True) clear_entityid_check_position("Threshold Gradient Modifier", ["Threshold Gradient Modifier"])
# 9) Create entity with Invert Gradient Modifier and verify gradient position after clearing pinned entity # 7) Create entity with FastNoise Gradient and verify gradient position after clearing pinned entity
clear_entityid_check_position("Invert Gradient Modifier", ["Invert Gradient Modifier"]) clear_entityid_check_position(
"FastNoise Gradient", ["FastNoise Gradient", "Gradient Transform Modifier", "Box Shape"], True
)
# 8) Create entity with Dither Gradient Modifier and verify gradient position after clearing pinned entity
clear_entityid_check_position("Dither Gradient Modifier", ["Dither Gradient Modifier"], True)
# 9) Create entity with Invert Gradient Modifier and verify gradient position after clearing pinned entity
clear_entityid_check_position("Invert Gradient Modifier", ["Invert Gradient Modifier"])
# 10) Create entity with Perlin Noise Gradient and verify gradient position after clearing pinned entity
clear_entityid_check_position(
"Perlin Noise Gradient", ["Perlin Noise Gradient", "Gradient Transform Modifier", "Box Shape"], True
)
# 10) Create entity with Perlin Noise Gradient and verify gradient position after clearing pinned entity
clear_entityid_check_position(
"Perlin Noise Gradient", ["Perlin Noise Gradient", "Gradient Transform Modifier", "Box Shape"], True
)
if __name__ == "__main__":
test = TestGradientPreviewSettings() from editor_python_test_tools.utils import Report
test.run() Report.start_test(GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin)

@ -5,18 +5,6 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.entity as entity
import azlmbr.paths
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests'))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class Scoped: class Scoped:
def __init__(self, constructor, destructor, *args): def __init__(self, constructor, destructor, *args):
@ -33,81 +21,84 @@ class TestParams:
self.accessed_component = accessed_component self.accessed_component = accessed_component
class TestGradientPreviewSettings(EditorTestHelper): def GradientPreviewSettings_DefaultPinnedEntityIsSelf():
def __init__(self): """
EditorTestHelper.__init__(self, log_prefix="GradientPreviewSettings_DefaultPinnedEntity", args=["level"]) Summary:
This test verifies default values for the pinned entity for Gradient Preview settings.
def run_test(self):
""" Expected Behavior:
Summary: Pinned entity is self for all gradient generator/modifiers.
This test verifies default values for the pinned entity for Gradient Preview settings.
Expected Behavior:
Pinned entity is self for all gradient generator/modifiers.
Test Steps:
1) Create a new level
2) Create a new entity in the level
3) Add each Gradient Generator component to an entity, and verify the Pin Preview to Shape property is set to
self
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
def execute_test(test_id, function, *args):
if function(*args):
self.log(test_id + ' has Preview pinned to own Entity result: SUCCESS')
def create_entity():
return editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
def delete_entity(entity_id):
editor.ToolsApplicationRequestBus(bus.Broadcast, 'DeleteEntityAndAllDescendants', entity_id)
def attach_components(component_list, entity_id):
components = []
for i in component_list:
components.append(hydra.add_component(i, entity_id))
return components
def validate_id_is_current(param):
entity_ptr = Scoped(create_entity, delete_entity)
added_components = attach_components(param.required_components, entity_ptr.data)
value = hydra.get_component_property_value(added_components[param.accessed_component],
'Preview Settings|Pin Preview to Shape')
self.test_success = self.test_success and entity_ptr.data.Equal(value)
return entity_ptr.data.Equal(value)
param_list = [
TestParams(['Gradient Transform Modifier', 'Box Shape', 'Perlin Noise Gradient'], 2),
TestParams(['Random Noise Gradient', 'Gradient Transform Modifier', 'Box Shape'], 0),
TestParams(['FastNoise Gradient', 'Gradient Transform Modifier', 'Box Shape'], 0),
TestParams(['Dither Gradient Modifier'], 0),
TestParams(['Invert Gradient Modifier'], 0),
TestParams(['Levels Gradient Modifier'], 0),
TestParams(['Posterize Gradient Modifier'], 0),
TestParams(['Smooth-Step Gradient Modifier'], 0),
TestParams(['Threshold Gradient Modifier'], 0)
]
# Create a new empty level
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=1024,
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096,
use_terrain=False,
)
for param in param_list: Test Steps:
execute_test(param.required_components[param.accessed_component], 1) Open a simple level
validate_id_is_current, param) 2) Create a new entity in the level
3) Add each Gradient Generator component to an entity, and verify the Pin Preview to Shape property is set to
self
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
test = TestGradientPreviewSettings() :return: None
test.run() """
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.entity as entity
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
def execute_test(test_id, function, *args):
pinned_to_self = (
f"{test_id} has Preview pinned to self",
f"{test_id} has Preview pinned to a different entity"
)
Report.result(pinned_to_self, function(*args))
def create_entity():
return editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
def delete_entity(entity_id):
editor.ToolsApplicationRequestBus(bus.Broadcast, 'DeleteEntityAndAllDescendants', entity_id)
def attach_components(component_list, entity_id):
components = []
for i in component_list:
components.append(hydra.add_component(i, entity_id))
return components
def validate_id_is_current(param):
entity_ptr = Scoped(create_entity, delete_entity)
added_components = attach_components(param.required_components, entity_ptr.data)
value = hydra.get_component_property_value(added_components[param.accessed_component],
'Preview Settings|Pin Preview to Shape')
return entity_ptr.data.Equal(value)
param_list = [
TestParams(['Gradient Transform Modifier', 'Box Shape', 'Perlin Noise Gradient'], 2),
TestParams(['Random Noise Gradient', 'Gradient Transform Modifier', 'Box Shape'], 0),
TestParams(['FastNoise Gradient', 'Gradient Transform Modifier', 'Box Shape'], 0),
TestParams(['Dither Gradient Modifier'], 0),
TestParams(['Invert Gradient Modifier'], 0),
TestParams(['Levels Gradient Modifier'], 0),
TestParams(['Posterize Gradient Modifier'], 0),
TestParams(['Smooth-Step Gradient Modifier'], 0),
TestParams(['Threshold Gradient Modifier'], 0)
]
# 1) Open an existing simple level
helper.init_idle()
helper.open_level("Physics", "Base")
for param in param_list:
execute_test(param.required_components[param.accessed_component],
validate_id_is_current, param)
if __name__ == "__main__":
from editor_python_test_tools.utils import Report
Report.start_test(GradientPreviewSettings_DefaultPinnedEntityIsSelf)

@ -5,92 +5,82 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import azlmbr.math as math
import azlmbr.paths
import azlmbr.entity as EntityId
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests'))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class TestGradientSampling(EditorTestHelper):
def __init__(self):
EditorTestHelper.__init__(self, log_prefix="GradientSampling_GradientReferences", args=["level"])
def run_test(self):
"""
Summary:
An existing gradient generator can be pinned and cleared to/from the Gradient Entity Id field
Expected Behavior:
Gradient generator is assigned to the Gradient Entity Id field.
Gradient generator is removed from the field.
Test Steps:
1) Open level
2) Create a new entity with components "Random Noise Gradient", "Gradient Transform Modifier" and "Box Shape"
3) Create a new entity with Gradient Modifier's, pin and clear the random noise entity id to the Gradient Id
field in Gradient Modifier
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
def modifier_pin_clear_to_gradiententityid(modifier):
entity_position = math.Vector3(125.0, 136.0, 32.0)
component_to_add = [modifier]
gradient_modifier = hydra.Entity(modifier)
gradient_modifier.create_entity(entity_position, component_to_add)
gradient_modifier.get_set_test(0, "Configuration|Gradient|Gradient Entity Id", random_noise.id)
entity = hydra.get_component_property_value(
gradient_modifier.components[0], "Configuration|Gradient|Gradient Entity Id"
)
if entity.Equal(random_noise.id):
print(f"Gradient Generator is pinned to the {modifier} successfully")
else:
print(f"Failed to pin Gradient Generator to the {modifier}")
hydra.get_set_test(gradient_modifier, 0, "Configuration|Gradient|Gradient Entity Id", EntityId.EntityId())
entity = hydra.get_component_property_value(
gradient_modifier.components[0], "Configuration|Gradient|Gradient Entity Id"
)
if entity.Equal(EntityId.EntityId()):
print(f"Gradient Generator is cleared from the {modifier} successfully")
else:
print(f"Failed to clear Gradient Generator from the {modifier}")
# 1) Open level
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=1024,
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096,
use_terrain=False,
)
# 2) Create a new entity with components "Random Noise Gradient", "Gradient Transform Modifier" and "Box Shape" def GradientSampling_GradientReferencesAddRemoveSuccessfully():
"""
Summary:
An existing gradient generator can be pinned and cleared to/from the Gradient Entity Id field
Expected Behavior:
Gradient generator is assigned to the Gradient Entity Id field.
Gradient generator is removed from the field.
Test Steps:
1) Open level
2) Create a new entity with components "Random Noise Gradient", "Gradient Transform Modifier" and "Box Shape"
3) Create a new entity with Gradient Modifier's, pin and clear the random noise entity id to the Gradient Id
field in Gradient Modifier
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
import azlmbr.math as math
import azlmbr.entity as EntityId
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
def modifier_pin_clear_to_gradiententityid(modifier):
entity_position = math.Vector3(125.0, 136.0, 32.0) entity_position = math.Vector3(125.0, 136.0, 32.0)
components_to_add = ["Random Noise Gradient", "Gradient Transform Modifier", "Box Shape"] component_to_add = [modifier]
random_noise = hydra.Entity("Random_Noise") gradient_modifier = hydra.Entity(modifier)
random_noise.create_entity(entity_position, components_to_add) gradient_modifier.create_entity(entity_position, component_to_add)
gradient_modifier.get_set_test(0, "Configuration|Gradient|Gradient Entity Id", random_noise.id)
# 3) Create a new entity with Gradient Modifier's, pin and clear the random noise entity id to the Gradient Id entity = hydra.get_component_property_value(
# field in Gradient Modifier gradient_modifier.components[0], "Configuration|Gradient|Gradient Entity Id"
modifier_pin_clear_to_gradiententityid("Dither Gradient Modifier") )
modifier_pin_clear_to_gradiententityid("Invert Gradient Modifier") gradient_pinned_to_modifier = (
modifier_pin_clear_to_gradiententityid("Levels Gradient Modifier") f"Gradient Generator is pinned to the {modifier} successfully",
modifier_pin_clear_to_gradiententityid("Posterize Gradient Modifier") f"Failed to pin Gradient Generator to the {modifier}"
modifier_pin_clear_to_gradiententityid("Smooth-Step Gradient Modifier") )
modifier_pin_clear_to_gradiententityid("Threshold Gradient Modifier") Report.result(gradient_pinned_to_modifier, entity.Equal(random_noise.id))
hydra.get_set_test(gradient_modifier, 0, "Configuration|Gradient|Gradient Entity Id", EntityId.EntityId())
entity = hydra.get_component_property_value(
test = TestGradientSampling() gradient_modifier.components[0], "Configuration|Gradient|Gradient Entity Id"
test.run() )
gradient_cleared_from_modifier = (
f"Gradient Generator is cleared from the {modifier} successfully",
f"Failed to clear Gradient Generator from the {modifier}"
)
Report.result(gradient_cleared_from_modifier, entity.Equal(EntityId.EntityId()))
# 1) Open an existing simple level
helper.init_idle()
helper.open_level("Physics", "Base")
# 2) Create a new entity with components "Random Noise Gradient", "Gradient Transform Modifier" and "Box Shape"
entity_position = math.Vector3(125.0, 136.0, 32.0)
components_to_add = ["Random Noise Gradient", "Gradient Transform Modifier", "Box Shape"]
random_noise = hydra.Entity("Random_Noise")
random_noise.create_entity(entity_position, components_to_add)
# 3) Create a new entity with Gradient Modifier's, pin and clear the random noise entity id to the Gradient Id
# field in Gradient Modifier
modifier_pin_clear_to_gradiententityid("Dither Gradient Modifier")
modifier_pin_clear_to_gradiententityid("Invert Gradient Modifier")
modifier_pin_clear_to_gradiententityid("Levels Gradient Modifier")
modifier_pin_clear_to_gradiententityid("Posterize Gradient Modifier")
modifier_pin_clear_to_gradiententityid("Smooth-Step Gradient Modifier")
modifier_pin_clear_to_gradiententityid("Threshold Gradient Modifier")
if __name__ == "__main__":
from editor_python_test_tools.utils import Report
Report.start_test(GradientSampling_GradientReferencesAddRemoveSuccessfully)

@ -5,114 +5,104 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
import azlmbr.math as math
import azlmbr.bus as bus
import azlmbr.entity as entity
import azlmbr.paths
import azlmbr.editor as editor
sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests"))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class TestGradientSurfaceTagEmitterDependencies(EditorTestHelper):
def __init__(self):
EditorTestHelper.__init__(
self, log_prefix="GradientSurfaceTagEmitter_ComponentDependencies", args=["level"]
)
def run_test(self):
""" def GradientSurfaceTagEmitter_ComponentDependencies():
Summary: """
This test verifies that the Gradient Surface Tag Emitter component is dependent on a gradient component. Summary:
This test verifies that the Gradient Surface Tag Emitter component is dependent on a gradient component.
Expected Result:
Gradient Surface Tag Emitter component is disabled until a Gradient Generator, Modifier or Gradient Reference Expected Result:
component (and any sub-dependencies) is added to the entity. Gradient Surface Tag Emitter component is disabled until a Gradient Generator, Modifier or Gradient Reference
component (and any sub-dependencies) is added to the entity.
Test Steps:
1) Open level Test Steps:
2) Create a new entity with a Gradient Surface Tag Emitter component 1) Open level
3) Verify the component is disabled until a dependent component is also added to the entity 2) Create a new entity with a Gradient Surface Tag Emitter component
3) Verify the component is disabled until a dependent component is also added to the entity
Note:
- This test file must be called from the Open 3D Engine Editor command terminal Note:
- Any passed and failed tests are written to the Editor.log file. - This test file must be called from the Open 3D Engine Editor command terminal
Parsing the file or running a log_monitor are required to observe the test results. - Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
""" :return: None
"""
def is_enabled(EntityComponentIdPair):
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", EntityComponentIdPair) import azlmbr.math as math
import azlmbr.bus as bus
# Create empty level import azlmbr.entity as entity
self.test_success = self.create_level( import azlmbr.editor as editor
self.args["level"],
heightmap_resolution=1024, import editor_python_test_tools.hydra_editor_utils as hydra
heightmap_meters_per_pixel=1, from editor_python_test_tools.utils import Report
terrain_texture_resolution=4096, from editor_python_test_tools.utils import TestHelper as helper
use_terrain=False,
def is_enabled(EntityComponentIdPair):
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", EntityComponentIdPair)
# Open an existing simple level
helper.init_idle()
helper.open_level("Physics", "Base")
# Create an entity with Gradient Surface Tag Emitter component
position = math.Vector3(512.0, 512.0, 32.0)
gradient = hydra.Entity("gradient")
gradient.create_entity(position, ["Gradient Surface Tag Emitter"])
# Make sure Gradient Surface Tag Emitter is disabled
gradient_surface_tag_disabled = (
"Gradient Surface Tag Emitter is Disabled",
"Gradient Surface Tag Emitter is Enabled, but should be Disabled without dependencies met"
)
Report.result(gradient_surface_tag_disabled, not is_enabled(gradient.components[0]))
# Verify Gradient Surface Tag Emitter component is enabled after adding Gradient, Generator, Modifier
# or Reference component
new_components_to_add = [
"Dither Gradient Modifier",
"Gradient Mixer",
"Invert Gradient Modifier",
"Levels Gradient Modifier",
"Posterize Gradient Modifier",
"Smooth-Step Gradient Modifier",
"Threshold Gradient Modifier",
"Altitude Gradient",
"Constant Gradient",
"FastNoise Gradient",
"Image Gradient",
"Perlin Noise Gradient",
"Random Noise Gradient",
"Reference Gradient",
"Shape Falloff Gradient",
"Slope Gradient",
"Surface Mask Gradient",
]
for component in new_components_to_add:
component_list = ["FastNoise Gradient", "Image Gradient", "Perlin Noise Gradient", "Random Noise Gradient"]
if component in component_list:
for Component in ["Gradient Transform Modifier", "Box Shape"]:
hydra.add_component(Component, gradient.id)
typeIdsList = editor.EditorComponentAPIBus(bus.Broadcast, 'FindComponentTypeIdsByEntityType', [component],
entity.EntityType().Game)
ComponentOutcome = editor.EditorComponentAPIBus(bus.Broadcast, 'AddComponentsOfType', gradient.id, [typeIdsList[0]])
Components = ComponentOutcome.GetValue()
ComponentIdPair = Components[0]
gradient_enabled = is_enabled(gradient.components[0])
new_components_enabled = is_enabled(ComponentIdPair)
dependencies_met = (
f"{component} and Gradient Surface Tag Emitter are enabled",
f"{component} and Gradient Surface Tag Emitter are disabled"
) )
Report.result(dependencies_met, new_components_enabled and gradient_enabled)
if component in component_list:
hydra.remove_component("Gradient Transform Modifier", gradient.id)
hydra.remove_component("Box Shape", gradient.id)
hydra.remove_component(component, gradient.id)
if __name__ == "__main__":
# Create an entity with Gradient Surface Tag Emitter component from editor_python_test_tools.utils import Report
position = math.Vector3(512.0, 512.0, 32.0) Report.start_test(GradientSurfaceTagEmitter_ComponentDependencies)
gradient = hydra.Entity("gradient")
gradient.create_entity(position, ["Gradient Surface Tag Emitter"])
# Make sure Gradient Surface Tag Emitter is disabled
is_enable = is_enabled(gradient.components[0])
if not is_enable:
self.log("Gradient Surface Tag Emitter is Disabled")
elif not is_enable:
self.log("Gradient Surface Tag Emitter is Enabled, but should be Disabled without dependencies met")
# Verify Gradient Surface Tag Emitter component is enabled after adding Gradient, Generator, Modifier
# or Reference component
new_components_to_add = [
"Dither Gradient Modifier",
"Gradient Mixer",
"Invert Gradient Modifier",
"Levels Gradient Modifier",
"Posterize Gradient Modifier",
"Smooth-Step Gradient Modifier",
"Threshold Gradient Modifier",
"Altitude Gradient",
"Constant Gradient",
"FastNoise Gradient",
"Image Gradient",
"Perlin Noise Gradient",
"Random Noise Gradient",
"Reference Gradient",
"Shape Falloff Gradient",
"Slope Gradient",
"Surface Mask Gradient",
]
for component in new_components_to_add:
component_list = ["FastNoise Gradient", "Image Gradient", "Perlin Noise Gradient", "Random Noise Gradient"]
if component in component_list:
for Component in ["Gradient Transform Modifier", "Box Shape"]:
hydra.add_component(Component, gradient.id)
typeIdsList = editor.EditorComponentAPIBus(bus.Broadcast, 'FindComponentTypeIdsByEntityType', [component],
entity.EntityType().Game)
ComponentOutcome = editor.EditorComponentAPIBus(bus.Broadcast, 'AddComponentsOfType', gradient.id, [typeIdsList[0]])
Components = ComponentOutcome.GetValue()
ComponentIdPair = Components[0]
gradient_enabled = new_components_enabled = False
gradient_enabled = is_enabled(gradient.components[0])
new_components_enabled = is_enabled(ComponentIdPair)
if new_components_enabled and gradient_enabled:
self.log(f"{component} and Gradient Surface Tag Emitter are enabled")
else:
self.log(f"{component} and Gradient Surface Tag Emitter are disabled")
if component in component_list:
hydra.remove_component("Gradient Transform Modifier", gradient.id)
hydra.remove_component("Box Shape", gradient.id)
hydra.remove_component(component, gradient.id)
test = TestGradientSurfaceTagEmitterDependencies()
test.run()

@ -5,75 +5,69 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys def GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully():
"""
sys.path.append(os.path.dirname(os.path.abspath(__file__))) Summary:
import azlmbr.math as math Entity with Gradient Surface Tag Emitter and Reference Gradient components is created.
import azlmbr.paths And new surface tag has been added and removed.
import azlmbr.surface_data as surface_data
Expected Behavior:
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests')) A new Surface Tag can be added and removed from the component
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper Test Steps:
1) Open level
2) Create an entity with Gradient Surface Tag Emitter and Reference Gradient components.
class TestGradientSurfaceTagEmitter(EditorTestHelper): 3) Add/ remove Surface Tags
def __init__(self):
EditorTestHelper.__init__(self, log_prefix="GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSucessfully", Note:
args=["level"]) - This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
def run_test(self): Parsing the file or running a log_monitor are required to observe the test results.
"""
Summary: :return: None
Entity with Gradient Surface Tag Emitter and Reference Gradient components is created. """
And new surface tag has been added and removed.
import azlmbr.math as math
Expected Behavior: import azlmbr.surface_data as surface_data
A new Surface Tag can be added and removed from the component
import editor_python_test_tools.hydra_editor_utils as hydra
Test Steps: from editor_python_test_tools.utils import Report
1) Open level from editor_python_test_tools.utils import TestHelper as helper
2) Create an entity with Gradient Surface Tag Emitter and Reference Gradient components.
3) Add/ remove Surface Tags # 1) Open an existing simple level
helper.init_idle()
Note: helper.open_level("Physics", "Base")
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file. # 2) Create an entity with Gradient Surface Tag Emitter and Reference Gradient components.
Parsing the file or running a log_monitor are required to observe the test results. entity_position = math.Vector3(125.0, 136.0, 32.0)
components_to_add = ["Gradient Surface Tag Emitter", "Reference Gradient"]
:return: None entity = hydra.Entity("entity")
""" entity.create_entity(entity_position, components_to_add)
# 1) Open level # 3) Add/ remove Surface Tags
self.test_success = self.create_level( tag = surface_data.SurfaceTag()
self.args["level"], tag.SetTag("water")
heightmap_resolution=1024, pte = hydra.get_property_tree(entity.components[0])
heightmap_meters_per_pixel=1, path = "Configuration|Extended Tags"
terrain_texture_resolution=4096, pte.add_container_item(path, 0, tag)
use_terrain=False, success = helper.wait_for_condition(lambda: pte.get_container_count(path).GetValue() == 1, 1.0)
) tag_added_to_container = (
"Successfully added surface tag",
# 2) Create an entity with Gradient Surface Tag Emitter and Reference Gradient components. "Failed to add surface tag"
entity_position = math.Vector3(125.0, 136.0, 32.0) )
components_to_add = ["Gradient Surface Tag Emitter", "Reference Gradient"] Report.result(tag_added_to_container, success)
entity = hydra.Entity("entity") pte.remove_container_item(path, 0)
entity.create_entity(entity_position, components_to_add) success = helper.wait_for_condition(lambda: pte.get_container_count(path).GetValue() == 0, 1.0)
tag_removed_from_container = (
# 3) Add/ remove Surface Tags "Successfully removed surface tag",
tag = surface_data.SurfaceTag() "Failed to remove surface tag"
tag.SetTag("water") )
pte = hydra.get_property_tree(entity.components[0]) Report.result(tag_removed_from_container, success)
path = "Configuration|Extended Tags"
pte.add_container_item(path, 0, tag)
success = self.wait_for_condition(lambda: pte.get_container_count(path).GetValue() == 1) if __name__ == "__main__":
self.test_success = self.test_success and success
print(f"Added SurfaceTag: container count is {pte.get_container_count(path).GetValue()}") from editor_python_test_tools.utils import Report
pte.remove_container_item(path, 0) Report.start_test(GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully)
success = self.wait_for_condition(lambda: pte.get_container_count(path).GetValue() == 0)
self.test_success = self.test_success and success
print(f"Removed SurfaceTag: container count is {pte.get_container_count(path).GetValue()}")
test = TestGradientSurfaceTagEmitter()
test.run()

@ -5,118 +5,102 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.math as math
import azlmbr.entity as EntityId
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests'))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class TestGradientTransform_ComponentIncompatibleWithExpectedGradients(EditorTestHelper):
def __init__(self):
EditorTestHelper.__init__(self, log_prefix="GradientTransform_ComponentIncompatibleWithExpectedGradients",
args=["level"])
def run_test(self):
"""
Summary:
A New level is created. A New entity is created with components Gradient Transform Modifier and Box Shape.
Adding components Constant Gradient, Altitude Gradient, Gradient Mixer, Reference Gradient, Shape
Falloff Gradient, Slope Gradient and Surface Mask Gradient to the same entity.
Expected Behavior:
All added components are disabled and inform the user that they are incompatible with the Gradient Transform
Modifier
Test Steps:
1) Create level
2) Create a new entity with components Gradient Transform Modifier and Box Shape
3) Make sure all components are enabled in Entity
4) Add Constant Gradient, Altitude Gradient, Gradient Mixer, Reference Gradient, Shape
Falloff Gradient, Slope Gradient and Surface Mask Gradient to the same entity
5) Make sure all newly added components are disabled
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
def is_enabled(EntityComponentIdPair):
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", EntityComponentIdPair)
# 1) Create level
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=1024,
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096,
use_terrain=False,
)
# 2) Create a new entity with components Gradient Transform Modifier and Box Shape def GradientTransform_ComponentIncompatibleWithExpectedGradients():
entity_position = math.Vector3(125.0, 136.0, 32.0) """
components_to_add = ["Gradient Transform Modifier", "Box Shape"] Summary:
gradient_id = editor.ToolsApplicationRequestBus( A New level is created. A New entity is created with components Gradient Transform Modifier and Box Shape.
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId() Adding components Constant Gradient, Altitude Gradient, Gradient Mixer, Reference Gradient, Shape
Falloff Gradient, Slope Gradient and Surface Mask Gradient to the same entity.
Expected Behavior:
All added components are disabled and inform the user that they are incompatible with the Gradient Transform
Modifier
Test Steps:
1) Create level
2) Create a new entity with components Gradient Transform Modifier and Box Shape
3) Make sure all components are enabled in Entity
4) Add Constant Gradient, Altitude Gradient, Gradient Mixer, Reference Gradient, Shape
Falloff Gradient, Slope Gradient and Surface Mask Gradient to the same entity
5) Make sure all newly added components are disabled
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.math as math
import azlmbr.entity as EntityId
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
def is_enabled(EntityComponentIdPair):
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", EntityComponentIdPair)
# 1) Open an existing simple level
helper.init_idle()
helper.open_level("Physics", "Base")
# 2) Create a new entity with components Gradient Transform Modifier and Box Shape
entity_position = math.Vector3(125.0, 136.0, 32.0)
components_to_add = ["Gradient Transform Modifier", "Box Shape"]
gradient_id = editor.ToolsApplicationRequestBus(
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId()
)
gradient = hydra.Entity("gradient", gradient_id)
gradient.components = []
for component in components_to_add:
gradient.components.append(hydra.add_component(component, gradient_id))
entity_created = (
"Entity created successfully",
"Failed to create entity"
)
Report.critical_result(entity_created, gradient_id.isValid())
# 3) Make sure all components are enabled in Entity
index = 0
for component in components_to_add:
components_enabled = (
f"{component} is enabled",
f"{component} is unexpectedly disabled"
)
Report.critical_result(components_enabled, is_enabled(gradient.components[index]))
index += 1
# 4) Add Constant Gradient, Altitude Gradient, Gradient Mixer, Reference Gradient, Shape
# Falloff Gradient, Slope Gradient and Surface Mask Gradient to the same entity
new_components_to_add = [
"Constant Gradient",
"Altitude Gradient",
"Gradient Mixer",
"Reference Gradient",
"Shape Falloff Gradient",
"Slope Gradient",
"Surface Mask Gradient",
]
new_components_enabled = False
for component in new_components_to_add:
gradient.components.append(hydra.add_component(component, gradient_id))
gradient_components_disabled = (
f"{component} is disabled",
f"{component} is enabled, but should be disabled"
) )
gradient = hydra.Entity("gradient", gradient_id) Report.result(gradient_components_disabled, not is_enabled(gradient.components[2]))
if not is_enabled(gradient.components[2]):
gradient.components = []
for component in components_to_add:
gradient.components.append(hydra.add_component(component, gradient_id))
if gradient_id.isValid():
self.log("New Entity Created")
# 3) Make sure all components are enabled in Entity
index = 0
for component in components_to_add:
is_enable = is_enabled(gradient.components[index])
if is_enable:
self.log(f"{component} is Enabled")
self.test_success = self.test_success and is_enable
elif not is_enable:
self.log(f"{component} is disabled, but it should be enabled")
self.test_success = self.test_success and is_enable
break
index += 1
# 4) Add Constant Gradient, Altitude Gradient, Gradient Mixer, Reference Gradient, Shape
# Falloff Gradient, Slope Gradient and Surface Mask Gradient to the same entity
new_components_to_add = [
"Constant Gradient",
"Altitude Gradient",
"Gradient Mixer",
"Reference Gradient",
"Shape Falloff Gradient",
"Slope Gradient",
"Surface Mask Gradient",
]
index = 2
new_components_enabled = False
for component in new_components_to_add:
gradient.components.append(hydra.add_component(component, gradient_id))
new_components_enabled = is_enabled(gradient.components[index])
if new_components_enabled:
self.log(f"{component} is enabled, but should be disabled")
break
editor.EditorComponentAPIBus(bus.Broadcast, "RemoveComponents", component) editor.EditorComponentAPIBus(bus.Broadcast, "RemoveComponents", component)
# 5) Make sure all newly added components are disabled
if not new_components_enabled:
self.log("All newly added components are incompatible and disabled")
self.test_success = self.test_success and not new_components_enabled
if __name__ == "__main__":
test = TestGradientTransform_ComponentIncompatibleWithExpectedGradients() from editor_python_test_tools.utils import Report
test.run() Report.start_test(GradientTransform_ComponentIncompatibleWithExpectedGradients)

@ -5,104 +5,88 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.math as math
import azlmbr.entity as EntityId
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests'))
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.editor_test_helper import EditorTestHelper
class TestGradientTransform_ComponentIncompatibleWithSpawners(EditorTestHelper):
def __init__(self):
EditorTestHelper.__init__(self, log_prefix="GradientTransform_ComponentIncompatibleWithSpawners",
args=["level"])
def run_test(self):
"""
Summary:
A New level is created. A New entity is created with components Gradient Transform Modifier and Box Shape.
Adding a component Vegetation Layer Spawner to the same entity.
Expected Behavior:
The Vegetation Layer Spawner is deactivated and it is communicated that it is incompatible with Gradient
Transform Modifier
Test Steps:
1) Create level
2) Create a new entity with components Gradient Transform Modifier and Box Shape
3) Make sure all components are enabled in Entity
4) Add Vegetation Layer Spawner to the same entity
5) Make sure newly added component is disabled
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
def is_enabled(EntityComponentIdPair):
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", EntityComponentIdPair)
# 1) Create level
self.test_success = self.create_level(
self.args["level"],
heightmap_resolution=1024,
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096,
use_terrain=False,
)
# 2) Create a new entity with components Gradient Transform Modifier and Box Shape def GradientTransform_ComponentIncompatibleWithSpawners():
entity_position = math.Vector3(125.0, 136.0, 32.0) """
components_to_add = ["Gradient Transform Modifier", "Box Shape"] Summary:
gradient_id = editor.ToolsApplicationRequestBus( A simple level is opened. A New entity is created with components Gradient Transform Modifier and Box Shape.
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId() Adding a component Vegetation Layer Spawner to the same entity.
Expected Behavior:
The Vegetation Layer Spawner is deactivated and it is communicated that it is incompatible with Gradient
Transform Modifier
Test Steps:
1) Open a simple level
2) Create a new entity with components Gradient Transform Modifier and Box Shape
3) Make sure all components are enabled in Entity
4) Add Vegetation Layer Spawner to the same entity
5) Make sure newly added component is disabled
Note:
- This test file must be called from the Open 3D Engine Editor command terminal
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
:return: None
"""
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.math as math
import azlmbr.entity as EntityId
import editor_python_test_tools.hydra_editor_utils as hydra
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
def is_enabled(EntityComponentIdPair):
return editor.EditorComponentAPIBus(bus.Broadcast, "IsComponentEnabled", EntityComponentIdPair)
# 1) Open an existing simple level
helper.init_idle()
helper.open_level("Physics", "Base")
# 2) Create a new entity with components Gradient Transform Modifier and Box Shape
entity_position = math.Vector3(125.0, 136.0, 32.0)
components_to_add = ["Gradient Transform Modifier", "Box Shape"]
gradient_id = editor.ToolsApplicationRequestBus(
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId()
)
gradient = hydra.Entity("gradient", gradient_id)
gradient.components = []
for component in components_to_add:
gradient.components.append(hydra.add_component(component, gradient_id))
entity_created = (
"Entity created successfully",
"Failed to create entity"
)
Report.critical_result(entity_created, gradient_id.isValid())
# 3) Make sure all components are enabled in Entity
index = 0
for component in components_to_add:
components_enabled = (
f"{component} is enabled",
f"{component} is unexpectedly disabled"
) )
gradient = hydra.Entity("gradient", gradient_id) Report.critical_result(components_enabled, is_enabled(gradient.components[index]))
index += 1
gradient.components = []
# 4) Add Vegetation Layer Spawner to the same entity
for component in components_to_add: gradient.components.append(hydra.add_component("Vegetation Layer Spawner", gradient_id))
gradient.components.append(hydra.add_component(component, gradient_id))
if gradient_id.isValid(): # 5) Make sure newly added component is disabled
self.log("New Entity Created") spawner_component_disabled = (
"Spawner component is disabled",
# 3) Make sure all components are enabled in Entity "Spawner component is unexpectedly enabled"
index = 0 )
for component in components_to_add: Report.result(spawner_component_disabled, not is_enabled(gradient.components[2]))
is_enable = is_enabled(gradient.components[index])
if is_enable:
self.log(f"{component} is Enabled") if __name__ == "__main__":
self.test_success = self.test_success and is_enable
elif not is_enable: from editor_python_test_tools.utils import Report
self.log(f"{component} is Disabled. But It should be Enabled in an Entity") Report.start_test(GradientTransform_ComponentIncompatibleWithSpawners)
self.test_success = self.test_success and is_enable
break
index += 1
# 4) Add Vegetation Layer Spawner to the same entity
new_component_to_add = "Vegetation Layer Spawner"
index = 2
gradient.components.append(hydra.add_component(new_component_to_add, gradient_id))
new_component_enabled = is_enabled(gradient.components[index])
# 5) Make sure newly added component is disabled
if not new_component_enabled:
self.log(f"{new_component_to_add} is incompatible and disabled")
self.test_success = self.test_success and not new_component_enabled
elif new_component_enabled:
self.log(f"{new_component_to_add} is compatible and enabled. But It should be Incompatible and disabled")
self.test_success = self.test_success and new_component_enabled
test = TestGradientTransform_ComponentIncompatibleWithSpawners()
test.run()

@ -5,87 +5,82 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
"""
C3430292: Frequency Zoom can manually be set higher than 8.
"""
import os class Tests:
import sys entity_created = (
"Entity created successfully",
sys.path.append(os.path.dirname(os.path.abspath(__file__))) "Failed to create entity"
import azlmbr.bus as bus )
import azlmbr.editor as editor components_added = (
import azlmbr.math as math "All expected components added to entity",
import azlmbr.paths "Failed to add expected components to entity"
import azlmbr.entity as EntityId )
higher_zoom_value_set = (
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests')) "Frequency Zoom is equal to expected value",
import editor_python_test_tools.hydra_editor_utils as hydra "Frequency Zoom is not equal to expected value"
from editor_python_test_tools.editor_test_helper import EditorTestHelper )
class TestGradientTransformFrequencyZoom(EditorTestHelper): def GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange():
def __init__(self): """
EditorTestHelper.__init__(self, log_prefix="GradientTransform_FrequencyZoomBeyondSliders", args=["level"]) Summary:
Frequency Zoom can manually be set higher than 8 in a random noise gradient
def run_test(self):
""" Expected Behavior:
Summary: The value properly changes, despite the value being outside of the slider limit
Frequency Zoom can manually be set higher than 8 in a random noise gradient
Test Steps:
Expected Behavior: 1) Open level
The value properly changes, despite the value being outside of the slider limit 2) Create entity
3) Add components to the entity
Test Steps: 4) Set the frequency value of the component
1) Open level 5) Verify if the frequency value is set to higher value
2) Create entity
3) Add components to the entity Note:
4) Set the frequency value of the component - This test file must be called from the Open 3D Engine Editor command terminal
5) Verify if the frequency value is set to higher value - Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
Note:
- This test file must be called from the Open 3D Engine Editor command terminal :return: None
- Any passed and failed tests are written to the Editor.log file. """
Parsing the file or running a log_monitor are required to observe the test results.
import azlmbr.bus as bus
:return: None import azlmbr.editor as editor
""" import azlmbr.math as math
import azlmbr.entity as EntityId
# 1) Open level
self.test_success = self.create_level( import editor_python_test_tools.hydra_editor_utils as hydra
self.args["level"], from editor_python_test_tools.utils import Report
heightmap_resolution=1024, from editor_python_test_tools.utils import TestHelper as helper
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096, # 1) Open an existing simple level
use_terrain=False, helper.init_idle()
) helper.open_level("Physics", "Base")
# 2) Create entity # 2) Create entity
entity_position = math.Vector3(125.0, 136.0, 32.0) entity_position = math.Vector3(125.0, 136.0, 32.0)
entity_id = editor.ToolsApplicationRequestBus( entity_id = editor.ToolsApplicationRequestBus(
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId() bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId()
) )
if entity_id.IsValid(): Report.critical_result(Tests.entity_created, entity_id.IsValid())
print("Entity Created")
# 3) Add components to the entity
# 3) Add components to the entity components_to_add = ["Random Noise Gradient", "Gradient Transform Modifier", "Box Shape"]
components_to_add = ["Random Noise Gradient", "Gradient Transform Modifier", "Box Shape"] entity = hydra.Entity("entity", entity_id)
entity = hydra.Entity("entity", entity_id) entity.components = []
entity.components = [] for component in components_to_add:
for component in components_to_add: entity.components.append(hydra.add_component(component, entity_id))
entity.components.append(hydra.add_component(component, entity_id)) Report.critical_result(Tests.components_added, len(entity.components) == 3)
print("Components added to the entity")
# 4) Set the frequency value of the component
# 4) Set the frequency value of the component hydra.get_set_test(entity, 1, "Configuration|Frequency Zoom", 10)
hydra.get_set_test(entity, 1, "Configuration|Frequency Zoom", 10)
# 5) Verify if the frequency value is set to higher value
# 5) Verify if the frequency value is set to higher value curr_value = hydra.get_component_property_value(entity.components[1], "Configuration|Frequency Zoom")
curr_value = hydra.get_component_property_value(entity.components[1], "Configuration|Frequency Zoom") Report.result(Tests.higher_zoom_value_set, curr_value == 10.0)
if curr_value == 10.0:
print("Frequency Zoom is equal to expected value")
else: if __name__ == "__main__":
print("Frequency Zoom is not equal to expected value")
from editor_python_test_tools.utils import Report
Report.start_test(GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange)
test = TestGradientTransformFrequencyZoom()
test.run()

@ -4,73 +4,71 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
class Tests:
import azlmbr.bus as bus disabled_without_shape = (
import azlmbr.editor as editor "Gradient Transform Modifier component is disabled without a Shape component on the Entity",
import azlmbr.entity as entity "Gradient Transform Modifier component is unexpectedly enabled without a Shape component on the Entity",
import azlmbr.paths )
enabled_with_shape = (
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests')) "Gradient Transform Modifier component is enabled now that the Entity has a Shape",
import editor_python_test_tools.hydra_editor_utils as hydra "Gradient Transform Modifier component is still disabled alongside a Shape component",
from editor_python_test_tools.editor_test_helper import EditorTestHelper )
class TestGradientTransformRequiresShape(EditorTestHelper): def GradientTransform_RequiresShape():
def __init__(self): """
EditorTestHelper.__init__(self, log_prefix="GradientTransformRequiresShape", args=["level"]) Summary:
This test verifies that the Gradient Transform Modifier component is dependent on a shape component.
def run_test(self):
""" Expected Result:
Summary: Gradient Transform Modifier component is disabled until a shape component is added to the entity.
This test verifies that the Gradient Transform Modifier component is dependent on a shape component.
Test Steps:
Expected Result: 1) Open level
Gradient Transform Modifier component is disabled until a shape component is added to the entity. 2) Create a new entity with a Gradient Transform Modifier component
3) Verify the component is disabled until a shape component is also added to the entity
Test Steps:
1) Open level Note:
2) Create a new entity with a Gradient Transform Modifier component - This test file must be called from the Open 3D Engine Editor command terminal
3) Verify the component is disabled until a shape component is also added to the entity - Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
Note:
- This test file must be called from the Open 3D Engine Editor command terminal :return: None
- Any passed and failed tests are written to the Editor.log file. """
Parsing the file or running a log_monitor are required to observe the test results.
import azlmbr.bus as bus
:return: None import azlmbr.editor as editor
""" import azlmbr.entity as entity
# Create a new empty level
self.test_success = self.create_level( import editor_python_test_tools.hydra_editor_utils as hydra
self.args["level"], from editor_python_test_tools.utils import Report
heightmap_resolution=1024, from editor_python_test_tools.utils import TestHelper as helper
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096, # Open an existing simple level
use_terrain=False, helper.init_idle()
) helper.open_level("Physics", "Base")
# Create a new Entity in the level # Create a new Entity in the level
entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId()) entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
# Add a Gradient Transform Component (that will be disabled since there is no shape on the Entity) # Add a Gradient Transform Component (that will be disabled since there is no shape on the Entity)
gradient_transform_component = hydra.add_component('Gradient Transform Modifier', entity_id) gradient_transform_component = hydra.add_component('Gradient Transform Modifier', entity_id)
# Verify the Gradient Transform Component is not active before adding the Shape # Verify the Gradient Transform Component is not active before adding the Shape
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_transform_component) active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_transform_component)
self.test_success = self.test_success and not active Report.result(Tests.disabled_without_shape, not active)
if not active:
self.log("Gradient Transform component is not active without a Shape component on the Entity") # Add a Shape component to the same Entity
hydra.add_component('Box Shape', entity_id)
# Add a Shape component to the same Entity
hydra.add_component('Box Shape', entity_id) # Check if the Gradient Transform Component is active now after adding the Shape
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_transform_component)
# Check if the Gradient Transform Component is active now after adding the Shape Report.result(Tests.enabled_with_shape, active)
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', gradient_transform_component)
self.test_success = self.test_success and active
if active: if __name__ == "__main__":
self.log("Gradient Transform Modifier component is active now that the Entity has a Shape")
from editor_python_test_tools.utils import Report
Report.start_test(GradientTransform_RequiresShape)
test = TestGradientTransformRequiresShape()
test.run()

@ -5,89 +5,91 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys class Tests:
image_gradient_entity_created = (
sys.path.append(os.path.dirname(os.path.abspath(__file__))) "Image Gradient entity created",
import azlmbr.asset as asset "Failed to create Image Gradient entity",
import azlmbr.bus as bus )
import azlmbr.entity as EntityId image_gradient_asset_found = (
import azlmbr.editor as editor "image_grad_test_gsi.png was found in the workspace",
import azlmbr.math as math "image_grad_test_gsi.png was not found in the workspace"
import azlmbr.paths )
image_gradient_assigned = (
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests')) "Successfully assigned image gradient asset",
import editor_python_test_tools.hydra_editor_utils as hydra "Failed to assign image gradient asset"
from editor_python_test_tools.editor_test_helper import EditorTestHelper )
class TestImageGradient(EditorTestHelper): def ImageGradient_ProcessedImageAssignedSuccessfully():
def __init__(self): """
EditorTestHelper.__init__(self, log_prefix="ImageGradient_ProcessedImageAssignedSucessfully", Summary:
args=["level"]) Level created with Entity having Image Gradient and Gradient Transform Modifier components.
Save any new image to your workspace with the suffix "_gsi" and assign as image asset.
def run_test(self):
""" Expected Behavior:
Summary: Image can be assigned as the Image Asset for the Image as Gradient component.
Level created with Entity having Image Gradient and Gradient Transform Modifier components.
Save any new image to your workspace with the suffix "_gsi" and assign as image asset. Test Steps:
1) Open a level
Expected Behavior: 2) Create an entity with Image Gradient and Gradient Transform Modifier components.
Image can be assigned as the Image Asset for the Image as Gradient component. 3) Assign the newly processed gradient image as Image asset.
Test Steps: Note:
1) Create level - This test file must be called from the Open 3D Engine Editor command terminal
2) Create an entity with Image Gradient and Gradient Transform Modifier components. - Any passed and failed tests are written to the Editor.log file.
3) Assign the newly processed gradient image as Image asset. Parsing the file or running a log_monitor are required to observe the test results.
Note: :return: None
- This test file must be called from the Open 3D Engine Editor command terminal """
- Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results. import os
:return: None import azlmbr.asset as asset
""" import azlmbr.bus as bus
import azlmbr.entity as EntityId
# 1) Create level import azlmbr.editor as editor
self.test_success = self.create_level( import azlmbr.math as math
self.args["level"],
heightmap_resolution=1024, import editor_python_test_tools.hydra_editor_utils as hydra
heightmap_meters_per_pixel=1, from editor_python_test_tools.utils import Report
terrain_texture_resolution=4096, from editor_python_test_tools.utils import TestHelper as helper
use_terrain=False,
) # 1) Open an existing simple level
helper.init_idle()
# 2) Create an entity with Image Gradient and Gradient Transform Modifier components helper.open_level("Physics", "Base")
components_to_add = ["Image Gradient", "Gradient Transform Modifier", "Box Shape"]
entity_position = math.Vector3(512.0, 512.0, 32.0) # 2) Create an entity with Image Gradient and Gradient Transform Modifier components
new_entity_id = editor.ToolsApplicationRequestBus( components_to_add = ["Image Gradient", "Gradient Transform Modifier", "Box Shape"]
bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId() entity_position = math.Vector3(512.0, 512.0, 32.0)
) new_entity_id = editor.ToolsApplicationRequestBus(
if new_entity_id.IsValid(): bus.Broadcast, "CreateNewEntityAtPosition", entity_position, EntityId.EntityId()
print("Image Gradient Entity created") )
image_gradient_entity = hydra.Entity("Image Gradient Entity", new_entity_id) Report.critical_result(Tests.image_gradient_entity_created, new_entity_id.IsValid())
image_gradient_entity.components = [] image_gradient_entity = hydra.Entity("Image Gradient Entity", new_entity_id)
for component in components_to_add: image_gradient_entity.components = []
image_gradient_entity.add_component(component) for component in components_to_add:
image_gradient_entity.add_component(component)
# 3) Assign the processed gradient signal image as the Image Gradient's image asset and verify success
# 3) Assign the processed gradient signal image as the Image Gradient's image asset and verify success
# First, check for the base image in the workspace
base_image = "image_grad_test_gsi.png" # First, check for the base image in the workspace
base_image_path = os.path.join("AutomatedTesting", "Assets", "ImageGradients", base_image) base_image = "image_grad_test_gsi.png"
if os.path.isfile(base_image_path): base_image_path = os.path.join("AutomatedTesting", "Assets", "ImageGradients", base_image)
print(f"{base_image} was found in the workspace") Report.critical_result(Tests.image_gradient_asset_found, os.path.isfile(base_image_path))
# Next, assign the processed image to the Image Gradient's Image Asset property # Next, assign the processed image to the Image Gradient's Image Asset property
processed_image_path = os.path.join("Assets", "ImageGradients", "image_grad_test_gsi.gradimage") processed_image_path = os.path.join("Assets", "ImageGradients", "image_grad_test_gsi.gradimage")
asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", processed_image_path, math.Uuid(), asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", processed_image_path, math.Uuid(),
False) False)
hydra.get_set_test(image_gradient_entity, 0, "Configuration|Image Asset", asset_id) hydra.get_set_test(image_gradient_entity, 0, "Configuration|Image Asset", asset_id)
# Finally, verify if the gradient image is assigned as the Image Asset # Finally, verify if the gradient image is assigned as the Image Asset
success = hydra.get_component_property_value(image_gradient_entity.components[0], "Configuration|Image Asset") == asset_id success = hydra.get_component_property_value(image_gradient_entity.components[0], "Configuration|Image Asset") == asset_id
self.test_success = self.test_success and success Report.result(Tests.image_gradient_assigned, success)
test = TestImageGradient() if __name__ == "__main__":
test.run()
from editor_python_test_tools.utils import Report
Report.start_test(ImageGradient_ProcessedImageAssignedSuccessfully)

@ -4,74 +4,72 @@ For complete copyright and license terms please see the LICENSE at the root of t
SPDX-License-Identifier: Apache-2.0 OR MIT SPDX-License-Identifier: Apache-2.0 OR MIT
""" """
import os
import sys
class Tests:
import azlmbr.bus as bus disabled_without_shape = (
import azlmbr.editor as editor "Image Gradient component is disabled without a Shape component on the Entity",
import azlmbr.entity as entity "Image Gradient component is unexpectedly enabled without a Shape component on the Entity",
import azlmbr.paths )
enabled_with_shape = (
sys.path.append(os.path.join(azlmbr.paths.devroot, 'AutomatedTesting', 'Gem', 'PythonTests')) "Image Gradient component is enabled now that the Entity has a Shape",
import editor_python_test_tools.hydra_editor_utils as hydra "Image Gradient component is still disabled alongside a Shape component",
from editor_python_test_tools.editor_test_helper import EditorTestHelper )
class TestImageGradientRequiresShape(EditorTestHelper): def ImageGradient_RequiresShape():
def __init__(self): """
EditorTestHelper.__init__(self, log_prefix="ImageGradientRequiresShape", args=["level"]) Summary:
This test verifies that the Image Gradient component is dependent on a shape component.
def run_test(self):
""" Expected Result:
Summary: Gradient Transform Modifier component is disabled until a shape component is added to the entity.
This test verifies that the Image Gradient component is dependent on a shape component.
Test Steps:
Expected Result: 1) Open level
Gradient Transform Modifier component is disabled until a shape component is added to the entity. 2) Create a new entity with a Image Gradient component
3) Verify the component is disabled until a shape component is also added to the entity
Test Steps:
1) Open level Note:
2) Create a new entity with a Image Gradient component - This test file must be called from the Open 3D Engine Editor command terminal
3) Verify the component is disabled until a shape component is also added to the entity - Any passed and failed tests are written to the Editor.log file.
Parsing the file or running a log_monitor are required to observe the test results.
Note:
- This test file must be called from the Open 3D Engine Editor command terminal :return: None
- Any passed and failed tests are written to the Editor.log file. """
Parsing the file or running a log_monitor are required to observe the test results.
import azlmbr.bus as bus
:return: None import azlmbr.editor as editor
""" import azlmbr.entity as entity
# Create a new empty level
self.test_success = self.create_level( import editor_python_test_tools.hydra_editor_utils as hydra
self.args["level"], from editor_python_test_tools.utils import Report
heightmap_resolution=1024, from editor_python_test_tools.utils import TestHelper as helper
heightmap_meters_per_pixel=1,
terrain_texture_resolution=4096, # Open an existing simple level
use_terrain=False, helper.init_idle()
) helper.open_level("Physics", "Base")
# Create a new Entity in the level # Create a new Entity in the level
entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId()) entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', entity.EntityId())
# Add an Image Gradient and Gradient Transform Component (should be disabled until a Shape exists on the Entity) # Add an Image Gradient and Gradient Transform Component (should be disabled until a Shape exists on the Entity)
image_gradient_component = hydra.add_component('Image Gradient', entity_id) image_gradient_component = hydra.add_component('Image Gradient', entity_id)
hydra.add_component('Gradient Transform Modifier', entity_id) hydra.add_component('Gradient Transform Modifier', entity_id)
# Verify the Image Gradient Component is not active before adding the Shape # Verify the Image Gradient Component is not active before adding the Shape
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', image_gradient_component) active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', image_gradient_component)
self.test_success = self.test_success and not active Report.result(Tests.disabled_without_shape, not active)
if not active:
self.log("Image Gradient component is not active without a Shape component on the Entity") # Add a Shape component to the same Entity
hydra.add_component('Box Shape', entity_id)
# Add a Shape component to the same Entity
hydra.add_component('Box Shape', entity_id) # Check if the Image Gradient Component is active now after adding the Shape
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', image_gradient_component)
# Check if the Image Gradient Component is active now after adding the Shape Report.result(Tests.enabled_with_shape, active)
active = editor.EditorComponentAPIBus(bus.Broadcast, 'IsComponentEnabled', image_gradient_component)
self.test_success = self.test_success and active
if active: if __name__ == "__main__":
self.log("Image Gradient component is active now that the Entity has a Shape")
from editor_python_test_tools.utils import Report
Report.start_test(ImageGradient_RequiresShape)
test = TestImageGradientRequiresShape()
test.run()

@ -0,0 +1,71 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import os
import pytest
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../../automatedtesting_shared')
from base import TestAutomationBase
@pytest.mark.SUITE_periodic
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
def test_GradientGenerators_Incompatibilities(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientGenerators_Incompatibilities as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientModifiers_Incompatibilities(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientModifiers_Incompatibilities as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientPreviewSettings_DefaultPinnedEntityIsSelf(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientPreviewSettings_DefaultPinnedEntityIsSelf as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientSampling_GradientReferencesAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientSampling_GradientReferencesAddRemoveSuccessfully as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientSurfaceTagEmitter_ComponentDependencies(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientSurfaceTagEmitter_ComponentDependencies as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientTransform_RequiresShape(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientTransform_RequiresShape as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientTransform_ComponentIncompatibleWithSpawners(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientTransform_ComponentIncompatibleWithSpawners as test_module
self._run_test(request, workspace, editor, test_module)
def test_GradientTransform_ComponentIncompatibleWithExpectedGradients(self, request, workspace, editor, launcher_platform):
from .EditorScripts import GradientTransform_ComponentIncompatibleWithExpectedGradients as test_module
self._run_test(request, workspace, editor, test_module)
def test_ImageGradient_RequiresShape(self, request, workspace, editor, launcher_platform):
from .EditorScripts import ImageGradient_RequiresShape as test_module
self._run_test(request, workspace, editor, test_module)
def test_ImageGradient_ProcessedImageAssignedSuccessfully(self, request, workspace, editor, launcher_platform):
from .EditorScripts import ImageGradient_ProcessedImageAssignedSuccessfully as test_module
self._run_test(request, workspace, editor, test_module)

@ -0,0 +1,55 @@
"""
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
import pytest
from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, EditorParallelTest, EditorTestSuite
@pytest.mark.SUITE_periodic
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(EditorTestSuite):
class test_GradientGenerators_Incompatibilities(EditorSharedTest):
from .EditorScripts import GradientGenerators_Incompatibilities as test_module
class test_GradientModifiers_Incompatibilities(EditorSharedTest):
from .EditorScripts import GradientModifiers_Incompatibilities as test_module
class test_GradientPreviewSettings_DefaultPinnedEntityIsSelf(EditorSharedTest):
from .EditorScripts import GradientPreviewSettings_DefaultPinnedEntityIsSelf as test_module
class test_GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin(EditorSharedTest):
from .EditorScripts import GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin as test_module
class test_GradientSampling_GradientReferencesAddRemoveSuccessfully(EditorSharedTest):
from .EditorScripts import GradientSampling_GradientReferencesAddRemoveSuccessfully as test_module
class test_GradientSurfaceTagEmitter_ComponentDependencies(EditorSharedTest):
from .EditorScripts import GradientSurfaceTagEmitter_ComponentDependencies as test_module
class test_GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(EditorSharedTest):
from .EditorScripts import GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module
class test_GradientTransform_RequiresShape(EditorSharedTest):
from .EditorScripts import GradientTransform_RequiresShape as test_module
class test_GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange(EditorSharedTest):
from .EditorScripts import GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange as test_module
class test_GradientTransform_ComponentIncompatibleWithSpawners(EditorSharedTest):
from .EditorScripts import GradientTransform_ComponentIncompatibleWithSpawners as test_module
class test_GradientTransform_ComponentIncompatibleWithExpectedGradients(EditorSharedTest):
from .EditorScripts import GradientTransform_ComponentIncompatibleWithExpectedGradients as test_module
class test_ImageGradient_RequiresShape(EditorSharedTest):
from .EditorScripts import ImageGradient_RequiresShape as test_module
class test_ImageGradient_ProcessedImageAssignedSuccessfully(EditorSharedTest):
from .EditorScripts import ImageGradient_ProcessedImageAssignedSuccessfully as test_module
Loading…
Cancel
Save