From 52354d4c2e130a734df7cbf0bd0a9741ebe6cecc Mon Sep 17 00:00:00 2001 From: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com> Date: Fri, 11 Feb 2022 16:00:28 -0600 Subject: [PATCH] Simplifying surface tag assignment, fixing incomplete comment, and removing un-needed property tree query Signed-off-by: jckand-amzn <82226555+jckand-amzn@users.noreply.github.com> --- .../EditorScripts/ImageGradient_ModifiesSurfaces.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ModifiesSurfaces.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ModifiesSurfaces.py index 31704dc22c..2c9f6d22e9 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ModifiesSurfaces.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/EditorScripts/ImageGradient_ModifiesSurfaces.py @@ -90,23 +90,19 @@ def ImageGradient_ModifiesSurfaces(): image_gradient_entity.components[2].set_component_property_value("Configuration|Shape Entity Id", spawner_entity.id) # 4) Assign surface tags to the required components - tag_list = [surface_data.SurfaceTag()] - surface_tags = {"terrain": 3363197873} + tag_list = [surface_data.SurfaceTag("terrain")] # Set the Veg Spawner entity's Surface Tag Mask Filter component to include the "terrain" tag - hydra.get_property_tree(spawner_entity.components[3]) hydra.get_set_test(spawner_entity, 3, "Configuration|Inclusion|Surface Tags", tag_list) - hydra.get_set_test(spawner_entity, 3, "Configuration|Inclusion|Surface Tags|[0]|Surface Tag", - surface_tags["terrain"]) # Set the Image Gradient entity's Gradient Surface Tag Emitter component to modify the "terrain" tag # NOTE: This requires a disable/re-enable of the component to force a refresh as assigning a tag via script does not grad_surf_tag_emitter_component = image_gradient_entity.components[3] - grad_surf_tag_emitter_component.add_container_item("Configuration|Extended Tags", 0, surface_tags["terrain"]) + grad_surf_tag_emitter_component.add_container_item("Configuration|Extended Tags", 0, tag_list[0]) grad_surf_tag_emitter_component.set_enabled(False) grad_surf_tag_emitter_component.set_enabled(True) - # 5) Validate the expected number of vegetation instances. Instances should only spawn on the modified + # 5) Validate the expected number of vegetation instances. Instances should only spawn on the modified surface num_expected_instances = 168 success = helper.wait_for_condition(lambda: dynveg.validate_instance_count_in_entity_shape( spawner_entity.id, num_expected_instances), 5.0)