diff --git a/Assets/Editor/Icons/Components/NonUniformScale.svg b/Assets/Editor/Icons/Components/NonUniformScale.svg
new file mode 100644
index 0000000000..f377232d62
--- /dev/null
+++ b/Assets/Editor/Icons/Components/NonUniformScale.svg
@@ -0,0 +1,27 @@
+
+
\ No newline at end of file
diff --git a/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg b/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg
deleted file mode 100644
index c9876cb1f9..0000000000
--- a/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "Amazon": {
- "AssetProcessor": {
- "Settings": {
- "RC cgf": {
- "ignore": true
- },
- "RC fbx": {
- "ignore": true
- }
- }
- }
- }
-}
diff --git a/AutomatedTesting/Gem/Code/Platform/Mac/tool_dependencies.cmake b/AutomatedTesting/Gem/Code/Platform/Mac/tool_dependencies.cmake
index ee7be9ac6d..2e9d450ab8 100644
--- a/AutomatedTesting/Gem/Code/Platform/Mac/tool_dependencies.cmake
+++ b/AutomatedTesting/Gem/Code/Platform/Mac/tool_dependencies.cmake
@@ -14,4 +14,6 @@ set(GEM_DEPENDENCIES
Gem::Atom_RHI_Null.Builders
Gem::Atom_RHI_Metal.Private
Gem::Atom_RHI_Metal.Builders
+ Gem::Atom_RHI_Vulkan.Builders
+ Gem::Atom_RHI_DX12.Builders
)
\ No newline at end of file
diff --git a/AutomatedTesting/Gem/Code/runtime_dependencies.cmake b/AutomatedTesting/Gem/Code/runtime_dependencies.cmake
index c8e66740e4..62a6ed7f8c 100644
--- a/AutomatedTesting/Gem/Code/runtime_dependencies.cmake
+++ b/AutomatedTesting/Gem/Code/runtime_dependencies.cmake
@@ -53,5 +53,6 @@ set(GEM_DEPENDENCIES
Gem::ImguiAtom
Gem::Atom_AtomBridge
Gem::AtomFont
+ Gem::NvCloth
Gem::Blast
)
diff --git a/AutomatedTesting/Gem/Code/tool_dependencies.cmake b/AutomatedTesting/Gem/Code/tool_dependencies.cmake
index 8c5da63f42..a6bbeee350 100644
--- a/AutomatedTesting/Gem/Code/tool_dependencies.cmake
+++ b/AutomatedTesting/Gem/Code/tool_dependencies.cmake
@@ -68,5 +68,6 @@ set(GEM_DEPENDENCIES
Gem::ImguiAtom
Gem::AtomFont
Gem::AtomToolsFramework.Editor
+ Gem::NvCloth.Editor
Gem::Blast.Editor
)
diff --git a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt
index 42fe9ac4a1..3124f1048a 100644
--- a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt
@@ -51,7 +51,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE sandbox
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/physics/TestSuite_Sandbox.py
- TIMEOUT 3600
+ TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -68,7 +68,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE periodic
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/scripting/TestSuite_Active.py
- TIMEOUT 1500
+ TIMEOUT 3000
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -107,20 +107,21 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
endif()
## NvCloth ##
-# [TODO LYN-1928] Enable when AutomatedTesting runs with Atom
-#if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
-# ly_add_pytest(
-# NAME AutomatedTesting::NvClothTests
-# TEST_SUITE main
-# TEST_SERIAL
-# PATH ${CMAKE_CURRENT_LIST_DIR}/NvCloth/TestSuite_Active.py
-# TIMEOUT 1500
-# RUNTIME_DEPENDENCIES
-# Legacy::Editor
-# AZ::AssetProcessor
-# AutomatedTesting.Assets
-# )
-#endif()
+if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
+ ly_add_pytest(
+ NAME AutomatedTesting::NvClothTests_Main
+ TEST_SUITE main
+ TEST_SERIAL
+ PATH ${CMAKE_CURRENT_LIST_DIR}/NvCloth/TestSuite_Active.py
+ TIMEOUT 1500
+ RUNTIME_DEPENDENCIES
+ Legacy::Editor
+ AZ::AssetProcessor
+ AutomatedTesting.Assets
+ COMPONENT
+ NvCloth
+ )
+endif()
## Editor Python Bindings ##
if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py
index a9f6d0aa02..c7f1aba031 100644
--- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py
+++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/utils.py
@@ -265,6 +265,7 @@ class Tracer:
self.warnings = []
self.errors = []
self.asserts = []
+ self.prints = []
self.has_warnings = False
self.has_errors = False
self.has_asserts = False
@@ -310,6 +311,11 @@ class Tracer:
def __repr__(self):
return f"[Assert: {self.message}]"
+
+ class PrintInfo:
+ def __init__(self, args):
+ self.window = args[0]
+ self.message = args[1]
def _on_warning(self, args):
warningInfo = Tracer.WarningInfo(args)
@@ -331,13 +337,19 @@ class Tracer:
Report.info("Tracer caught Assert: %s:%i[%s] \"%s\"" % (assertInfo.filename, assertInfo.line, assertInfo.function, assertInfo.message))
self.has_asserts = True
return False
-
+
+ def _on_printf(self, args):
+ printInfo = Tracer.PrintInfo(args)
+ self.prints.append(printInfo)
+ return False
+
def __enter__(self):
self.handler = azlmbr.debug.TraceMessageBusHandler()
self.handler.connect(None)
self.handler.add_callback("OnPreAssert", self._on_assert)
self.handler.add_callback("OnPreWarning", self._on_warning)
self.handler.add_callback("OnPreError", self._on_error)
+ self.handler.add_callback("OnPrintf", self._on_printf)
return self
def __exit__(self, type, value, traceback):
diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py
index 2677ba5605..5cfc57fd5f 100755
--- a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py
+++ b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C18977329
# Test Case Title : Add cloth simulation to a Mesh
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977329
# fmt: off
class Tests:
@@ -20,7 +19,7 @@ class Tests:
exit_game_mode = ("Exited game mode", "Failed to exit game mode")
# fmt: on
-def run():
+def C18977329_NvCloth_AddClothSimulationToMesh():
"""
Summary:
Load level with Entity having Mesh and Cloth components already setup. Verify that editor remains stable in Game mode.
@@ -89,4 +88,7 @@ def run():
helper.close_editor()
if __name__ == "__main__":
- run()
+ import ImportPathHelper as imports
+ imports.init()
+ from editor_python_test_tools.utils import Report
+ Report.start_test(C18977329_NvCloth_AddClothSimulationToMesh)
diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py
index 2d4fa4e325..c21df8ea4c 100755
--- a/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py
+++ b/AutomatedTesting/Gem/PythonTests/NvCloth/C18977330_NvCloth_AddClothSimulationToActor.py
@@ -11,7 +11,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C18977330
# Test Case Title : Add cloth simulation to an Actor
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977330
# fmt: off
class Tests:
@@ -20,7 +19,7 @@ class Tests:
exit_game_mode = ("Exited game mode", "Failed to exit game mode")
# fmt: on
-def run():
+def C18977330_NvCloth_AddClothSimulationToActor():
"""
Summary:
Load level with Entity having Actor and Cloth components already setup. Verify that editor remains stable in Game mode.
@@ -89,4 +88,7 @@ def run():
helper.close_editor()
if __name__ == "__main__":
- run()
+ import ImportPathHelper as imports
+ imports.init()
+ from editor_python_test_tools.utils import Report
+ Report.start_test(C18977330_NvCloth_AddClothSimulationToActor)
diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Active.py b/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Active.py
index 162c54afc8..86bfc48636 100755
--- a/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Active.py
+++ b/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Active.py
@@ -21,14 +21,15 @@ sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesti
from base import TestAutomationBase
-@pytest.mark.SUITE_main
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
+ @pytest.mark.xfail(reason="Running with atom null renderer is causing this test to fail")
def test_C18977329_NvCloth_AddClothSimulationToMesh(self, request, workspace, editor, launcher_platform):
from . import C18977329_NvCloth_AddClothSimulationToMesh as test_module
self._run_test(request, workspace, editor, test_module)
+ @pytest.mark.xfail(reason="Running with atom null renderer is causing this test to fail")
def test_C18977330_NvCloth_AddClothSimulationToActor(self, request, workspace, editor, launcher_platform):
from . import C18977330_NvCloth_AddClothSimulationToActor as test_module
self._run_test(request, workspace, editor, test_module)
diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py
index dabc04575f..86a27e588e 100755
--- a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py
+++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798177_WhiteBox_AddComponentToEntity.py
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C28798177
# Test Case Title : White Box Tool Component can be added to an Entity
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798177
# fmt:off
diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py
index 18a5c3164e..7a2a08a8ce 100755
--- a/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py
+++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/C28798205_WhiteBox_SetInvisible.py
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C28798205
# Test Case Title : From the White Box Component Card the White Box Mesh can be set to be invisible in Game View
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28798205
# fmt:off
diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py
index e892285dde..635c804914 100755
--- a/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py
+++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/C29279329_WhiteBox_SetDefaultShape.py
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C29279329
# Test Case Title : White Box mesh shape can be changed with the Default Shape dropdown on the Component
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/29279329
# fmt:off
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
index aafa2ff9b7..0b75760e05 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
@@ -18,7 +18,7 @@ import pytest
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
-EDITOR_TIMEOUT = 120
+EDITOR_TIMEOUT = 300
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@@ -27,6 +27,155 @@ TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@pytest.mark.parametrize("level", ["auto_test"])
class TestAtomEditorComponentsMain(object):
- # It requires at least one test
- def test_Dummy(self, request, editor, level, workspace, project, launcher_platform):
- pass
+ @pytest.mark.test_case_id(
+ "C32078130", # Display Mapper
+ "C32078129", # Light
+ "C32078131", # Radius Weight Modifier
+ "C32078127", # PostFX Layer
+ "C32078125", # Physical Sky
+ "C32078115", # Global Skylight (IBL)
+ "C32078121", # Exposure Control
+ "C32078120", # Directional Light
+ "C32078119", # DepthOfField
+ "C32078118") # Decal (Atom)
+ def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
+ cfg_args = [level]
+
+ expected_lines = [
+ # Decal (Atom) Component
+ "Decal (Atom) Entity successfully created",
+ "Decal (Atom)_test: Component added to the entity: True",
+ "Decal (Atom)_test: Component removed after UNDO: True",
+ "Decal (Atom)_test: Component added after REDO: True",
+ "Decal (Atom)_test: Entered game mode: True",
+ "Decal (Atom)_test: Exit game mode: True",
+ "Decal (Atom) Controller|Configuration|Material: SUCCESS",
+ "Decal (Atom)_test: Entity is hidden: True",
+ "Decal (Atom)_test: Entity is shown: True",
+ "Decal (Atom)_test: Entity deleted: True",
+ "Decal (Atom)_test: UNDO entity deletion works: True",
+ "Decal (Atom)_test: REDO entity deletion works: True",
+ # DepthOfField Component
+ "DepthOfField Entity successfully created",
+ "DepthOfField_test: Component added to the entity: True",
+ "DepthOfField_test: Component removed after UNDO: True",
+ "DepthOfField_test: Component added after REDO: True",
+ "DepthOfField_test: Entered game mode: True",
+ "DepthOfField_test: Exit game mode: True",
+ "DepthOfField_test: Entity disabled initially: True",
+ "DepthOfField_test: Entity enabled after adding required components: True",
+ "DepthOfField Controller|Configuration|Camera Entity: SUCCESS",
+ "DepthOfField_test: Entity is hidden: True",
+ "DepthOfField_test: Entity is shown: True",
+ "DepthOfField_test: Entity deleted: True",
+ "DepthOfField_test: UNDO entity deletion works: True",
+ "DepthOfField_test: REDO entity deletion works: True",
+ # Exposure Control Component
+ "Exposure Control Entity successfully created",
+ "Exposure Control_test: Component added to the entity: True",
+ "Exposure Control_test: Component removed after UNDO: True",
+ "Exposure Control_test: Component added after REDO: True",
+ "Exposure Control_test: Entered game mode: True",
+ "Exposure Control_test: Exit game mode: True",
+ "Exposure Control_test: Entity disabled initially: True",
+ "Exposure Control_test: Entity enabled after adding required components: True",
+ "Exposure Control_test: Entity is hidden: True",
+ "Exposure Control_test: Entity is shown: True",
+ "Exposure Control_test: Entity deleted: True",
+ "Exposure Control_test: UNDO entity deletion works: True",
+ "Exposure Control_test: REDO entity deletion works: True",
+ # Global Skylight (IBL) Component
+ "Global Skylight (IBL) Entity successfully created",
+ "Global Skylight (IBL)_test: Component added to the entity: True",
+ "Global Skylight (IBL)_test: Component removed after UNDO: True",
+ "Global Skylight (IBL)_test: Component added after REDO: True",
+ "Global Skylight (IBL)_test: Entered game mode: True",
+ "Global Skylight (IBL)_test: Exit game mode: True",
+ "Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS",
+ "Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS",
+ "Global Skylight (IBL)_test: Entity is hidden: True",
+ "Global Skylight (IBL)_test: Entity is shown: True",
+ "Global Skylight (IBL)_test: Entity deleted: True",
+ "Global Skylight (IBL)_test: UNDO entity deletion works: True",
+ "Global Skylight (IBL)_test: REDO entity deletion works: True",
+ # Physical Sky Component
+ "Physical Sky Entity successfully created",
+ "Physical Sky component was added to entity",
+ "Entity has a Physical Sky component",
+ "Physical Sky_test: Component added to the entity: True",
+ "Physical Sky_test: Component removed after UNDO: True",
+ "Physical Sky_test: Component added after REDO: True",
+ "Physical Sky_test: Entered game mode: True",
+ "Physical Sky_test: Exit game mode: True",
+ "Physical Sky_test: Entity is hidden: True",
+ "Physical Sky_test: Entity is shown: True",
+ "Physical Sky_test: Entity deleted: True",
+ "Physical Sky_test: UNDO entity deletion works: True",
+ "Physical Sky_test: REDO entity deletion works: True",
+ # PostFX Layer Component
+ "PostFX Layer Entity successfully created",
+ "PostFX Layer_test: Component added to the entity: True",
+ "PostFX Layer_test: Component removed after UNDO: True",
+ "PostFX Layer_test: Component added after REDO: True",
+ "PostFX Layer_test: Entered game mode: True",
+ "PostFX Layer_test: Exit game mode: True",
+ "PostFX Layer_test: Entity is hidden: True",
+ "PostFX Layer_test: Entity is shown: True",
+ "PostFX Layer_test: Entity deleted: True",
+ "PostFX Layer_test: UNDO entity deletion works: True",
+ "PostFX Layer_test: REDO entity deletion works: True",
+ # Radius Weight Modifier Component
+ "Radius Weight Modifier Entity successfully created",
+ "Radius Weight Modifier_test: Component added to the entity: True",
+ "Radius Weight Modifier_test: Component removed after UNDO: True",
+ "Radius Weight Modifier_test: Component added after REDO: True",
+ "Radius Weight Modifier_test: Entered game mode: True",
+ "Radius Weight Modifier_test: Exit game mode: True",
+ "Radius Weight Modifier_test: Entity is hidden: True",
+ "Radius Weight Modifier_test: Entity is shown: True",
+ "Radius Weight Modifier_test: Entity deleted: True",
+ "Radius Weight Modifier_test: UNDO entity deletion works: True",
+ "Radius Weight Modifier_test: REDO entity deletion works: True",
+ # Light Component
+ "Light Entity successfully created",
+ "Light_test: Component added to the entity: True",
+ "Light_test: Component removed after UNDO: True",
+ "Light_test: Component added after REDO: True",
+ "Light_test: Entered game mode: True",
+ "Light_test: Exit game mode: True",
+ "Light_test: Entity is hidden: True",
+ "Light_test: Entity is shown: True",
+ "Light_test: Entity deleted: True",
+ "Light_test: UNDO entity deletion works: True",
+ "Light_test: REDO entity deletion works: True",
+ # Display Mapper Component
+ "Display Mapper Entity successfully created",
+ "Display Mapper_test: Component added to the entity: True",
+ "Display Mapper_test: Component removed after UNDO: True",
+ "Display Mapper_test: Component added after REDO: True",
+ "Display Mapper_test: Entered game mode: True",
+ "Display Mapper_test: Exit game mode: True",
+ "Display Mapper_test: Entity is hidden: True",
+ "Display Mapper_test: Entity is shown: True",
+ "Display Mapper_test: Entity deleted: True",
+ "Display Mapper_test: UNDO entity deletion works: True",
+ "Display Mapper_test: REDO entity deletion works: True",
+ ]
+
+ unexpected_lines = [
+ "failed to open",
+ "Traceback (most recent call last):",
+ ]
+
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ editor,
+ "hydra_AtomEditorComponents_AddedToEntity.py",
+ timeout=EDITOR_TIMEOUT,
+ expected_lines=expected_lines,
+ unexpected_lines=unexpected_lines,
+ halt_on_unexpected=True,
+ null_renderer=True,
+ cfg_args=cfg_args,
+ )
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_SandboxSuite.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_SandboxSuite.py
index 8ca5b5aa31..0fb873e677 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_SandboxSuite.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_SandboxSuite.py
@@ -19,170 +19,6 @@ import pytest
@pytest.mark.parametrize("level", ["auto_test"])
class TestAtomEditorComponentsSandbox(object):
- @pytest.mark.test_case_id(
- "C32078117", # Area Light
- "C32078130", # Display Mapper
- "C32078129", # Light
- "C32078131", # Radius Weight Modifier
- "C32078127", # PostFX Layer
- "C32078126", # Point Light
- "C32078125", # Physical Sky
- "C32078115", # Global Skylight (IBL)
- "C32078121", # Exposure Control
- "C32078120", # Directional Light
- "C32078119", # DepthOfField
- "C32078118") # Decal
- def test_AtomEditorComponents_AddedToEntity(self, request, editor, level, workspace, project, launcher_platform):
- cfg_args = [level]
-
- expected_lines = [
- # Decal Component
- "Decal (Atom) Entity successfully created",
- "Decal (Atom)_test: Component added to the entity: True",
- "Decal (Atom)_test: Component removed after UNDO: True",
- "Decal (Atom)_test: Component added after REDO: True",
- "Decal (Atom)_test: Entered game mode: True",
- "Decal (Atom)_test: Exit game mode: True",
- "Decal (Atom) Controller|Configuration|Material: SUCCESS",
- "Decal (Atom)_test: Entity is hidden: True",
- "Decal (Atom)_test: Entity is shown: True",
- "Decal (Atom)_test: Entity deleted: True",
- "Decal (Atom)_test: UNDO entity deletion works: True",
- "Decal (Atom)_test: REDO entity deletion works: True",
- # DepthOfField Component
- "DepthOfField Entity successfully created",
- "DepthOfField_test: Component added to the entity: True",
- "DepthOfField_test: Component removed after UNDO: True",
- "DepthOfField_test: Component added after REDO: True",
- "DepthOfField_test: Entered game mode: True",
- "DepthOfField_test: Exit game mode: True",
- "DepthOfField_test: Entity disabled initially: True",
- "DepthOfField_test: Entity enabled after adding required components: True",
- "DepthOfField Controller|Configuration|Camera Entity: SUCCESS",
- "DepthOfField_test: Entity is hidden: True",
- "DepthOfField_test: Entity is shown: True",
- "DepthOfField_test: Entity deleted: True",
- "DepthOfField_test: UNDO entity deletion works: True",
- "DepthOfField_test: REDO entity deletion works: True",
- # Directional Light Component
- "Directional Light Entity successfully created",
- "Directional Light_test: Component added to the entity: True",
- "Directional Light_test: Component removed after UNDO: True",
- "Directional Light_test: Component added after REDO: True",
- "Directional Light_test: Entered game mode: True",
- "Directional Light_test: Exit game mode: True",
- "Directional Light Controller|Configuration|Shadow|Camera: SUCCESS",
- "Directional Light_test: Entity is hidden: True",
- "Directional Light_test: Entity is shown: True",
- "Directional Light_test: Entity deleted: True",
- "Directional Light_test: UNDO entity deletion works: True",
- "Directional Light_test: REDO entity deletion works: True",
- # Exposure Control Component
- "Exposure Control Entity successfully created",
- "Exposure Control_test: Component added to the entity: True",
- "Exposure Control_test: Component removed after UNDO: True",
- "Exposure Control_test: Component added after REDO: True",
- "Exposure Control_test: Entered game mode: True",
- "Exposure Control_test: Exit game mode: True",
- "Exposure Control_test: Entity disabled initially: True",
- "Exposure Control_test: Entity enabled after adding required components: True",
- "Exposure Control_test: Entity is hidden: True",
- "Exposure Control_test: Entity is shown: True",
- "Exposure Control_test: Entity deleted: True",
- "Exposure Control_test: UNDO entity deletion works: True",
- "Exposure Control_test: REDO entity deletion works: True",
- # Global Skylight (IBL) Component
- "Global Skylight (IBL) Entity successfully created",
- "Global Skylight (IBL)_test: Component added to the entity: True",
- "Global Skylight (IBL)_test: Component removed after UNDO: True",
- "Global Skylight (IBL)_test: Component added after REDO: True",
- "Global Skylight (IBL)_test: Entered game mode: True",
- "Global Skylight (IBL)_test: Exit game mode: True",
- "Global Skylight (IBL) Controller|Configuration|Diffuse Image: SUCCESS",
- "Global Skylight (IBL) Controller|Configuration|Specular Image: SUCCESS",
- "Global Skylight (IBL)_test: Entity is hidden: True",
- "Global Skylight (IBL)_test: Entity is shown: True",
- "Global Skylight (IBL)_test: Entity deleted: True",
- "Global Skylight (IBL)_test: UNDO entity deletion works: True",
- "Global Skylight (IBL)_test: REDO entity deletion works: True",
- # Physical Sky Component
- "Physical Sky Entity successfully created",
- "Physical Sky component was added to entity",
- "Entity has a Physical Sky component",
- "Physical Sky_test: Component added to the entity: True",
- "Physical Sky_test: Component removed after UNDO: True",
- "Physical Sky_test: Component added after REDO: True",
- "Physical Sky_test: Entered game mode: True",
- "Physical Sky_test: Exit game mode: True",
- "Physical Sky_test: Entity is hidden: True",
- "Physical Sky_test: Entity is shown: True",
- "Physical Sky_test: Entity deleted: True",
- "Physical Sky_test: UNDO entity deletion works: True",
- "Physical Sky_test: REDO entity deletion works: True",
- # PostFX Layer Component
- "PostFX Layer Entity successfully created",
- "PostFX Layer_test: Component added to the entity: True",
- "PostFX Layer_test: Component removed after UNDO: True",
- "PostFX Layer_test: Component added after REDO: True",
- "PostFX Layer_test: Entered game mode: True",
- "PostFX Layer_test: Exit game mode: True",
- "PostFX Layer_test: Entity is hidden: True",
- "PostFX Layer_test: Entity is shown: True",
- "PostFX Layer_test: Entity deleted: True",
- "PostFX Layer_test: UNDO entity deletion works: True",
- "PostFX Layer_test: REDO entity deletion works: True",
- # Radius Weight Modifier Component
- "Radius Weight Modifier Entity successfully created",
- "Radius Weight Modifier_test: Component added to the entity: True",
- "Radius Weight Modifier_test: Component removed after UNDO: True",
- "Radius Weight Modifier_test: Component added after REDO: True",
- "Radius Weight Modifier_test: Entered game mode: True",
- "Radius Weight Modifier_test: Exit game mode: True",
- "Radius Weight Modifier_test: Entity is hidden: True",
- "Radius Weight Modifier_test: Entity is shown: True",
- "Radius Weight Modifier_test: Entity deleted: True",
- "Radius Weight Modifier_test: UNDO entity deletion works: True",
- "Radius Weight Modifier_test: REDO entity deletion works: True",
- # Light Component
- "Light Entity successfully created",
- "Light_test: Component added to the entity: True",
- "Light_test: Component removed after UNDO: True",
- "Light_test: Component added after REDO: True",
- "Light_test: Entered game mode: True",
- "Light_test: Exit game mode: True",
- "Light_test: Entity is hidden: True",
- "Light_test: Entity is shown: True",
- "Light_test: Entity deleted: True",
- "Light_test: UNDO entity deletion works: True",
- "Light_test: REDO entity deletion works: True",
- # Display Mapper Component
- "Display Mapper Entity successfully created",
- "Display Mapper_test: Component added to the entity: True",
- "Display Mapper_test: Component removed after UNDO: True",
- "Display Mapper_test: Component added after REDO: True",
- "Display Mapper_test: Entered game mode: True",
- "Display Mapper_test: Exit game mode: True",
- "Display Mapper_test: Entity is hidden: True",
- "Display Mapper_test: Entity is shown: True",
- "Display Mapper_test: Entity deleted: True",
- "Display Mapper_test: UNDO entity deletion works: True",
- "Display Mapper_test: REDO entity deletion works: True",
- ]
-
- unexpected_lines = [
- "failed to open",
- "Traceback (most recent call last):",
- ]
-
- hydra.launch_and_validate_results(
- request,
- TEST_DIRECTORY,
- editor,
- "hydra_AtomEditorComponents_AddedToEntity.py",
- timeout=EDITOR_TIMEOUT,
- expected_lines=expected_lines,
- unexpected_lines=unexpected_lines,
- halt_on_unexpected=True,
- null_renderer=True,
- cfg_args=cfg_args,
- )
+ # It requires at least one test
+ def test_Dummy(self, request, editor, level, workspace, project, launcher_platform):
+ pass
diff --git a/AutomatedTesting/Gem/PythonTests/editor/test_AssetPicker.py b/AutomatedTesting/Gem/PythonTests/editor/test_AssetPicker.py
index ac499d734f..90ca3690e4 100644
--- a/AutomatedTesting/Gem/PythonTests/editor/test_AssetPicker.py
+++ b/AutomatedTesting/Gem/PythonTests/editor/test_AssetPicker.py
@@ -42,6 +42,7 @@ class TestAssetPicker(object):
@pytest.mark.test_case_id("C13751579", "C1508814")
@pytest.mark.SUITE_periodic
+ @pytest.mark.xfail # ATOM-15493
def test_AssetPicker_UI_UX(self, request, editor, level, launcher_platform):
expected_lines = [
"TestEntity Entity successfully created",
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py b/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py
index e415687001..bc7b1b5e00 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py
@@ -98,5 +98,5 @@ if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
- from utils import Report
+ from editor_python_test_tools.utils import Report
Report.start_test(C14861501_PhysXCollider_RenderMeshAutoAssigned)
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py b/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py
index c76c5cab80..8400364626 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py
@@ -68,7 +68,7 @@ def C14976308_ScriptCanvas_SetKinematicTargetTransform():
the script deactivates Signal, Sphere's transform will update to that of Transform_Target.
NOTE: There is a known bug (LY-107723) which causes the rotation to update to a value that is not sufficiently close
to the expected result when using Set Kinematic Target which will cause the test to fail:
- https://jira.agscollab.com/browse/LY-107723
+ LY-107723
Test Steps:
1) Open level and enter game mode
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py b/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py
index 4ae10288bd..e714da9de7 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C3510644_Collider_CollisionGroups.py
@@ -13,7 +13,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# Test case ID : C3510644
# Test Case Title : Check that the collision layer and collision group of the terrain can be changed
# and the collision behavior of the terrain changes accordingly
-# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/3510644
# fmt: off
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py b/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py
index d65e9050bd..57cdc8f9c5 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py
@@ -114,5 +114,5 @@ if __name__ == "__main__":
import ImportPathHelper as imports
imports.init()
- from utils import Report
+ from editor_python_test_tools.utils import Report
Report.start_test(C4044695_PhysXCollider_AddMultipleSurfaceFbx)
diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py b/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py
index 4b0b036970..08083a7868 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py
@@ -239,7 +239,7 @@ def C6321601_Force_HighValuesDirectionAxes():
force_notification_handler.add_callback("OnCalculateNetForce", on_calc_net_force)
# Wait for 3 secs, because there is a known bug identified and filed in
- # JIRA https://jira.agscollab.com/browse/LY-107677
+ # JIRA LY-107677
# The error "[Error] Huge object being added to a COctreeNode, name: 'MeshComponentRenderNode', objBox:"
# will show (if occured) in about 3 sec into the game mode.
helper.wait_for_condition(has_physx_error, 3.0)
diff --git a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py
index 8f098941ea..8986c1024a 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_InDevelopment.py
@@ -50,7 +50,7 @@ class TestAutomation(TestAutomationBase):
unexpected_lines = ["Assert"]
self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines)
- # BUG: https://jira.agscollab.com/browse/LY-107723")
+ # BUG: LY-107723")
def test_C14976308_ScriptCanvas_SetKinematicTargetTransform(self, request, workspace, editor):
from . import C14976308_ScriptCanvas_SetKinematicTargetTransform as test_module
diff --git a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Main.py
index f81445fe03..8f1f2f7481 100644
--- a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Main.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Main.py
@@ -73,7 +73,7 @@ class TestAutomation(TestAutomationBase):
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
- @fm.file_override('physxsystemconfiguration.setreg','C4982593_PhysXCollider_CollisionLayer.setreg', 'AutomatedTesting/Registry')
+ @fm.file_override('physxsystemconfiguration.setreg','C4982593_PhysXCollider_CollisionLayer.setreg_override', 'AutomatedTesting/Registry')
def test_C4982593_PhysXCollider_CollisionLayerTest(self, request, workspace, editor, launcher_platform):
from . import C4982593_PhysXCollider_CollisionLayerTest as test_module
self._run_test(request, workspace, editor, test_module)
diff --git a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Periodic.py
index 93831e9658..2b82c3e596 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Periodic.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/TestSuite_Periodic.py
@@ -308,19 +308,19 @@ class TestAutomation(TestAutomationBase):
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
- @fm.file_override('physxsystemconfiguration.setreg','C4976245_PhysXCollider_CollisionLayerTest.setreg', 'AutomatedTesting/Registry')
+ @fm.file_override('physxsystemconfiguration.setreg','C4976245_PhysXCollider_CollisionLayerTest.setreg_override', 'AutomatedTesting/Registry')
def test_C4976245_PhysXCollider_CollisionLayerTest(self, request, workspace, editor, launcher_platform):
from . import C4976245_PhysXCollider_CollisionLayerTest as test_module
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
- @fm.file_override('physxsystemconfiguration.setreg','C4976244_Collider_SameGroupSameLayerCollision.setreg', 'AutomatedTesting/Registry')
+ @fm.file_override('physxsystemconfiguration.setreg','C4976244_Collider_SameGroupSameLayerCollision.setreg_override', 'AutomatedTesting/Registry')
def test_C4976244_Collider_SameGroupSameLayerCollision(self, request, workspace, editor, launcher_platform):
from . import C4976244_Collider_SameGroupSameLayerCollision as test_module
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
- @fm.file_override('physxdefaultsceneconfiguration.setreg','C14195074_ScriptCanvas_PostUpdateEvent.setreg', 'AutomatedTesting/Registry')
+ @fm.file_override('physxdefaultsceneconfiguration.setreg','C14195074_ScriptCanvas_PostUpdateEvent.setreg_override', 'AutomatedTesting/Registry')
def test_C14195074_ScriptCanvas_PostUpdateEvent(self, request, workspace, editor, launcher_platform):
from . import C14195074_ScriptCanvas_PostUpdateEvent as test_module
self._run_test(request, workspace, editor, test_module)
@@ -331,7 +331,7 @@ class TestAutomation(TestAutomationBase):
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
- @fm.file_override('physxdefaultsceneconfiguration.setreg','C14902097_ScriptCanvas_PreUpdateEvent.setreg', 'AutomatedTesting/Registry')
+ @fm.file_override('physxdefaultsceneconfiguration.setreg','C14902097_ScriptCanvas_PreUpdateEvent.setreg_override', 'AutomatedTesting/Registry')
def test_C14902097_ScriptCanvas_PreUpdateEvent(self, request, workspace, editor, launcher_platform):
from . import C14902097_ScriptCanvas_PreUpdateEvent as test_module
self._run_test(request, workspace, editor, test_module)
@@ -365,7 +365,7 @@ class TestAutomation(TestAutomationBase):
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
- @fm.file_override('physxsystemconfiguration.setreg','C4976227_Collider_NewGroup.setreg', 'AutomatedTesting/Registry')
+ @fm.file_override('physxsystemconfiguration.setreg','C4976227_Collider_NewGroup.setreg_override', 'AutomatedTesting/Registry')
def test_C4976227_Collider_NewGroup(self, request, workspace, editor, launcher_platform):
from . import C4976227_Collider_NewGroup as test_module
self._run_test(request, workspace, editor, test_module)
@@ -429,6 +429,8 @@ class TestAutomation(TestAutomationBase):
from . import C4976236_AddPhysxColliderComponent as test_module
self._run_test(request, workspace, editor, test_module)
+ @pytest.mark.xfail(
+ reason="This will fail due to this issue ATOM-15487.")
def test_C14861502_PhysXCollider_AssetAutoAssigned(self, request, workspace, editor, launcher_platform):
from . import C14861502_PhysXCollider_AssetAutoAssigned as test_module
self._run_test(request, workspace, editor, test_module)
@@ -450,7 +452,7 @@ class TestAutomation(TestAutomationBase):
self._run_test(request, workspace, editor, test_module)
@revert_physics_config
- @fm.file_override('physxsystemconfiguration.setreg','C3510644_Collider_CollisionGroups.setreg', 'AutomatedTesting/Registry')
+ @fm.file_override('physxsystemconfiguration.setreg','C3510644_Collider_CollisionGroups.setreg_override', 'AutomatedTesting/Registry')
def test_C3510644_Collider_CollisionGroups(self, request, workspace, editor, launcher_platform):
from . import C3510644_Collider_CollisionGroups as test_module
self._run_test(request, workspace, editor, test_module)
diff --git a/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py b/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py
index 5f24f41083..b6d7c610e3 100755
--- a/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py
+++ b/AutomatedTesting/Gem/PythonTests/physics/UtilTest_Physmaterial_Editor.py
@@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
'''
This unittest might have to be refactored once changes to Physmaterial_Editor.py are made.
These changes will occur after the but, reverence below is resloved.
-Bug: https://jira.agscollab.com/browse/LY-107392
+Bug: LY-107392
'''
class Tests:
opening_bad_file = ("Bad file could not be opened", "Bad file was opened")
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py
new file mode 100644
index 0000000000..b844f9e4af
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py
@@ -0,0 +1,123 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92569013
+Test Case Title: Script Event file can be created
+"""
+
+
+# fmt: off
+class Tests():
+ new_event_created = ("New Script Event created", "New Script Event not created")
+ child_event_created = ("Child Event created", "Child not created")
+ file_saved = ("Script event file saved", "Script event file did not save")
+ console_error = ("No unexpected error in console", "Error found in console")
+ console_warning = ("No unexpected warning in console", "Warning found in console")
+# fmt: on
+
+
+def CreateScriptEventFile():
+ """
+ Summary:
+ Script Event file can be created
+
+ Expected Behavior:
+ File is created without any errors and warnings in Console
+
+ Test Steps:
+ 1) Open Asset Editor
+ 2) Get Asset Editor Qt object
+ 3) Create new Script Event Asset
+ 4) Add new child event
+ 5) Save the Script Event file
+ 6) Verify if file is created
+ 7) Verify console for errors/warnings
+ 8) Close Asset Editor
+
+ 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 os
+ from utils import Report
+ from utils import TestHelper as helper
+ from utils import Tracer
+ import pyside_utils
+
+ # Open 3D Engine imports
+ import azlmbr.legacy.general as general
+ import azlmbr.editor as editor
+ import azlmbr.bus as bus
+
+ # Pyside imports
+ from PySide2 import QtWidgets
+
+ GENERAL_WAIT = 1.0 # seconds
+
+ FILE_PATH = os.path.join("AutomatedTesting", "ScriptCanvas", "test_file.scriptevent")
+
+ # 1) Open Asset Editor
+ general.idle_enable(True)
+ # Initially close the Asset Editor and then reopen to ensure we don't have any existing assets open
+ general.close_pane("Asset Editor")
+ general.open_pane("Asset Editor")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Asset Editor"), 5.0)
+
+ # 2) Get Asset Editor Qt object
+ editor_window = pyside_utils.get_editor_main_window()
+ asset_editor_widget = editor_window.findChild(QtWidgets.QDockWidget, "Asset Editor").findChild(
+ QtWidgets.QWidget, "AssetEditorWindowClass"
+ )
+ container = asset_editor_widget.findChild(QtWidgets.QWidget, "ContainerForRows")
+ menu_bar = asset_editor_widget.findChild(QtWidgets.QMenuBar)
+
+ # 3) Create new Script Event Asset
+ action = pyside_utils.find_child_by_pattern(menu_bar, {"type": QtWidgets.QAction, "text": "Script Events"})
+ action.trigger()
+ result = helper.wait_for_condition(
+ lambda: container.findChild(QtWidgets.QFrame, "Events") is not None, 3 * GENERAL_WAIT
+ )
+ Report.result(Tests.new_event_created, result)
+
+ # 4) Add new child event
+ add_event = container.findChild(QtWidgets.QFrame, "Events").findChild(QtWidgets.QToolButton, "")
+ add_event.click()
+ result = helper.wait_for_condition(
+ lambda: asset_editor_widget.findChild(QtWidgets.QFrame, "EventName") is not None, GENERAL_WAIT
+ )
+ Report.result(Tests.child_event_created, result)
+
+ with Tracer() as section_tracer:
+ # 5) Save the Script Event file
+ editor.AssetEditorWidgetRequestsBus(bus.Broadcast, "SaveAssetAs", FILE_PATH)
+
+ # 6) Verify if file is created
+ result = helper.wait_for_condition(lambda: os.path.exists(FILE_PATH), 3 * GENERAL_WAIT)
+ Report.result(Tests.file_saved, result)
+
+ # 7) Verify console for errors/warnings
+ Report.result(Tests.console_error, not section_tracer.has_errors)
+ Report.result(Tests.console_warning, not section_tracer.has_warnings)
+
+ # 8) Close Asset Editor
+ general.close_pane("Asset Editor")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(CreateScriptEventFile)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py
new file mode 100644
index 0000000000..e4fec76fe2
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py
@@ -0,0 +1,128 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92568942
+Test Case Title: Clicking the "+" button and selecting "New Script Event" opens the
+Asset Editor with a new Script Event asset
+"""
+
+from PySide2 import QtWidgets
+import azlmbr.legacy.general as general
+
+import editor_python_test_tools.pyside_utils as pyside_utils
+from editor_python_test_tools.utils import TestHelper as helper
+from editor_python_test_tools.utils import Report
+
+
+class Tests:
+ action_found = "New Script event action found"
+ asset_editor_opened = "Asset Editor opened"
+ new_asset = "Asset Editor created with new asset"
+ script_event = "New Script event created in Asset Editor"
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+class TestAssetEditor_NewScriptEvent:
+ """
+ Summary:
+ Clicking the "+" button in Node Palette and creating New Script Event opens Asset Editor
+
+ Expected Behavior:
+ Clicking the "+" button and selecting "New Script Event" opens the Asset Editor with a
+ new Script Event asset
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Close any existing AssetEditor window
+ 3) Get the SC window object
+ 4) Click on New Script Event on Node palette
+ 5) Verify if Asset Editor opened
+ 6) Verify if a new asset with Script Canvas category is opened
+ 7) Close Script Canvas and Asset Editor
+
+
+ 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
+ """
+
+ @pyside_utils.wrap_async
+ async def run_test(self):
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+
+ # 2) Close any existing AssetEditor window
+ general.close_pane("Asset Editor")
+ helper.wait_for_condition(lambda: not general.is_pane_visible("Asset Editor"), 5.0)
+
+ # 3) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
+ frame = node_palette.findChild(QtWidgets.QFrame, "searchCustomization")
+ button = frame.findChild(QtWidgets.QToolButton)
+ pyside_utils.click_button_async(button)
+
+ # 4) Click on New Script Event on Node palette
+ menu = None
+
+ def menu_has_focus():
+ nonlocal menu
+ for fw in [
+ QtWidgets.QApplication.activePopupWidget(),
+ QtWidgets.QApplication.activeModalWidget(),
+ QtWidgets.QApplication.focusWidget(),
+ QtWidgets.QApplication.activeWindow(),
+ ]:
+ print(fw)
+ if fw and isinstance(fw, QtWidgets.QMenu) and fw.isVisible():
+ menu = fw
+ return True
+ return False
+
+ await pyside_utils.wait_for_condition(menu_has_focus, GENERAL_WAIT)
+ action = await pyside_utils.wait_for_action_in_menu(menu, {"text": "New Script Event"})
+ Report.info(f"{Tests.action_found}: {action is not None}")
+ action.trigger()
+ pyside_utils.queue_hide_event(menu)
+
+ # 5) Verify if Asset Editor opened
+ result = helper.wait_for_condition(lambda: general.is_pane_visible("Asset Editor"), GENERAL_WAIT)
+ Report.info(f"{Tests.asset_editor_opened}: {result}")
+
+ # 6) Verify if a new asset with Script Canvas category is opened
+ asset_editor = editor_window.findChild(QtWidgets.QDockWidget, "Asset Editor")
+ row_container = asset_editor.findChild(QtWidgets.QWidget, "ContainerForRows")
+ # NOTE: QWidget ContainerForRows will have frames of Name, Category, ToolTip etc.
+ # To validate if a new script event file is generated, we check for
+ # QFrame Category and its value
+ categories = row_container.findChildren(QtWidgets.QFrame, "Category")
+ Report.info(f"{Tests.new_asset}: {len(categories)>0}")
+ result = False
+ for frame in categories:
+ line_edit = frame.findChild(QtWidgets.QLineEdit)
+ result = True if (line_edit and line_edit.text() == "Script Events") else False
+ Report.info(f"{Tests.script_event}: {result}")
+
+ # 7) Close Script Canvas and Asset Editor
+ general.close_pane("Script Canvas")
+ general.close_pane("Asset Editor")
+
+
+test = TestAssetEditor_NewScriptEvent()
+test.run_test()
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py
new file mode 100644
index 0000000000..0947b0bb51
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py
@@ -0,0 +1,143 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92568856
+Test Case Title: Multiple Entities can be targeted in the Debugger tool
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("New level created", "New level not created")
+ entities_found = ("Entities are found in Logging window", "Entities are not found in Logging window")
+ select_multiple_targets = ("Multiple targets are selected", "Multiple targets are not selected")
+# fmt: on
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+def Debugging_TargetMultipleEntities():
+ """
+ Summary:
+ Multiple Entities can be targeted in the Debugger tool
+
+ Expected Behavior:
+ Selected files can be checked for logging.
+ Upon checking, checkboxes of the parent folders change to either full or partial check.
+
+ Test Steps:
+ 1) Create temp level
+ 2) Create two entities with scriptcanvas components
+ 3) Set values for scriptcanvas
+ 4) Open Script Canvas window and get sc opbject
+ 5) Open Debugging(Logging) window
+ 6) Click on Entities tab in logging window
+ 7) Verify if the scriptcanvas exist under entities
+ 8) Verify if the entities can be selected
+ 9) Close Debugging window and Script Canvas window
+
+
+ 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
+ """
+
+ from PySide2 import QtWidgets
+ from PySide2.QtCore import Qt
+ import azlmbr.legacy.general as general
+ import azlmbr.math as math
+ import azlmbr.asset as asset
+ import azlmbr.bus as bus
+
+ import os
+ import pyside_utils
+ import hydra_editor_utils as hydra
+ from utils import TestHelper as helper
+ from utils import Report
+
+ LEVEL_NAME = "tmp_level"
+ ASSET_NAME_1 = "ScriptCanvas_TwoComponents0.scriptcanvas"
+ ASSET_NAME_2 = "ScriptCanvas_TwoComponents1.scriptcanvas"
+ ASSET_1 = os.path.join("scriptcanvas", ASSET_NAME_1)
+ ASSET_2 = os.path.join("scriptcanvas", ASSET_NAME_2)
+ WAIT_TIME = 3.0
+
+ def get_asset(asset_path):
+ return asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", asset_path, math.Uuid(), False)
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create two entities with scriptcanvas components
+ position = math.Vector3(512.0, 512.0, 32.0)
+ test_entity_1 = hydra.Entity("test_entity_1")
+ test_entity_1.create_entity(position, ["Script Canvas"])
+ test_entity_2 = hydra.Entity("test_entity_2")
+ test_entity_2.create_entity(position, ["Script Canvas"])
+
+ # 3) Set values for scriptcanvas
+ test_entity_1.get_set_test(0, "Script Canvas Asset|Script Canvas Asset", get_asset(ASSET_1))
+ test_entity_2.get_set_test(0, "Script Canvas Asset|Script Canvas Asset", get_asset(ASSET_2))
+
+ # 4) Open Script Canvas window and get sc opbject
+ general.open_pane("Script Canvas")
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 5) Open Debugging(Logging) window
+ if (
+ sc.findChild(QtWidgets.QDockWidget, "LoggingWindow") is None
+ or not sc.findChild(QtWidgets.QDockWidget, "LoggingWindow").isVisible()
+ ):
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Debugging", "type": QtWidgets.QAction})
+ action.trigger()
+ logging_window = sc.findChild(QtWidgets.QDockWidget, "LoggingWindow")
+
+ # 6) Click on Entities tab in logging window
+ button = pyside_utils.find_child_by_pattern(logging_window, {"type": QtWidgets.QPushButton, "text": "Entities"})
+ button.click()
+
+ # 7) Verify if the scriptcanvas exist under entities
+ entities = logging_window.findChild(QtWidgets.QWidget, "entitiesPage")
+ tree = entities.findChild(QtWidgets.QTreeView, "pivotTreeView")
+ asset_1_mi = pyside_utils.find_child_by_pattern(tree, ASSET_NAME_1.lower())
+ asset_2_mi = pyside_utils.find_child_by_pattern(tree, ASSET_NAME_2.lower())
+ result = asset_1_mi is not None and asset_2_mi is not None
+ Report.critical_result(Tests.entities_found, result)
+
+ # 8) Verify if the entities can be selected
+ tree.expandAll()
+ tree.model().setData(asset_1_mi, 2, Qt.CheckStateRole)
+ tree.model().setData(asset_2_mi, 2, Qt.CheckStateRole)
+ checklist = [asset_1_mi, asset_1_mi.parent(), asset_2_mi, asset_2_mi.parent()]
+ result = all([index.data(Qt.CheckStateRole) == 2 for index in checklist])
+ Report.critical_result(Tests.select_multiple_targets, result)
+
+ # 9) Close Debugging window and Script Canvas window
+ logging_window.close()
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(Debugging_TargetMultipleEntities)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py
new file mode 100644
index 0000000000..8d2c39f288
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py
@@ -0,0 +1,112 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92569137
+Test Case Title: Multiple Graphs can be targeted in the Debugger tool
+"""
+
+
+# fmt: off
+class Tests():
+ select_multiple_targets = ("Multiple targets are selected", "Multiple targets are not selected")
+# fmt: on
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+def Debugging_TargetMultipleGraphs():
+ """
+ Summary:
+ Multiple Graphs can be targeted in the Debugger tool
+
+ Expected Behavior:
+ Selected files can be checked for logging.
+ Upon checking, checkboxes of the parent folders change to either full or partial check.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Debugging Tool if not opened already
+ 4) Select Graphs tab under logging window
+ 5) Select multiple targets from levels and scriptcanvas
+ 6) Verify if multiple targets are selected
+ 7) Close Debugging window and Script Canvas window
+
+
+ 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
+ """
+
+ from PySide2 import QtWidgets
+ from PySide2.QtCore import Qt
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+ from utils import TestHelper as helper
+ from utils import Report
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 6.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 3) Open Debugging Tool if not opened already
+ if (
+ sc.findChild(QtWidgets.QDockWidget, "LoggingWindow") is None
+ or not sc.findChild(QtWidgets.QDockWidget, "LoggingWindow").isVisible()
+ ):
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Debugging", "type": QtWidgets.QAction})
+ action.trigger()
+ logging_window = sc.findChild(QtWidgets.QDockWidget, "LoggingWindow")
+
+ # 4) Select Graphs tab under logging window
+ button = pyside_utils.find_child_by_pattern(logging_window, {"type": QtWidgets.QPushButton, "text": "Graphs"})
+ button.click()
+
+ # 5) Select multiple targets from levels and scriptcanvas
+ graphs = logging_window.findChild(QtWidgets.QWidget, "graphsPage")
+ tree = graphs.findChild(QtWidgets.QTreeView, "pivotTreeView")
+ # Select the first child under levels
+ level_model_index = pyside_utils.find_child_by_pattern(tree, "levels")
+ level_child_index = pyside_utils.get_item_view_index(tree, 0, 0, level_model_index)
+ tree.model().setData(level_child_index, 2, Qt.CheckStateRole)
+ # Select the first child under scriptcanvas
+ sc_model_index = pyside_utils.find_child_by_pattern(tree, "scriptcanvas")
+ sc_child_index = pyside_utils.get_item_view_index(tree, 0, 0, sc_model_index)
+ tree.model().setData(sc_child_index, 2, Qt.CheckStateRole)
+
+ # 6) Verify if multiple targets are selected
+ result = all([index.data(Qt.CheckStateRole) != 0 for index in (level_model_index, sc_model_index)])
+ result = result and all([index.data(Qt.CheckStateRole) == 2 for index in (level_child_index, sc_child_index)])
+ Report.result(Tests.select_multiple_targets, result)
+
+ # 7) Close Debugging window and Script Canvas window
+ logging_window.close()
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(Debugging_TargetMultipleGraphs)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py
index 25dd83e5e2..537b4d817a 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py
@@ -10,13 +10,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702824
Test Case Title: Docking
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702824
"""
# fmt: off
class Tests():
- open_sc_window = ("Script Canvas window is opened", "Failed to open Script Canvas window")
pane_opened = ("Pane is opened successfully", "Failed to open pane")
dock_pane = ("Pane is docked successfully", "Failed to dock Pane into one or more allowed area")
# fmt: on
@@ -78,8 +76,7 @@ def Docking_Pane():
# 1) Open Script Canvas window (Tools > Script Canvas)
general.open_pane("Script Canvas")
- is_sc_visible = helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
- Report.result(Tests.open_sc_window, is_sc_visible)
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
# 2) Make sure Node Palette pane is opened
editor_window = pyside_utils.get_editor_main_window()
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py b/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py
new file mode 100644
index 0000000000..38ceb8335b
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py
@@ -0,0 +1,121 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92569049
+Test Case Title: Edit > Undo undoes the last action
+Test case ID: T92569051
+Test Case Title: Edit > Redo redoes the last undone action
+"""
+
+
+# fmt: off
+class Tests():
+ variable_created = ("New variable created", "New variable not created")
+ undo_worked = ("Undo action working", "Undo action did not work")
+ redo_worked = ("Redo action working", "Redo action did not work")
+# fmt: on
+
+
+def EditMenu_UndoRedo():
+ """
+ Summary:
+ Edit > Undo undoes the last action
+ Edit > Redo redoes the last undone action
+ We create a new variable in variable manager, undo and verify if variable is removed,
+ redo it and verify if the variable is created again.
+
+ Expected Behavior:
+ The last action is undone.
+ The last undone action is redone.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Variable Manager if not opened already
+ 4) Create Graph
+ 5) Create new variable
+ 6) Verify if the variable is created initially
+ 7) Trigger Undo action and verify if variable is removed in Variable Manager
+ 8) Trigger Redo action and verify if variable is readded in Variable Manager
+ 9) Close SC window
+
+ 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
+ """
+
+ from PySide2 import QtWidgets, QtCore
+
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+
+ # 1) Open Script Canvas window
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 3) Open Variable Manager if not opened already
+ if sc.findChild(QtWidgets.QDockWidget, "VariableManager") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Variable Manager", "type": QtWidgets.QAction})
+ action.trigger()
+ variable_manager = sc.findChild(QtWidgets.QDockWidget, "VariableManager")
+
+ # 4) Create Graph
+ action = pyside_utils.find_child_by_pattern(sc, {"objectName": "action_New_Script", "type": QtWidgets.QAction})
+ action.trigger()
+
+ # 5) Create new variable
+ add_button = variable_manager.findChild(QtWidgets.QPushButton, "addButton")
+ add_button.click() # Click on Create Variable button
+ # Select variable type
+ table_view = variable_manager.findChild(QtWidgets.QTableView, "variablePalette")
+ model_index = pyside_utils.find_child_by_pattern(table_view, "Boolean")
+ # Click on it to create variable
+ pyside_utils.item_view_index_mouse_click(table_view, model_index)
+
+ # 6) Verify if the variable is created initially
+ graph_vars = variable_manager.findChild(QtWidgets.QTableView, "graphVariables")
+ result = graph_vars.model().rowCount(QtCore.QModelIndex()) == 1 # since we added 1 variable, rowcount=1
+ Report.result(Tests.variable_created, result)
+
+ # 7) Trigger Undo action and verify if variable is removed in Variable Manager
+ action = sc.findChild(QtWidgets.QAction, "action_Undo")
+ action.trigger()
+ result = graph_vars.model().rowCount(QtCore.QModelIndex()) == 0 # since we triggered undo, rowcount=0
+ Report.result(Tests.undo_worked, result)
+
+ # 8) Trigger Redo action and verify if variable is readded in Variable Manager
+ action = sc.findChild(QtWidgets.QAction, "action_Redo")
+ action.trigger()
+ result = (
+ graph_vars.model().rowCount(QtCore.QModelIndex()) == 1
+ ) # since action is redone 1 variable is readded, rowcount=1
+ Report.result(Tests.redo_worked, result)
+
+ # 9) Close SC window
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(EditMenu_UndoRedo)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py b/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py
new file mode 100644
index 0000000000..47bbb955ec
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py
@@ -0,0 +1,87 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92562978
+Test Case Title: Script Canvas Component can be added to an entity
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("New level created", "Failed to create new level")
+ entity_created = ("Test Entity created", "Failed to create test entity")
+ add_sc_component = ("Script Canvas component added to entity", "Failed to add SC component to entity")
+ no_errors_found = ("Tracer found no errors", "One or more errors found by Tracer")
+ no_warnings_found = ("Tracer found no warnings", "One or more warnings found by Tracer")
+# fmt: on
+
+
+def Entity_AddScriptCanvasComponent():
+ """
+ Summary:
+ verify if Script Canvas component can be added to Entity without any issue
+
+ Expected Behavior:
+ Script Canvas Component is added to the entity successfully without issue.
+
+ Test Steps:
+ 1) Create temp level
+ 2) Create test entity
+ 3) Start Tracer
+ 4) Add Script Canvas component to test entity
+ 5) Search for errors and warnings
+
+
+ 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
+ """
+
+ from utils import TestHelper as helper
+ from utils import Tracer
+ from editor_entity_utils import EditorEntity
+ import azlmbr.legacy.general as general
+
+ LEVEL_NAME = "tmp_level"
+ WAIT_TIME = 3.0 # SECONDS
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create new entity
+ test_entity = EditorEntity.create_editor_entity("test_entity")
+ Report.result(Tests.entity_created, test_entity.id.IsValid())
+
+ # 3) Start Tracer
+ with Tracer() as section_tracer:
+
+ # 4) Add Script Canvas component to test entity
+ test_entity.add_component("Script Canvas")
+ Report.result(Tests.add_sc_component, test_entity.has_component("Script Canvas"))
+
+ # 5) Search for errors and warnings
+ Report.result(Tests.no_errors_found, not section_tracer.has_errors)
+ Report.result(Tests.no_warnings_found, not section_tracer.has_warnings)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(Entity_AddScriptCanvasComponent)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py b/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py
new file mode 100644
index 0000000000..3206590a8d
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py
@@ -0,0 +1,96 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92569037
+Test Case Title: File > New Script creates a new script
+Test case ID: T92569039
+Test Case Title: File > Open opens the Open... dialog
+"""
+
+import os
+import sys
+from PySide2 import QtWidgets
+import azlmbr.legacy.general as general
+
+import editor_python_test_tools.pyside_utils as pyside_utils
+from editor_python_test_tools.utils import Report
+
+# fmt: off
+class Tests():
+ new_action = "File->New action working as expected"
+ open_action = "File->Open action working as expected"
+# fmt: on
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+class TestFileMenuNewOpen:
+ """
+ Summary:
+ When clicked on File->New, new script opens and File->Open should open the FileBrowser
+
+ Expected Behavior:
+ New and Open actions should work as expected.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Trigger File->New action
+ 4) Verify if New tab is opened
+ 5) Trigger File->Open action
+ 6) Close Script Canvas window
+
+
+ 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
+ """
+
+ @pyside_utils.wrap_async
+ async def run_test(self):
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.open_pane("Script Canvas")
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ sc_main = sc.findChild(QtWidgets.QMainWindow)
+ sc_tabs = sc_main.findChild(QtWidgets.QTabWidget, "ScriptCanvasTabs")
+
+ # 3) Trigger File->New action
+ initial_tabs_count = sc_tabs.count()
+ action = pyside_utils.find_child_by_pattern(
+ sc_main, {"objectName": "action_New_Script", "type": QtWidgets.QAction}
+ )
+ action.trigger()
+
+ # 4) Verify if New tab is opened
+ general.idle_wait(GENERAL_WAIT)
+ Report.info(f"{Tests.new_action}: {sc_tabs.count() == initial_tabs_count + 1}")
+
+ # 5) Trigger File->Open action
+ action = pyside_utils.find_child_by_pattern(sc_main, {"objectName": "action_Open", "type": QtWidgets.QAction})
+ pyside_utils.trigger_action_async(action)
+ general.idle_wait(GENERAL_WAIT)
+ popup = await pyside_utils.wait_for_modal_widget()
+ Report.info(f"{Tests.open_action}: {popup and 'Open' in popup.windowTitle()}")
+ popup.close()
+
+ # 6) Close Script Canvas window
+ general.close_pane("Script Canvas")
+
+
+test = TestFileMenuNewOpen()
+test.run_test()
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py b/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py
new file mode 100644
index 0000000000..ec8f0c8fb6
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py
@@ -0,0 +1,108 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92563070
+Test Case Title: Graphs can be closed by clicking X on the Graph name tab
+Test case ID: T92563068
+Test Case Title: Save Prompt: User is prompted to save a graph on close after
+creating a new graph
+"""
+
+import os
+import sys
+from PySide2 import QtWidgets
+import azlmbr.legacy.general as general
+
+import editor_python_test_tools.pyside_utils as pyside_utils
+from editor_python_test_tools.utils import TestHelper as helper
+from editor_python_test_tools.utils import Report
+
+# fmt: off
+class Tests():
+ new_graph = "New graph created"
+ save_prompt = "Save prompt opened as expected"
+ close_graph = "Close button worked as expected"
+# fmt: on
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+class TestGraphCloseSavePrompt:
+ """
+ Summary:
+ The graph is closed when x button is clicked.
+ Save Prompt is opened before closing.
+
+ Expected Behavior:
+ New and Open actions should work as expected.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Trigger File->New action
+ 4) Verify if New tab is opened
+ 5) Close new tab using X on top of graph and check for save dialog
+ 6) Check if tab is closed
+ 7) Close Script Canvas window
+
+ 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
+ """
+
+ @pyside_utils.wrap_async
+ async def run_test(self):
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ sc_main = sc.findChild(QtWidgets.QMainWindow)
+ sc_tabs = sc_main.findChild(QtWidgets.QTabWidget, "ScriptCanvasTabs")
+ tab_bar = sc_tabs.findChild(QtWidgets.QTabBar)
+
+ # 3) Trigger File->New action
+ initial_tabs_count = sc_tabs.count()
+ action = pyside_utils.find_child_by_pattern(
+ sc_main, {"objectName": "action_New_Script", "type": QtWidgets.QAction}
+ )
+ action.trigger()
+
+ # 4) Verify if New tab is opened
+ result = helper.wait_for_condition(lambda: sc_tabs.count() == initial_tabs_count + 1, GENERAL_WAIT)
+ Report.info(f"{Tests.new_graph}: {result}")
+
+ # 5) Close new tab using X on top of graph and check for save dialog
+ close_button = tab_bar.findChildren(QtWidgets.QAbstractButton)[0]
+ pyside_utils.click_button_async(close_button)
+ popup = await pyside_utils.wait_for_modal_widget()
+ if popup:
+ Report.info(f"{Tests.save_prompt}: {popup.findChild(QtWidgets.QDialog, 'SaveChangesDialog') is not None}")
+ dont_save = popup.findChild(QtWidgets.QPushButton, "m_continueButton")
+ dont_save.click()
+
+ # 6) Check if tab is closed
+ await pyside_utils.wait_for_condition(lambda: sc_tabs.count() == initial_tabs_count, 5.0)
+ Report.info(f"{Tests.close_graph}: {sc_tabs.count()==initial_tabs_count}")
+
+ # 7) Close Script Canvas window
+ general.close_pane("Script Canvas")
+
+
+test = TestGraphCloseSavePrompt()
+test.run_test()
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py b/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py
new file mode 100644
index 0000000000..d2765bfdf7
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py
@@ -0,0 +1,118 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92569079
+Test Case Title: View > Zoom In zooms the graph in
+Test case ID: T92569081
+Test Case Title: View > Zoom In zooms the graph out
+"""
+
+
+# fmt: off
+class Tests():
+ zoom_in = ("Zoom In action working as expected", "Zoom In action not working as expected")
+ zoom_out = ("Zoom Out action working as expected", "Zoom Out action not working as expected")
+# fmt: on
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+def Graph_ZoomInZoomOut():
+ """
+ Summary:
+ The graph can be zoomed in and zoomed out.
+
+ Expected Behavior:
+ The graph is zoomed in when when we click View->ZoomIn
+ The graph is zoomed out when when we click View->ZoomOut
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Create new graph
+ 4) Get initial graph transform values
+ 5) Trigger Zoom In and verify if the graph transform scale is increased
+ 6) Trigger Zoom Out and verify if the graph transform scale is decreased
+ 7) Close Script Canvas window
+
+
+ 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
+ """
+
+ # Helper imports
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from PySide2 import QtWidgets
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+ from utils import TestHelper as helper
+ from utils import Report
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ sc_main = sc.findChild(QtWidgets.QMainWindow)
+
+ # 3) Create new graph
+ create_new_graph = pyside_utils.find_child_by_pattern(
+ sc_main, {"objectName": "action_New_Script", "type": QtWidgets.QAction}
+ )
+ create_new_graph.trigger()
+
+ # 4) Get initial graph transform values
+ graphics_view = sc_main.findChild(QtWidgets.QGraphicsView)
+ # NOTE: transform m11 and m22 are horizontal and vertical scales of graph
+ # they increase when zoomed in and decreased when zoomed out
+ curr_m11, curr_m22 = graphics_view.transform().m11(), graphics_view.transform().m22()
+
+ # 5) Trigger Zoom In and verify if the graph transform scale is increased
+ zin = pyside_utils.find_child_by_pattern(sc_main, {"objectName": "action_ZoomIn", "type": QtWidgets.QAction})
+ zin.trigger()
+ result = helper.wait_for_condition(
+ lambda: curr_m11 < graphics_view.transform().m11() and curr_m22 < graphics_view.transform().m22(), GENERAL_WAIT,
+ )
+ Report.result(Tests.zoom_in, result)
+
+ # 6) Trigger Zoom Out and verify if the graph transform scale is decreased
+ curr_m11, curr_m22 = graphics_view.transform().m11(), graphics_view.transform().m22()
+ zout = pyside_utils.find_child_by_pattern(sc_main, {"objectName": "action_ZoomOut", "type": QtWidgets.QAction})
+ zout.trigger()
+ result = helper.wait_for_condition(
+ lambda: curr_m11 > graphics_view.transform().m11() and curr_m22 > graphics_view.transform().m22(), GENERAL_WAIT,
+ )
+ Report.result(Tests.zoom_out, result)
+
+ # 7) Close Script Canvas window
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(Graph_ZoomInZoomOut)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py b/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py
index 8aede24d0e..23e5f87030 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py
@@ -9,8 +9,9 @@ remove or modify any license notices. This file is distributed on an "AS IS" BAS
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
+
def init():
import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
-
\ No newline at end of file
+ sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../EditorPythonTestTools/editor_python_test_tools')
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodeCategory_ExpandOnClick.py b/AutomatedTesting/Gem/PythonTests/scripting/NodeCategory_ExpandOnClick.py
new file mode 100644
index 0000000000..141cdbea8d
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodeCategory_ExpandOnClick.py
@@ -0,0 +1,128 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92562988
+Test Case Title: Left-click/double click expands and collapses node categories
+"""
+
+
+# fmt: off
+class Tests():
+ pane_open = ("Script Canvas pane successfully opened", "Script Canvas pane failed to open")
+ click_expand = ("Category expanded on left click", "Category failed to expand on left click")
+ click_collapse = ("Category collapsed on left click", "Category failed to collapse on left click")
+ dClick_expand = ("Category expanded on double click", "Category failed to expand on double click")
+ dClick_collapse = ("Category collapsed on double click", "Category failed to collapse on double click")
+# fmt: on
+
+
+def NodeCategory_ExpandOnClick():
+ """
+ Summary:
+ Verifying the expand/collapse functionality on node categories
+
+ Expected Behavior:
+ The node category should expand when double clicked or when the drop down indicator is
+ left-clicked. Once expanded, it should be collapsed via the same actions.
+
+ Test Steps:
+ 1) Open Script Canvas pane
+ 2) Get the SC window objects
+ 3) Ensure all categories are collapsed for a clean state
+ 4) Left-Click on a node category arrow to expand it
+ 5) Verify it expanded
+ 6) Left-Click on a node category arrow to collapse it
+ 7) Verify it collapsed
+ 8) Double-Click on a node category to expand it
+ 9) Verify it expanded
+ 10) Double-Click on a node category to collapse it
+ 11) Verify it collapsed
+
+ 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
+ """
+ from utils import Report
+ from PySide2 import QtCore, QtWidgets, QtTest
+ from PySide2.QtTest import QTest
+ import pyside_utils
+ import azlmbr.legacy.general as general
+
+ def left_click_arrow(item_view, index):
+ original_state = item_view.isExpanded(index)
+ rect_center_y = item_view.visualRect(index).center().y()
+ rect_left_x = item_view.visualRect(index).left()
+ for i in range(5): # this range can be increased for safe side
+ QtTest.QTest.mouseClick(
+ item_view.viewport(),
+ QtCore.Qt.LeftButton,
+ QtCore.Qt.NoModifier,
+ QtCore.QPoint(rect_left_x - i, rect_center_y),
+ )
+ if item_view.isExpanded(index) != original_state:
+ break
+
+ def double_click(item_view, index):
+ item_index_center = item_view.visualRect(index).center()
+ # Left click on the item before trying to double click, will otherwise fail to expand
+ # as first click would highlight and second click would be a 'single click'
+ pyside_utils.item_view_index_mouse_click(item_view, index)
+ QTest.mouseDClick(item_view.viewport(), QtCore.Qt.LeftButton, QtCore.Qt.NoModifier, item_index_center)
+
+ # 1) Open Script Canvas pane
+ general.open_pane("Script Canvas")
+ Report.critical_result(Tests.pane_open, general.is_pane_visible("Script Canvas"))
+
+ # 2) Get the SC window objects
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
+ action.trigger()
+ node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
+ nodeTree = node_palette.findChild(QtWidgets.QTreeView, "treeView")
+ ai_index = pyside_utils.find_child_by_pattern(nodeTree, "AI")
+
+ # 3) Ensure all categories are collapsed for a clean state
+ nodeTree.collapseAll()
+
+ # 4) Left-Click on a node category arrow to expand it
+ left_click_arrow(nodeTree, ai_index)
+
+ # 5) Verify it expanded
+ Report.result(Tests.click_expand, nodeTree.isExpanded(ai_index))
+
+ # 6) Left-Click on a node category arrow to collapse it
+ left_click_arrow(nodeTree, ai_index)
+
+ # 7) Verify it collapsed
+ Report.result(Tests.click_collapse, not nodeTree.isExpanded(ai_index))
+
+ # 8) Double-Click on a node category to expand it
+ double_click(nodeTree, ai_index)
+
+ # 9) Verify it expanded
+ Report.result(Tests.dClick_expand, nodeTree.isExpanded(ai_index))
+
+ # 10) Double-Click on a node category to collapse it
+ double_click(nodeTree, ai_index)
+
+ # 11) Verify it collapsed
+ Report.result(Tests.dClick_collapse, not nodeTree.isExpanded(ai_index))
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+ imports.init()
+ from utils import Report
+ Report.start_test(NodeCategory_ExpandOnClick)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py
new file mode 100644
index 0000000000..550969e32a
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py
@@ -0,0 +1,131 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92568982
+Test Case Title: Renaming variables in the Node Inspector
+"""
+
+
+# fmt: off
+class Tests():
+ variable_created = ("New variable created", "New variable is not created")
+ node_inspector_rename = ("Variable is renamed in Node Inspector", "Variable is not renamed in Node Inspector")
+ variable_manager_rename = ("Variable is renamed in Variable Manager", "Variable is not renamed in Variable Manager")
+# fmt: on
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+def NodeInspector_RenameVariable():
+ """
+ Summary:
+ Renaming variables in the Node Inspector, renames the actual variable.
+
+ Expected Behavior:
+ The Variable's name is changed in both Node Inspector and Variable Manager.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Variable Manager if not opened already
+ 4) Open Node Inspector if not opened already
+ 5) Create new graph and a new variable in Variable manager
+ 6) Click on the variable
+ 7) Update name in Node Inspector and click on ENTER
+ 8) Verify if the name is updated in Node inspector and Variable manager
+ 9) Close Script Canvas window
+
+ 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
+ """
+
+ TEST_NAME = "test name"
+
+ from PySide2 import QtWidgets, QtCore, QtTest
+ from PySide2.QtCore import Qt
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+ from utils import TestHelper as helper
+
+ def open_tool(sc, dock_widget_name, pane_name):
+ if sc.findChild(QtWidgets.QDockWidget, dock_widget_name) is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": pane_name, "type": QtWidgets.QAction})
+ action.trigger()
+ tool = sc.findChild(QtWidgets.QDockWidget, dock_widget_name)
+ return tool
+
+ # 1) Open Script Canvas window
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 3) Open Variable Manager if not opened already
+ variable_manager = open_tool(sc, "VariableManager", "Variable Manager")
+
+ # 4) Open Node Inspector if not opened already
+ node_inspector = open_tool(sc, "NodeInspector", "Node Inspector")
+
+ # 5) Create new graph and a new variable in Variable manager
+ action = pyside_utils.find_child_by_pattern(sc, {"objectName": "action_New_Script", "type": QtWidgets.QAction})
+ action.trigger()
+ graph_vars = variable_manager.findChild(QtWidgets.QTableView, "graphVariables")
+ add_button = variable_manager.findChild(QtWidgets.QPushButton, "addButton")
+ add_button.click()
+ # Select variable type
+ table_view = variable_manager.findChild(QtWidgets.QTableView, "variablePalette")
+ model_index = pyside_utils.find_child_by_pattern(table_view, "Boolean")
+ # Click on it to create variable
+ pyside_utils.item_view_index_mouse_click(table_view, model_index)
+ result = graph_vars.model().rowCount(QtCore.QModelIndex()) == 1
+ var_mi = pyside_utils.find_child_by_pattern(graph_vars, "Variable 1")
+ result = result and (var_mi is not None)
+ Report.critical_result(Tests.variable_created, result)
+
+ # 6) Click on the variable
+ pyside_utils.item_view_index_mouse_click(graph_vars, var_mi)
+
+ # 7) Update name in Node Inspector and click on ENTER
+ helper.wait_for_condition(
+ lambda: node_inspector.findChild(QtWidgets.QWidget, "ContainerForRows") is not None, GENERAL_WAIT
+ )
+ row_container = node_inspector.findChild(QtWidgets.QWidget, "ContainerForRows")
+ name_frame = row_container.findChild(QtWidgets.QWidget, "Name")
+ name_line_edit = name_frame.findChild(QtWidgets.QLineEdit)
+ name_line_edit.setText(TEST_NAME)
+ QtTest.QTest.keyClick(name_line_edit, Qt.Key_Return, Qt.NoModifier)
+
+ # 8) Verify if the name is updated in Node inspector and Variable manager
+ helper.wait_for_condition(lambda: var_mi.data(Qt.DisplayRole) == TEST_NAME, GENERAL_WAIT)
+ Report.critical_result(Tests.node_inspector_rename, name_line_edit.text() == TEST_NAME)
+ Report.critical_result(Tests.variable_manager_rename, var_mi.data(Qt.DisplayRole) == TEST_NAME)
+
+ # 9) Close Script Canvas window
+ general.close_pane("Script Canvas")
+
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(NodeInspector_RenameVariable)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py
new file mode 100644
index 0000000000..979bcff02e
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py
@@ -0,0 +1,93 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92562993
+Test Case Title: Clicking the X button on the Search Box clears the currently entered string
+"""
+
+
+# fmt: off
+class Tests():
+ set_search_string = ("Search string is set", "Search string is not set")
+ search_string_cleared = ("Search string cleared as expected", "Search string not cleared")
+# fmt: on
+
+
+def NodePalette_ClearSelection():
+ """
+ Summary:
+ We enter some string in the Node Palette Search box, and click on the X button to verify if the
+ search string got cleared.
+
+ Expected Behavior:
+ Clicking the X button on the Search Box clears the currently entered string
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Node Manager if not opened already
+ 4) Set some string in the Search box
+ 5) Verify if the test string is set
+ 6) Clear search string and verify if it is cleared
+
+ 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
+ """
+
+ from PySide2 import QtWidgets
+
+ from utils import TestHelper as helper
+
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+
+ TEST_STRING = "Test String"
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 3.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 3) Open Node Manager if not opened already
+ if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
+ action.trigger()
+ node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
+ search_frame = node_palette.findChild(QtWidgets.QFrame, "searchFrame")
+
+ # 4) Set some string in the Search box
+ search_box = search_frame.findChild(QtWidgets.QLineEdit, "searchFilter")
+ search_box.setText(TEST_STRING)
+
+ # 5) Verify if the test string is set
+ Report.result(Tests.set_search_string, search_box.text() == TEST_STRING)
+
+ # 6) Clear search string and verify if it is cleared
+ clear_text_button = search_frame.findChild(QtWidgets.QToolButton, "ClearToolButton")
+ clear_text_button.click()
+ Report.result(Tests.search_string_cleared, search_box.text() == "")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(NodePalette_ClearSelection)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SearchText_Deletion.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SearchText_Deletion.py
new file mode 100644
index 0000000000..0739a8e637
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SearchText_Deletion.py
@@ -0,0 +1,91 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+"""
+
+
+# fmt: off
+class Tests():
+ set_search_string = ("Search string is set", "Search string is not set")
+ search_string_deleted = ("Search string deleted as expected", "Search string not deleted")
+# fmt: on
+
+
+def NodePalette_SearchText_Deletion():
+ """
+ Summary:
+ We enter some string in the Node Palette Search box, select that text and delete it.
+
+ Expected Behavior:
+ After RightClick->Delete the text in the Searchbox should be deleted.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Node Manager if not opened already
+ 4) Set some string in the Search box
+ 5) Verify if the test string is set
+ 6) Delete search string using right click and verify if it is cleared
+
+ 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
+ """
+
+ from PySide2 import QtWidgets, QtTest, QtCore
+
+ from utils import TestHelper as helper
+
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+
+ TEST_STRING = "TestString"
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 3.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 3) Open Node Manager if not opened already
+ if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
+ action.trigger()
+ node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
+ search_frame = node_palette.findChild(QtWidgets.QFrame, "searchFrame")
+
+ # 4) Set some string in the Search box
+ search_box = search_frame.findChild(QtWidgets.QLineEdit, "searchFilter")
+ search_box.setText(TEST_STRING)
+
+ # 5) Verify if the test string is set
+ result = helper.wait_for_condition(lambda: search_box.text() == TEST_STRING, 1.0)
+ Report.result(Tests.set_search_string, result)
+
+ # 6) Delete search string using right click and verify if it is cleared
+ QtTest.QTest.keyClick(search_box, QtCore.Qt.Key_A, QtCore.Qt.ControlModifier)
+ pyside_utils.trigger_context_menu_entry(search_box, "Delete")
+ result = helper.wait_for_condition(lambda: search_box.text() == "", 2.0)
+ Report.result(Tests.search_string_deleted, result)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(NodePalette_SearchText_Deletion)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py
new file mode 100644
index 0000000000..374dc4e1a0
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py
@@ -0,0 +1,103 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+
+Test case ID: T92568940
+Test Case Title: Categories and Nodes can be selected
+"""
+
+
+# fmt: off
+class Tests():
+ category_selected = ("Category can be selected", "Category cannot be selected")
+ node_selected = ("Node can be selected", "Node cannot be selected")
+# fmt: on
+
+
+GENERAL_WAIT = 0.5 # seconds
+
+
+def NodePalette_SelectNode():
+ """
+ Summary:
+ Categories and Nodes can be selected
+
+ Expected Behavior:
+ When clicked on Node Palette, nodes and categories can be selected.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Expand QTreeView
+ 4) Click on category and check if it is selected
+ 5) Click on node and check if it is selected
+ 6) Close Script Canvas window
+
+
+ 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
+ """
+
+ CATEGORY = "AI"
+ NODE = "Find Path To Entity"
+
+ from PySide2 import QtWidgets
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+ from utils import TestHelper as helper
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ if sc.findChild(QtWidgets.QDockWidget, "NodePalette") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Node Palette", "type": QtWidgets.QAction})
+ action.trigger()
+ node_palette = sc.findChild(QtWidgets.QDockWidget, "NodePalette")
+ tree = node_palette.findChild(QtWidgets.QTreeView, "treeView")
+
+ # 3) Expand QTreeView
+ tree.expandAll()
+
+ # 4) Click on category and check if it is selected
+ category_index = pyside_utils.find_child_by_hierarchy(tree, CATEGORY)
+ tree.scrollTo(category_index)
+ pyside_utils.item_view_index_mouse_click(tree, category_index)
+ pyside_utils.wait_for_condition(tree.selectedIndexes() and tree.selectedIndexes()[0] == category_index)
+ Report.result(Tests.category_selected, tree.selectedIndexes()[0] == category_index)
+
+ # 5) Click on node and check if it is selected
+ node_index = pyside_utils.find_child_by_pattern(tree, NODE)
+ helper.wait_for_condition(lambda: tree.isExpanded(node_index), GENERAL_WAIT)
+ pyside_utils.item_view_index_mouse_click(tree, node_index)
+ pyside_utils.wait_for_condition(tree.selectedIndexes()[0] == node_index)
+ Report.result(Tests.node_selected, tree.selectedIndexes()[0] == node_index)
+
+ # 6) Close Script Canvas window
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(NodePalette_SelectNode)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py
new file mode 100644
index 0000000000..00893d6acb
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py
@@ -0,0 +1,183 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92569253 // T92569254
+Test Case Title: On Entity Activated // On Entity Deactivated
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("Successfully created temp level", "Failed to create temp level")
+ controller_exists = ("Successfully found controller entity", "Failed to find controller entity")
+ activated_exists = ("Successfully found activated entity", "Failed to find activated entity")
+ deactivated_exists = ("Successfully found deactivated entity","Failed to find deactivated entity")
+ start_states_correct = ("Start states set up successfully", "Start states set up incorrectly")
+ game_mode_entered = ("Successfully entered game mode" "Failed to enter game mode")
+ lines_found = ("Successfully found expected prints", "Failed to find expected prints")
+ game_mode_exited = ("Successfully exited game mode" "Failed to exit game mode")
+# fmt: on
+
+
+def OnEntityActivatedDeactivated_PrintMessage():
+ """
+ Summary:
+ Verify that the On Entity Activation node is working as expected
+
+ Expected Behavior:
+ Upon entering game mode, the Controller entity will wait 1 second and then activate the ActivationTest
+ entity. The script attached to ActivationTest will print out a message on activation. The Controller
+ will also deactivate the DeactivationTest entity, which should print a message.
+
+ Test Steps:
+ 1) Create temp level
+ 2) Setup the level
+ 3) Validate the entities
+ 4) Start the Tracer
+ 5) Enter Game Mode
+ 6) Validate Print message
+ 7) Exit game mode
+
+ 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 os
+
+ from utils import TestHelper as helper
+ from editor_entity_utils import EditorEntity as Entity
+ from utils import Report
+ from utils import Tracer
+
+ import azlmbr.legacy.general as general
+
+ EditorEntity = str
+ LEVEL_NAME = "tmp_level"
+ WAIT_TIME = 3.0 # SECONDS
+ EXPECTED_LINES = ["Activator Script: Activated", "Deactivator Script: Deactivated"]
+ controller_dict = {
+ "name": "Controller",
+ "status": "active",
+ "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "controller.scriptcanvas")
+ }
+ activated_dict = {
+ "name": "ActivationTest",
+ "status": "inactive",
+ "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "activator.scriptcanvas")
+ }
+ deactivated_dict = {
+ "name": "DeactivationTest",
+ "status": "active",
+ "path": os.path.join("ScriptCanvas", "OnEntityActivatedScripts", "deactivator.scriptcanvas")
+ }
+
+ def get_asset(asset_path):
+ return azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, "GetAssetIdByPath", asset_path, azlmbr.math.Uuid(), False)
+
+ def setup_level():
+ def create_editor_entity(entity_dict:dict, entity_to_activate:EditorEntity=None, entity_to_deactivate:EditorEntity=None) -> EditorEntity:
+ entity = Entity.create_editor_entity(entity_dict["name"])
+ entity.set_start_status(entity_dict["status"])
+ sc_component = entity.add_component("Script Canvas")
+ sc_component.set_component_property_value("Script Canvas Asset|Script Canvas Asset", get_asset(entity_dict["path"]))
+
+ if entity_dict["name"] == "Controller":
+ sc_component.get_property_tree()
+ sc_component.set_component_property_value("Properties|Variable Fields|Variables|[0]|Name,Value|Datum|Datum|EntityToActivate", entity_to_activate.id)
+ sc_component.set_component_property_value("Properties|Variable Fields|Variables|[1]|Name,Value|Datum|Datum|EntityToDeactivate", entity_to_deactivate.id)
+ return entity
+
+ activated = create_editor_entity(activated_dict)
+ deactivated = create_editor_entity(deactivated_dict)
+ create_editor_entity(controller_dict, activated, deactivated)
+
+ def validate_entity_exist(entity_name: str, test_tuple: tuple):
+ """
+ Validate the entity with the given name exists in the level
+ :return: entity: editor entity object
+ """
+ entity = Entity.find_editor_entity(entity_name)
+ Report.critical_result(test_tuple, entity.id.IsValid())
+ return entity
+
+ def validate_start_state(entity:EditorEntity, expected_state:str):
+ """
+ Validate that the starting state of the entity is correct, if it isn't then attempt to rectify and recheck.
+ :return: bool: Whether state is set as expected
+ """
+ state_options = {
+ "active": azlmbr.globals.property.EditorEntityStartStatus_StartActive,
+ "inactive": azlmbr.globals.property.EditorEntityStartStatus_StartInactive,
+ "editor": azlmbr.globals.property.EditorEntityStartStatus_EditorOnly,
+ }
+ if expected_state.lower() not in state_options.keys():
+ raise ValueError(f"{expected_state} is an invalid option; valid options: active, inactive, or editor.")
+
+ state = entity.get_start_status()
+ if state != state_options[expected_state]:
+ # If state fails to set, set_start_status will assert
+ entity.set_start_status(expected_state)
+ return True
+
+ def validate_entities_in_level():
+ controller = validate_entity_exist(controller_dict["name"], Tests.controller_exists)
+ state1_correct = validate_start_state(controller, controller_dict["status"])
+
+ act_tester = validate_entity_exist(activated_dict["name"], Tests.activated_exists)
+ state2_correct = validate_start_state(act_tester, activated_dict["status"])
+
+ deac_tester = validate_entity_exist(deactivated_dict["name"], Tests.deactivated_exists)
+ state3_correct = validate_start_state(deac_tester, deactivated_dict["status"])
+
+ all_states_correct = state1_correct and state2_correct and state3_correct
+ Report.critical_result(Tests.start_states_correct, all_states_correct)
+
+ def locate_expected_lines(line_list: list):
+ found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
+ return all(line in found_lines for line in line_list)
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Setup the level
+ setup_level()
+
+ # 3) Validate the entities
+ validate_entities_in_level()
+
+ # 4) Start the Tracer
+ with Tracer() as section_tracer:
+
+ # 5) Enter Game Mode
+ helper.enter_game_mode(Tests.game_mode_entered)
+
+ # 6) Validate Print message
+ helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
+
+ Report.result(Tests.lines_found, locate_expected_lines(EXPECTED_LINES))
+
+ # 7) Exit game mode
+ helper.exit_game_mode(Tests.game_mode_exited)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(OnEntityActivatedDeactivated_PrintMessage)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py
index 6100285092..48c40eb05e 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py
@@ -10,14 +10,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702834 // C1702823
Test Case Title: Opening pane // Closing pane
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702834 and
- https://testrail.agscollab.com/index.php?/cases/view/1702823
"""
# fmt: off
class Tests():
- open_sc_window = ("Script Canvas window is opened", "Failed to open Script Canvas window")
default_visible = ("All the panes visible by default", "One or more panes do not visible by default")
open_panes = ("All the Panes opened successfully", "Failed to open one or more panes")
close_pane = ("All the Panes closed successfully", "Failed to close one or more panes")
@@ -49,11 +46,6 @@ def Opening_Closing_Pane():
:return: None
"""
- # Helper imports
- import ImportPathHelper as imports
-
- imports.init()
-
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
import editor_python_test_tools.pyside_utils as pyside_utils
@@ -82,8 +74,7 @@ def Opening_Closing_Pane():
# 1) Open Script Canvas window (Tools > Script Canvas)
general.open_pane("Script Canvas")
- is_sc_visible = helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
- Report.result(Tests.open_sc_window, is_sc_visible)
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
# 2) Restore default layout
editor_window = pyside_utils.get_editor_main_window()
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py b/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py
new file mode 100644
index 0000000000..adf9b5f35a
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py
@@ -0,0 +1,162 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: C1702821 // C1702832
+Test Case Title: Retain visibility, size and location upon Script Canvas restart
+"""
+
+
+# fmt: off
+class Tests():
+ relaunch_sc = ("Script Canvas window is relaunched", "Failed to relaunch Script Canvas window")
+ test_panes_visible = ("All the test panes are opened", "Failed to open one or more test panes")
+ close_pane_1 = ("Test pane 1 is closed", "Failed to close test pane 1")
+ visiblity_retained = ("Test pane retained its visiblity on SC restart", "Failed to retain visiblity of test pane on SC restart")
+ resize_pane_3 = ("Test pane 3 resized successfully", "Failed to resize Test pane 3")
+ size_retained = ("Test pane retained its size on SC restart", "Failed to retain size of test pane on SC restart")
+ location_changed = ("Location of test pane 2 changed successfully", "Failed to change locatio of test pane 2")
+ location_retained = ("Test pane retained its location on SC restart", "Failed to retain location of test pane on SC restart")
+# fmt: on
+
+
+def Pane_RetainOnSCRestart():
+ """
+ Summary:
+ The Script Canvas window is opened to verify if Script canvas panes can retain its visibility, size and location
+ upon ScriptCanvas restart.
+
+ Expected Behavior:
+ The ScriptCanvas pane retain it's visiblity, size and location upon ScriptCanvas restart.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Make sure test panes are open and visible
+ 3) Close test pane 1
+ 4) Change dock location of test pane 2
+ 5) Resize test pane 3
+ 6) Relaunch Script Canvas
+ 7) Verify if test pane 1 retain its visiblity
+ 8) Verify if location of test pane 2 is retained
+ 9) Verify if size of test pane 3 is retained
+ 10) Restore default layout and close SC window
+
+ 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
+ """
+
+ # Helper imports
+ from utils import Report
+ from utils import TestHelper as helper
+ import pyside_utils
+
+ # Open 3D Engine Imports
+ import azlmbr.legacy.general as general
+
+ # Pyside imports
+ from PySide2 import QtCore, QtWidgets
+ from PySide2.QtCore import Qt
+
+ # Constants
+ TEST_PANE_1 = "NodePalette" # test visibility
+ TEST_PANE_2 = "VariableManager" # test location
+ TEST_PANE_3 = "NodeInspector" # test size
+ SCALE_INT = 10 # Random resize scale integer
+ DOCKAREA = Qt.TopDockWidgetArea # Preferred top area since no widget is docked on top
+
+ def click_menu_option(window, option_text):
+ action = pyside_utils.find_child_by_pattern(window, {"text": option_text, "type": QtWidgets.QAction})
+ action.trigger()
+
+ def find_pane(window, pane_name):
+ return window.findChild(QtWidgets.QDockWidget, pane_name)
+
+ # Test starts here
+ general.idle_enable(True)
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 3.0)
+
+ # 2) Make sure test panes are open and visible
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ click_menu_option(sc, "Restore Default Layout")
+ test_pane_1 = sc.findChild(QtWidgets.QDockWidget, TEST_PANE_1)
+ test_pane_2 = sc.findChild(QtWidgets.QDockWidget, TEST_PANE_2)
+ test_pane_3 = sc.findChild(QtWidgets.QDockWidget, TEST_PANE_3)
+
+ Report.result(
+ Tests.test_panes_visible, test_pane_1.isVisible() and test_pane_2.isVisible() and test_pane_3.isVisible()
+ )
+
+ # Initiate try block here to restore default in finally block
+ try:
+ # 3) Close test pane
+ test_pane_1.close()
+ Report.result(Tests.close_pane_1, not test_pane_1.isVisible())
+
+ # 4) Change dock location of test pane 2
+ sc_main = sc.findChild(QtWidgets.QMainWindow)
+ sc_main.addDockWidget(DOCKAREA, find_pane(sc_main, TEST_PANE_2), QtCore.Qt.Vertical)
+ Report.result(Tests.location_changed, sc_main.dockWidgetArea(find_pane(sc_main, TEST_PANE_2)) == DOCKAREA)
+
+ # 5) Resize test pane 3
+ initial_size = test_pane_3.frameSize()
+ test_pane_3.resize(initial_size.width() + SCALE_INT, initial_size.height() + SCALE_INT)
+ new_size = test_pane_3.frameSize()
+ resize_success = (
+ abs(initial_size.width() - new_size.width()) == abs(initial_size.height() - new_size.height()) == SCALE_INT
+ )
+ Report.result(Tests.resize_pane_3, resize_success)
+
+ # 6) Relaunch Script Canvas
+ general.close_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 2.0)
+
+ general.open_pane("Script Canvas")
+ sc_visible = helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+ Report.result(Tests.relaunch_sc, sc_visible)
+
+ # 7) Verify if test pane 1 retain its visiblity
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ Report.result(Tests.visiblity_retained, not find_pane(sc, TEST_PANE_1).isVisible())
+
+ # 8) Verify if location of test pane 2 is retained
+ sc_main = sc.findChild(QtWidgets.QMainWindow)
+ Report.result(Tests.location_retained, sc_main.dockWidgetArea(find_pane(sc_main, TEST_PANE_2)) == DOCKAREA)
+
+ # 9) Verify if size of test pane 3 is retained
+ test_pane_3 = sc.findChild(QtWidgets.QDockWidget, TEST_PANE_3)
+ retained_size = test_pane_3.frameSize()
+ retain_success = retained_size != initial_size
+ Report.result(Tests.size_retained, retain_success)
+
+ finally:
+ # 10) Restore default layout and close SC window
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ click_menu_option(sc, "Restore Default Layout")
+ sc.close()
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(Pane_RetainOnSCRestart)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py b/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py
index 9262e76cb0..bbae3afefd 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py
@@ -10,13 +10,11 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Test case ID: C1702829
Test Case Title: Resizing pane
-URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702829
"""
# fmt: off
class Tests():
- open_sc_window = ("Script Canvas window is opened", "Failed to open Script Canvas window")
open_pane = ("Pane opened successfully", "Failed to open pane")
resize_pane = ("Pane window resized successfully", "Failed to resize pane window")
# fmt: on
@@ -46,11 +44,6 @@ def Resizing_Pane():
:return: None
"""
- # Helper imports
- import ImportPathHelper as imports
-
- imports.init()
-
from editor_python_test_tools.utils import Report
from editor_python_test_tools.utils import TestHelper as helper
import editor_python_test_tools.pyside_utils as pyside_utils
@@ -76,8 +69,7 @@ def Resizing_Pane():
# 1) Open Script Canvas window (Tools > Script Canvas)
general.open_pane("Script Canvas")
- is_sc_visible = helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
- Report.result(Tests.open_sc_window, is_sc_visible)
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
# 2) Restore default layout
editor_window = pyside_utils.get_editor_main_window()
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py
new file mode 100644
index 0000000000..bb4de4a6c9
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py
@@ -0,0 +1,115 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92562986
+Test Case Title: Changing the assigned Script Canvas Asset on an entity properly updates
+level functionality
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("New level created", "New level not created")
+ entity_created = ("Test Entity created", "Test Entity not created")
+ game_mode_entered = ("Game Mode successfully entered", "Game mode failed to enter")
+ game_mode_exited = ("Game Mode successfully exited", "Game mode failed to exited")
+ found_lines = ("Expected log lines were found", "Expected log lines were not found")
+# fmt: on
+
+
+def ScriptCanvas_ChangingAssets():
+ """
+ Summary:
+ Changing the assigned Script Canvas Asset on an entity properly updates level functionality
+
+ Expected Behavior:
+ When game mode is entered, respective strings of assigned assets should be printed
+
+ Test Steps:
+ 1) Create temp level
+ 2) Create new entity
+ 3) Start Tracer
+ 4) Set first script and evaluate
+ 5) Set second script and evaluate
+
+
+ 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 os
+
+ from utils import TestHelper as helper
+ from utils import Tracer
+ import hydra_editor_utils as hydra
+ import azlmbr.legacy.general as general
+ import azlmbr.math as math
+ import azlmbr.asset as asset
+ import azlmbr.bus as bus
+ import azlmbr.paths as paths
+
+ LEVEL_NAME = "tmp_level"
+ ASSET_1 = os.path.join("scriptcanvas", "ScriptCanvas_TwoComponents0.scriptcanvas")
+ ASSET_2 = os.path.join("scriptcanvas", "ScriptCanvas_TwoComponents1.scriptcanvas")
+ EXP_LINE_1 = "Greetings from the first script"
+ EXP_LINE_2 = "Greetings from the second script"
+ WAIT_TIME = 3.0 # SECONDS
+
+ def get_asset(asset_path):
+ return asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", asset_path, math.Uuid(), False)
+
+ def find_expected_line(expected_line):
+ found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
+ return expected_line in found_lines
+
+ def set_asset_evaluate(test_entity, ASSET_PATH, EXP_LINE):
+ # Set Script Canvas entity
+ test_entity.get_set_test(0, "Script Canvas Asset|Script Canvas Asset", get_asset(ASSET_PATH))
+
+ # Enter/exit game mode
+ helper.enter_game_mode(Tests.game_mode_entered)
+ helper.wait_for_condition(lambda: find_expected_line(EXP_LINE), WAIT_TIME)
+ Report.result(Tests.found_lines, find_expected_line(EXP_LINE))
+ helper.exit_game_mode(Tests.game_mode_exited)
+
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create new entity
+ position = math.Vector3(512.0, 512.0, 32.0)
+ test_entity = hydra.Entity("test_entity")
+ test_entity.create_entity(position, ["Script Canvas"])
+
+ # 3) Start Tracer
+ with Tracer() as section_tracer:
+
+ # 4) Set first script and evaluate
+ set_asset_evaluate(test_entity, ASSET_1, EXP_LINE_1)
+
+ # 5) Set second script and evaluate
+ set_asset_evaluate(test_entity, ASSET_2, EXP_LINE_2)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(ScriptCanvas_ChangingAssets)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py
new file mode 100644
index 0000000000..6187ac81ba
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py
@@ -0,0 +1,117 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92563190
+Test Case Title: A single Entity with two Script Canvas components works properly
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("New level created", "New level not created")
+ game_mode_entered = ("Game Mode successfully entered", "Game mode failed to enter")
+ game_mode_exited = ("Game Mode successfully exited", "Game mode failed to exited")
+ found_lines = ("Expected log lines were found", "Expected log lines were not found")
+# fmt: on
+
+
+class LogLines:
+ expected_lines = ["Greetings from the first script", "Greetings from the second script"]
+
+
+def ScriptCanvas_TwoComponents():
+ """
+ Summary:
+ A test entity contains two Script Canvas components with different unique script canvas files.
+ Each of these files will have a print node set to activate on graph start.
+
+ Expected Behavior:
+ When game mode is entered, two unique strings should be printed out to the console
+
+ Test Steps:
+ 1) Create level
+ 2) Create entity with SC components
+ 3) Start Tracer
+ 4) Enter game mode
+ 5) Wait for expected lines to be found
+ 6) Report if expected lines were found
+ 7) Exit game mode
+
+ 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 os
+
+ from utils import TestHelper as helper
+ import hydra_editor_utils as hydra
+ from utils import Report
+ from utils import Tracer
+ import azlmbr.legacy.general as general
+ import azlmbr.math as math
+ import azlmbr.asset as asset
+ import azlmbr.bus as bus
+
+ LEVEL_NAME = "tmp_level"
+ ASSET_1 = os.path.join("scriptcanvas", "ScriptCanvas_TwoComponents0.scriptcanvas")
+ ASSET_2 = os.path.join("scriptcanvas", "ScriptCanvas_TwoComponents1.scriptcanvas")
+ WAIT_TIME = 3.0 # SECONDS
+
+ def get_asset(asset_path):
+ return asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", asset_path, math.Uuid(), False)
+
+ def locate_expected_lines():
+ found_lines = []
+ for printInfo in section_tracer.prints:
+ found_lines.append(printInfo.message.strip())
+
+ return all(line in found_lines for line in LogLines.expected_lines)
+
+ # 1) Create level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create entity with SC components
+ position = math.Vector3(512.0, 512.0, 32.0)
+ test_entity = hydra.Entity("test_entity")
+ test_entity.create_entity(position, ["Script Canvas", "Script Canvas"])
+ test_entity.get_set_test(0, "Script Canvas Asset|Script Canvas Asset", get_asset(ASSET_1))
+ test_entity.get_set_test(1, "Script Canvas Asset|Script Canvas Asset", get_asset(ASSET_2))
+
+ # 3) Start Tracer
+ with Tracer() as section_tracer:
+
+ # 4) Enter game mode
+ helper.enter_game_mode(Tests.game_mode_entered)
+
+ # 5) Wait for expected lines to be found
+ helper.wait_for_condition(locate_expected_lines, WAIT_TIME)
+
+ # 6) Report if expected lines were found
+ Report.result(Tests.found_lines, locate_expected_lines())
+
+ # 7) Exit game mode
+ helper.exit_game_mode(Tests.game_mode_exited)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(ScriptCanvas_TwoComponents)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py
new file mode 100644
index 0000000000..9453c31488
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py
@@ -0,0 +1,106 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92563191
+Test Case Title: Two Entities can use the same Graph asset successfully at RunTime
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("New level created", "New level not created")
+ game_mode_entered = ("Game Mode successfully entered", "Game mode failed to enter")
+ game_mode_exited = ("Game Mode successfully exited", "Game mode failed to exited")
+ found_lines = ("Expected log lines were found", "Expected log lines were not found")
+# fmt: on
+
+
+def ScriptCanvas_TwoEntities():
+ """
+ Summary:
+ Two Entities can use the same Graph asset successfully at RunTime. The script canvas asset
+ attached to the enties will print the respective entity names.
+
+ Expected Behavior:
+ When game mode is entered, respective strings of different entities should be printed.
+
+ Test Steps:
+ 1) Create temp level
+ 2) Create two new entities with different names
+ 3) Set ScriptCanvas asset to both the entities
+ 4) Enter/Exit game mode and verify log lines
+
+
+ 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 os
+
+ from utils import TestHelper as helper
+ from utils import Tracer
+ import hydra_editor_utils as hydra
+ import azlmbr.legacy.general as general
+ import azlmbr.math as math
+ import azlmbr.asset as asset
+ import azlmbr.bus as bus
+
+ LEVEL_NAME = "tmp_level"
+ ASSET_PATH = os.path.join("scriptcanvas", "T92563191_test.scriptcanvas")
+ EXPECTED_LINES = ["Entity Name: test_entity_1", "Entity Name: test_entity_2"]
+ WAIT_TIME = 0.5 # SECONDS
+
+ def get_asset(asset_path):
+ return asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", asset_path, math.Uuid(), False)
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create two new entities with different names
+ position = math.Vector3(512.0, 512.0, 32.0)
+ test_entity_1 = hydra.Entity("test_entity_1")
+ test_entity_1.create_entity(position, ["Script Canvas"])
+
+ test_entity_2 = hydra.Entity("test_entity_2")
+ test_entity_2.create_entity(position, ["Script Canvas"])
+
+ # 3) Set ScriptCanvas asset to both the entities
+ test_entity_1.get_set_test(0, "Script Canvas Asset|Script Canvas Asset", get_asset(ASSET_PATH))
+ test_entity_2.get_set_test(0, "Script Canvas Asset|Script Canvas Asset", get_asset(ASSET_PATH))
+
+ # 4) Enter/Exit game mode and verify log lines
+ with Tracer() as section_tracer:
+
+ helper.enter_game_mode(Tests.game_mode_entered)
+ # wait for WAIT_TIME to let the script print strings
+ general.idle_wait(WAIT_TIME)
+ helper.exit_game_mode(Tests.game_mode_exited)
+
+ found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
+ result = all(line in found_lines for line in EXPECTED_LINES)
+
+ Report.result(Tests.found_lines, result)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(ScriptCanvas_TwoEntities)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_ReturnSetType_Successfully.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_ReturnSetType_Successfully.py
new file mode 100644
index 0000000000..aa9abd110b
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_ReturnSetType_Successfully.py
@@ -0,0 +1,112 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test Case Title: Event can return a value of set type successfully
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("Successfully created temporary level", "Failed to create temporary level")
+ entity_created = ("Successfully created test entity", "Failed to create test entity")
+ enter_game_mode = ("Successfully entered game mode", "Failed to enter game mode")
+ lines_found = ("Successfully found expected message", "Failed to find expected message")
+ exit_game_mode = ("Successfully exited game mode", "Failed to exit game mode")
+# fmt: on
+
+
+def ScriptEvents_ReturnSetType_Successfully():
+ """
+ Summary: A temporary level is created with an Entity having ScriptCanvas component.
+ ScriptEvent(T92569006_ScriptEvent.scriptevents) is created with one Method that has a return value.
+ ScriptCanvas(T92569006_ScriptCanvas.scriptcanvas) is attached to Entity. Graph has Send node that sends the Method
+ of the ScriptEvent and prints the returned result ( On Entity Activated -> Send node -> Print) and Receive node is
+ set to return custom value ( Receive node -> Print).
+ Verify that the entity containing T92569006_ScriptCanvas.scriptcanvas should print the custom value set in both
+ Send and Receive nodes.
+
+ Expected Behavior:
+ After entering game mode, the graph on the entity should print an expected message to the console
+
+ Test Steps:
+ 1) Create test level
+ 2) Create test entity
+ 3) Start Tracer
+ 4) Enter Game Mode
+ 5) Read for line
+ 6) Exit Game Mode
+
+ 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 os
+ from editor_entity_utils import EditorEntity as Entity
+ from utils import Report
+ from utils import TestHelper as helper
+ from utils import Tracer
+
+ import azlmbr.legacy.general as general
+ import azlmbr.asset as asset
+ import azlmbr.math as math
+ import azlmbr.bus as bus
+
+ LEVEL_NAME = "tmp_level"
+ WAIT_TIME = 3.0 # SECONDS
+ EXPECTED_LINES = ["T92569006_ScriptEvent_Sent", "T92569006_ScriptEvent_Received"]
+ SC_ASSET_PATH = os.path.join("ScriptCanvas", "T92569006_ScriptCanvas.scriptcanvas")
+
+ def create_editor_entity(name, sc_asset):
+ entity = Entity.create_editor_entity(name)
+ sc_comp = entity.add_component("Script Canvas")
+ asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", sc_asset, math.Uuid(), False)
+ sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", asset_id)
+ Report.critical_result(Tests.entity_created, entity.id.isValid())
+
+ def locate_expected_lines(line_list: list):
+ found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
+
+ return all(line in found_lines for line in line_list)
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create test entity
+ create_editor_entity("TestEntity", SC_ASSET_PATH)
+
+ # 3) Start Tracer
+ with Tracer() as section_tracer:
+
+ # 4) Enter Game Mode
+ helper.enter_game_mode(Tests.enter_game_mode)
+
+ # 5) Read for line
+ lines_located = helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
+ Report.result(Tests.lines_found, lines_located)
+
+ # 6) Exit Game Mode
+ helper.exit_game_mode(Tests.exit_game_mode)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(ScriptEvents_ReturnSetType_Successfully)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py
new file mode 100644
index 0000000000..a2913d3468
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py
@@ -0,0 +1,119 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92567321
+Test Case Title: Script Events: Can send and receive a script event across multiple entities successfully
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("Successfully created temporary level", "Failed to create temporary level")
+ entitya_created = ("Successfully created EntityA", "Failed to create EntityA")
+ entityb_created = ("Successfully created EntityB", "Failed to create EntityB")
+ enter_game_mode = ("Successfully entered game mode", "Failed to enter game mode")
+ lines_found = ("Successfully found expected message", "Failed to find expected message")
+ exit_game_mode = ("Successfully exited game mode", "Failed to exit game mode")
+# fmt: on
+
+
+def ScriptEvents_SendReceiveAcrossMultiple():
+ """
+ Summary:
+ EntityA and EntityB will be created in a level. Attached to both will be a Script Canvas component. The Script Event created for the test will be sent from EntityA to EntityB.
+
+ Expected Behavior:
+ The output of the Script Event should be printed to the console
+
+ Test Steps:
+ 1) Create test level
+ 2) Create EntityA/EntityB (add scriptcanvas files part of entity setup)
+ 3) Start Tracer
+ 4) Enter Game Mode
+ 5) Read for line
+ 6) Exit Game Mode
+
+
+ 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 os
+
+ from editor_entity_utils import EditorEntity as Entity
+ from utils import Report
+ from utils import TestHelper as helper
+ from utils import Tracer
+
+ import azlmbr.legacy.general as general
+
+ LEVEL_NAME = "tmp_level"
+ WAIT_TIME = 3.0
+ ASSET_PREFIX = "T92567321"
+ asset_paths = {
+ "event": os.path.join("TestAssets", f"{ASSET_PREFIX}.scriptevents"),
+ "assetA": os.path.join("ScriptCanvas", f"{ASSET_PREFIX}A.scriptcanvas"),
+ "assetB": os.path.join("ScriptCanvas", f"{ASSET_PREFIX}B.scriptcanvas"),
+ }
+ sc_for_entities = {
+ "EntityA": asset_paths["assetA"],
+ "EntityB": asset_paths["assetB"]
+ }
+ EXPECTED_LINES = ["Incoming Message Received"]
+
+ def get_asset(asset_path):
+ return azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, "GetAssetIdByPath", asset_path, azlmbr.math.Uuid(), False)
+
+ def create_editor_entity(name, sc_asset):
+ entity = Entity.create_editor_entity(name)
+ sc_comp = entity.add_component("Script Canvas")
+ sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", get_asset(sc_asset))
+ Report.critical_result(Tests.__dict__[name.lower()+"_created"], entity.id.isValid())
+
+ def locate_expected_lines(line_list: list):
+ found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
+
+ return all(line in found_lines for line in line_list)
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create EntityA/EntityB
+ for key in sc_for_entities.keys():
+ create_editor_entity(key, sc_for_entities[key])
+
+ # 3) Start Tracer
+ with Tracer() as section_tracer:
+
+ # 4) Enter Game Mode
+ helper.enter_game_mode(Tests.enter_game_mode)
+
+ # 5) Read for line
+ lines_located = helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
+ Report.result(Tests.lines_found, lines_located)
+
+ # 6) Exit Game Mode
+ helper.exit_game_mode(Tests.exit_game_mode)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(ScriptEvents_SendReceiveAcrossMultiple)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py
new file mode 100644
index 0000000000..388e2bb7c0
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py
@@ -0,0 +1,109 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92567320
+Test Case Title: Script Events: Can send and receive a script event successfully
+"""
+
+
+# fmt: off
+class Tests():
+ level_created = ("Successfully created temporary level", "Failed to create temporary level")
+ entity_created = ("Successfully created test entity", "Failed to create test entity")
+ enter_game_mode = ("Successfully entered game mode", "Failed to enter game mode")
+ lines_found = ("Successfully found expected message", "Failed to find expected message")
+ exit_game_mode = ("Successfully exited game mode", "Failed to exit game mode")
+# fmt: on
+
+
+def ScriptEvents_SendReceiveSuccessfully():
+ """
+ Summary:
+ An entity exists in the level that contains a Script Canvas component. In the graph is both a Send Event
+ and a Receive Event.
+
+ Expected Behavior:
+ After entering game mode the graph on the entity should print an expected message to the console
+
+ Test Steps:
+ 1) Create test level
+ 2) Create test entity
+ 3) Start Tracer
+ 4) Enter Game Mode
+ 5) Read for line
+ 6) Exit Game Mode
+
+ 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 os
+ from editor_entity_utils import EditorEntity as Entity
+ from utils import Report
+ from utils import TestHelper as helper
+ from utils import Tracer
+
+ import azlmbr.legacy.general as general
+ import azlmbr.asset as asset
+ import azlmbr.math as math
+ import azlmbr.bus as bus
+
+ LEVEL_NAME = "tmp_level"
+ WAIT_TIME = 3.0 # SECONDS
+ EXPECTED_LINES = ["T92567320: Message Received"]
+ SC_ASSET_PATH = os.path.join("ScriptCanvas", "T92567320.scriptcanvas")
+
+ def create_editor_entity(name, sc_asset):
+ entity = Entity.create_editor_entity(name)
+ sc_comp = entity.add_component("Script Canvas")
+ asset_id = asset.AssetCatalogRequestBus(bus.Broadcast, "GetAssetIdByPath", sc_asset, math.Uuid(), False)
+ sc_comp.set_component_property_value("Script Canvas Asset|Script Canvas Asset", asset_id)
+ Report.critical_result(Tests.entity_created, entity.id.isValid())
+
+ def locate_expected_lines(line_list: list):
+ found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints]
+
+ return all(line in found_lines for line in line_list)
+
+ # 1) Create temp level
+ general.idle_enable(True)
+ result = general.create_level_no_prompt(LEVEL_NAME, 128, 1, 512, True)
+ Report.critical_result(Tests.level_created, result == 0)
+ helper.wait_for_condition(lambda: general.get_current_level_name() == LEVEL_NAME, WAIT_TIME)
+ general.close_pane("Error Report")
+
+ # 2) Create test entity
+ create_editor_entity("TestEntity", SC_ASSET_PATH)
+
+ # 3) Start Tracer
+ with Tracer() as section_tracer:
+
+ # 4) Enter Game Mode
+ helper.enter_game_mode(Tests.enter_game_mode)
+
+ # 5) Read for line
+ lines_located = helper.wait_for_condition(lambda: locate_expected_lines(EXPECTED_LINES), WAIT_TIME)
+ Report.result(Tests.lines_found, lines_located)
+
+ # 6) Exit Game Mode
+ helper.exit_game_mode(Tests.exit_game_mode)
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(ScriptEvents_SendReceiveSuccessfully)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py
index 8c34f29ebf..dda75f0a0c 100755
--- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py
+++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py
@@ -12,22 +12,264 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import pytest
import os
import sys
+sys.path.append(os.path.dirname(__file__))
+import ImportPathHelper as imports
+imports.init()
+
+import hydra_test_utils as hydra
+import ly_test_tools.environment.file_system as file_system
from ly_test_tools import LAUNCHERS
-
-sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared')
-
from base import TestAutomationBase
+TEST_DIRECTORY = os.path.dirname(__file__)
+
+
@pytest.mark.SUITE_periodic
@pytest.mark.parametrize("launcher_platform", ['windows_editor'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
class TestAutomation(TestAutomationBase):
-
+ @pytest.mark.test_case_id("C1702834", "C1702823")
+ def test_Opening_Closing_Pane(self, request, workspace, editor, launcher_platform):
+ from . import Opening_Closing_Pane as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("C1702824")
def test_Docking_Pane(self, request, workspace, editor, launcher_platform):
from . import Docking_Pane as test_module
self._run_test(request, workspace, editor, test_module)
+ @pytest.mark.test_case_id("C1702829")
def test_Resizing_Pane(self, request, workspace, editor, launcher_platform):
from . import Resizing_Pane as test_module
self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92563190")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_ScriptCanvas_TwoComponents(self, request, workspace, editor, launcher_platform, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import ScriptCanvas_TwoComponents as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92562986")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_ScriptCanvas_ChangingAssets(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import ScriptCanvas_ChangingAssets as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92569079", "T92569081")
+ def test_Graph_ZoomInZoomOut(self, request, workspace, editor, launcher_platform):
+ from . import Graph_ZoomInZoomOut as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92568940")
+ def test_NodePalette_SelectNode(self, request, workspace, editor, launcher_platform):
+ from . import NodePalette_SelectNode as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92569253")
+ @pytest.mark.test_case_id("T92569254")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_OnEntityActivatedDeactivated_PrintMessage(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import OnEntityActivatedDeactivated_PrintMessage as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92562993")
+ def test_NodePalette_ClearSelection(self, request, workspace, editor, launcher_platform, project):
+ from . import NodePalette_ClearSelection as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92563191")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_ScriptCanvas_TwoEntities(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import ScriptCanvas_TwoEntities as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92569013")
+ def test_AssetEditor_CreateScriptEventFile(self, request, workspace, editor, launcher_platform, project):
+ def teardown():
+ file_system.delete(
+ [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True
+ )
+ request.addfinalizer(teardown)
+ file_system.delete(
+ [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True
+ )
+ from . import AssetEditor_CreateScriptEventFile as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92569165", "T92569167", "T92569168", "T92569170")
+ def test_Toggle_ScriptCanvasTools(self, request, workspace, editor, launcher_platform):
+ from . import Toggle_ScriptCanvasTools as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92568982")
+ def test_NodeInspector_RenameVariable(self, request, workspace, editor, launcher_platform, project):
+ from . import NodeInspector_RenameVariable as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92569137")
+ def test_Debugging_TargetMultipleGraphs(self, request, workspace, editor, launcher_platform, project):
+ from . import Debugging_TargetMultipleGraphs as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92568856")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_Debugging_TargetMultipleEntities(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import Debugging_TargetMultipleEntities as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92569049", "T92569051")
+ def test_EditMenu_UndoRedo(self, request, workspace, editor, launcher_platform, project):
+ from . import EditMenu_UndoRedo as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("C1702825", "C1702831")
+ def test_UnDockedPane_CloseSCWindow(self, request, workspace, editor, launcher_platform):
+ from . import UnDockedPane_CloseSCWindow as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92562978")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_Entity_AddScriptCanvasComponent(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import Entity_AddScriptCanvasComponent as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("C1702821", "C1702832")
+ def test_Pane_RetainOnSCRestart(self, request, workspace, editor, launcher_platform):
+ from . import Pane_RetainOnSCRestart as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92567321")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_ScriptEvents_SendReceiveAcrossMultiple(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import ScriptEvents_SendReceiveAcrossMultiple as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.test_case_id("T92567320")
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_ScriptEvents_SendReceiveSuccessfully(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import ScriptEvents_SendReceiveSuccessfully as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ @pytest.mark.parametrize("level", ["tmp_level"])
+ def test_ScriptEvents_ReturnSetType_Successfully(self, request, workspace, editor, launcher_platform, project, level):
+ def teardown():
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ request.addfinalizer(teardown)
+ file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True)
+ from . import ScriptEvents_ReturnSetType_Successfully as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ def test_NodeCategory_ExpandOnClick(self, request, workspace, editor, launcher_platform):
+ from . import NodeCategory_ExpandOnClick as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ def test_NodePalette_SearchText_Deletion(self, request, workspace, editor, launcher_platform):
+ from . import NodePalette_SearchText_Deletion as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+ def test_VariableManager_UnpinVariableType_Works(self, request, workspace, editor, launcher_platform):
+ from . import VariableManager_UnpinVariableType_Works as test_module
+ self._run_test(request, workspace, editor, test_module)
+
+# NOTE: We had to use hydra_test_utils.py, as TestAutomationBase run_test method
+# fails because of pyside_utils import
+@pytest.mark.SUITE_periodic
+@pytest.mark.parametrize("launcher_platform", ["windows_editor"])
+@pytest.mark.parametrize("project", ["AutomatedTesting"])
+class TestScriptCanvasTests(object):
+ """
+ The following tests use hydra_test_utils.py to launch the editor and validate the results.
+ """
+
+ @pytest.mark.test_case_id("T92569037", "T92569039")
+ def test_FileMenu_New_Open(self, request, editor, launcher_platform):
+ expected_lines = [
+ "File->New action working as expected: True",
+ "File->Open action working as expected: True",
+ ]
+ hydra.launch_and_validate_results(
+ request, TEST_DIRECTORY, editor, "FileMenu_New_Open.py", expected_lines, auto_test_mode=False, timeout=60,
+ )
+
+ @pytest.mark.test_case_id("T92568942")
+ def test_AssetEditor_NewScriptEvent(self, request, editor, launcher_platform):
+ expected_lines = [
+ "New Script event action found: True",
+ "Asset Editor opened: True",
+ "Asset Editor created with new asset: True",
+ "New Script event created in Asset Editor: True",
+ ]
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ editor,
+ "AssetEditor_NewScriptEvent.py",
+ expected_lines,
+ auto_test_mode=False,
+ timeout=60,
+ )
+
+ @pytest.mark.test_case_id("T92563068", "T92563070")
+ def test_GraphClose_SavePrompt(self, request, editor, launcher_platform):
+ expected_lines = [
+ "New graph created: True",
+ "Save prompt opened as expected: True",
+ "Close button worked as expected: True",
+ ]
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ editor,
+ "GraphClose_SavePrompt.py",
+ expected_lines,
+ auto_test_mode=False,
+ timeout=60,
+ )
+
+ @pytest.mark.test_case_id("T92564789", "T92568873")
+ def test_VariableManager_CreateDeleteVars(self, request, editor, launcher_platform):
+ var_types = ["Boolean", "Color", "EntityID", "Number", "String", "Transform", "Vector2", "Vector3", "Vector4"]
+ expected_lines = [f"Success: {var_type} variable is created" for var_type in var_types]
+ expected_lines.extend([f"Success: {var_type} variable is deleted" for var_type in var_types])
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ editor,
+ "VariableManager_CreateDeleteVars.py",
+ expected_lines,
+ auto_test_mode=False,
+ timeout=60,
+ )
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py
new file mode 100644
index 0000000000..42cc42de0d
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py
@@ -0,0 +1,132 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: C92569165, C92569167, C92569168, C92569170
+Test Case Title: Tools > Node Palette toggles the Node Palette
+ Tools > Node Inspector toggles the Node Inspector
+ Tools > Bookmarks toggles the Bookmarks
+ Tools > Variable Manager toggles the Variable Manager
+"""
+
+
+# fmt: off
+class Tests():
+ node_palette_opened = ("NodePalette is opened successfully", "Failed to open NodePalette")
+ node_inspector_opened = ("NodeInspector is opened successfully", "Failed to open NodeInspector")
+ bookmark_opened = ("Bookmarks is opened successfully", "Failed to open Bookmarks")
+ variable_manager_opened = ("VariableManager is opened successfully", "Failed to open VariableManager")
+ node_palette_closed_by_start = ("NodePalette is closed successfully", "Failed to close NodePalette")
+ node_inspector_closed_by_start = ("NodeInspector is closed successfully", "Failed to close NodeInspector")
+ bookmark_closed_by_start = ("Bookmarks is closed successfully", "Failed to close Bookmarks")
+ variable_manager_closed_by_start = ("VariableManager is closed successfully", "Failed to close VariableManager")
+ node_palette_closed_by_end = ("NodePalette is closed successfully", "Failed to close NodePalette")
+ node_inspector_closed_by_end = ("NodeInspector is closed successfully", "Failed to close NodeInspector")
+ bookmark_closed_by_end = ("Bookmarks is closed successfully", "Failed to close Bookmarks")
+ variable_manager_closed_by_end = ("VariableManager is closed successfully", "Failed to close VariableManager")
+# fmt: on
+
+
+def Toggle_ScriptCanvasTools():
+ """
+ Summary:
+ Toggle Node Palette, Node Inspector, Bookmarks and Variable Manager in Script Canvas.
+ Make sure each pane opens and closes successfully.
+
+ Expected Behavior:
+ Each pane opens and closes successfully.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Make sure Node Palette, Node Inspector, Bookmarks and Variable Manager panes are closed in Script Canvas window
+ 3) Open Node Palette, Node Inspector, Bookmarks and Variable Manager in Script Canvas window
+ 4) Close Node Palette, Node Inspector, Bookmarks and Variable Manager in Script Canvas window
+ 5) Restore default layout
+ 6) Close Script Canvas window
+
+ 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
+ """
+
+ from utils import Report
+ from utils import TestHelper as helper
+ import pyside_utils
+
+ # Open 3D Engine imports
+ import azlmbr.legacy.general as general
+
+ # Pyside imports
+ from PySide2 import QtWidgets
+
+ def click_menu_option(window, option_text):
+ action = pyside_utils.find_child_by_pattern(window, {"text": option_text, "type": QtWidgets.QAction})
+ action.trigger()
+
+ def find_pane(window, pane_name):
+ return window.findChild(QtWidgets.QDockWidget, pane_name)
+
+ def close_tool(window, pane_widget, test_tuple):
+ pane = find_pane(window, pane_widget)
+ pane.close()
+ Report.result(test_tuple, not pane.isVisible())
+
+ def open_tool(window, pane_widget, tool, test_tuple):
+ pane = find_pane(window, pane_widget)
+ if not pane.isVisible():
+ click_menu_option(window, tool)
+ pane = find_pane(window, pane_widget)
+ Report.result(test_tuple, pane.isVisible())
+
+ # Test starts here
+ general.idle_enable(True)
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+
+ # 2) Make sure Node Palette, Node Inspector, Bookmarks and Variable Manager panes are closed in Script Canvas window
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ close_tool(sc, "NodePalette", Tests.node_palette_closed_by_start)
+ close_tool(sc, "NodeInspector", Tests.node_inspector_closed_by_start)
+ close_tool(sc, "BookmarkDockWidget", Tests.bookmark_closed_by_start)
+ close_tool(sc, "VariableManager", Tests.variable_manager_closed_by_start)
+
+ # 3) Open Node Palette, Node Inspector, Bookmarks and Variable Manager in Script Canvas window
+ open_tool(sc, "NodePalette", "Node Palette", Tests.node_palette_opened)
+ open_tool(sc, "NodeInspector", "Node Inspector", Tests.node_inspector_opened)
+ open_tool(sc, "BookmarkDockWidget", "Bookmarks", Tests.bookmark_opened)
+ open_tool(sc, "VariableManager", "Variable Manager", Tests.variable_manager_opened)
+
+ # 4) Close Node Palette, Node Inspector, Bookmarks and Variable Manager in Script Canvas window
+ close_tool(sc, "NodePalette", Tests.node_palette_closed_by_end)
+ close_tool(sc, "NodeInspector", Tests.node_inspector_closed_by_end)
+ close_tool(sc, "BookmarkDockWidget", Tests.bookmark_closed_by_end)
+ close_tool(sc, "VariableManager", Tests.variable_manager_closed_by_end)
+
+ # 5) Restore default layout
+ # Need this step to restore to default in case of test failure
+ click_menu_option(sc, "Restore Default Layout")
+
+ # 6) Close Script Canvas window
+ sc.close()
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(Toggle_ScriptCanvasTools)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py b/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py
new file mode 100644
index 0000000000..da33a8ab80
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py
@@ -0,0 +1,126 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: C1702825 // C1702831
+Test Case Title: Undocking // Closing script canvas with the pane floating
+"""
+
+
+# fmt: off
+class Tests():
+ undock_pane = ("Pane is undocked successfully", "Failed to undock pane")
+ close_sc_window = ("Script Canvas window is closed", "Failed to close Script Canvas window")
+ pane_closed = ("Pane is closed successfully", "Failed to close the pane")
+# fmt: on
+
+
+def UnDockedPane_CloseSCWindow():
+ """
+ Summary:
+ The Script Canvas window is opened with one of the pane undocked.
+ Verify if undocked pane closes upon closing Script canvas window.
+
+ Expected Behavior:
+ The undocked pane closes when Script Canvas window closed.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Undock Node Palette pane
+ 3) Connect to Pane visibility signal emitter to verify pane closed
+ 4) Close Script Canvas window
+ 5) Restore default layout
+
+ 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
+ """
+
+ # Helper imports
+ from utils import Report
+ from utils import TestHelper as helper
+ import pyside_utils
+
+ # Open 3D Engine imports
+ import azlmbr.legacy.general as general
+
+ # Pyside imports
+ from PySide2 import QtWidgets
+
+ TEST_PANE = "NodePalette" # Chosen most commonly used pane
+
+ def click_menu_option(window, option_text):
+ action = pyside_utils.find_child_by_pattern(window, {"text": option_text, "type": QtWidgets.QAction})
+ action.trigger()
+
+ def find_pane(window, pane_name):
+ return window.findChild(QtWidgets.QDockWidget, pane_name)
+
+ def on_top_level_changed():
+ # This function has test condition always True since it gets emitted only when condition satisfied
+ Report.result(Tests.undock_pane, True)
+
+ def on_pane_closed():
+ # This function has test condition always True since it gets emitted only when condition satisfied
+ Report.result(Tests.pane_closed, True)
+
+ # Test starts here
+ general.idle_enable(True)
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+
+ # 2) Undock Node Palette pane
+ # Make sure Node Palette pane is opened
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ pane = find_pane(sc, TEST_PANE)
+ if not pane.isVisible():
+ click_menu_option(sc, "Node Palette")
+ pane = find_pane(sc, TEST_PANE) # New reference
+
+ # We drag/drop pane over the graph since it doesn't allow docking, so this will undock it
+ try:
+ graph = find_pane(sc, "GraphCanvasEditorCentralWidget")
+ try:
+ pane.topLevelChanged.connect(on_top_level_changed)
+ pyside_utils.drag_and_drop(pane, graph)
+ finally:
+ pane.topLevelChanged.disconnect(on_top_level_changed)
+
+ # 3) Connect to Pane visibility signal emitter to verify pane closed
+ # No need to disconnect this since pane widget gets deleted when SC window closed
+ pane.visibilityChanged.connect(on_pane_closed)
+
+ # 4) Close Script Canvas window
+ sc.close()
+ is_sc_visible = helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 2.0)
+ Report.result(Tests.close_sc_window, not is_sc_visible)
+
+ finally:
+ # 5) Restore default layout
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 5.0)
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ click_menu_option(sc, "Restore Default Layout")
+ sc.close()
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(UnDockedPane_CloseSCWindow)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py
new file mode 100644
index 0000000000..8b5c78fa87
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py
@@ -0,0 +1,121 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+
+Test case ID: T92564789
+Test Case Title: Each Variable type can be created
+Test case ID: T92568873
+Test Case Title: Each Variable type can be deleted
+"""
+
+
+def VariableManager_CreateDeleteVars():
+ """
+ Summary:
+ Each variable type can be created and deleted in variable manager.
+
+ Expected Behavior:
+ Each variable type can be created and deleted in variable manager.
+
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Variable Manager if not opened already
+ 4) Create Graph
+ 5) Create variable of each type and verify if it is created
+ 6) Delete each type of variable and verify if it is deleted
+ 7) Close SC window
+
+ 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
+ """
+
+ from PySide2 import QtWidgets, QtCore, QtTest
+
+ from PySide2.QtCore import Qt
+
+ from utils import TestHelper as helper
+
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+
+ def generate_test_tuple(var_type, action):
+ return (f"{var_type} variable is {action}d", f"{var_type} variable is not {action}d")
+
+ # 1) Open Script Canvas window
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 10.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+
+ # 3) Open Variable Manager if not opened already
+ if sc.findChild(QtWidgets.QDockWidget, "VariableManager") is None:
+ action = pyside_utils.find_child_by_pattern(sc, {"text": "Variable Manager", "type": QtWidgets.QAction})
+ action.trigger()
+ variable_manager = sc.findChild(QtWidgets.QDockWidget, "VariableManager")
+
+ # 4) Create Graph
+ action = pyside_utils.find_child_by_pattern(sc, {"objectName": "action_New_Script", "type": QtWidgets.QAction})
+ action.trigger()
+
+ graph_vars = variable_manager.findChild(QtWidgets.QTableView, "graphVariables")
+
+ var_types = ["Boolean", "Color", "EntityID", "Number", "String", "Transform", "Vector2", "Vector3", "Vector4"]
+
+ # 5) Create variable of each type and verify if it is created
+ for index, var_type in enumerate(var_types):
+ # Create new variable
+ add_button = variable_manager.findChild(QtWidgets.QPushButton, "addButton")
+ add_button.click() # Click on Create Variable button
+ # Select variable type
+ table_view = variable_manager.findChild(QtWidgets.QTableView, "variablePalette")
+ model_index = pyside_utils.find_child_by_pattern(table_view, var_type)
+ # Click on it to create variable
+ pyside_utils.item_view_index_mouse_click(table_view, model_index)
+ # Verify if the variable is created
+ # NOTE: To check if variable of a type is created, we are checking 1) rowcount
+ # 2) If we have row with variable "Variable "
+ # 3) Type of variable, which is next column of the variable name
+ result = graph_vars.model().rowCount(QtCore.QModelIndex()) == (
+ index + 1
+ ) # since we added 1 variable, rowcount will increase by 1
+ var_mi = pyside_utils.find_child_by_pattern(graph_vars, f"Variable {index+1}")
+ result = result and (var_mi is not None) and (var_mi.siblingAtColumn(1).data(Qt.DisplayRole) == var_type)
+ Report.result(generate_test_tuple(var_type, "create"), result)
+
+ # 6) Delete each type of variable and verify if it is deleted
+ for index, var_type in enumerate(var_types):
+ # Delete variable and verify if its deleted
+ # NOTE: To check if variable of a type is deleted, we are checking rowcount
+ var_mi = pyside_utils.find_child_by_pattern(graph_vars, f"Variable {index+1}")
+ pyside_utils.item_view_index_mouse_click(graph_vars, var_mi)
+ QtTest.QTest.keyClick(graph_vars, Qt.Key_Delete, Qt.NoModifier)
+ # since variable is deleted, rowcount will decrease by 1
+ result = graph_vars.model().rowCount(QtCore.QModelIndex()) == (len(var_types) - (index + 1))
+ Report.result(generate_test_tuple(var_type, "delete"), result)
+
+ # 7) Close SC window
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+ from utils import Report
+
+ Report.start_test(VariableManager_CreateDeleteVars)
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType_Works.py b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType_Works.py
new file mode 100644
index 0000000000..7076f60385
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_UnpinVariableType_Works.py
@@ -0,0 +1,121 @@
+"""
+All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
+its licensors.
+For complete copyright and license terms please see the LICENSE at the root of this
+distribution (the "License"). All use of this software is governed by the License,
+or, if provided, by the license below or the license accompanying this file. Do not
+remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+"""
+
+
+# fmt: off
+class Tests():
+ variable_manager_opened = ("VariableManager is opened successfully", "Failed to open VariableManager")
+ variable_pinned = ("Variable is pinned", "Variable is not pinned, But it should be unpinned")
+ variable_unpinned = ("Variable is unpinned", "Variable is not unpinned, But it should be pinned")
+ variable_unpinned_after_reopen = ("Variable is unpinned after reopening create variable menu", "Variable is not unpinned after reopening create variable menu")
+# fmt: on
+
+
+def VariableManager_UnpinVariableType_Works():
+ """
+ Summary:
+ Unpin variable types in create variable menu.
+ Expected Behavior:
+ The variable unpinned in create variable menu remains unpinned after reopening create variable menu.
+ Test Steps:
+ 1) Open Script Canvas window (Tools > Script Canvas)
+ 2) Get the SC window object
+ 3) Open Variable Manager in Script Canvas window
+ 4) Create new graph
+ 5) Click on the Create Variable button in the Variable Manager
+ 6) Unpin Boolean by clicking the "Pin" icon on its left side
+ 7) Close and Reopen Create Variable menu and make sure Boolean is unpinned after reopening Create Variable menu
+ 8) Restore default layout and close SC window
+ 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
+ """
+
+ from PySide2 import QtWidgets
+ import azlmbr.legacy.general as general
+
+ import pyside_utils
+ from utils import TestHelper as helper
+ from utils import Report
+ from PySide2.QtCore import Qt
+
+ GENERAL_WAIT = 1.0 # seconds
+
+ def find_pane(window, pane_name):
+ return window.findChild(QtWidgets.QDockWidget, pane_name)
+
+ def click_menu_option(window, option_text):
+ action = pyside_utils.find_child_by_pattern(window, {"text": option_text, "type": QtWidgets.QAction})
+ action.trigger()
+
+ # 1) Open Script Canvas window (Tools > Script Canvas)
+ general.idle_enable(True)
+ general.open_pane("Script Canvas")
+ helper.wait_for_condition(lambda: general.is_pane_visible("Script Canvas"), 6.0)
+
+ # 2) Get the SC window object
+ editor_window = pyside_utils.get_editor_main_window()
+ sc = editor_window.findChild(QtWidgets.QDockWidget, "Script Canvas")
+ sc_main = sc.findChild(QtWidgets.QMainWindow)
+
+ # 3) Open Variable Manager in Script Canvas window
+ pane = find_pane(sc, "VariableManager")
+ if not pane.isVisible():
+ click_menu_option(sc, "Variable Manager")
+ pane = find_pane(sc, "VariableManager")
+ Report.result(Tests.variable_manager_opened, pane.isVisible())
+
+ # 4) Create new graph
+ create_new_graph = pyside_utils.find_child_by_pattern(
+ sc_main, {"objectName": "action_New_Script", "type": QtWidgets.QAction}
+ )
+ create_new_graph.trigger()
+
+ # 5) Click on the Create Variable button in the Variable Manager
+ variable_manager = sc_main.findChild(QtWidgets.QDockWidget, "VariableManager")
+ button = variable_manager.findChild(QtWidgets.QPushButton, "addButton")
+ button.click()
+
+ # 6) Unpin Boolean by clicking the "Pin" icon on its left side
+ table_view = variable_manager.findChild(QtWidgets.QTableView, "variablePalette")
+ model_index = pyside_utils.find_child_by_pattern(table_view, "Boolean")
+ # Make sure Boolean is pinned
+ is_boolean = model_index.siblingAtColumn(0)
+ result = helper.wait_for_condition(lambda: is_boolean.data(Qt.DecorationRole) is not None, GENERAL_WAIT)
+ Report.result(Tests.variable_pinned, result)
+ # Unpin Boolean and make sure Boolean is unpinned.
+ pyside_utils.item_view_index_mouse_click(table_view, is_boolean)
+ result = helper.wait_for_condition(lambda: is_boolean.data(Qt.DecorationRole) is None, GENERAL_WAIT)
+ Report.result(Tests.variable_unpinned, result)
+
+ # 7) Close and Reopen Create Variable menu and make sure Boolean is unpinned after reopening Create Variable menu
+ button.click()
+ button.click()
+ model_index = pyside_utils.find_child_by_pattern(table_view, "Boolean")
+ result = helper.wait_for_condition(
+ lambda: model_index.siblingAtColumn(0).data(Qt.DecorationRole) is None, GENERAL_WAIT
+ )
+ Report.result(Tests.variable_unpinned_after_reopen, result)
+
+ # 8) Restore default layout and close SC window
+ click_menu_option(sc, "Restore Default Layout")
+ general.close_pane("Script Canvas")
+
+
+if __name__ == "__main__":
+ import ImportPathHelper as imports
+
+ imports.init()
+
+ from utils import Report
+
+ Report.start_test(VariableManager_UnpinVariableType_Works)
diff --git a/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/C18977329_NvCloth_AddClothSimulationToMesh.ly b/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/C18977329_NvCloth_AddClothSimulationToMesh.ly
index 17fee158d8..1afbf787db 100644
--- a/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/C18977329_NvCloth_AddClothSimulationToMesh.ly
+++ b/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/C18977329_NvCloth_AddClothSimulationToMesh.ly
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:a2a3360287a4711882c4254d64ca2ba70cd743012a7d38ca29aa2a57f151efaa
-size 6661
+oid sha256:e15d484113e8151072b410924747a8ad304f6f12457fad577308c0491693ab34
+size 5472
diff --git a/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/filelist.xml b/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/filelist.xml
index 6c8b361e57..9775a35c53 100644
--- a/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/filelist.xml
+++ b/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/filelist.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/level.pak b/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/level.pak
index e80d5ca1d9..08a775b6c8 100644
--- a/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/level.pak
+++ b/AutomatedTesting/Levels/NvCloth/C18977329_NvCloth_AddClothSimulationToMesh/level.pak
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:cd8105f020151e65093988dfb09ab42ff8d33ef5b97c61fbe0011384870aadf8
-size 39238
+oid sha256:64de37c805b0be77cdb7a85b5406af58b7f845e7d97fec1721ac5d789bb641db
+size 38856
diff --git a/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/C18977330_NvCloth_AddClothSimulationToActor.ly b/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/C18977330_NvCloth_AddClothSimulationToActor.ly
index 031989ee11..385027c479 100644
--- a/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/C18977330_NvCloth_AddClothSimulationToActor.ly
+++ b/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/C18977330_NvCloth_AddClothSimulationToActor.ly
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:f53fb5e096ff562e9f0f12856ce387891596776d086f49c7ed3a59dcd0a0c11a
-size 6535
+oid sha256:7b595323d4d51211463dea0338abb6ce2a4a0a8d41efb12ac3c9dccd1f972171
+size 5504
diff --git a/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/filelist.xml b/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/filelist.xml
index 290a28f223..7ccc1d51eb 100644
--- a/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/filelist.xml
+++ b/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/filelist.xml
@@ -1,6 +1,6 @@
-
+
diff --git a/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/level.pak b/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/level.pak
index fb91adeba5..12ce03fa87 100644
--- a/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/level.pak
+++ b/AutomatedTesting/Levels/NvCloth/C18977330_NvCloth_AddClothSimulationToActor/level.pak
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:87fbd9fda267daa505f11276b64f47c26115bee9e6d14f2a6f5a1cf1e1234218
-size 39179
+oid sha256:617c455668fc41cb7fd69de690e4aa3c80f2cb36deaa371902b79de18fcd1cb2
+size 39233
diff --git a/AutomatedTesting/Registry/C14195074_ScriptCanvas_PostUpdateEvent.setreg b/AutomatedTesting/Registry/C14195074_ScriptCanvas_PostUpdateEvent.setreg_override
similarity index 100%
rename from AutomatedTesting/Registry/C14195074_ScriptCanvas_PostUpdateEvent.setreg
rename to AutomatedTesting/Registry/C14195074_ScriptCanvas_PostUpdateEvent.setreg_override
diff --git a/AutomatedTesting/Registry/C14902097_ScriptCanvas_PreUpdateEvent.setreg b/AutomatedTesting/Registry/C14902097_ScriptCanvas_PreUpdateEvent.setreg_override
similarity index 100%
rename from AutomatedTesting/Registry/C14902097_ScriptCanvas_PreUpdateEvent.setreg
rename to AutomatedTesting/Registry/C14902097_ScriptCanvas_PreUpdateEvent.setreg_override
diff --git a/AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg b/AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg_override
similarity index 100%
rename from AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg
rename to AutomatedTesting/Registry/C3510644_Collider_CollisionGroups.setreg_override
diff --git a/AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg b/AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg_override
similarity index 100%
rename from AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg
rename to AutomatedTesting/Registry/C4976227_Collider_NewGroup.setreg_override
diff --git a/AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg b/AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg_override
similarity index 100%
rename from AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg
rename to AutomatedTesting/Registry/C4976244_Collider_SameGroupSameLayerCollision.setreg_override
diff --git a/AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg b/AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg_override
similarity index 100%
rename from AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg
rename to AutomatedTesting/Registry/C4976245_PhysXCollider_CollisionLayerTest.setreg_override
diff --git a/AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg b/AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg_override
similarity index 100%
rename from AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg
rename to AutomatedTesting/Registry/C4982593_PhysXCollider_CollisionLayer.setreg_override
diff --git a/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/activator.scriptcanvas b/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/activator.scriptcanvas
new file mode 100644
index 0000000000..89d86f0d54
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/activator.scriptcanvas
@@ -0,0 +1,778 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/controller.scriptcanvas b/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/controller.scriptcanvas
new file mode 100644
index 0000000000..83a899798e
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/controller.scriptcanvas
@@ -0,0 +1,1865 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/deactivator.scriptcanvas b/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/deactivator.scriptcanvas
new file mode 100644
index 0000000000..ca98ee303a
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/deactivator.scriptcanvas
@@ -0,0 +1,766 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents0.scriptcanvas b/AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents0.scriptcanvas
new file mode 100644
index 0000000000..af3afead19
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents0.scriptcanvas
@@ -0,0 +1,365 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents1.scriptcanvas b/AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents1.scriptcanvas
new file mode 100644
index 0000000000..0a16717520
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents1.scriptcanvas
@@ -0,0 +1,365 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/T92563191_test.scriptcanvas b/AutomatedTesting/ScriptCanvas/T92563191_test.scriptcanvas
new file mode 100644
index 0000000000..f0797739a5
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/T92563191_test.scriptcanvas
@@ -0,0 +1,750 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/T92567320.scriptcanvas b/AutomatedTesting/ScriptCanvas/T92567320.scriptcanvas
new file mode 100644
index 0000000000..d509442435
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/T92567320.scriptcanvas
@@ -0,0 +1,1266 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/T92567321A.scriptcanvas b/AutomatedTesting/ScriptCanvas/T92567321A.scriptcanvas
new file mode 100644
index 0000000000..644a5daa17
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/T92567321A.scriptcanvas
@@ -0,0 +1,778 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/T92567321B.scriptcanvas b/AutomatedTesting/ScriptCanvas/T92567321B.scriptcanvas
new file mode 100644
index 0000000000..54c83c2933
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/T92567321B.scriptcanvas
@@ -0,0 +1,880 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/ScriptCanvas/T92569006_ScriptCanvas.scriptcanvas b/AutomatedTesting/ScriptCanvas/T92569006_ScriptCanvas.scriptcanvas
new file mode 100644
index 0000000000..626ee29d96
--- /dev/null
+++ b/AutomatedTesting/ScriptCanvas/T92569006_ScriptCanvas.scriptcanvas
@@ -0,0 +1,1952 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/TestAssets/T92567320.scriptevents b/AutomatedTesting/TestAssets/T92567320.scriptevents
new file mode 100644
index 0000000000..63cf20f2d0
--- /dev/null
+++ b/AutomatedTesting/TestAssets/T92567320.scriptevents
@@ -0,0 +1,116 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/TestAssets/T92567321.scriptevents b/AutomatedTesting/TestAssets/T92567321.scriptevents
new file mode 100644
index 0000000000..6f9308ad02
--- /dev/null
+++ b/AutomatedTesting/TestAssets/T92567321.scriptevents
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/AutomatedTesting/TestAssets/T92569006.scriptevents b/AutomatedTesting/TestAssets/T92569006.scriptevents
new file mode 100644
index 0000000000..518b1b5733
--- /dev/null
+++ b/AutomatedTesting/TestAssets/T92569006.scriptevents
@@ -0,0 +1,126 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ae8a7a05f8..2ee08a8d16 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,13 +25,37 @@ include(cmake/LySet.cmake)
include(cmake/Version.cmake)
include(cmake/OutputDirectory.cmake)
+# Set the engine_path and engine_json
+set(o3de_engine_path ${CMAKE_CURRENT_LIST_DIR})
+set(o3de_engine_json ${o3de_engine_path}/engine.json)
+
if(NOT PROJECT_NAME)
project(O3DE
LANGUAGES C CXX
VERSION ${LY_VERSION_STRING}
)
+
+ # o3de manifest
+ include(cmake/o3de_manifest.cmake)
endif()
+################################################################################
+# Resolve this engines name and restricted path
+################################################################################
+o3de_engine_name(${o3de_engine_json} o3de_engine_name)
+o3de_restricted_path(${o3de_engine_json} o3de_engine_restricted_path)
+message(STATUS "O3DE Engine Name: ${o3de_engine_name}")
+message(STATUS "O3DE Engine Path: ${o3de_engine_path}")
+if(o3de_engine_restricted_path)
+ message(STATUS "O3DE Engine Restricted Path: ${o3de_engine_restricted_path}")
+endif()
+
+# add the engines cmake folder to the CMAKE_MODULE_PATH
+list(APPEND CMAKE_MODULE_PATH "${o3de_engine_path}/cmake")
+
+################################################################################
+# Initialize
+################################################################################
include(cmake/GeneralSettings.cmake)
include(cmake/FileUtil.cmake)
include(cmake/PAL.cmake)
@@ -60,20 +84,19 @@ include(cmake/Projects.cmake)
if(NOT INSTALLED_ENGINE)
# Add the rest of the targets
add_subdirectory(Code)
- add_subdirectory(Gems)
else()
ly_find_o3de_packages()
endif()
+# Add external subdirectories listed in the manifest
+list(APPEND LY_EXTERNAL_SUBDIRS ${o3de_engine_external_subdirectories})
+
set(enabled_platforms
${PAL_PLATFORM_NAME}
${LY_PAL_TOOLS_ENABLED})
-foreach(restricted_platform ${PAL_RESTRICTED_PLATFORMS})
- if(restricted_platform IN_LIST enabled_platforms)
- add_subdirectory(restricted/${restricted_platform})
- endif()
-endforeach()
+# Add any engine restricted platforms as external subdirs
+o3de_add_engine_restricted_platform_external_subdirs()
if(NOT INSTALLED_ENGINE)
add_subdirectory(scripts)
diff --git a/Code/CryEngine/CryCommon/AnimTime.h b/Code/CryEngine/CryCommon/AnimTime.h
deleted file mode 100644
index 8bd0b9d442..0000000000
--- a/Code/CryEngine/CryCommon/AnimTime.h
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __animtime_h__
-#define __animtime_h__
-
-#include
-#include
-#include
-
-struct SAnimTime
-{
- static const uint numTicksPerSecond = 6000;
-
- // List of possible frame rates (dividers of 6000). Most commonly used ones first.
- enum EFrameRate
- {
- // Common
- eFrameRate_30fps, eFrameRate_60fps, eFrameRate_120fps,
-
- // Possible
- eFrameRate_10fps, eFrameRate_12fps, eFrameRate_15fps, eFrameRate_24fps,
- eFrameRate_25fps, eFrameRate_40fps, eFrameRate_48fps, eFrameRate_50fps,
- eFrameRate_75fps, eFrameRate_80fps, eFrameRate_100fps, eFrameRate_125fps,
- eFrameRate_150fps, eFrameRate_200fps, eFrameRate_240fps, eFrameRate_250fps,
- eFrameRate_300fps, eFrameRate_375fps, eFrameRate_400fps, eFrameRate_500fps,
- eFrameRate_600fps, eFrameRate_750fps, eFrameRate_1000fps, eFrameRate_1200fps,
- eFrameRate_1500fps, eFrameRate_2000fps, eFrameRate_3000fps, eFrameRate_6000fps,
-
- eFrameRate_Num
- };
-
- SAnimTime()
- : m_ticks(0) {}
- explicit SAnimTime(int32 ticks)
- : m_ticks(ticks) {}
- explicit SAnimTime(float time)
- : m_ticks(aznumeric_caster(std::lround(static_cast(time) * numTicksPerSecond))) {}
-
- static uint GetFrameRateValue(EFrameRate frameRate)
- {
- const uint frameRateValues[eFrameRate_Num] =
- {
- // Common
- 30, 60, 120,
-
- // Possible
- 10, 12, 15, 24, 25, 40, 48, 50, 75, 80, 100, 125,
- 150, 200, 240, 250, 300, 375, 400, 500, 600, 750,
- 1000, 1200, 1500, 2000, 3000, 6000
- };
-
- return frameRateValues[frameRate];
- }
-
- static const char* GetFrameRateName(EFrameRate frameRate)
- {
- const char* frameRateNames[eFrameRate_Num] =
- {
- // Common
- "30 fps", "60 fps", "120 fps",
-
- // Possible
- "10 fps", "12 fps", "15 fps", "24 fps",
- "25 fps", "40 fps", "48 fps", "50 fps",
- "75 fps", "80 fps", "100 fps", "125 fps",
- "150 fps", "200 fps", "240 fps", "250 fps",
- "300 fps", "375 fps", "400 fps", "500 fps",
- "600 fps", "750 fps", "1000 fps", "1200 fps",
- "1500 fps", "2000 fps", "3000 fps", "6000 fps"
- };
-
- return frameRateNames[frameRate];
- }
-
- float ToFloat() const { return static_cast(m_ticks) / numTicksPerSecond; }
-
- void Serialize(Serialization::IArchive& ar)
- {
- ar(m_ticks, "ticks", "Ticks");
- }
-
- // Helper to serialize from ticks or old float time
- void Serialize(XmlNodeRef keyNode, bool bLoading, const char* pName, const char* pLegacyName)
- {
- if (bLoading)
- {
- int32 ticks;
- if (!keyNode->getAttr(pName, ticks))
- {
- // Backwards compatibility
- float time = 0.0f;
- keyNode->getAttr(pLegacyName, time);
- *this = SAnimTime(time);
- }
- else
- {
- m_ticks = ticks;
- }
- }
- else if (m_ticks > 0)
- {
- keyNode->setAttr(pName, m_ticks);
- }
- }
-
- int32 GetTicks() const { return m_ticks; }
-
- static SAnimTime Min() { SAnimTime minTime; minTime.m_ticks = std::numeric_limits::lowest(); return minTime; }
- static SAnimTime Max() { SAnimTime maxTime; maxTime.m_ticks = (std::numeric_limits::max)(); return maxTime; }
-
- SAnimTime operator-() const { return SAnimTime(-m_ticks); }
- SAnimTime operator-(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks -= r.m_ticks; return temp; }
- SAnimTime operator+(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks += r.m_ticks; return temp; }
- SAnimTime operator*(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks *= r.m_ticks; return temp; }
- SAnimTime operator/(SAnimTime r) const { SAnimTime temp; temp.m_ticks = static_cast((static_cast(m_ticks) * numTicksPerSecond) / r.m_ticks); return temp; }
- SAnimTime operator%(SAnimTime r) const { SAnimTime temp = *this; temp.m_ticks %= r.m_ticks; return temp; }
- SAnimTime operator*(float r) const { SAnimTime temp; temp.m_ticks = aznumeric_caster(std::lround(static_cast(m_ticks) * r)); return temp; }
- SAnimTime operator/(float r) const { SAnimTime temp; temp.m_ticks = aznumeric_caster(std::lround(static_cast(m_ticks) / r)); return temp; }
- SAnimTime& operator+=(SAnimTime r) { *this = *this + r; return *this; }
- SAnimTime& operator-=(SAnimTime r) { *this = *this - r; return *this; }
- SAnimTime& operator*=(SAnimTime r) { *this = *this * r; return *this; }
- SAnimTime& operator/=(SAnimTime r) { *this = *this / r; return *this; }
- SAnimTime& operator%=(SAnimTime r) { *this = *this % r; return *this; }
- SAnimTime& operator*=(float r) { *this = *this * r; return *this; }
- SAnimTime& operator/=(float r) { *this = *this / r; return *this; }
-
- bool operator<(SAnimTime r) const { return m_ticks < r.m_ticks; }
- bool operator<=(SAnimTime r) const { return m_ticks <= r.m_ticks; }
- bool operator>(SAnimTime r) const { return m_ticks > r.m_ticks; }
- bool operator>=(SAnimTime r) const { return m_ticks >= r.m_ticks; }
- bool operator==(SAnimTime r) const { return m_ticks == r.m_ticks; }
- bool operator!=(SAnimTime r) const { return m_ticks != r.m_ticks; }
-
- // Snap to nearest multiple of given frame rate
- SAnimTime SnapToNearest(const EFrameRate frameRate)
- {
- const int sign = sgn(m_ticks);
- const int32 absTicks = abs(m_ticks);
-
- const int framesMod = numTicksPerSecond / GetFrameRateValue(frameRate);
- const int32 remainder = absTicks % framesMod;
- const bool bNextMultiple = remainder >= (framesMod / 2);
- return SAnimTime(sign * ((absTicks - remainder) + (bNextMultiple ? framesMod : 0)));
- }
-
-private:
- int32 m_ticks;
-
- friend bool Serialize(Serialization::IArchive& ar, SAnimTime& animTime, const char* name, const char* label);
-};
-
-inline bool Serialize(Serialization::IArchive& ar, SAnimTime& animTime, const char* name, const char* label)
-{
- return ar(animTime.m_ticks, name, label);
-}
-
-inline SAnimTime abs(SAnimTime time)
-{
- return (time >= SAnimTime(0)) ? time : -time;
-}
-
-#endif
diff --git a/Code/CryEngine/CryCommon/Bezier.h b/Code/CryEngine/CryCommon/Bezier.h
deleted file mode 100644
index fa1cf60d49..0000000000
--- a/Code/CryEngine/CryCommon/Bezier.h
+++ /dev/null
@@ -1,321 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __BEZIER_H__
-#define __BEZIER_H__
-
-#include
-#include
-#include
-
-struct SBezierControlPoint
-{
- SBezierControlPoint()
- : m_value(0.0f)
- , m_inTangent(ZERO)
- , m_outTangent(ZERO)
- , m_inTangentType(eTangentType_Auto)
- , m_outTangentType(eTangentType_Auto)
- , m_bBreakTangents(false)
- {
- }
-
- enum ETangentType
- {
- eTangentType_Custom,
- eTangentType_Auto,
- eTangentType_Zero,
- eTangentType_Step,
- eTangentType_Linear,
- };
-
- void Serialize(Serialization::IArchive& ar)
- {
- ar(m_value, "value", "Value");
-
- if (ar.IsOutput())
- {
- bool breakTangents = m_bBreakTangents;
- ar(breakTangents, "breakTangents", "Break Tangents");
- }
- else
- {
- bool breakTangents = false;
- ar(breakTangents, "breakTangents", "Break Tangents");
- m_bBreakTangents = breakTangents;
- }
-
- if (ar.IsOutput())
- {
- ETangentType inTangentType = m_inTangentType;
- ar(inTangentType, "inTangentType", "Incoming tangent type");
- }
- else
- {
- ETangentType inTangentType = eTangentType_Auto;
- ar(inTangentType, "inTangentType", "Incoming tangent type");
- m_inTangentType = inTangentType;
- }
-
- ar(m_inTangent, "inTangent", (m_inTangentType == eTangentType_Custom) ? "Incoming Tangent" : NULL);
-
- if (ar.IsOutput())
- {
- ETangentType outTangentType = m_outTangentType;
- ar(outTangentType, "outTangentType", "Outgoing tangent type");
- }
- else
- {
- ETangentType outTangentType = eTangentType_Auto;
- ar(outTangentType, "outTangentType", "Outgoing tangent type");
- m_outTangentType = outTangentType;
- }
-
- ar(m_outTangent, "outTangent", (m_outTangentType == eTangentType_Custom) ? "Outgoing Tangent" : NULL);
- }
-
- float m_value;
-
- // For 1D Bezier only the Y component is used
- Vec2 m_inTangent;
- Vec2 m_outTangent;
-
- ETangentType m_inTangentType : 4;
- ETangentType m_outTangentType : 4;
- bool m_bBreakTangents : 1;
-};
-
-struct SBezierKey
-{
- SBezierKey()
- : m_time(0) {}
-
- void Serialize(Serialization::IArchive& ar)
- {
- ar(m_time, "time", "Time");
- ar(m_controlPoint, "controlPoint", "Control Point");
- }
-
- SAnimTime m_time;
- SBezierControlPoint m_controlPoint;
-};
-
-namespace Bezier
-{
- inline float Evaluate(float t, float p0, float p1, float p2, float p3)
- {
- const float a = 1 - t;
- const float aSq = a * a;
- const float tSq = t * t;
- return (aSq * a * p0) + (3.0f * aSq * t * p1) + (3.0f * a * tSq * p2) + (tSq * t * p3);
- }
-
- inline float EvaluateDeriv(float t, float p0, float p1, float p2, float p3)
- {
- const float a = 1 - t;
- const float ta = t * a;
- const float aSq = a * a;
- const float tSq = t * t;
- return 3.0f * ((-p2 * tSq) + (p3 * tSq) - (p0 * aSq) + (p1 * aSq) + 2.0f * ((-p1 * ta) + (p2 * ta)));
- }
-
- inline float EvaluateX(const float t, const float duration, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = 0.0f;
- const float p1 = p0 + start.m_outTangent.x;
- const float p3 = duration;
- const float p2 = p3 + end.m_inTangent.x;
- return Evaluate(t, p0, p1, p2, p3);
- }
-
- inline float EvaluateY(const float t, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = start.m_value;
- const float p1 = p0 + start.m_outTangent.y;
- const float p3 = end.m_value;
- const float p2 = p3 + end.m_inTangent.y;
- return Evaluate(t, p0, p1, p2, p3);
- }
-
- // Duration = (time at end key) - (time at start key)
- inline float EvaluateDerivX(const float t, const float duration, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = 0.0f;
- const float p1 = p0 + start.m_outTangent.x;
- const float p3 = duration;
- const float p2 = p3 + end.m_inTangent.x;
- return EvaluateDeriv(t, p0, p1, p2, p3);
- }
-
- inline float EvaluateDerivY(const float t, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- const float p0 = start.m_value;
- const float p1 = p0 + start.m_outTangent.y;
- const float p3 = end.m_value;
- const float p2 = p3 + end.m_inTangent.y;
- return EvaluateDeriv(t, p0, p1, p2, p3);
- }
-
- // Find interpolation factor where 2D bezier curve has the given x value. Works only for curves where x is monotonically increasing.
- // The passed x must be in range [0, duration]. Uses the Newton-Raphson root finding method. Usually takes 2 or 3 iterations.
- //
- // Note: This is for "1D" 2D bezier curves as used in TrackView. The curves are restricted by the curve editor to be monotonically increasing.
- //
- inline float InterpolationFactorFromX(const float x, const float duration, const SBezierControlPoint& start, const SBezierControlPoint& end)
- {
- float t = (x / duration);
-
- const float epsilon = 0.00001f;
- const uint maxSteps = 10;
-
- for (uint i = 0; i < maxSteps; ++i)
- {
- const float currentX = EvaluateX(t, duration, start, end) - x;
- if (fabs(currentX) <= epsilon)
- {
- break;
- }
-
- const float currentXDeriv = EvaluateDerivX(t, duration, start, end);
- t -= currentX / currentXDeriv;
- }
-
- return t;
- }
-
- inline SBezierControlPoint CalculateInTangent(
- float time, const SBezierControlPoint& point,
- float leftTime, const SBezierControlPoint* pLeftPoint,
- float rightTime, const SBezierControlPoint* pRightPoint)
- {
- SBezierControlPoint newPoint = point;
-
- // In tangent X can never be positive
- newPoint.m_inTangent.x = std::min(point.m_inTangent.x, 0.0f);
-
- if (pLeftPoint)
- {
- switch (point.m_inTangentType)
- {
- case SBezierControlPoint::eTangentType_Custom:
- {
- // Need to clamp tangent if it is reaching over last point
- const float deltaTime = time - leftTime;
- if (deltaTime < -newPoint.m_inTangent.x)
- {
- if (newPoint.m_inTangent.x == 0)
- {
- newPoint.m_inTangent = Vec2(ZERO);
- }
- else
- {
- float scaleFactor = deltaTime / -newPoint.m_inTangent.x;
- newPoint.m_inTangent.x = -deltaTime;
- newPoint.m_inTangent.y *= scaleFactor;
- }
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Zero:
- // Fall through. Zero for y is same as Auto, x is set to 0.0f
- case SBezierControlPoint::eTangentType_Auto:
- {
- const SBezierControlPoint& rightPoint = pRightPoint ? *pRightPoint : point;
- const float deltaTime = (pRightPoint ? rightTime : time) - leftTime;
- if (deltaTime > 0.0f)
- {
- const float ratio = (time - leftTime) / deltaTime;
- const float deltaValue = rightPoint.m_value - pLeftPoint->m_value;
- const bool bIsZeroTangent = (point.m_inTangentType == SBezierControlPoint::eTangentType_Zero);
- newPoint.m_inTangent = Vec2(-(deltaTime * ratio) / 3.0f, bIsZeroTangent ? 0.0f : -(deltaValue * ratio) / 3.0f);
- }
- else
- {
- newPoint.m_inTangent = Vec2(ZERO);
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Linear:
- newPoint.m_inTangent = Vec2((leftTime - time) / 3.0f,
- (pLeftPoint->m_value - point.m_value) / 3.0f);
- break;
- }
- }
-
- return newPoint;
- }
-
- inline SBezierControlPoint CalculateOutTangent(
- float time, const SBezierControlPoint& point,
- float leftTime, const SBezierControlPoint* pLeftPoint,
- float rightTime, const SBezierControlPoint* pRightPoint)
- {
- SBezierControlPoint newPoint = point;
-
- // Out tangent X can never be negative
- newPoint.m_outTangent.x = std::max(point.m_outTangent.x, 0.0f);
-
- if (pRightPoint)
- {
- switch (point.m_outTangentType)
- {
- case SBezierControlPoint::eTangentType_Custom:
- {
- // Need to clamp tangent if it is reaching over next point
- const float deltaTime = rightTime - time;
- if (deltaTime < newPoint.m_outTangent.x)
- {
- if (newPoint.m_outTangent.x == 0)
- {
- newPoint.m_outTangent = Vec2(ZERO);
- }
- else
- {
- float scaleFactor = deltaTime / newPoint.m_outTangent.x;
- newPoint.m_outTangent.x = deltaTime;
- newPoint.m_outTangent.y *= scaleFactor;
- }
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Zero:
- // Fall through. Zero for y is same as Auto, x is set to 0.0f
- case SBezierControlPoint::eTangentType_Auto:
- {
- const SBezierControlPoint& leftPoint = pLeftPoint ? *pLeftPoint : point;
- const float deltaTime = rightTime - (pLeftPoint ? leftTime : time);
- if (deltaTime > 0.0f)
- {
- const float ratio = (rightTime - time) / deltaTime;
- const float deltaValue = pRightPoint->m_value - leftPoint.m_value;
- const bool bIsZeroTangent = (point.m_outTangentType == SBezierControlPoint::eTangentType_Zero);
- newPoint.m_outTangent = Vec2((deltaTime * ratio) / 3.0f, bIsZeroTangent ? 0.0f : (deltaValue * ratio) / 3.0f);
- }
- else
- {
- newPoint.m_outTangent = Vec2(ZERO);
- }
- }
- break;
- case SBezierControlPoint::eTangentType_Linear:
- newPoint.m_outTangent = Vec2((rightTime - time) / 3.0f,
- (pRightPoint->m_value - point.m_value) / 3.0f);
- break;
- }
- }
-
- return newPoint;
- }
-}
-
-#endif
diff --git a/Code/CryEngine/CryCommon/CREBaseCloud.h b/Code/CryEngine/CryCommon/CREBaseCloud.h
deleted file mode 100644
index b7a95d88d4..0000000000
--- a/Code/CryEngine/CryCommon/CREBaseCloud.h
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CREBASECLOUD_H__
-#define __CREBASECLOUD_H__
-
-//================================================================================
-
-class SCloudParticle
-{
-public:
- inline SCloudParticle();
- inline SCloudParticle(const Vec3& vPos, float fRadius, const ColorF& baseColor, float fTransparency = 0);
- inline SCloudParticle(const Vec3& vPos, float fRadiusX, float fRadiusY, float fRotMin, float fRotMax, Vec2 vUV[]);
- inline ~SCloudParticle();
-
- float GetRadiusX() const { return m_fSize[0]; }
- float GetRadiusY() const { return m_fSize[1]; }
- float GetTransparency() const { return m_fTransparency; }
- const Vec3& GetPosition() const { return m_vPosition; }
- const ColorF& GetBaseColor() const { return m_vBaseColor; }
- uint32 GetNumLitColors() const { return m_vLitColors.size(); }
- inline const ColorF GetLitColor(unsigned int index) const;
- float GetSquareSortDistance() const { return m_fSquareSortDistance; }
-
- //! Sets the radius of the particle.
- void SetRadiusX(float rad) { m_fSize[0] = rad; }
- void SetRadiusY(float rad) { m_fSize[1] = rad; }
- void SetTransparency(float trans) { m_fTransparency = trans; }
- void SetPosition(const Vec3& pos) { m_vPosition = pos; }
- void SetBaseColor(const ColorF& col) { m_vBaseColor = col; }
- void AddLitColor(const ColorF& col) { m_vLitColors.push_back(col); }
- void ClearLitColors() { m_vLitColors.clear(); }
- void SetSquareSortDistance(float fSquareDistance) { m_fSquareSortDistance = fSquareDistance; }
-
- bool operator<(const SCloudParticle& p) const
- {
- return (m_fSquareSortDistance < p.m_fSquareSortDistance);
- }
-
- bool operator>(const SCloudParticle& p) const
- {
- return (m_fSquareSortDistance > p.m_fSquareSortDistance);
- }
-
-protected:
- float m_fTransparency;
- Vec3 m_vPosition;
- float m_fSize[2];
- float m_fRotMin;
- float m_fRotMax;
- ColorF m_vBaseColor;
- TArray m_vLitColors;
- Vec3 m_vEye;
-
- // for sorting particles during shading
- float m_fSquareSortDistance;
-public:
- Vec2 m_vUV[2];
-};
-
-inline SCloudParticle::SCloudParticle()
-{
- m_fSize[0] = 0;
- m_fTransparency = 0;
- m_vPosition = Vec3(0, 0, 0);
- m_vBaseColor = Col_Black;
- m_vEye = Vec3(0, 0, 0);
- m_fSquareSortDistance = 0;
-
- m_vLitColors.clear();
-}
-
-inline SCloudParticle::SCloudParticle(const Vec3& pos, float fRadius, const ColorF& baseColor, float fTransparency)
-{
- m_fSize[0] = fRadius;
- m_fSize[1] = fRadius;
- m_fTransparency = fTransparency;
- m_vPosition = pos;
- m_vBaseColor = baseColor;
- m_vUV[0] = Vec2(0, 0);
- m_vUV[1] = Vec2(1, 1);
-
- m_fRotMin = 0;
- m_fRotMax = 0;
- m_vEye = Vec3(0, 0, 0);
- m_fSquareSortDistance = 0;
-
- m_vLitColors.clear();
-}
-
-inline SCloudParticle::SCloudParticle(const Vec3& vPos, float fRadiusX, float fRadiusY, float fRotMin, float fRotMax, Vec2 vUV[2])
-{
- m_fSize[0] = fRadiusX;
- m_fSize[1] = fRadiusY;
- m_vPosition = vPos;
- m_vBaseColor = Col_White;
- m_vUV[0] = vUV[0];
- m_vUV[1] = vUV[1];
- m_fRotMin = fRotMin;
- m_fRotMax = fRotMax;
-
- m_fTransparency = 1.0f;
- m_vEye = Vec3(0, 0, 0);
- m_fSquareSortDistance = 0;
-
- m_vLitColors.clear();
-}
-
-inline SCloudParticle::~SCloudParticle()
-{
- m_vLitColors.clear();
-}
-
-inline const ColorF SCloudParticle::GetLitColor(unsigned int index) const
-{
- if (index <= m_vLitColors.size())
- {
- return m_vLitColors[index];
- }
- else
- {
- return Col_Black;
- }
-}
-
-//===========================================================================
-class CREBaseCloud
- : public CRendElementBase
-{
- friend class CRECloud;
-
-public:
- CREBaseCloud()
- : CRendElementBase()
- {
- mfSetType(eDATA_Cloud);
- mfUpdateFlags(FCEF_TRANSFORM);
- }
- virtual void SetParticles(SCloudParticle* pParticles, int nNumParticles) = 0;
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-};
-
-#endif // __CREBASECLOUD_H__
diff --git a/Code/CryEngine/CryCommon/CREFogVolume.h b/Code/CryEngine/CryCommon/CREFogVolume.h
deleted file mode 100644
index 83a024d15e..0000000000
--- a/Code/CryEngine/CryCommon/CREFogVolume.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREFOGVOLUME_
-#define _CREFOGVOLUME_
-
-#pragma once
-
-#include "VertexFormats.h"
-
-
-struct IFogVolumeRenderNode;
-
-
-class CREFogVolume
- : public CRendElementBase
-{
-public:
- CREFogVolume();
-
- virtual ~CREFogVolume();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- Vec3 m_center;
- uint32 m_viewerInsideVolume : 1;
- uint32 m_affectsThisAreaOnly : 1;
- uint32 m_stencilRef : 8;
- uint32 m_volumeType : 1;
- uint32 m_reserved : 21;
- AABB m_localAABB;
- Matrix34 m_matWSInv;
- float m_globalDensity;
- float m_densityOffset;
- float m_nearCutoff;
- Vec2 m_softEdgesLerp;
- ColorF m_fogColor; // color already combined with fHDRDynamic
- Vec3 m_heightFallOffDirScaled;
- Vec3 m_heightFallOffBasePoint;
- Vec3 m_eyePosInWS;
- Vec3 m_eyePosInOS;
- Vec3 m_rampParams;
- Vec3 m_windOffset;
- float m_noiseScale;
- Vec3 m_noiseFreq;
- float m_noiseOffset;
- float m_noiseElapsedTime;
- Vec3 m_scale;
-};
-
-
-#endif // #ifndef _CREFOGVOLUME_
diff --git a/Code/CryEngine/CryCommon/CREGameEffect.h b/Code/CryEngine/CryCommon/CREGameEffect.h
deleted file mode 100644
index 17e68813ed..0000000000
--- a/Code/CryEngine/CryCommon/CREGameEffect.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREGameEffect_
-#define _CREGameEffect_
-
-#pragma once
-
-//==================================================================================================
-// Name: IREGameEffect
-// Desc: Interface for game effect render elements, designed to be instantiated in game code, and
-// called from the CREGameEffect within the engine. This then allows render elements
-// to be created in game code as well as in the engine.
-// Author: James Chilvers
-//==================================================================================================
-struct IREGameEffect
-{
- virtual ~IREGameEffect(){}
-
- virtual void mfPrepare(bool bCheckOverflow) = 0;
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm, CRenderObject* renderObj) = 0;
-};//------------------------------------------------------------------------------------------------
-
-//==================================================================================================
-// Name: CREGameEffect
-// Desc: Render element that uses the IREGameEffect interface for its functionality
-// Author: James Chilvers
-//==================================================================================================
-class CREGameEffect
- : public CRendElementBase
-{
-public:
-
- CREGameEffect();
- ~CREGameEffect();
-
- // CRendElementBase interface
- void mfPrepare(bool bCheckOverflow);
- bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- // CREGameEffect interface
- inline void SetPrivateImplementation(IREGameEffect* pImpl) { m_pImpl = pImpl; }
- inline IREGameEffect* GetPrivateImplementation() const { return m_pImpl; }
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-private:
-
- IREGameEffect* m_pImpl; // Implementation of of render element
-};//------------------------------------------------------------------------------------------------
-
-#endif // #ifndef _CREGameEffect_
diff --git a/Code/CryEngine/CryCommon/CREGeomCache.h b/Code/CryEngine/CryCommon/CREGeomCache.h
deleted file mode 100644
index 6911b8486e..0000000000
--- a/Code/CryEngine/CryCommon/CREGeomCache.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Backend part of geometry cache rendering
-
-#ifndef CRYINCLUDE_CRYCOMMON_CREGEOMCACHE_H
-#define CRYINCLUDE_CRYCOMMON_CREGEOMCACHE_H
-#pragma once
-
-#if defined(USE_GEOM_CACHES)
-
-#include
-#include
-
-class CREGeomCache
- : public CRendElementBase
-{
-public:
- struct SMeshInstance
- {
- AABB m_aabb;
- Matrix34 m_matrix;
- Matrix34 m_prevMatrix;
- };
-
- struct SMeshRenderData
- {
- DynArray m_instances;
- _smart_ptr m_pRenderMesh;
- };
-
- struct UpdateList
- {
- CryCriticalSection m_mutex;
- AZStd::vector> m_geoms;
- };
-
-public:
- CREGeomCache();
- ~CREGeomCache();
-
- bool Update(const int flags, const bool bTesselation);
- static void UpdateModified();
-
- // CRendElementBase interface
- virtual bool mfUpdate(int Flags, bool bTessellation);
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- // CREGeomCache interface
- virtual void InitializeRenderElement(const uint numMeshes, _smart_ptr* pMeshes, uint16 materialId);
- virtual void SetupMotionBlur(CRenderObject* pRenderObject, const SRenderingPassInfo& passInfo);
-
- virtual volatile int* SetAsyncUpdateState(int& threadId);
- virtual DynArray* GetMeshFillDataPtr();
- virtual DynArray* GetRenderDataPtr();
- virtual void DisplayFilledBuffer(const int threadId);
-
-
- AZ::Vertex::Format GetVertexFormat() const override;
- bool GetGeometryInfo(SGeometryInfo &streams) override;
-
-private:
- uint16 m_materialId;
- volatile bool m_bUpdateFrame[2];
- volatile int m_transformUpdateState[2];
-
- // We use a double buffered m_meshFillData array for input from the main thread. When data
- // was successfully sent from the main thread it gets copied to m_meshRenderData
- // This simplifies the cases where frame data is missing, e.g. meshFillData is not updated for a frame
- // Note that meshFillData really needs to be double buffered because the copy occurs in render thread
- // so the next main thread could already be touching the data again
- //
- // Note: m_meshRenderData is directly accessed for ray intersections via GetRenderDataPtr.
- // This is safe, because it's only used in editor.
- DynArray m_meshFillData[2];
- DynArray m_meshRenderData;
-
- static StaticInstance sm_updateList[2]; // double buffered update lists
-
- AZ::Vertex::Format m_geomCacheVertexFormat;
-};
-
-#endif
-#endif // CRYINCLUDE_CRYCOMMON_CREGEOMCACHE_H
diff --git a/Code/CryEngine/CryCommon/CREImposter.h b/Code/CryEngine/CryCommon/CREImposter.h
deleted file mode 100644
index 1150212b7d..0000000000
--- a/Code/CryEngine/CryCommon/CREImposter.h
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#pragma once
-
-#include
-#include "Cry_Camera.h"
-
-//================================================================================
-
-struct SDynTexture2;
-struct SDynTexture;
-class IDynTexture;
-class CameraViewParameters;
-
-struct IImposterRenderElement
-{
- virtual void GetMemoryUsage(ICrySizer* pSizer) const = 0;
- virtual void mfPrepare(bool bCheckOverflow) = 0;
- virtual bool mfDraw(CShader* ef, SShaderPass* sl) = 0;
- virtual const SMinMaxBox& mfGetWorldSpaceBounds() = 0;
-
- virtual bool IsSplit() = 0;
- virtual bool IsScreenImposter() = 0;
-
- virtual float GetRadiusX() = 0;
- virtual float GetRadiusY() = 0;
- virtual Vec3* GetQuadCorners() = 0;
- virtual Vec3 GetNearPoint() = 0;
- virtual Vec3 GetFarPoint() = 0;
- virtual float GetErrorToleranceCosAngle() = 0;
- virtual uint32 GetState() = 0;
- virtual int GetAlphaRef() = 0;
- virtual ColorF GetColorHelper() = 0;
- virtual Vec3 GetLastSunDirection() = 0;
- virtual uint8 GetLastBestEdge() = 0;
- virtual float GetNear() = 0;
- virtual float GetFar() = 0;
- virtual float GetTransparency() = 0;
- virtual Vec3 GetPosition();
- virtual int GetLogResolutionX() = 0;
- virtual int GetLogResolutionY() = 0;
- virtual CameraViewParameters& GetLastViewParameters() = 0;
- virtual IDynTexture* GetTexture() = 0;
- virtual IDynTexture* GetScreenTexture() = 0;
- virtual IDynTexture* GetFrontTexture() = 0;
- virtual IDynTexture* GetDepthTexture() = 0;
- virtual const SMinMaxBox& GetWorldSpaceBounds() = 0;
-
- virtual void SetBBox(const Vec3& min, const Vec3& max) = 0;
- virtual void SetScreenImposterState(bool state) = 0;
- virtual void SetState(uint32 state) = 0;
- virtual void SetAlphaRef(uint32 ref) = 0;
- virtual void SetPosition(Vec3 pos) = 0;
- virtual void SetFrameResetValue(int frameResetValue) = 0;
- virtual void SetTexture(IDynTexture* texture) = 0;
- virtual void SetScreenTexture(IDynTexture* texture) = 0;
- virtual void SetFrontTexture(IDynTexture* texture) = 0;
- virtual void SetDepthTexture(IDynTexture* texture) = 0;
-};
-
-class CREImposter
- : public CRendElementBase
-{
- friend class CRECloud;
- static IDynTexture* m_pScreenTexture;
-
- CameraViewParameters m_LastViewParameters;
- bool m_bScreenImposter;
- bool m_bSplit;
- float m_fRadiusX;
- float m_fRadiusY;
- Vec3 m_vQuadCorners[4]; // in world space, relative to m_vPos, in clockwise order, can be rotated
- Vec3 m_vNearPoint;
- Vec3 m_vFarPoint;
- int m_nLogResolutionX;
- int m_nLogResolutionY;
- IDynTexture* m_pTexture;
- IDynTexture* m_pFrontTexture;
- IDynTexture* m_pTextureDepth;
- float m_fErrorToleranceCosAngle; // cosine of m_fErrorToleranceAngle used to check if IsImposterValid
- SMinMaxBox m_WorldSpaceBV;
- uint32 m_State;
- int m_AlphaRef;
- float m_fCurTransparency;
- ColorF m_ColorHelper;
- Vec3 m_vPos;
- Vec3 m_vLastSunDir;
- uint8 m_nLastBestEdge; // 0..11 this edge is favored to not jitter between different edges
- float m_fNear;
- float m_fFar;
-
- bool IsImposterValid(const CameraViewParameters& viewParameters, float fRadiusX, float fRadiusY, float fCamRadiusX, float fCamRadiusY,
- const int iRequiredLogResX, const int iRequiredLogResY, const uint32 dwBestEdge);
-
- bool Display(bool bDisplayFrontOfSplit);
-
-public:
- int m_nFrameReset;
- int m_FrameUpdate;
- float m_fTimeUpdate;
-
- static int m_MemUpdated;
- static int m_MemPostponed;
- static int m_PrevMemUpdated;
- static int m_PrevMemPostponed;
-
- CREImposter()
- : CRendElementBase()
- , m_pTexture(NULL)
- , m_pFrontTexture(NULL)
- , m_pTextureDepth(NULL)
- , m_bSplit(false)
- , m_fRadiusX(0)
- , m_fRadiusY(0)
- , m_fErrorToleranceCosAngle(cos(DEG2RAD(0.25f)))
- , m_bScreenImposter(false)
- , m_State(GS_DEPTHWRITE)
- , m_AlphaRef(-1)
- , m_fCurTransparency(1.0f)
- , m_FrameUpdate(0)
- , m_nFrameReset(0)
- , m_fTimeUpdate(0)
- , m_vLastSunDir(0, 0, 0)
- , m_nLogResolutionX(0)
- , m_nLogResolutionY(0)
- , m_nLastBestEdge(0)
- {
- mfSetType(eDATA_Imposter);
- mfUpdateFlags(FCEF_TRANSFORM);
- m_ColorHelper = Col_White;
- }
- virtual ~CREImposter()
- {
- ReleaseResources();
- }
-
- bool UpdateImposter();
- void ReleaseResources();
-
- bool PrepareForUpdate();
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sl);
- const SMinMaxBox& mfGetWorldSpaceBounds() { return m_WorldSpaceBV; }
-
- virtual bool IsSplit() { return m_bSplit; }
- virtual bool IsScreenImposter() { return m_bScreenImposter; }
-
- virtual float GetRadiusX() { return m_fRadiusX; }
- virtual float GetRadiusY() { return m_fRadiusY; }
- virtual Vec3* GetQuadCorners() { return &m_vQuadCorners[0]; }
- virtual Vec3 GetNearPoint() { return m_vNearPoint; }
- virtual Vec3 GetFarPoint() { return m_vFarPoint; }
- virtual float GetErrorToleranceCosAngle() { return m_fErrorToleranceCosAngle; }
- virtual uint32 GetState() { return m_State; }
- virtual int GetAlphaRef() { return m_AlphaRef; }
- virtual ColorF GetColorHelper() { return m_ColorHelper; }
- virtual Vec3 GetLastSunDirection() { return m_vLastSunDir; }
- virtual uint8 GetLastBestEdge() { return m_nLastBestEdge; }
- virtual float GetNear() { return m_fNear; }
- virtual float GetFar() { return m_fFar; }
- virtual float GetTransparency() { return m_fCurTransparency; }
- virtual Vec3 GetPosition();
- virtual int GetLogResolutionX() { return m_nLogResolutionX; }
- virtual int GetLogResolutionY() { return m_nLogResolutionY; }
- virtual CameraViewParameters& GetLastViewParameters() { return m_LastViewParameters; }
- virtual IDynTexture** GetTexture() { return &m_pTexture; }
- virtual IDynTexture** GetScreenTexture() { return &m_pScreenTexture; }
- virtual IDynTexture** GetFrontTexture() { return &m_pFrontTexture; }
- virtual IDynTexture** GetDepthTexture() { return &m_pTextureDepth; }
- virtual const SMinMaxBox& GetWorldSpaceBounds() { return m_WorldSpaceBV; }
- virtual int GetFrameReset() { return m_nFrameReset; }
- virtual void SetBBox(const Vec3& min, const Vec3& max) { m_WorldSpaceBV.SetMin(min); m_WorldSpaceBV.SetMax(max); }
- virtual void SetScreenImposterState(bool state) { m_bScreenImposter = state; }
- virtual void SetState(uint32 state) { m_State = state; }
- virtual void SetAlphaRef(uint32 ref) { m_AlphaRef = ref; }
- virtual void SetPosition(Vec3 pos) { m_vPos = pos; }
- virtual void SetFrameResetValue(int frameResetValue) { m_nFrameReset = frameResetValue; }
-};
diff --git a/Code/CryEngine/CryCommon/CREMesh.h b/Code/CryEngine/CryCommon/CREMesh.h
deleted file mode 100644
index 40df816808..0000000000
--- a/Code/CryEngine/CryCommon/CREMesh.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CREMESH_H__
-#define __CREMESH_H__
-
-class CREMesh
- : public CRendElementBase
-{
-public:
-
- struct CRenderChunk* m_pChunk;
- class CRenderMesh* m_pRenderMesh;
-
- // Copy of Chunk to avoid indirections
- int32 m_nFirstIndexId;
- int32 m_nNumIndices;
-
- uint32 m_nFirstVertId;
- uint32 m_nNumVerts;
-
-protected:
- CREMesh()
- {
- mfSetType(eDATA_Mesh);
- mfUpdateFlags(FCEF_TRANSFORM);
-
- m_pChunk = NULL;
- m_pRenderMesh = NULL;
- m_nFirstIndexId = -1;
- m_nNumIndices = -1;
- m_nFirstVertId = 0;
- m_nNumVerts = 0;
- }
-
- virtual ~CREMesh()
- {
- }
-
- // Ideally should be declared and left unimplemented to prevent slicing at compile time
- // but this would prevent auto code gen in renderer later on.
- // To track potential slicing, uncomment the following (and their equivalent in CREMeshImpl)
- //CREMesh(CREMesh&);
- //CREMesh& operator=(CREMesh& rhs);
-};
-
-#endif // __CREMESH_H__
diff --git a/Code/CryEngine/CryCommon/CREOcclusionQuery.h b/Code/CryEngine/CryCommon/CREOcclusionQuery.h
deleted file mode 100644
index 9350a74104..0000000000
--- a/Code/CryEngine/CryCommon/CREOcclusionQuery.h
+++ /dev/null
@@ -1,116 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CREOCCLUSIONQUERY_H__
-#define __CREOCCLUSIONQUERY_H__
-
-#define SUPP_HMAP_OCCL
-#define SUPP_HWOBJ_OCCL
-
-//=============================================================
-
-class CRenderMesh;
-
-class CREOcclusionQuery
- : public CRendElementBase
-{
- friend class CRender3D;
- bool m_bSucceeded;
-public:
-
- int m_nVisSamples;
- int m_nCheckFrame;
- int m_nDrawFrame;
- Vec3 m_vBoxMin;
- Vec3 m_vBoxMax;
-
- UINT_PTR m_nOcclusionID; // this will carry a pointer LPDIRECT3DQUERY9, so it needs to be 64-bit on Windows 64
-
- CRenderMesh* m_pRMBox;
- static uint32 m_nQueriesPerFrameCounter;
- static uint32 m_nReadResultNowCounter;
- static uint32 m_nReadResultTryCounter;
-
- CREOcclusionQuery()
- {
- m_nOcclusionID = 0;
-
- m_nVisSamples = 800 * 600;
- m_nCheckFrame = 0;
- m_nDrawFrame = 0;
- m_vBoxMin = Vec3(0, 0, 0);
- m_vBoxMax = Vec3(0, 0, 0);
- m_pRMBox = NULL;
-
- mfSetType(eDATA_OcclusionQuery);
- mfUpdateFlags(FCEF_TRANSFORM);
- }
-
- bool RT_ReadResult_Try(uint32 nDefaultNumSamples);
-
- ILINE bool HasSucceeded() const { return m_bSucceeded; }
-
- virtual ~CREOcclusionQuery();
-
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
- virtual void mfReset();
- virtual bool mfReadResult_Try(uint32 nDefaultNumSamples = 1);
- virtual bool mfReadResult_Now();
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-};
-
-struct OcclusionTestClient
-{
- OcclusionTestClient()
- : nLastOccludedMainFrameID(0)
- , nLastVisibleMainFrameID(0)
- {
-#ifdef SUPP_HMAP_OCCL
- vLastVisPoint.Set(0, 0, 0);
- nTerrainOccLastFrame = 0;
-#endif
-#ifdef SUPP_HWOBJ_OCCL
- bOccluded = true;
- pREOcclusionQuery = 0;
-#endif
- //nInstantTestRequested=0;
- }
-#ifdef SUPP_HWOBJ_OCCL
- ~OcclusionTestClient()
- {
- if (pREOcclusionQuery)
- {
- pREOcclusionQuery->Release(false);
- }
- }
-#endif
- uint32 nLastVisibleMainFrameID, nLastOccludedMainFrameID;
- uint32 nLastShadowCastMainFrameID, nLastNoShadowCastMainFrameID;
-#ifdef SUPP_HMAP_OCCL
- Vec3 vLastVisPoint;
- int nTerrainOccLastFrame;
-#endif
-#ifdef SUPP_HWOBJ_OCCL
- CREOcclusionQuery* pREOcclusionQuery;
- uint8 bOccluded;
-#endif
- //uint8 nInstantTestRequested;
-};
-
-
-#endif // CRYINCLUDE_CRYCOMMON_CREOCCLUSIONQUERY_H
diff --git a/Code/CryEngine/CryCommon/CREPostProcess.h b/Code/CryEngine/CryCommon/CREPostProcess.h
deleted file mode 100644
index 4803ae2166..0000000000
--- a/Code/CryEngine/CryCommon/CREPostProcess.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef CRYINCLUDE_CRYCOMMON_CREPOSTPROCESS_H
-#define CRYINCLUDE_CRYCOMMON_CREPOSTPROCESS_H
-#pragma once
-
-
-class CREPostProcess
- : public CRendElementBase
-{
- friend class CD3D9Renderer;
-
-public:
-
- CREPostProcess();
- virtual ~CREPostProcess();
-
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- // Use for setting numeric values, vec4 (colors, position, vectors, wtv), strings
- virtual int mfSetParameter(const char* pszParam, float fValue, bool bForceValue = false) const;
- virtual int mfSetParameterVec4(const char* pszParam, const Vec4& pValue, bool bForceValue = false) const;
- virtual int mfSetParameterString(const char* pszParam, const char* pszArg) const;
-
- virtual void mfGetParameter(const char* pszParam, float& fValue) const;
- virtual void mfGetParameterVec4(const char* pszParam, Vec4& pValue) const;
- virtual void mfGetParameterString(const char* pszParam, const char*& pszArg) const;
-
- virtual int32 mfGetPostEffectID(const char* pPostEffectName) const;
-
- // Reset all post processing effects
- virtual void Reset(bool bOnSpecChange = false);
- virtual void mfReset()
- {
- Reset();
- }
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-};
-
-#endif // CRYINCLUDE_CRYCOMMON_CREPOSTPROCESS_H
diff --git a/Code/CryEngine/CryCommon/CREPrismObject.h b/Code/CryEngine/CryCommon/CREPrismObject.h
deleted file mode 100644
index 4ec290f1b9..0000000000
--- a/Code/CryEngine/CryCommon/CREPrismObject.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREPRISMOBJECT_
-#define _CREPRISMOBJECT_
-
-#pragma once
-
-#if !defined(EXCLUDE_DOCUMENTATION_PURPOSE)
-
-class CREPrismObject
- : public CRendElementBase
-{
-public:
- CREPrismObject();
-
- virtual ~CREPrismObject() {}
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- Vec3 m_center;
-};
-
-#endif // EXCLUDE_DOCUMENTATION_PURPOSE
-
-#endif // _CREPRISMOBJECT_
diff --git a/Code/CryEngine/CryCommon/CRESky.h b/Code/CryEngine/CryCommon/CRESky.h
deleted file mode 100644
index 3dfc7d184f..0000000000
--- a/Code/CryEngine/CryCommon/CRESky.h
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef __CRESKY_H__
-#define __CRESKY_H__
-
-//=============================================================
-
-#include "VertexFormats.h"
-#include
-
-struct SSkyLightRenderParams;
-
-class CRESky
- : public CRendElementBase
-{
- friend class CRender3D;
-
-public:
-
- float m_fTerrainWaterLevel;
- float m_fSkyBoxStretching;
- float m_fAlpha;
- int m_nSphereListId;
-
-public:
- CRESky();
- virtual ~CRESky();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- AZ::Vertex::Format GetVertexFormat() const override;
- bool GetGeometryInfo(SGeometryInfo& streams) override;
-
-private:
- AZ::Vertex::Format m_skyVertexFormat;
-};
-
-class CREHDRSky
- : public CRendElementBase
-{
-public:
- CREHDRSky();
- virtual ~CREHDRSky();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- void GenerateSkyDomeTextures(int32 width, int32 height);
-
- virtual AZ::Vertex::Format GetVertexFormat() const override;
- virtual bool GetGeometryInfo(SGeometryInfo& streams) override;
-
-public:
- const SSkyLightRenderParams* m_pRenderParams;
- int m_moonTexId;
- class CTexture* m_pSkyDomeTextureMie;
- class CTexture* m_pSkyDomeTextureRayleigh;
-
- static void SetCommonMoonParams(CShader* ef, bool bUseMoon = false);
-
-private:
- void Init();
-
-private:
- int m_skyDomeTextureLastTimeStamp;
- int m_frameReset;
- class CStars* m_pStars;
- AZ::Vertex::Format m_hdrSkyVertexFormat;
-};
-
-
-#endif // __CRESKY_H__
diff --git a/Code/CryEngine/CryCommon/CREVolumeObject.h b/Code/CryEngine/CryCommon/CREVolumeObject.h
deleted file mode 100644
index 2137053a8e..0000000000
--- a/Code/CryEngine/CryCommon/CREVolumeObject.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREVOLUMEOBJECT_
-#define _CREVOLUMEOBJECT_
-
-#pragma once
-
-#include "VertexFormats.h"
-
-
-struct IVolumeObjectRenderNode;
-
-struct IVolumeTexture
-{
-public:
- virtual ~IVolumeTexture() {}
- virtual void Release() = 0;
- virtual bool Create(unsigned int width, unsigned int height, unsigned int depth, unsigned char* pData) = 0;
- virtual bool Update(unsigned int width, unsigned int height, unsigned int depth, const unsigned char* pData) = 0;
- virtual int GetTexID() const = 0;
- virtual uint32 GetWidth() const = 0;
- virtual uint32 GetHeight() const = 0;
- virtual uint32 GetDepth() const = 0;
- virtual ITexture* GetTexture() const = 0;
-};
-
-class CREVolumeObject
- : public CRendElementBase
-{
-public:
- CREVolumeObject();
-
- virtual ~CREVolumeObject();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
-
- virtual IVolumeTexture* CreateVolumeTexture() const;
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
- Vec3 m_center;
- Matrix34 m_matInv;
- Vec3 m_eyePosInWS;
- Vec3 m_eyePosInOS;
- Plane_tpl m_volumeTraceStartPlane;
- AABB m_renderBoundsOS;
- bool m_viewerInsideVolume;
- bool m_nearPlaneIntersectsVolume;
- float m_alpha;
- float m_scale;
-
- IVolumeTexture* m_pDensVol;
- IVolumeTexture* m_pShadVol;
- _smart_ptr m_pHullMesh;
-};
-
-#endif // #ifndef _CREVOLUMEOBJECT_
diff --git a/Code/CryEngine/CryCommon/CREWaterOcean.h b/Code/CryEngine/CryCommon/CREWaterOcean.h
deleted file mode 100644
index e8ca310d41..0000000000
--- a/Code/CryEngine/CryCommon/CREWaterOcean.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-#ifndef _CREWATEROCEAN_
-#define _CREWATEROCEAN_
-
-class CWater;
-
-class CREWaterOcean
- : public CRendElementBase
-{
-public:
- CREWaterOcean();
- virtual ~CREWaterOcean();
-
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
- virtual void mfGetPlane(Plane_tpl& pl);
-
- virtual void Create(uint32 nVerticesCount, SVF_P3F_C4B_T2F* pVertices, uint32 nIndicesCount, const void* pIndices, uint32 nIndexSizeof);
- void ReleaseOcean();
-
- virtual Vec3 GetPositionAt(float x, float y) const;
- virtual Vec4* GetDisplaceGrid() const;
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-private:
-
- uint32 m_nVerticesCount;
- uint32 m_nIndicesCount;
- uint32 m_nIndexSizeof;
-
- void* m_pVertDecl;
- void* m_pVertices;
- void* m_pIndices;
-
-private:
-
- void UpdateFFT();
- void FrameUpdate();
-};
-
-
-#endif
diff --git a/Code/CryEngine/CryCommon/CREWaterVolume.h b/Code/CryEngine/CryCommon/CREWaterVolume.h
deleted file mode 100644
index 89102e3097..0000000000
--- a/Code/CryEngine/CryCommon/CREWaterVolume.h
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-#ifndef _CREWATERVOLUME_
-#define _CREWATERVOLUME_
-
-#pragma once
-
-
-#include "VertexFormats.h"
-
-class CREWaterVolume
- : public CRendElementBase
-{
-public:
- CREWaterVolume();
-
- virtual ~CREWaterVolume();
- virtual void mfPrepare(bool bCheckOverflow);
- virtual bool mfDraw(CShader* ef, SShaderPass* sfm);
- virtual void mfGetPlane(Plane_tpl& pl);
- virtual void mfCenter(Vec3& vCenter, CRenderObject* pObj);
-
- virtual void GetMemoryUsage(ICrySizer* pSizer) const
- {
- pSizer->AddObject(this, sizeof(*this));
- }
-
-public:
- struct SParams
- {
- SParams()
- : m_pVertices(0)
- , m_pIndices(0)
- , m_numVertices(0)
- , m_numIndices(0)
- , m_center(0, 0, 0)
- , m_WSBBox(Vec3(-1, -1, -1), Vec3(1, 1, 1))
- , m_fogPlane(Vec3(0, 0, 1), 0)
- , m_fogDensity(0.1f)
- , m_fogColor(0.2f, 0.5f, 0.7f)
- , m_fogColorAffectedBySun(true)
- , m_fogShadowing(0.5f)
- , m_caustics(true)
- , m_causticIntensity(1.0f)
- , m_causticTiling(1.0f)
- , m_causticHeight(0.9f)
- , m_viewerInsideVolume(false)
- , m_viewerCloseToWaterPlane(false)
- , m_viewerCloseToWaterVolume(false)
- {
- }
-
- const SVF_P3F_C4B_T2F* m_pVertices;
- const uint16* m_pIndices;
-
- size_t m_numVertices;
- size_t m_numIndices;
-
- Vec3 m_center;
- AABB m_WSBBox;
-
- Plane_tpl m_fogPlane;
- float m_fogDensity;
- Vec3 m_fogColor;
- bool m_fogColorAffectedBySun;
- float m_fogShadowing;
-
- bool m_caustics;
- float m_causticIntensity;
- float m_causticTiling;
- float m_causticHeight;
-
- bool m_viewerInsideVolume;
- bool m_viewerCloseToWaterPlane;
- bool m_viewerCloseToWaterVolume;
- };
-
- struct SOceanParams
- {
- SOceanParams()
- : m_fogColor(0.2f, 0.5f, 0.7f)
- , m_fogColorShallow(0.2f, 0.5f, 0.7f)
- , m_fogDensity(0.2f)
- {
- }
-
- Vec3 m_fogColor;
- Vec3 m_fogColorShallow;
- float m_fogDensity;
- };
-
-public:
- const SParams* m_pParams;
- const SOceanParams* m_pOceanParams;
- bool m_drawWaterSurface;
- bool m_drawFastPath;
-};
-
-
-#endif // #ifndef _CREWATERVOLUME_
diff --git a/Code/CryEngine/CryCommon/CryAssert_Mac.h b/Code/CryEngine/CryCommon/CryAssert_Mac.h
index 8cf49e1a5d..9502605fea 100644
--- a/Code/CryEngine/CryCommon/CryAssert_Mac.h
+++ b/Code/CryEngine/CryCommon/CryAssert_Mac.h
@@ -45,43 +45,6 @@ void CryAssertTrace(const char* szFormat, ...)
}
}
}
-/*
-bool CryAssert(const char* szCondition, const char* szFile,unsigned int line, bool *pIgnore)
-{
- if (!gEnv) return false;
-
- gEnv->pSystem->OnAssert(szCondition, gs_szMessage, szFile, line);
-
- if (!gEnv->bNoAssertDialog && !gEnv->bIgnoreAllAsserts)
- {
- EDialogAction action = MacOSXHandleAssert(szCondition, szFile, line, gs_szMessage, gEnv->pRenderer != NULL);
-
- switch (action) {
- case eDAStop:
- raise(SIGABRT);
- exit(-1);
- case eDABreak:
- return true;
- case eDAIgnoreAll:
- gEnv->bIgnoreAllAsserts = true;
- break;
- case eDAIgnore:
- *pIgnore = true;
- break;
- case eDAReportAsBug:
- if ( gEnv && gEnv->pSystem)
- {
- gEnv->pSystem->ReportBug("Assert: %s - %s", szCondition,gs_szMessage);
- }
-
- case eDAContinue:
- default:
- break;
- }
- }
-
- return false;
-}*/
bool CryAssert(const char* szCondition, const char* szFile, unsigned int line, bool* pIgnore)
{
diff --git a/Code/CryEngine/CryCommon/CryExtension/CryCreateClassInstance.h b/Code/CryEngine/CryCommon/CryExtension/CryCreateClassInstance.h
deleted file mode 100644
index 1d1a4805d4..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/CryCreateClassInstance.h
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_CRYCREATECLASSINSTANCE_H
-#define CRYINCLUDE_CRYEXTENSION_CRYCREATECLASSINSTANCE_H
-#pragma once
-
-
-#include "ICryUnknown.h"
-#include "ICryFactory.h"
-#include "ICryFactoryRegistry.h"
-#include // <> required for Interfuscator
-
-
-template
-bool CryCreateClassInstance(const CryClassID& cid, AZStd::shared_ptr& p)
-{
- p = AZStd::shared_ptr();
- ICryFactoryRegistry* pFactoryReg = gEnv->pSystem->GetCryFactoryRegistry();
- if (pFactoryReg)
- {
- ICryFactory* pFactory = pFactoryReg->GetFactory(cid);
- if (pFactory && pFactory->ClassSupports(cryiidof()))
- {
- ICryUnknownPtr pUnk = pFactory->CreateClassInstance();
- AZStd::shared_ptr pT = cryinterface_cast(pUnk);
- if (pT)
- {
- p = pT;
- }
- }
- }
- return p.get() != NULL;
-}
-
-
-template
-bool CryCreateClassInstance(const char* cname, AZStd::shared_ptr& p)
-{
- p = AZStd::shared_ptr();
- ICryFactoryRegistry* pFactoryReg = gEnv->pSystem->GetCryFactoryRegistry();
- if (pFactoryReg)
- {
- ICryFactory* pFactory = pFactoryReg->GetFactory(cname);
- if (pFactory != NULL && pFactory->ClassSupports(cryiidof()))
- {
- ICryUnknownPtr pUnk = pFactory->CreateClassInstance();
- AZStd::shared_ptr pT = cryinterface_cast(pUnk);
- if (pT)
- {
- p = pT;
- }
- }
- }
- return p.get() != NULL;
-}
-
-
-template
-bool CryCreateClassInstanceForInterface(const CryInterfaceID& iid, AZStd::shared_ptr& p)
-{
- p = AZStd::shared_ptr();
- ICryFactoryRegistry* pFactoryReg = gEnv->pSystem->GetCryFactoryRegistry();
- if (pFactoryReg)
- {
- size_t numFactories = 1;
- ICryFactory* pFactory = 0;
- pFactoryReg->IterateFactories(iid, &pFactory, numFactories);
- if (numFactories == 1 && pFactory)
- {
- ICryUnknownPtr pUnk = pFactory->CreateClassInstance();
- AZStd::shared_ptr pT = cryinterface_cast(pUnk);
- if (pT)
- {
- p = pT;
- }
- }
- }
- return p.get() != NULL;
-}
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_CRYCREATECLASSINSTANCE_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/CryGUID.h b/Code/CryEngine/CryCommon/CryExtension/CryGUID.h
deleted file mode 100644
index a779e91bd2..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/CryGUID.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_CRYGUID_H
-#define CRYINCLUDE_CRYEXTENSION_CRYGUID_H
-#pragma once
-
-#include "Serialization/IArchive.h"
-#include "Random.h"
-
-#include
-
-struct CryGUID
-{
- uint64 hipart;
- uint64 lopart;
-
- // !!! Do NOT turn CryGUID into a non-aggregate !!!
- // It will prevent inlining and type list unrolling opportunities within
- // cryinterface_cast() and cryiidof(). As such prevent constructors,
- // non-public members, base classes and virtual functions!
-
- //CryGUID() : hipart(0), lopart(0) {}
- //CryGUID(uint64 h, uint64 l) : hipart(h), lopart(l) {}
-
- static CryGUID Construct(const uint64& hipart, const uint64& lopart)
- {
- CryGUID guid = {hipart, lopart};
- return guid;
- }
-
- static CryGUID Create()
- {
- uint64 lopart = 0;
- uint64 hipart = 0;
- while (lopart == 0 || hipart == 0)
- {
- const uint32 a = cry_random_uint32();
- const uint32 b = cry_random_uint32();
- const uint32 c = cry_random_uint32();
- const uint32 d = cry_random_uint32();
- lopart = (uint64)a | ((uint64)b << 32);
- hipart = (uint64)c | ((uint64)d << 32);
- }
-
- return Construct(lopart, hipart);
- }
-
- static CryGUID Null()
- {
- return Construct(0, 0);
- }
-
- bool operator ==(const CryGUID& rhs) const {return hipart == rhs.hipart && lopart == rhs.lopart; }
- bool operator !=(const CryGUID& rhs) const {return hipart != rhs.hipart || lopart != rhs.lopart; }
- bool operator <(const CryGUID& rhs) const {return hipart == rhs.hipart ? lopart < rhs.lopart : hipart < rhs.hipart; }
-
- void Serialize(Serialization::IArchive& ar)
- {
- if (ar.IsInput())
- {
- uint32 dwords[4];
- ar(dwords, "guid");
- lopart = (((uint64)dwords[1]) << 32) | (uint64)dwords[0];
- hipart = (((uint64)dwords[3]) << 32) | (uint64)dwords[2];
- }
- else
- {
- uint32 guid[4] = {
- (uint32)(lopart & 0xFFFFFFFF), (uint32)((lopart >> 32) & 0xFFFFFFFF),
- (uint32)(hipart & 0xFFFFFFFF), (uint32)((hipart >> 32) & 0xFFFFFFFF)
- };
- ar(guid, "guid");
- }
- }
-};
-
-// This is only used by the editor where we use C++ 11.
-namespace std
-{
- template<>
- struct hash
- {
- public:
- size_t operator()(const CryGUID& guid) const
- {
- std::hash hasher;
- return hasher(guid.lopart) ^ hasher(guid.hipart);
- }
- };
-}
-
-namespace AZStd
-{
- template<>
- struct hash
- {
- public:
- size_t operator()(const CryGUID& guid) const
- {
- std::hash hasher;
- return hasher(guid);
- }
- };
-}
-
-#define MAKE_CRYGUID(high, low) CryGUID::Construct((uint64) high##LL, (uint64) low##LL)
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_CRYGUID_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/CryTypeID.h b/Code/CryEngine/CryCommon/CryExtension/CryTypeID.h
deleted file mode 100644
index 16ae05b448..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/CryTypeID.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_CRYTYPEID_H
-#define CRYINCLUDE_CRYEXTENSION_CRYTYPEID_H
-#pragma once
-
-
-#include "CryGUID.h"
-
-
-typedef CryGUID CryInterfaceID;
-typedef CryGUID CryClassID;
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_CRYTYPEID_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/ICryFactory.h b/Code/CryEngine/CryCommon/CryExtension/ICryFactory.h
deleted file mode 100644
index a1a7344198..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/ICryFactory.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_ICRYFACTORY_H
-#define CRYINCLUDE_CRYEXTENSION_ICRYFACTORY_H
-#pragma once
-
-
-#include "CryTypeID.h"
-#include
-
-struct ICryUnknown;
-DECLARE_SMART_POINTERS(ICryUnknown);
-
-struct ICryFactory
-{
- virtual const char* GetName() const = 0;
- virtual const CryClassID& GetClassID() const = 0;
- virtual bool ClassSupports(const CryInterfaceID& iid) const = 0;
- virtual void ClassSupports(const CryInterfaceID*& pIIDs, size_t& numIIDs) const = 0;
- virtual ICryUnknownPtr CreateClassInstance() const = 0;
-
-protected:
- // prevent explicit destruction from client side (delete, shared_ptr, etc)
- virtual ~ICryFactory() {}
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_ICRYFACTORY_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/ICryFactoryRegistry.h b/Code/CryEngine/CryCommon/CryExtension/ICryFactoryRegistry.h
deleted file mode 100644
index f97c0780a1..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/ICryFactoryRegistry.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_ICRYFACTORYREGISTRY_H
-#define CRYINCLUDE_CRYEXTENSION_ICRYFACTORYREGISTRY_H
-#pragma once
-
-
-#include "CryTypeID.h"
-
-
-struct ICryFactory;
-
-
-struct ICryFactoryRegistry
-{
- virtual ICryFactory* GetFactory(const char* cname) const = 0;
- virtual ICryFactory* GetFactory(const CryClassID& cid) const = 0;
- /**
- * Iterates all factories implementing the interface specified by \p iid.
- * \param[in] iid ID of the interface to iterate. Often procured using cryiidof<...>().
- * \param[out] pFactories A pointer of the array of factories to fill in. May be nullptr (see below).
- * \param[in] Size (in elements) of the pFactories array [out] Number of elements actually written to pFactories or, when pFactories is null, the number of elements that would be written if sufficient storage was available.
- *
- * Example:
- * \code{.cpp}
- * size_t factoryCount = 0;
- * // Assigns the number of found factories to factoryCount
- * factoryRegistry->IterateFactories(cryiidof(), 0, factoryCount);
- * // Allocate an array of the proper length on the stack
- * ICryFactory** factories = static_cast(alloca(sizeof(ICryFactory*) * factoryCount);
- * // Fill in factories with factoryCount results.
- * factoryRegistry->IterateFactories(cryiidof(), factories, factoryCount);
- * \endcode
- */
- virtual void IterateFactories(const CryInterfaceID& iid, ICryFactory** pFactories, size_t& numFactories) const = 0;
-
-protected:
- // prevent explicit destruction from client side (delete, shared_ptr, etc)
- virtual ~ICryFactoryRegistry() {}
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_ICRYFACTORYREGISTRY_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/ICryUnknown.h b/Code/CryEngine/CryCommon/CryExtension/ICryUnknown.h
deleted file mode 100644
index 0de018305b..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/ICryUnknown.h
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_ICRYUNKNOWN_H
-#define CRYINCLUDE_CRYEXTENSION_ICRYUNKNOWN_H
-#pragma once
-
-
-#include "CryTypeID.h"
-#include
-
-
-struct ICryFactory;
-struct ICryUnknown;
-
-namespace InterfaceCastSemantics
-{
- template
- const CryInterfaceID& cryiidof()
- {
- return T::IID();
- }
-
-#define _BEFRIEND_CRYIIDOF() \
- template \
- friend const CryInterfaceID&InterfaceCastSemantics::cryiidof();
-
-
- template
- Dst* cryinterface_cast(Src* p)
- {
- return static_cast(p ? p->QueryInterface(cryiidof()) : 0);
- }
-
- template
- Dst* cryinterface_cast(const Src* p)
- {
- return static_cast(p ? p->QueryInterface(cryiidof()) : 0);
- }
-
- namespace Internal
- {
- template
- struct cryinterface_cast_shared_ptr_helper;
-
- template
- struct cryinterface_cast_shared_ptr_helper
- {
- static AZStd::shared_ptr Op(const AZStd::shared_ptr& p)
- {
- Dst* dp = cryinterface_cast(p.get());
- return dp ? AZStd::shared_ptr(p, dp) : AZStd::shared_ptr();
- }
- };
-
- template
- struct cryinterface_cast_shared_ptr_helper
- {
- static AZStd::shared_ptr Op(const AZStd::shared_ptr& p)
- {
- ICryUnknown* dp = cryinterface_cast(p.get());
- return dp ? AZStd::shared_ptr(*((const AZStd::shared_ptr*) & p), dp) : AZStd::shared_ptr();
- }
- };
-
- template
- struct cryinterface_cast_shared_ptr_helper
- {
- static AZStd::shared_ptr Op(const AZStd::shared_ptr& p)
- {
- const ICryUnknown* dp = cryinterface_cast(p.get());
- return dp ? AZStd::shared_ptr(*((const AZStd::shared_ptr*) & p), dp) : AZStd::shared_ptr();
- }
- };
- } // namespace Internal
-
- template
- AZStd::shared_ptr cryinterface_cast(const AZStd::shared_ptr& p)
- {
- return Internal::cryinterface_cast_shared_ptr_helper::Op(p);
- }
-
-#define _BEFRIEND_CRYINTERFACE_CAST() \
- template \
- friend Dst * InterfaceCastSemantics::cryinterface_cast(Src*); \
- template \
- friend Dst * InterfaceCastSemantics::cryinterface_cast(const Src*); \
- template \
- friend AZStd::shared_ptr InterfaceCastSemantics::cryinterface_cast(const AZStd::shared_ptr&);
-} // namespace InterfaceCastSemantics
-
-using InterfaceCastSemantics::cryiidof;
-using InterfaceCastSemantics::cryinterface_cast;
-
-
-template
-bool CryIsSameClassInstance(S* p0, T* p1)
-{
- return static_cast(p0) == static_cast(p1) || cryinterface_cast(p0) == cryinterface_cast(p1);
-}
-
-template
-bool CryIsSameClassInstance(const AZStd::shared_ptr& p0, T* p1)
-{
- return CryIsSameClassInstance(p0.get(), p1);
-}
-
-template
-bool CryIsSameClassInstance(S* p0, const AZStd::shared_ptr& p1)
-{
- return CryIsSameClassInstance(p0, p1.get());
-}
-
-template
-bool CryIsSameClassInstance(const AZStd::shared_ptr& p0, const AZStd::shared_ptr& p1)
-{
- return CryIsSameClassInstance(p0.get(), p1.get());
-}
-
-
-namespace CompositeQuerySemantics
-{
- template
- AZStd::shared_ptr crycomposite_query(Src* p, const char* name, bool* pExposed = 0)
- {
- void* pComposite = p ? p->QueryComposite(name) : 0;
- pExposed ? *pExposed = pComposite != 0 : 0;
- return pComposite ? *static_cast*>(pComposite) : AZStd::shared_ptr();
- }
-
- template
- AZStd::shared_ptr crycomposite_query(const Src* p, const char* name, bool* pExposed = 0)
- {
- void* pComposite = p ? p->QueryComposite(name) : 0;
- pExposed ? *pExposed = pComposite != 0 : 0;
- return pComposite ? *static_cast*>(pComposite) : AZStd::shared_ptr();
- }
-
- template
- AZStd::shared_ptr crycomposite_query(const AZStd::shared_ptr& p, const char* name, bool* pExposed = 0)
- {
- return crycomposite_query(p.get(), name, pExposed);
- }
-
- template
- AZStd::shared_ptr crycomposite_query(const AZStd::shared_ptr& p, const char* name, bool* pExposed = 0)
- {
- return crycomposite_query(p.get(), name, pExposed);
- }
-
-#define _BEFRIEND_CRYCOMPOSITE_QUERY() \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(Src*, const char*, bool*); \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(const Src*, const char*, bool*); \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(const AZStd::shared_ptr&, const char*, bool*); \
- template \
- friend AZStd::shared_ptr CompositeQuerySemantics::crycomposite_query(const AZStd::shared_ptr&, const char*, bool*);
-} // namespace CompositeQuerySemantics
-
-using CompositeQuerySemantics::crycomposite_query;
-
-
-#define _BEFRIEND_MAKE_SHARED() \
- template \
- friend class AZStd::Internal::sp_ms_deleter; \
- template \
- friend AZStd::shared_ptr AZStd::make_shared(); \
- template \
- friend AZStd::shared_ptr AZStd::allocate_shared(A const& a);
-
-// prevent explicit destruction from client side
-#define _PROTECTED_DTOR(iname) \
-protected: \
- virtual ~iname() {}
-
-
-// Befriending cryinterface_cast() and crycomposite_query() via CRYINTERFACE_DECLARE is actually only needed for ICryUnknown
-// since QueryInterface() and QueryComposite() are usually not redeclared in derived interfaces but it doesn't hurt either
-#define CRYINTERFACE_DECLARE(iname, iidHigh, iidLow) \
- _BEFRIEND_CRYIIDOF() \
- _BEFRIEND_CRYINTERFACE_CAST() \
- _BEFRIEND_CRYCOMPOSITE_QUERY() \
- _BEFRIEND_MAKE_SHARED() \
- _PROTECTED_DTOR(iname) \
- \
-private: \
- static const CryInterfaceID& IID() \
- { \
- static const CryInterfaceID iid = {(uint64) iidHigh##LL, (uint64) iidLow##LL}; \
- return iid; \
- } \
-public:
-
-
-struct ICryUnknown
-{
- CRYINTERFACE_DECLARE(ICryUnknown, 0x1000000010001000, 0x1000100000000000)
-
- virtual ICryFactory * GetFactory() const = 0;
-
-protected:
- virtual void* QueryInterface(const CryInterfaceID& iid) const = 0;
- virtual void* QueryComposite(const char* name) const = 0;
-};
-
-DECLARE_SMART_POINTERS(ICryUnknown);
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_ICRYUNKNOWN_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/ClassWeaver.h b/Code/CryEngine/CryCommon/CryExtension/Impl/ClassWeaver.h
deleted file mode 100644
index c3b5bb340c..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/ClassWeaver.h
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_CLASSWEAVER_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_CLASSWEAVER_H
-#pragma once
-
-#include "TypeList.h"
-#include "Conversion.h"
-#include "RegFactoryNode.h"
-#include "../ICryUnknown.h"
-#include "../ICryFactory.h"
-#include
-
-namespace CW
-{
- namespace Internal
- {
- template
- struct InterfaceCast;
-
- template
- struct InterfaceCast
- {
- template
- static void* Op(T* p)
- {
- return (Dst*) p;
- }
- };
-
- template <>
- struct InterfaceCast
- {
- template
- static void* Op(T* p)
- {
- return const_cast(static_cast(static_cast(p)));
- }
- };
- }
-
- template
- struct InterfaceCast;
-
- template <>
- struct InterfaceCast
- {
- template
- static void* Op(T*, const CryInterfaceID&)
- {
- return 0;
- }
- };
-
- template
- struct InterfaceCast >
- {
- template
- static void* Op(T* p, const CryInterfaceID& iid)
- {
- if (cryiidof() == iid)
- {
- return Internal::InterfaceCast::Op(p);
- }
- return InterfaceCast::Op(p, iid);
- }
- };
-
- template
- struct FillIIDs;
-
- template <>
- struct FillIIDs
- {
- static void Op(CryInterfaceID*)
- {
- }
- };
-
- template
- struct FillIIDs >
- {
- static void Op(CryInterfaceID* p)
- {
- *p++ = cryiidof();
- FillIIDs::Op(p);
- }
- };
-
- namespace Internal
- {
- template
- struct PickList;
-
- template
- struct PickList
- {
- typedef TL::BuildTypelist<>::Result Result;
- };
-
- template
- struct PickList
- {
- typedef typename S::FullCompositeList Result;
- };
- }
-
- template
- struct ProbeFullCompositeList
- {
- private:
- typedef char y[1];
- typedef char n[2];
-
- template
- static y& test(typename S::FullCompositeList*);
-
- template
- static n& test(...);
-
- public:
- enum
- {
- listFound = sizeof(test(0)) == sizeof(y)
- };
-
- typedef typename Internal::PickList::Result ListType;
- };
-
- namespace Internal
- {
- template
- struct CompositeQuery;
-
- template <>
- struct CompositeQuery
- {
- template
- static void* Op(const T&, const char*)
- {
- return 0;
- }
- };
-
- template
- struct CompositeQuery >
- {
- template
- static void* Op(const T& ref, const char* name)
- {
- void* p = ref.Head::CompositeQueryImpl(name);
- return p ? p : CompositeQuery::Op(ref, name);
- }
- };
- }
-
- struct CompositeQuery
- {
- template
- static void* Op(const T& ref, const char* name)
- {
- return Internal::CompositeQuery::ListType>::Op(ref, name);
- }
- };
-
- inline bool NameMatch(const char* name, const char* compositeName)
- {
- if (!name || !compositeName)
- {
- return false;
- }
- size_t i = 0;
- for (; name[i] && name[i] == compositeName[i]; ++i)
- {
- }
- return name[i] == compositeName[i];
- }
-
- template
- void* CheckCompositeMatch(const char* name, const AZStd::shared_ptr& composite, const char* compositeName)
- {
- typedef TC::SuperSubClass Rel;
- COMPILE_TIME_ASSERT(Rel::exists);
- return NameMatch(name, compositeName) ? const_cast(static_cast(&composite)) : 0;
- }
-} // namespace CW
-
-
-#define CRYINTERFACE_BEGIN() \
-private: \
- typedef TL::BuildTypelist < ICryUnknown
-
-#define CRYINTERFACE_ADD(iname) , iname
-
-#define CRYINTERFACE_END() > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_UserDefinedPartialInterfaceList>::Result FullInterfaceList;
-
-#define _CRY_TPL_APPEND0(base) TL::Append::Result
-#define _CRY_TPL_APPEND(base, intermediate) TL::Append::Result
-
-#define CRYINTERFACE_ENDWITHBASE(base) > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_CRY_TPL_APPEND0(base)>::Result FullInterfaceList;
-
-#define CRYINTERFACE_ENDWITHBASE2(base0, base1) > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_CRY_TPL_APPEND(base0, _CRY_TPL_APPEND0(base1))>::Result FullInterfaceList;
-
-#define CRYINTERFACE_ENDWITHBASE3(base0, base1, base2) > ::Result _UserDefinedPartialInterfaceList; \
-protected: \
- typedef TL::NoDuplicates<_CRY_TPL_APPEND(base0, _CRY_TPL_APPEND(base1, _CRY_TPL_APPEND0(base2)))>::Result FullInterfaceList;
-
-#define CRYINTERFACE_SIMPLE(iname) \
- CRYINTERFACE_BEGIN() \
- CRYINTERFACE_ADD(iname) \
- CRYINTERFACE_END()
-
-#define CRYCOMPOSITE_BEGIN() \
-private: \
- void* CompositeQueryImpl(const char* name) const \
- { \
- (void)(name); \
- void* res = 0; (void)(res); \
-
-#define CRYCOMPOSITE_ADD(member, membername) \
- COMPILE_TIME_ASSERT((sizeof(membername) / sizeof(membername[0])) > 1); \
- if ((res = CW::CheckCompositeMatch(name, member, membername)) != 0) { \
- return res; }
-
-#define _CRYCOMPOSITE_END(implclassname) \
- return 0; \
- }; \
-protected: \
- typedef TL::BuildTypelist::Result _PartialCompositeList; \
- \
- template \
- friend struct CW::Internal::PickList;
-
-#define CRYCOMPOSITE_END(implclassname) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef _PartialCompositeList FullCompositeList;
-
-#define _CRYCOMPOSITE_APPEND0(base) TL::Append<_PartialCompositeList, CW::ProbeFullCompositeList::ListType>::Result
-#define _CRYCOMPOSITE_APPEND(base, intermediate) TL::Append::ListType>::Result
-
-#define CRYCOMPOSITE_ENDWITHBASE(implclassname, base) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef _CRYCOMPOSITE_APPEND0 (base) FullCompositeList;
-
-#define CRYCOMPOSITE_ENDWITHBASE2(implclassname, base0, base1) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef TL::NoDuplicates<_CRYCOMPOSITE_APPEND(base1, _CRYCOMPOSITE_APPEND0(base0))>::Result FullCompositeList;
-
-#define CRYCOMPOSITE_ENDWITHBASE3(implclassname, base0, base1, base2) \
- _CRYCOMPOSITE_END(implclassname) \
-protected: \
- typedef TL::NoDuplicates<_CRYCOMPOSITE_APPEND(base2, _CRYCOMPOSITE_APPEND(base1, _CRYCOMPOSITE_APPEND0(base0)))>::Result FullCompositeList;
-
-template
-class CFactory
- : public ICryFactory
-{
-public:
- virtual const char* GetName() const
- {
- return T::GetCName();
- }
-
- virtual const CryClassID& GetClassID() const
- {
- return T::GetCID();
- }
-
- virtual bool ClassSupports(const CryInterfaceID& iid) const
- {
- for (size_t i = 0; i < m_numIIDs; ++i)
- {
- if (iid == m_pIIDs[i])
- {
- return true;
- }
- }
- return false;
- }
-
- virtual void ClassSupports(const CryInterfaceID*& pIIDs, size_t& numIIDs) const
- {
- pIIDs = m_pIIDs;
- numIIDs = m_numIIDs;
- }
-public:
- virtual ICryUnknownPtr CreateClassInstance() const
- {
- AZStd::shared_ptr p = AZStd::make_shared();
- return cryinterface_cast (p);
- }
-
- CFactory()
- : m_numIIDs(0)
- , m_pIIDs(0)
- , m_regFactory()
- {
- static CryInterfaceID supportedIIDs[TL::Length < typename T::FullInterfaceList > ::value];
- CW::FillIIDs::Op(supportedIIDs);
- m_pIIDs = &supportedIIDs[0];
- m_numIIDs = TL::Length::value;
- new(&m_regFactory)SRegFactoryNode(this);
- }
-
-protected:
- CFactory(const CFactory&);
- CFactory& operator =(const CFactory&);
-
-
- size_t m_numIIDs;
- CryInterfaceID* m_pIIDs;
- SRegFactoryNode m_regFactory;
-};
-
-template
-class CSingletonFactory
- : public CFactory
-{
-public:
- CSingletonFactory()
- : CFactory()
- , m_csCreateClassInstance()
- {
- }
-
- virtual ICryUnknownPtr CreateClassInstance() const
- {
- CryAutoLock lock(m_csCreateClassInstance);
- // override the allocator. These function static instances are being destroyed after the AZ alloctor has been deleted.
- // On win, TerminateProcess() prevents these destructors from being called, but that is not the case on OSX.
- static typename AZStd::aligned_storage,SingletonAllocator>), AZStd::alignment_of::value>::type m_storage;
- static ICryUnknownPtr p = AZStd::allocate_shared(SingletonAllocator(AZStd::addressof(m_storage)));
- return p;
- }
-
- mutable CryCriticalSection m_csCreateClassInstance;
-
- struct SingletonAllocator
- {
- SingletonAllocator(void* ptr) :
- m_data(ptr)
- {}
- void* allocate(size_t /*byteSize*/, size_t /*alignment*/, int /*flags*/ = 0)
- {
- return m_data;
- }
- void deallocate(void* /*ptr*/, size_t /*byteSize*/, size_t /*alignment*/)
- {
- // nothing to see here
- }
- void* m_data;
- };
-};
-
-#define _CRYFACTORY_DECLARE(implclassname) \
-private: \
- friend class CFactory; \
- static CFactory s_factory;
-
-#define _CRYFACTORY_DECLARE_SINGLETON(implclassname) \
-private: \
- friend class CFactory; \
- friend void* Get##implclassname##Factory(); \
- static CSingletonFactory s_factory;
-
-#define _IMPLEMENT_ICRYUNKNOWN() \
-public: \
- virtual ICryFactory* GetFactory() const \
- { \
- return &s_factory; \
- } \
- \
-protected: \
- virtual void* QueryInterface(const CryInterfaceID&iid) const \
- { \
- return CW::InterfaceCast::Op(this, iid); \
- } \
- \
- template \
- friend struct CW::Internal::CompositeQuery; \
- \
- virtual void* QueryComposite(const char* name) const \
- { \
- return CW::CompositeQuery::Op(*this, name); \
- }
-
-#define _ENFORCE_CRYFACTORY_USAGE(implclassname, cname, cidHigh, cidLow) \
-public: \
- static const char* GetCName() \
- { \
- return cname; \
- } \
- static const CryClassID& GetCID() \
- { \
- static const CryClassID cid = {(uint64) cidHigh##LL, (uint64) cidLow##LL}; \
- return cid; \
- } \
- static AZStd::shared_ptr CreateClassInstance() \
- { \
- ICryUnknownPtr p = s_factory.CreateClassInstance(); \
- return AZStd::shared_ptr(*static_cast*>(static_cast(&p))); \
- } \
- \
-protected: \
- implclassname(); \
- virtual ~implclassname();
-
-#define _BEFRIEND_OPS() \
- _BEFRIEND_CRYINTERFACE_CAST() \
- _BEFRIEND_CRYCOMPOSITE_QUERY() \
- _BEFRIEND_MAKE_SHARED()
-
-#define CRYGENERATE_CLASS(implclassname, cname, cidHigh, cidLow) \
- _CRYFACTORY_DECLARE(implclassname) \
- _BEFRIEND_OPS() \
- _IMPLEMENT_ICRYUNKNOWN() \
- _ENFORCE_CRYFACTORY_USAGE(implclassname, cname, cidHigh, cidLow)
-
-#define CRYGENERATE_SINGLETONCLASS(implclassname, cname, cidHigh, cidLow) \
- _CRYFACTORY_DECLARE_SINGLETON(implclassname) \
- _BEFRIEND_OPS() \
- _IMPLEMENT_ICRYUNKNOWN() \
- _ENFORCE_CRYFACTORY_USAGE(implclassname, cname, cidHigh, cidLow)
-
-
-#define CRYREGISTER_CLASS(implclassname) \
- CFactory implclassname::s_factory;
-
-#define DECLARE_CRYREGISTER_SINGLETON_CLASS(implclassname) \
- void* Get##implclassname##Factory();
-
-#define CRYREGISTER_SINGLETON_CLASS(implclassname) \
- CSingletonFactory implclassname::s_factory; \
- void* Get##implclassname##Factory() { \
- return &implclassname::s_factory; \
- }
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_CLASSWEAVER_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/Conversion.h b/Code/CryEngine/CryCommon/CryExtension/Impl/Conversion.h
deleted file mode 100644
index bd729f259e..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/Conversion.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_CONVERSION_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_CONVERSION_H
-#pragma once
-
-
-namespace TC
-{
- //template
- //struct Conversion
- //{
- //private:
- // typedef char y[1];
- // typedef char n[2];
- // static y& Test(U);
- // static n& Test(...);
- // static T MakeT();
-
- //public:
- // enum
- // {
- // exists = sizeof(Test(MakeT())) == sizeof(y),
- // sameType = false
- // };
- //};
-
- //template
- //struct Conversion
- //{
- //public:
- // enum
- // {
- // exists = true,
- // sameType = true
- // };
- //};
-
- //template
- //struct CheckInheritance
- //{
- // enum
- // {
- // exists = Conversion::exists && !Conversion::sameType
- // };
- //};
-
- //template
- //struct CheckStrictInheritance
- //{
- // enum
- // {
- // exists = CheckInheritance::exists && !Conversion::sameType
- // };
- //};
-
-
- template
- struct SuperSubClass
- {
- private:
- typedef char y[1];
- typedef char n[2];
-
- template
- static y& check(const volatile Derived&, T);
- static n& check(const volatile Base&, int);
-
- struct C
- {
- operator const volatile Base&() const;
- operator const volatile Derived&();
- };
-
- static C getC();
-
- public:
- enum
- {
- exists = sizeof(check(getC(), 0)) == sizeof(y),
- sameType = false
- };
- };
-
- template
- struct SuperSubClass
- {
- enum
- {
- exists = true
- };
- };
-} // namespace TC
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_CONVERSION_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/CryGUIDHelper.h b/Code/CryEngine/CryCommon/CryExtension/Impl/CryGUIDHelper.h
deleted file mode 100644
index 53ee4352fc..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/CryGUIDHelper.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_CRYGUIDHELPER_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_CRYGUIDHELPER_H
-#pragma once
-
-
-#include "../CryGUID.h"
-#include "../../CryString.h"
-
-
-namespace CryGUIDHelper
-{
- string Print(const CryGUID& val)
- {
- char buf[39]; // sizeof("{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}")
-
- static const char hex[] = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
- char* p = buf;
- *p++ = '{';
- for (int i = 15; i >= 8; --i)
- {
- *p++ = hex[(unsigned char) ((val.hipart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 7; i >= 4; --i)
- {
- *p++ = hex[(unsigned char) ((val.hipart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 3; i >= 0; --i)
- {
- *p++ = hex[(unsigned char) ((val.hipart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 15; i >= 12; --i)
- {
- *p++ = hex[(unsigned char) ((val.lopart >> (i << 2)) & 0xF)];
- }
- *p++ = '-';
- for (int i = 11; i >= 0; --i)
- {
- *p++ = hex[(unsigned char) ((val.lopart >> (i << 2)) & 0xF)];
- }
- *p++ = '}';
- *p++ = '\0';
-
- return string(buf);
- }
-}
-
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_CRYGUIDHELPER_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/ICryFactoryRegistryImpl.h b/Code/CryEngine/CryCommon/CryExtension/Impl/ICryFactoryRegistryImpl.h
deleted file mode 100644
index 051c33fc33..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/ICryFactoryRegistryImpl.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_ICRYFACTORYREGISTRYIMPL_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_ICRYFACTORYREGISTRYIMPL_H
-#pragma once
-
-
-#include "../ICryFactoryRegistry.h"
-
-
-struct SRegFactoryNode;
-
-
-struct ICryFactoryRegistryCallback
-{
- virtual void OnNotifyFactoryRegistered(ICryFactory* pFactory) = 0;
- virtual void OnNotifyFactoryUnregistered(ICryFactory* pFactory) = 0;
-
-protected:
- virtual ~ICryFactoryRegistryCallback() {}
-};
-
-
-struct ICryFactoryRegistryImpl
- : public ICryFactoryRegistry
-{
- virtual ICryFactory* GetFactory(const char* cname) const = 0;
- virtual ICryFactory* GetFactory(const CryClassID& cid) const = 0;
- virtual void IterateFactories(const CryInterfaceID& iid, ICryFactory** pFactories, size_t& numFactories) const = 0;
-
- virtual void RegisterCallback(ICryFactoryRegistryCallback* pCallback) = 0;
- virtual void UnregisterCallback(ICryFactoryRegistryCallback* pCallback) = 0;
-
- virtual void RegisterFactories(const SRegFactoryNode* pFactories) = 0;
- virtual void UnregisterFactories(const SRegFactoryNode* pFactories) = 0;
-
- virtual void UnregisterFactory(ICryFactory* const pFactory) = 0;
-
-protected:
- // prevent explicit destruction from client side (delete, shared_ptr, etc)
- virtual ~ICryFactoryRegistryImpl() {}
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_ICRYFACTORYREGISTRYIMPL_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/RegFactoryNode.h b/Code/CryEngine/CryCommon/CryExtension/Impl/RegFactoryNode.h
deleted file mode 100644
index 8209ae9728..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/RegFactoryNode.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_IMPL_REGFACTORYNODE_H
-#define CRYINCLUDE_CRYEXTENSION_IMPL_REGFACTORYNODE_H
-#pragma once
-
-struct ICryFactory;
-struct SRegFactoryNode;
-
-extern SRegFactoryNode* g_pHeadToRegFactories;
-
-struct SRegFactoryNode
-{
- SRegFactoryNode()
- {
- }
-
- SRegFactoryNode(ICryFactory* pFactory)
- : m_pFactory(pFactory)
- , m_pNext(g_pHeadToRegFactories)
- {
- g_pHeadToRegFactories = this;
- }
-
- static void* operator new(size_t, void* p)
- {
- return p;
- }
-
- static void operator delete(void*, void*)
- {
- }
-
- ICryFactory* m_pFactory;
- SRegFactoryNode* m_pNext;
-};
-
-#endif // CRYINCLUDE_CRYEXTENSION_IMPL_REGFACTORYNODE_H
diff --git a/Code/CryEngine/CryCommon/CryExtension/Impl/TypeList.h b/Code/CryEngine/CryCommon/CryExtension/Impl/TypeList.h
deleted file mode 100644
index 231283fc19..0000000000
--- a/Code/CryEngine/CryCommon/CryExtension/Impl/TypeList.h
+++ /dev/null
@@ -1,236 +0,0 @@
-/*
-* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
-* its licensors.
-*
-* For complete copyright and license terms please see the LICENSE at the root of this
-* distribution (the "License"). All use of this software is governed by the License,
-* or, if provided, by the license below or the license accompanying this file. Do not
-* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-*
-*/
-// Original file Copyright Crytek GMBH or its affiliates, used under license.
-
-// Description : Part of CryEngine's extension framework.
-
-
-#ifndef CRYINCLUDE_CRYEXTENSION_TYPELIST_H
-#define CRYINCLUDE_CRYEXTENSION_TYPELIST_H
-#pragma once
-
-
-namespace TL
-{
- // typelist terminator
- class NullType
- {
- };
-
-
- // structure for typelist generation
- template
- struct Typelist
- {
- typedef T Head;
- typedef U Tail;
- };
-
-
- // helper structure to automatically build typelists containing n types
- template
- <
- typename T0 = NullType, typename T1 = NullType, typename T2 = NullType, typename T3 = NullType, typename T4 = NullType,
- typename T5 = NullType, typename T6 = NullType, typename T7 = NullType, typename T8 = NullType, typename T9 = NullType,
- typename T10 = NullType, typename T11 = NullType, typename T12 = NullType, typename T13 = NullType, typename T14 = NullType,
- typename T15 = NullType, typename T16 = NullType, typename T17 = NullType, typename T18 = NullType, typename T19 = NullType
- >
- struct BuildTypelist
- {
- private:
- typedef typename BuildTypelist::Result TailResult;
-
- public:
- typedef Typelist Result;
- };
-
- template <>
- struct BuildTypelist<>
- {
- typedef NullType Result;
- };
-
- // typelist operation : Length
- template
- struct Length;
-
- template <>
- struct Length
- {
- enum
- {
- value = 0
- };
- };
-
- template
- struct Length >
- {
- enum
- {
- value = 1 + Length::value
- };
- };
-
-
- // typelist operation : TypeAt
- template
- struct TypeAt;
-
- template
- struct TypeAt, 0>
- {
- typedef Head Result;
- };
-
- template
- struct TypeAt, index>
- {
- typedef typename TypeAt::Result Result;
- };
-
-
- // typelist operation : IndexOf
- template
- struct IndexOf;
-
- template
- struct IndexOf
- {
- enum
- {
- value = -1
- };
- };
-
- template
- struct IndexOf, T>
- {
- enum
- {
- value = 0
- };
- };
-
- template
- struct IndexOf, T>
- {
- private:
- enum
- {
- temp = IndexOf