From 3cbbcf1877f8966eae117362bdde338783758a15 Mon Sep 17 00:00:00 2001 From: balibhan Date: Mon, 3 May 2021 12:10:33 +0530 Subject: [PATCH 1/9] SC branch migration --- .../editor_python_test_tools/utils.py | 14 +- .../AssetEditor_CreateScriptEventFile.py | 124 ++ .../scripting/AssetEditor_NewScriptEvent.py | 129 ++ .../Debugging_TargetMultipleEntities.py | 144 ++ .../Debugging_TargetMultipleGraphs.py | 113 + .../Gem/PythonTests/scripting/Docking_Pane.py | 4 +- .../scripting/EditMenu_UndoRedo.py | 123 ++ .../Entity_AddScriptCanvasComponent.py | 88 + .../scripting/FileMenu_New_Open.py | 98 + .../scripting/GraphClose_SavePrompt.py | 110 + .../scripting/Graph_ZoomInZoomOut.py | 120 ++ .../PythonTests/scripting/ImportPathHelper.py | 1 + .../scripting/NodeInspector_RenameVariable.py | 132 ++ .../scripting/NodePalette_ClearSelection.py | 94 + .../scripting/NodePalette_SelectNode.py | 104 + ...EntityActivatedDeactivated_PrintMessage.py | 185 ++ .../scripting/Opening_Closing_Pane.py | 9 +- .../scripting/Pane_RetainOnSCRestart.py | 164 ++ .../PythonTests/scripting/Resizing_Pane.py | 9 +- .../scripting/ScriptCanvas_ChangingAssets.py | 116 + .../scripting/ScriptCanvas_TwoComponents.py | 118 ++ .../scripting/ScriptCanvas_TwoEntities.py | 107 + .../ScriptEvents_SendReceiveAcrossMultiple.py | 120 ++ .../ScriptEvents_SendReceiveSuccessfully.py | 110 + .../PythonTests/scripting/TestSuite_Active.py | 229 +- .../scripting/Toggle_ScriptCanvasTools.py | 137 ++ .../scripting/UnDockedPane_CloseSCWindow.py | 128 ++ .../VariableManager_CreateDeleteVars.py | 123 ++ .../activator.scriptcanvas | 778 +++++++ .../controller.scriptcanvas | 1865 +++++++++++++++++ .../deactivator.scriptcanvas | 766 +++++++ .../ScriptCanvas_TwoComponents0.scriptcanvas | 365 ++++ .../ScriptCanvas_TwoComponents1.scriptcanvas | 365 ++++ .../ScriptCanvas/T92563191_test.scriptcanvas | 750 +++++++ .../ScriptCanvas/T92567320.scriptcanvas | 1266 +++++++++++ .../ScriptCanvas/T92567321A.scriptcanvas | 778 +++++++ .../ScriptCanvas/T92567321B.scriptcanvas | 880 ++++++++ .../TestAssets/T92567320.scriptevents | 116 + .../TestAssets/T92567321.scriptevents | 166 ++ 39 files changed, 11024 insertions(+), 24 deletions(-) create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.py create mode 100644 AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.py create mode 100644 AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/activator.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/controller.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/OnEntityActivatedScripts/deactivator.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents0.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/ScriptCanvas_TwoComponents1.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/T92563191_test.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/T92567320.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/T92567321A.scriptcanvas create mode 100644 AutomatedTesting/ScriptCanvas/T92567321B.scriptcanvas create mode 100644 AutomatedTesting/TestAssets/T92567320.scriptevents create mode 100644 AutomatedTesting/TestAssets/T92567321.scriptevents 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/scripting/AssetEditor_CreateScriptEventFile.py b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py new file mode 100644 index 0000000000..dcbbf47f0c --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_CreateScriptEventFile.py @@ -0,0 +1,124 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569013 +""" + + +# 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..1f801d4eeb --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/AssetEditor_NewScriptEvent.py @@ -0,0 +1,129 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568942 +""" + +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..a26cb4f923 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleEntities.py @@ -0,0 +1,144 @@ +""" +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 +URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568856 +""" + + +# 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..4aa5c822a7 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/Debugging_TargetMultipleGraphs.py @@ -0,0 +1,113 @@ +""" +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 +URLs of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569137 +""" + + +# 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..4fa1e1257f 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Docking_Pane.py @@ -16,7 +16,6 @@ URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702 # 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 +77,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..a87d9e9be9 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/EditMenu_UndoRedo.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: T92569049 +Test Case Title: Edit > Undo undoes the last action +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569049 +Test case ID: T92569051 +Test Case Title: Edit > Redo redoes the last undone action +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569051 +""" + + +# 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..fd8e9b1173 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/Entity_AddScriptCanvasComponent.py @@ -0,0 +1,88 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562978 +""" + + +# 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..f72ac8ea01 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/FileMenu_New_Open.py @@ -0,0 +1,98 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569037 +Test case ID: T92569039 +Test Case Title: File > Open opens the Open... dialog +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569039 +""" + +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..ce610b159b --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/GraphClose_SavePrompt.py @@ -0,0 +1,110 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563070 +Test case ID: T92563068 +Test Case Title: Save Prompt: User is prompted to save a graph on close after +creating a new graph +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563068 +""" + +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..a93b6e61d1 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/Graph_ZoomInZoomOut.py @@ -0,0 +1,120 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569079 +Test case ID: T92569081 +Test Case Title: View > Zoom In zooms the graph out +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569081 +""" + + +# 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..a45024cebf 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/ImportPathHelper.py @@ -13,4 +13,5 @@ def init(): import os import sys sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') + sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../EditorPythonTestTools/editor_python_test_tools') \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.py new file mode 100644 index 0000000000..33d3f4137a --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/NodeInspector_RenameVariable.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: T92568982 +Test Case Title: Renaming variables in the Node Inspector +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568982 +""" + + +# 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..de30e46767 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_ClearSelection.py @@ -0,0 +1,94 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562993 +""" + + +# 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_SelectNode.py b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py new file mode 100644 index 0000000000..2ab76071a6 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/NodePalette_SelectNode.py @@ -0,0 +1,104 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568940 +""" + + +# 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..cea1230348 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py @@ -0,0 +1,185 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92569253 // https://testrail.agscollab.com/index.php?/tests/view/92569254 +""" + + +# 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] + print(f"bhanu: {found_lines}") + 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..666f052240 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Opening_Closing_Pane.py @@ -17,7 +17,6 @@ URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702 # 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 +48,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 +76,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..fa5e9e6068 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/Pane_RetainOnSCRestart.py @@ -0,0 +1,164 @@ +""" +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 +URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702821 and + https://testrail.agscollab.com/index.php?/cases/view/1702832 +""" + + +# 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..180f577953 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/Resizing_Pane.py @@ -16,7 +16,6 @@ URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702 # 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 +45,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 +70,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..38d60ad871 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_ChangingAssets.py @@ -0,0 +1,116 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92562986 +""" + + +# 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..896bee96e5 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoComponents.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: T92563190 +Test Case Title: A single Entity with two Script Canvas components works properly +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563190 +""" + + +# 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..401e6c0271 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptCanvas_TwoEntities.py @@ -0,0 +1,107 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92563191 +""" + + +# 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_SendReceiveAcrossMultiple.py b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py new file mode 100644 index 0000000000..d671229cdf --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveAcrossMultiple.py @@ -0,0 +1,120 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567321 +""" + + +# 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..b5e26d14ae --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/ScriptEvents_SendReceiveSuccessfully.py @@ -0,0 +1,110 @@ +""" +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 +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92567320 +""" + + +# 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..d87f2986bf 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Active.py @@ -12,22 +12,243 @@ 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) + +# 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, + ) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py new file mode 100644 index 0000000000..4024e28277 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/Toggle_ScriptCanvasTools.py @@ -0,0 +1,137 @@ +""" +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 + +URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/92569165 + https://testrail.agscollab.com/index.php?/cases/view/92569167 + https://testrail.agscollab.com/index.php?/cases/view/92569168 + https://testrail.agscollab.com/index.php?/cases/view/92569170 +""" + + +# 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..875f28ec95 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/UnDockedPane_CloseSCWindow.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: C1702825 // C1702831 +Test Case Title: Undocking // Closing script canvas with the pane floating +URLs of the test case: https://testrail.agscollab.com/index.php?/cases/view/1702825 & + https://testrail.agscollab.com/index.php?/cases/view/1702831 +""" + + +# 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..6facc324d4 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/scripting/VariableManager_CreateDeleteVars.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: T92564789 +Test Case Title: Each Variable type can be created +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92564789 +Test case ID: T92568873 +Test Case Title: Each Variable type can be deleted +URL of the test case: https://testrail.agscollab.com/index.php?/tests/view/92568873 +""" + + +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/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/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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 3df5f53e5ee465cc3f8f580a9d18095300d8c9d1 Mon Sep 17 00:00:00 2001 From: balibhan Date: Tue, 4 May 2021 15:16:31 +0530 Subject: [PATCH 2/9] updating timeout --- AutomatedTesting/Gem/PythonTests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt index 6d3727195e..2a8423bd5a 100644 --- a/AutomatedTesting/Gem/PythonTests/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/CMakeLists.txt @@ -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 From ceb7ac333a1e58941606dc401fded753522662ff Mon Sep 17 00:00:00 2001 From: balibhan Date: Wed, 5 May 2021 12:31:43 +0530 Subject: [PATCH 3/9] removed debug print --- .../scripting/OnEntityActivatedDeactivated_PrintMessage.py | 1 - 1 file changed, 1 deletion(-) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py index cea1230348..51b63c4268 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/OnEntityActivatedDeactivated_PrintMessage.py @@ -145,7 +145,6 @@ def OnEntityActivatedDeactivated_PrintMessage(): def locate_expected_lines(line_list: list): found_lines = [printInfo.message.strip() for printInfo in section_tracer.prints] - print(f"bhanu: {found_lines}") return all(line in found_lines for line in line_list) # 1) Create temp level From 7ba3a19b403161f8242eb343d73de94ddb8666fc Mon Sep 17 00:00:00 2001 From: Aaron Ruiz Mora Date: Wed, 5 May 2021 19:48:56 +0100 Subject: [PATCH 4/9] Remove unnecessary transformation of tangents and bitangents in cloth CPU skinning. --- .../ClothComponentMesh/ActorClothSkinning.cpp | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp index 8f97b212a3..411c727d33 100644 --- a/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp +++ b/Gems/NvCloth/Code/Source/Components/ClothComponentMesh/ActorClothSkinning.cpp @@ -287,12 +287,16 @@ namespace NvCloth const AZ::Vector3 skinnedPosition = vertexSkinningTransform * originalData.m_particles[index].GetAsVector3(); renderData.m_particles[index].Set(skinnedPosition, renderData.m_particles[index].GetW()); // Avoid overwriting the w component - // Calculate the reciprocal scale version of the matrix to transform the vectors. + // Calculate the reciprocal scale version of the matrix to transform the normals. + // Note: This operation is not strictly equivalent to the full inverse transpose when the matrix's + // basis vectors are not perpendicular, which is the case blending linearly the matrices. + // This is a fast approximation, which is also done by the GPU skinning shader. const AZ::Matrix3x4 vertexSkinningTransformReciprocalScale = vertexSkinningTransform.GetReciprocalScaled(); - renderData.m_tangents[index] = vertexSkinningTransformReciprocalScale.TransformVector(originalData.m_tangents[index]).GetNormalized(); - renderData.m_bitangents[index] = vertexSkinningTransformReciprocalScale.TransformVector(originalData.m_bitangents[index]).GetNormalized(); renderData.m_normals[index] = vertexSkinningTransformReciprocalScale.TransformVector(originalData.m_normals[index]).GetNormalized(); + + // Tangents and Bitangents are recalculated immediately after this call + // by cloth mesh component, so there is no need to transform them here. } } @@ -307,7 +311,7 @@ namespace NvCloth const float jointWeight = m_skinningInfluences[vertexInfluenceIndex].m_jointWeight; // Blending matrices the same way done in GPU shaders, by adding each weighted matrix element by element. - // This way the skinning results are much similar to the skinning performed in GPU. + // This operation results in a non orthogonal matrix, but it's done this way because it's fast to perform. vertexSkinningTransform += m_skinningMatrices[jointIndex] * jointWeight; } return vertexSkinningTransform; @@ -392,12 +396,14 @@ namespace NvCloth const AZ::Vector3 skinnedPosition = vertexSkinningTransform.TransformPoint(originalData.m_particles[index].GetAsVector3()); renderData.m_particles[index].Set(skinnedPosition, renderData.m_particles[index].GetW()); // Avoid overwriting the w component - // ComputeVertexSkinnningTransform is normalizing the dual quaternion, so it won't have scale - // and there is no need to compute the reciprocal scale version for transforming vectors. - - renderData.m_tangents[index] = vertexSkinningTransform.TransformVector(originalData.m_tangents[index]).GetNormalized(); - renderData.m_bitangents[index] = vertexSkinningTransform.TransformVector(originalData.m_bitangents[index]).GetNormalized(); + // ComputeVertexSkinnningTransform is normalizing the blended dual quaternion. This means the dual + // quaternion will not have any scale and there is no need to compute the reciprocal scale version + // for transforming normals. + // Note: The GPU skinning shader does the same operation. renderData.m_normals[index] = vertexSkinningTransform.TransformVector(originalData.m_normals[index]).GetNormalized(); + + // Tangents and Bitangents are recalculated immediately after this call + // by cloth mesh component, so there is no need to transform them here. } } From fdb461b3cab05b3e119e6027041d8c694a8d0d8c Mon Sep 17 00:00:00 2001 From: hnusrath Date: Wed, 5 May 2021 20:06:39 +0100 Subject: [PATCH 5/9] SPEC-6677 Remove TestRail URLs from Physx Tests --- .../physics/C100000_RigidBody_EnablingGravityWorksPoC.py | 2 +- ...11111_RigidBody_EnablingGravityWorksUsingNotificationsPoC.py | 2 +- .../physics/C12712452_ScriptCanvas_CollisionEvents.py | 2 +- .../physics/C12712453_ScriptCanvas_MultipleRaycastNode.py | 2 +- .../physics/C12712454_ScriptCanvas_OverlapNodeVerification.py | 2 +- .../physics/C12712455_ScriptCanvas_ShapeCastVerification.py | 2 +- .../C12868578_ForceRegion_DirectionHasNoAffectOnMagnitude.py | 2 +- .../physics/C12868580_ForceRegion_SplineModifiedTransform.py | 2 +- .../physics/C12905527_ForceRegion_MagnitudeDeviation.py | 2 +- .../physics/C12905528_ForceRegion_WithNonTriggerCollider.py | 2 +- .../physics/C13351703_COM_NotIncludeTriggerShapes.py | 2 +- .../physics/C13352089_RigidBodies_MaxAngularVelocity.py | 2 +- .../physics/C13508019_Terrain_TerrainTexturePainterWorks.py | 2 +- .../Gem/PythonTests/physics/C13895144_Ragdoll_ChangeLevel.py | 2 +- .../physics/C14195074_ScriptCanvas_PostUpdateEvent.py | 2 +- .../physics/C14654881_CharacterController_SwitchLevels.py | 2 +- .../Gem/PythonTests/physics/C14654882_Ragdoll_ragdollAPTest.py | 2 +- .../Gem/PythonTests/physics/C14861498_ConfirmError_NoPxMesh.py | 2 +- .../physics/C14861500_DefaultSetting_ColliderShape.py | 2 +- .../physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py | 2 +- .../physics/C14861502_PhysXCollider_AssetAutoAssigned.py | 2 +- .../physics/C14861504_RenderMeshAsset_WithNoPxAsset.py | 2 +- .../physics/C14902097_ScriptCanvas_PreUpdateEvent.py | 2 +- .../physics/C14902098_ScriptCanvas_PostPhysicsUpdate.py | 2 +- .../PythonTests/physics/C14976307_Gravity_SetGravityWorks.py | 2 +- .../C14976308_ScriptCanvas_SetKinematicTargetTransform.py | 2 +- ...15096732_Material_DefaultLibraryUpdatedAcrossLevels_after.py | 2 +- ...5096732_Material_DefaultLibraryUpdatedAcrossLevels_before.py | 2 +- .../physics/C15096735_Materials_DefaultLibraryConsistency.py | 2 +- .../C15096737_Materials_DefaultMaterialLibraryChanges.py | 2 +- .../physics/C15096740_Material_LibraryUpdatedCorrectly.py | 2 +- .../Gem/PythonTests/physics/C15308217_NoCrash_LevelSwitch.py | 2 +- .../physics/C15308221_Material_ComponentsInSyncWithLibrary.py | 2 +- AutomatedTesting/Gem/PythonTests/physics/C15425929_Undo_Redo.py | 2 +- .../physics/C15425935_Material_LibraryUpdatedAcrossLevels.py | 2 +- ...6261_PhysXMaterials_CharacterControllerMaterialAssignment.py | 2 +- .../C15563573_Material_AddModifyDeleteOnCharacterController.py | 2 +- .../physics/C15845879_ForceRegion_HighLinearDampingForce.py | 2 +- .../PythonTests/physics/C17411467_AddPhysxRagdollComponent.py | 2 +- .../physics/C18243580_Joints_Fixed2BodiesConstrained.py | 2 +- .../Gem/PythonTests/physics/C18243581_Joints_FixedBreakable.py | 2 +- .../physics/C18243582_Joints_FixedLeadFollowerCollide.py | 2 +- .../physics/C18243583_Joints_Hinge2BodiesConstrained.py | 2 +- .../physics/C18243584_Joints_HingeSoftLimitsConstrained.py | 2 +- .../physics/C18243585_Joints_HingeNoLimitsConstrained.py | 2 +- .../physics/C18243586_Joints_HingeLeadFollowerCollide.py | 2 +- .../Gem/PythonTests/physics/C18243587_Joints_HingeBreakable.py | 2 +- .../physics/C18243588_Joints_Ball2BodiesConstrained.py | 2 +- .../physics/C18243589_Joints_BallSoftLimitsConstrained.py | 2 +- .../physics/C18243590_Joints_BallNoLimitsConstrained.py | 2 +- .../physics/C18243591_Joints_BallLeadFollowerCollide.py | 2 +- .../Gem/PythonTests/physics/C18243592_Joints_BallBreakable.py | 2 +- .../physics/C18243593_Joints_GlobalFrameConstrained.py | 2 +- .../physics/C18977601_Material_FrictionCombinePriority.py | 2 +- .../physics/C18981526_Material_RestitutionCombinePriority.py | 2 +- .../physics/C19536274_GetCollisionName_PrintsName.py | 2 +- .../physics/C19536277_GetCollisionName_PrintsNothing.py | 2 +- .../physics/C19578018_ShapeColliderWithNoShapeComponent.py | 2 +- .../PythonTests/physics/C19578021_ShapeCollider_CanBeAdded.py | 2 +- .../physics/C19723164_ShapeColliders_WontCrashEditor.py | 2 +- .../C24308873_CylinderShapeCollider_CollidesWithPhysXTerrain.py | 2 +- .../PythonTests/physics/C28978033_Ragdoll_WorldBodyBusTests.py | 2 +- .../physics/C29032500_EditorComponents_WorldBodyBusWorks.py | 2 +- .../physics/C3510642_Terrain_NotCollideWithTerrain.py | 2 +- .../physics/C4044455_Material_libraryChangesInstantly.py | 2 +- .../PythonTests/physics/C4044456_Material_FrictionCombine.py | 2 +- .../PythonTests/physics/C4044457_Material_RestitutionCombine.py | 2 +- .../PythonTests/physics/C4044459_Material_DynamicFriction.py | 2 +- .../Gem/PythonTests/physics/C4044460_Material_StaticFriction.py | 2 +- .../Gem/PythonTests/physics/C4044461_Material_Restitution.py | 2 +- .../physics/C4044694_Material_EmptyLibraryUsesDefault.py | 2 +- .../physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py | 2 +- .../physics/C4044697_Material_PerfaceMaterialValidation.py | 2 +- .../physics/C4888315_Material_AddModifyDeleteOnCollider.py | 2 +- .../physics/C4925577_Materials_MaterialAssignedToTerrain.py | 2 +- .../physics/C4925579_Material_AddModifyDeleteOnTerrain.py | 2 +- .../physics/C4925580_Material_RagdollBonesMaterial.py | 2 +- .../physics/C4925582_Material_AddModifyDeleteOnRagdollBones.py | 2 +- .../physics/C4976194_RigidBody_PhysXComponentIsValid.py | 2 +- .../physics/C4976195_RigidBodies_InitialLinearVelocity.py | 2 +- .../physics/C4976197_RigidBodies_InitialAngularVelocity.py | 2 +- .../physics/C4976199_RigidBodies_LinearDampingObjectMotion.py | 2 +- .../physics/C4976200_RigidBody_AngularDampingObjectRotation.py | 2 +- .../PythonTests/physics/C4976201_RigidBody_MassIsAssigned.py | 2 +- .../C4976202_RigidBody_StopsWhenBelowKineticThreshold.py | 2 +- .../physics/C4976204_Verify_Start_Asleep_Condition.py | 2 +- .../physics/C4976206_RigidBodies_GravityEnabledActive.py | 2 +- .../physics/C4976207_PhysXRigidBodies_KinematicBehavior.py | 2 +- .../Gem/PythonTests/physics/C4976209_RigidBody_ComputesCOM.py | 2 +- .../Gem/PythonTests/physics/C4976210_COM_ManualSetting.py | 2 +- .../physics/C4976218_RigidBodies_InertiaObjectsNotComputed.py | 2 +- .../Gem/PythonTests/physics/C4976227_Collider_NewGroup.py | 2 +- .../PythonTests/physics/C4976236_AddPhysxColliderComponent.py | 2 +- .../C4976242_Collision_SameCollisionlayerSameCollisiongroup.py | 2 +- .../C4976243_Collision_SameCollisionGroupDiffCollisionLayers.py | 2 +- .../physics/C4976244_Collider_SameGroupSameLayerCollision.py | 2 +- .../physics/C4976245_PhysXCollider_CollisionLayerTest.py | 2 +- .../physics/C4982593_PhysXCollider_CollisionLayerTest.py | 2 +- .../physics/C4982595_Collider_TriggerDisablesCollision.py | 2 +- .../Gem/PythonTests/physics/C4982797_Collider_ColliderOffset.py | 2 +- .../physics/C4982798_Collider_ColliderRotationOffset.py | 2 +- .../physics/C4982800_PhysXColliderShape_CanBeSelected.py | 2 +- .../physics/C4982801_PhysXColliderShape_CanBeSelected.py | 2 +- .../physics/C4982802_PhysXColliderShape_CanBeSelected.py | 2 +- .../Gem/PythonTests/physics/C4982803_Enable_PxMesh_Option.py | 2 +- .../PythonTests/physics/C5296614_PhysXMaterial_ColliderShape.py | 2 +- .../physics/C5340400_RigidBody_ManualMomentOfInertia.py | 2 +- .../physics/C5689518_PhysXTerrain_CollidesWithPhysXTerrain.py | 2 +- .../C5689522_Physxterrain_AddPhysxterrainNoEditorCrash.py | 2 +- .../physics/C5689524_MultipleTerrains_CheckWarningInConsole.py | 2 +- .../physics/C5689528_Terrain_MultipleTerrainComponents.py | 2 +- .../physics/C5689529_Verify_Terrain_RigidBody_Collider_Mesh.py | 2 +- .../physics/C5689531_Warning_TerrainSliceTerrainComponent.py | 2 +- .../physics/C5932040_ForceRegion_CubeExertsWorldForce.py | 2 +- .../C5932041_PhysXForceRegion_LocalSpaceForceOnRigidBodies.py | 2 +- .../physics/C5932042_PhysXForceRegion_LinearDamping.py | 2 +- .../physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py | 2 +- .../physics/C5932044_ForceRegion_PointForceOnRigidBody.py | 2 +- .../Gem/PythonTests/physics/C5932045_ForceRegion_Spline.py | 2 +- .../physics/C5959759_RigidBody_ForceRegionSpherePointForce.py | 2 +- .../physics/C5959760_PhysXForceRegion_PointForceExertion.py | 2 +- .../physics/C5959761_ForceRegion_PhysAssetExertsPointForce.py | 2 +- .../physics/C5959763_ForceRegion_ForceRegionImpulsesCube.py | 2 +- .../physics/C5959764_ForceRegion_ForceRegionImpulsesCapsule.py | 2 +- .../physics/C5959765_ForceRegion_AssetGetsImpulsed.py | 2 +- .../PythonTests/physics/C5959808_ForceRegion_PositionOffset.py | 2 +- .../physics/C5959809_ForceRegion_RotationalOffset.py | 2 +- .../physics/C5959810_ForceRegion_ForceRegionCombinesForces.py | 2 +- .../C5968759_ForceRegion_ExertsSeveralForcesOnRigidBody.py | 2 +- .../physics/C5968760_ForceRegion_CheckNetForceChange.py | 2 +- .../physics/C6032082_Terrain_MultipleResolutionsValid.py | 2 +- .../physics/C6090546_ForceRegion_SliceFileInstantiates.py | 2 +- .../physics/C6090547_ForceRegion_ParentChildForceRegions.py | 2 +- .../physics/C6090550_ForceRegion_WorldSpaceForceNegative.py | 2 +- .../physics/C6090551_ForceRegion_LocalSpaceForceNegative.py | 2 +- .../physics/C6090552_ForceRegion_LinearDampingNegative.py | 2 +- .../C6090553_ForceRegion_SimpleDragForceOnRigidBodies.py | 2 +- .../physics/C6090554_ForceRegion_PointForceNegative.py | 2 +- .../physics/C6090555_ForceRegion_SplineFollowOnRigidBodies.py | 2 +- .../physics/C6131473_StaticSlice_OnDynamicSliceSpawn.py | 2 +- .../PythonTests/physics/C6224408_ScriptCanvas_EntitySpawn.py | 2 +- .../PythonTests/physics/C6274125_ScriptCanvas_TriggerEvents.py | 2 +- .../physics/C6321601_Force_HighValuesDirectionAxes.py | 2 +- 143 files changed, 143 insertions(+), 143 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/physics/C100000_RigidBody_EnablingGravityWorksPoC.py b/AutomatedTesting/Gem/PythonTests/physics/C100000_RigidBody_EnablingGravityWorksPoC.py index e0277180ae..1284c234bd 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C100000_RigidBody_EnablingGravityWorksPoC.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C100000_RigidBody_EnablingGravityWorksPoC.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C100000 # Test Case Title : Check that Gravity works -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/100000 + # fmt:off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC.py b/AutomatedTesting/Gem/PythonTests/physics/C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC.py index c7dd8debb9..725da5fb24 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C111111_RigidBody_EnablingGravityWorksUsingNotificationsPoC.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C111111 # Test Case Title : Check that Gravity works -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/111111 + # fmt:off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12712452_ScriptCanvas_CollisionEvents.py b/AutomatedTesting/Gem/PythonTests/physics/C12712452_ScriptCanvas_CollisionEvents.py index 216a75233f..380bb8a3c8 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12712452_ScriptCanvas_CollisionEvents.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12712452_ScriptCanvas_CollisionEvents.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C12712452 # Test Case Title : Verify ScriptCanvas Collision Events -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/12712452 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12712453_ScriptCanvas_MultipleRaycastNode.py b/AutomatedTesting/Gem/PythonTests/physics/C12712453_ScriptCanvas_MultipleRaycastNode.py index 2adf30e65e..b415688de7 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12712453_ScriptCanvas_MultipleRaycastNode.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12712453_ScriptCanvas_MultipleRaycastNode.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C12712453 # Test Case Title : Verify Raycast Multiple Node -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/12712453 + # fmt:off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12712454_ScriptCanvas_OverlapNodeVerification.py b/AutomatedTesting/Gem/PythonTests/physics/C12712454_ScriptCanvas_OverlapNodeVerification.py index 94eed900ff..bcf980a710 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12712454_ScriptCanvas_OverlapNodeVerification.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12712454_ScriptCanvas_OverlapNodeVerification.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : 12712454 # Test Case Title : Verify overlap nodes in script canvas -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/12712454 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12712455_ScriptCanvas_ShapeCastVerification.py b/AutomatedTesting/Gem/PythonTests/physics/C12712455_ScriptCanvas_ShapeCastVerification.py index 61f26ebecb..668e8083c3 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12712455_ScriptCanvas_ShapeCastVerification.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12712455_ScriptCanvas_ShapeCastVerification.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C12712455 # Test Case Title : Verify shape cast nodes in SC -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/12712455 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12868578_ForceRegion_DirectionHasNoAffectOnMagnitude.py b/AutomatedTesting/Gem/PythonTests/physics/C12868578_ForceRegion_DirectionHasNoAffectOnMagnitude.py index 4745927e89..d2438110fe 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12868578_ForceRegion_DirectionHasNoAffectOnMagnitude.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12868578_ForceRegion_DirectionHasNoAffectOnMagnitude.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C12868578 # Test Case Title : Check that World space and local space force direction doesn't affect magnitude of force exerted -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/12868578 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12868580_ForceRegion_SplineModifiedTransform.py b/AutomatedTesting/Gem/PythonTests/physics/C12868580_ForceRegion_SplineModifiedTransform.py index 937fdd85a6..6372104fcf 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12868580_ForceRegion_SplineModifiedTransform.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12868580_ForceRegion_SplineModifiedTransform.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C12868580 # Test Case Title : Check that spline follow force works if transform components of entity are altered -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/12868580 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12905527_ForceRegion_MagnitudeDeviation.py b/AutomatedTesting/Gem/PythonTests/physics/C12905527_ForceRegion_MagnitudeDeviation.py index 0cb0a2f841..76578460d5 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12905527_ForceRegion_MagnitudeDeviation.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12905527_ForceRegion_MagnitudeDeviation.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C12905527 # Test Case Title : Check that deviation occurring in Force Magnitude due to Values in Force direction is not large -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/12905527 + # fmt: off class Tests(): diff --git a/AutomatedTesting/Gem/PythonTests/physics/C12905528_ForceRegion_WithNonTriggerCollider.py b/AutomatedTesting/Gem/PythonTests/physics/C12905528_ForceRegion_WithNonTriggerCollider.py index 42565333f7..38dc5488d2 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C12905528_ForceRegion_WithNonTriggerCollider.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C12905528_ForceRegion_WithNonTriggerCollider.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C12905528 Test Case Title : Check that user is warned if non-trigger collider component is used with force region -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/12905528 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C13351703_COM_NotIncludeTriggerShapes.py b/AutomatedTesting/Gem/PythonTests/physics/C13351703_COM_NotIncludeTriggerShapes.py index 828022ccf2..d5bd946d34 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C13351703_COM_NotIncludeTriggerShapes.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C13351703_COM_NotIncludeTriggerShapes.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C13351703 # Test Case Title : Check that Center of Mass calculations should not include trigger shapes -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/13351703 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C13352089_RigidBodies_MaxAngularVelocity.py b/AutomatedTesting/Gem/PythonTests/physics/C13352089_RigidBodies_MaxAngularVelocity.py index 77d93d9752..09b6956b06 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C13352089_RigidBodies_MaxAngularVelocity.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C13352089_RigidBodies_MaxAngularVelocity.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C13352089 # Test Case Title : Verify that maximum angular velocity interacts correctly with initial angular velocity -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/13352089 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C13508019_Terrain_TerrainTexturePainterWorks.py b/AutomatedTesting/Gem/PythonTests/physics/C13508019_Terrain_TerrainTexturePainterWorks.py index 1c580bfbfe..9c7a6e75e9 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C13508019_Terrain_TerrainTexturePainterWorks.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C13508019_Terrain_TerrainTexturePainterWorks.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C13508019 # Test Case Title : Verify terrain materials are updated after using terrain texture layer painter. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/13508019 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C13895144_Ragdoll_ChangeLevel.py b/AutomatedTesting/Gem/PythonTests/physics/C13895144_Ragdoll_ChangeLevel.py index 61efe20dbd..66050565a4 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C13895144_Ragdoll_ChangeLevel.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C13895144_Ragdoll_ChangeLevel.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C13895144 # Test Case Title : Run a level with multiple ragdolls and then switch levels -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/13895144 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14195074_ScriptCanvas_PostUpdateEvent.py b/AutomatedTesting/Gem/PythonTests/physics/C14195074_ScriptCanvas_PostUpdateEvent.py index 5668082f78..1d0e1d5ac8 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14195074_ScriptCanvas_PostUpdateEvent.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14195074_ScriptCanvas_PostUpdateEvent.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C14195074 # Test Case Title : Verify Postsimulate Events -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14195074 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14654881_CharacterController_SwitchLevels.py b/AutomatedTesting/Gem/PythonTests/physics/C14654881_CharacterController_SwitchLevels.py index fd5653b801..8fc58b4765 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14654881_CharacterController_SwitchLevels.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14654881_CharacterController_SwitchLevels.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C14654881 # Test Case Title : Switching levels from a level containing a character controller component # should not lead to a crash -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14654881 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14654882_Ragdoll_ragdollAPTest.py b/AutomatedTesting/Gem/PythonTests/physics/C14654882_Ragdoll_ragdollAPTest.py index 03c18a5f1a..33077f2607 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14654882_Ragdoll_ragdollAPTest.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14654882_Ragdoll_ragdollAPTest.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ Test case ID : C14654882 Test Case Title : Loading level with old PhysX Ragdoll component serialization should not produce asset processor errors -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14654882 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14861498_ConfirmError_NoPxMesh.py b/AutomatedTesting/Gem/PythonTests/physics/C14861498_ConfirmError_NoPxMesh.py index e52bdb7574..dca831456d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14861498_ConfirmError_NoPxMesh.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14861498_ConfirmError_NoPxMesh.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C14861498 # Test Case Title : Confirm that when a PhysXCollider has no physics asset, the physics asset collider \ # shape throw an error -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14861498 + # fmt:off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14861500_DefaultSetting_ColliderShape.py b/AutomatedTesting/Gem/PythonTests/physics/C14861500_DefaultSetting_ColliderShape.py index 7a65448dcd..c6a275d04d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14861500_DefaultSetting_ColliderShape.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14861500_DefaultSetting_ColliderShape.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C14861500 Test Case Title : Verify Default shape is Physics Asset -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14861500 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py b/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py index 904b5b0189..e415687001 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14861501_PhysXCollider_RenderMeshAutoAssigned.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C14861501 Test Case Title : Verify PxMesh is auto-assigned when Collider component is added after Rendering Mesh component -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14861501 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14861502_PhysXCollider_AssetAutoAssigned.py b/AutomatedTesting/Gem/PythonTests/physics/C14861502_PhysXCollider_AssetAutoAssigned.py index 075c3f5b61..64820f7daf 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14861502_PhysXCollider_AssetAutoAssigned.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14861502_PhysXCollider_AssetAutoAssigned.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C14861502 Test Case Title : Verify PxMesh is auto-assigned in collider when Mesh is assigned in Rendering Mesh component -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14861502 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14861504_RenderMeshAsset_WithNoPxAsset.py b/AutomatedTesting/Gem/PythonTests/physics/C14861504_RenderMeshAsset_WithNoPxAsset.py index bbaabf67f6..766a359397 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14861504_RenderMeshAsset_WithNoPxAsset.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14861504_RenderMeshAsset_WithNoPxAsset.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C14861504 Test Case Title : Verify if Rendering Mesh does not have a PhysX Collision Mesh fbx, then PxMesh is not auto-assigned -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14861504 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14902097_ScriptCanvas_PreUpdateEvent.py b/AutomatedTesting/Gem/PythonTests/physics/C14902097_ScriptCanvas_PreUpdateEvent.py index 45557098f7..327f40ec38 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14902097_ScriptCanvas_PreUpdateEvent.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14902097_ScriptCanvas_PreUpdateEvent.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C14902097 # Test Case Title : Verify Presimulate Events -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14902097 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14902098_ScriptCanvas_PostPhysicsUpdate.py b/AutomatedTesting/Gem/PythonTests/physics/C14902098_ScriptCanvas_PostPhysicsUpdate.py index 19caaab4fe..f7c8be8804 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14902098_ScriptCanvas_PostPhysicsUpdate.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14902098_ScriptCanvas_PostPhysicsUpdate.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C14902098 # Test Case Title : Check that force region simulation with Postsimulate works independently from rendering tick -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14902098 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14976307_Gravity_SetGravityWorks.py b/AutomatedTesting/Gem/PythonTests/physics/C14976307_Gravity_SetGravityWorks.py index 342ac6bdbd..73137ac497 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14976307_Gravity_SetGravityWorks.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14976307_Gravity_SetGravityWorks.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C14976307 # Test Case Title : Check that Set Gravity Enabled works on an entity with gravity that starts as disabled -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/14976307 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py b/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py index 815e922a76..c76c5cab80 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C14976308_ScriptCanvas_SetKinematicTargetTransform.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case # ID : C14976308 # Title : Verify that SetKinematicTarget on PhysX rigid body updates transform for kinematic entities and vice versa -# URL : https://testrail.agscollab.com/index.php?/cases/view/14976308 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_after.py b/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_after.py index 76ea9475ff..bdfc9d19be 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_after.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_after.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15096732 # Test Case Title : Verify Default material library works across different levels -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15096732 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_before.py b/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_before.py index 748052db56..d45423fe94 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_before.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15096732_Material_DefaultLibraryUpdatedAcrossLevels_before.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15096732 # Test Case Title : Verify Default material library works across different levels -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15096732 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15096735_Materials_DefaultLibraryConsistency.py b/AutomatedTesting/Gem/PythonTests/physics/C15096735_Materials_DefaultLibraryConsistency.py index 4c7949cc91..3dd49d4fe4 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15096735_Materials_DefaultLibraryConsistency.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15096735_Materials_DefaultLibraryConsistency.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15096735 # Test Case Title : Verify that default material library works consistently across all systems that use it -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15096735 + # fmt:off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15096737_Materials_DefaultMaterialLibraryChanges.py b/AutomatedTesting/Gem/PythonTests/physics/C15096737_Materials_DefaultMaterialLibraryChanges.py index cc7dc3c5e2..c806cbb7d4 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15096737_Materials_DefaultMaterialLibraryChanges.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15096737_Materials_DefaultMaterialLibraryChanges.py @@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case Title : Verify that a change in the default material library material information # affects all the materials that reference it, even non-defaulted # exactly like if the library was selected -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15096737 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py b/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py index 0f33f0858b..bef98f6830 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15096740_Material_LibraryUpdatedCorrectly.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C15096740 Test Case Title : Verify that clearing a material library on all systems that use it, assigns the default material library -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15096740 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15308217_NoCrash_LevelSwitch.py b/AutomatedTesting/Gem/PythonTests/physics/C15308217_NoCrash_LevelSwitch.py index 625a8bfb4a..dadfbd7a7e 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15308217_NoCrash_LevelSwitch.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15308217_NoCrash_LevelSwitch.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15308217 # Test Case Title : Verify that the Terrain texture layer doesn't crash when changing # from on a level with a terrain component to another level without a terrain component -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15308217 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15308221_Material_ComponentsInSyncWithLibrary.py b/AutomatedTesting/Gem/PythonTests/physics/C15308221_Material_ComponentsInSyncWithLibrary.py index 3f6457f15c..ebc7d3fadd 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15308221_Material_ComponentsInSyncWithLibrary.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15308221_Material_ComponentsInSyncWithLibrary.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C15308221 # Test Case Title : Verify that material library and slots are always in sync and work consistently through the different places of usage -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/15308221 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15425929_Undo_Redo.py b/AutomatedTesting/Gem/PythonTests/physics/C15425929_Undo_Redo.py index 57a0e6a75e..dba14552c8 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15425929_Undo_Redo.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15425929_Undo_Redo.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15425929 # Test Case Title : Verify that undo - redo operations do not create any error -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15425929 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15425935_Material_LibraryUpdatedAcrossLevels.py b/AutomatedTesting/Gem/PythonTests/physics/C15425935_Material_LibraryUpdatedAcrossLevels.py index f61886ccd0..8ff90fddaf 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15425935_Material_LibraryUpdatedAcrossLevels.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15425935_Material_LibraryUpdatedAcrossLevels.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15425935 # Test Case Title : Verify that the change in Material Library gets updated across levels -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15425935 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15556261_PhysXMaterials_CharacterControllerMaterialAssignment.py b/AutomatedTesting/Gem/PythonTests/physics/C15556261_PhysXMaterials_CharacterControllerMaterialAssignment.py index 99e0dcc669..21f5952678 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15556261_PhysXMaterials_CharacterControllerMaterialAssignment.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15556261_PhysXMaterials_CharacterControllerMaterialAssignment.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15556261 # Test Case Title : Check that the material assignment works with Character Controller -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15556261 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15563573_Material_AddModifyDeleteOnCharacterController.py b/AutomatedTesting/Gem/PythonTests/physics/C15563573_Material_AddModifyDeleteOnCharacterController.py index 4572dd322a..1e9b15fc90 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15563573_Material_AddModifyDeleteOnCharacterController.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15563573_Material_AddModifyDeleteOnCharacterController.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C15563573 # Test Case Title : Check that any change (Add/Delete/Modify) made to the material surface in the material library reflects immediately in the PhysX Character Controller -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/15563573 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C15845879_ForceRegion_HighLinearDampingForce.py b/AutomatedTesting/Gem/PythonTests/physics/C15845879_ForceRegion_HighLinearDampingForce.py index 52af7d8be5..6b31ffb13b 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C15845879_ForceRegion_HighLinearDampingForce.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C15845879_ForceRegion_HighLinearDampingForce.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C15845879 # Test Case Title : Check that linear damping with high values do not make the object to quiver -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/15845879 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C17411467_AddPhysxRagdollComponent.py b/AutomatedTesting/Gem/PythonTests/physics/C17411467_AddPhysxRagdollComponent.py index 68efd452b2..32bd02ae26 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C17411467_AddPhysxRagdollComponent.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C17411467_AddPhysxRagdollComponent.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C17411467 Test Case Title : Check that Physx Ragdoll component can be added without errors/warnings -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/17411467 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243580_Joints_Fixed2BodiesConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243580_Joints_Fixed2BodiesConstrained.py index b13869ce12..c3a351ebea 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243580_Joints_Fixed2BodiesConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243580_Joints_Fixed2BodiesConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243580 # Test Case Title : Check that fixed joint constrains 2 bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243580 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243581_Joints_FixedBreakable.py b/AutomatedTesting/Gem/PythonTests/physics/C18243581_Joints_FixedBreakable.py index 19feee575b..00e9a5625f 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243581_Joints_FixedBreakable.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243581_Joints_FixedBreakable.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243581 # Test Case Title : Check that fixed joint is breakable -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243581 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243582_Joints_FixedLeadFollowerCollide.py b/AutomatedTesting/Gem/PythonTests/physics/C18243582_Joints_FixedLeadFollowerCollide.py index c9c90d35a7..d34e3f67d3 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243582_Joints_FixedLeadFollowerCollide.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243582_Joints_FixedLeadFollowerCollide.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243582 # Test Case Title : Check that fixed joint allows lead-follower collision -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243582 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243583_Joints_Hinge2BodiesConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243583_Joints_Hinge2BodiesConstrained.py index 66343534a7..eafce6ceaf 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243583_Joints_Hinge2BodiesConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243583_Joints_Hinge2BodiesConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243583 # Test Case Title : Check that hinge joint constrains 2 bodies about X-axis -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243583 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243584_Joints_HingeSoftLimitsConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243584_Joints_HingeSoftLimitsConstrained.py index 3b335cc5c6..90027be2d7 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243584_Joints_HingeSoftLimitsConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243584_Joints_HingeSoftLimitsConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243584 # Test Case Title : Check that hinge joint allows soft limit constraints on 2 bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243584 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243585_Joints_HingeNoLimitsConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243585_Joints_HingeNoLimitsConstrained.py index 289522fcac..0f677d94ae 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243585_Joints_HingeNoLimitsConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243585_Joints_HingeNoLimitsConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243585 # Test Case Title : Check that hinge joint allows no limit constraints on 2 bodies -# URL of the test case :https://testrail.agscollab.com/index.php?/cases/view/18243585 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243586_Joints_HingeLeadFollowerCollide.py b/AutomatedTesting/Gem/PythonTests/physics/C18243586_Joints_HingeLeadFollowerCollide.py index 60b9189c83..7c973729d1 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243586_Joints_HingeLeadFollowerCollide.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243586_Joints_HingeLeadFollowerCollide.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243586 # Test Case Title : Check that hinge joint allows lead-follower collision -# URL of the test case :https://testrail.agscollab.com/index.php?/cases/view/18243586 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243587_Joints_HingeBreakable.py b/AutomatedTesting/Gem/PythonTests/physics/C18243587_Joints_HingeBreakable.py index af6fa8cbac..4734328d70 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243587_Joints_HingeBreakable.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243587_Joints_HingeBreakable.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243587 # Test Case Title : Check that hinge joint is breakable -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243587 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243588_Joints_Ball2BodiesConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243588_Joints_Ball2BodiesConstrained.py index 074ca03000..b6acfd6dd8 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243588_Joints_Ball2BodiesConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243588_Joints_Ball2BodiesConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243588 # Test Case Title : Check that ball joint constrains 2 bodies within cone limits -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243588 + # fmt: off class Tests: enter_game_mode = ("Entered game mode", "Failed to enter game mode") diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243589_Joints_BallSoftLimitsConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243589_Joints_BallSoftLimitsConstrained.py index 16266b2da3..1ca49035b5 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243589_Joints_BallSoftLimitsConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243589_Joints_BallSoftLimitsConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : 18243589 # Test Case Title : Check that ball joint allows soft limit constraints -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243589 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243590_Joints_BallNoLimitsConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243590_Joints_BallNoLimitsConstrained.py index ede46fd5c5..1d5a213cd8 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243590_Joints_BallNoLimitsConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243590_Joints_BallNoLimitsConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243590 # Test Case Title : Check that ball joint allows no limit constraints -# URL of the test case :https://testrail.agscollab.com/index.php?/cases/view/18243590 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243591_Joints_BallLeadFollowerCollide.py b/AutomatedTesting/Gem/PythonTests/physics/C18243591_Joints_BallLeadFollowerCollide.py index c3e527956f..8f7b2d7823 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243591_Joints_BallLeadFollowerCollide.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243591_Joints_BallLeadFollowerCollide.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243591 # Test Case Title : Check that ball joint allows lead-follower collision -# URL of the test case :https://testrail.agscollab.com/index.php?/cases/view/18243591 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243592_Joints_BallBreakable.py b/AutomatedTesting/Gem/PythonTests/physics/C18243592_Joints_BallBreakable.py index 350fccd125..0fa43cf9c8 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243592_Joints_BallBreakable.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243592_Joints_BallBreakable.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243592 # Test Case Title : Check that ball joint is breakable -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243592 + # fmt: off class Tests: enter_game_mode = ("Entered game mode", "Failed to enter game mode") diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18243593_Joints_GlobalFrameConstrained.py b/AutomatedTesting/Gem/PythonTests/physics/C18243593_Joints_GlobalFrameConstrained.py index 4580a229ea..37d659f181 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18243593_Joints_GlobalFrameConstrained.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18243593_Joints_GlobalFrameConstrained.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18243593 # Test Case Title : Check that fixed/hinge/ball joints allow constraints to global frame -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18243593 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18977601_Material_FrictionCombinePriority.py b/AutomatedTesting/Gem/PythonTests/physics/C18977601_Material_FrictionCombinePriority.py index 57dfc0f349..b17b97a816 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18977601_Material_FrictionCombinePriority.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18977601_Material_FrictionCombinePriority.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18977601 # Test Case Title : Verify that when two objects with different materials collide, the friction combine priority works -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18977601 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C18981526_Material_RestitutionCombinePriority.py b/AutomatedTesting/Gem/PythonTests/physics/C18981526_Material_RestitutionCombinePriority.py index 9b7fea1ab9..690d3d4d3f 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C18981526_Material_RestitutionCombinePriority.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C18981526_Material_RestitutionCombinePriority.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C18981526 # Test Case Title : Verify when two objects with different materials collide, the restitution combine priority works -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/18981526 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C19536274_GetCollisionName_PrintsName.py b/AutomatedTesting/Gem/PythonTests/physics/C19536274_GetCollisionName_PrintsName.py index 48c947aa1f..611b502019 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C19536274_GetCollisionName_PrintsName.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C19536274_GetCollisionName_PrintsName.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C19536274 Test Case Title : Verify that the Get Collision Layer Name node prints the name of the collision layer -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/19536274 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C19536277_GetCollisionName_PrintsNothing.py b/AutomatedTesting/Gem/PythonTests/physics/C19536277_GetCollisionName_PrintsNothing.py index 66e1302b5b..04d973cbb2 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C19536277_GetCollisionName_PrintsNothing.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C19536277_GetCollisionName_PrintsNothing.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C19536277 Test Case Title : Verify that when a group is modified using ToggleCollisionLayer node such that the new group is not in the pre-existing groups, GetCollisionGroupName node prints no value -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/19536277 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C19578018_ShapeColliderWithNoShapeComponent.py b/AutomatedTesting/Gem/PythonTests/physics/C19578018_ShapeColliderWithNoShapeComponent.py index 32ece8541c..23996934bc 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C19578018_ShapeColliderWithNoShapeComponent.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C19578018_ShapeColliderWithNoShapeComponent.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C19578018 Test Case Title : Verify that a shape collider component with no shape component indicates a missing service -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/19578018 + """ # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C19578021_ShapeCollider_CanBeAdded.py b/AutomatedTesting/Gem/PythonTests/physics/C19578021_ShapeCollider_CanBeAdded.py index 0c42f5457d..1eb36e16f4 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C19578021_ShapeCollider_CanBeAdded.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C19578021_ShapeCollider_CanBeAdded.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C19578021 Test Case Title : Verify that a shape collider component may be added to an entity along with one or more PhysX collider components -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/19578021 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C19723164_ShapeColliders_WontCrashEditor.py b/AutomatedTesting/Gem/PythonTests/physics/C19723164_ShapeColliders_WontCrashEditor.py index 769f08e3c4..f6584624c3 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C19723164_ShapeColliders_WontCrashEditor.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C19723164_ShapeColliders_WontCrashEditor.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C19723164 Test Case Title : Verify that if we had 512 shape colliders in the level, the level does not crash -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/19723164 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C24308873_CylinderShapeCollider_CollidesWithPhysXTerrain.py b/AutomatedTesting/Gem/PythonTests/physics/C24308873_CylinderShapeCollider_CollidesWithPhysXTerrain.py index 60fa9dc44d..101b96b99b 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C24308873_CylinderShapeCollider_CollidesWithPhysXTerrain.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C24308873_CylinderShapeCollider_CollidesWithPhysXTerrain.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C24308873 # Test Case Title : Check that cylinder shape collider collides with terrain -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/24308873 + # A cylinder is suspended slightly over PhysX Terrain to check that it collides when dropped diff --git a/AutomatedTesting/Gem/PythonTests/physics/C28978033_Ragdoll_WorldBodyBusTests.py b/AutomatedTesting/Gem/PythonTests/physics/C28978033_Ragdoll_WorldBodyBusTests.py index 8980e68250..052795318a 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C28978033_Ragdoll_WorldBodyBusTests.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C28978033_Ragdoll_WorldBodyBusTests.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C28978033 # Test Case Title : Check that WorldRequestBus works with PhysX ragdoll -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/28978033 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C29032500_EditorComponents_WorldBodyBusWorks.py b/AutomatedTesting/Gem/PythonTests/physics/C29032500_EditorComponents_WorldBodyBusWorks.py index be541e4bf9..4915d362f7 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C29032500_EditorComponents_WorldBodyBusWorks.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C29032500_EditorComponents_WorldBodyBusWorks.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C29032500 # Test Case Title : Check that WorldRequestBus works with editor components -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/29032500 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C3510642_Terrain_NotCollideWithTerrain.py b/AutomatedTesting/Gem/PythonTests/physics/C3510642_Terrain_NotCollideWithTerrain.py index 3e3770adb9..b671cd3754 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C3510642_Terrain_NotCollideWithTerrain.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C3510642_Terrain_NotCollideWithTerrain.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C3510642 # Test Case Title : Check that when no physX terrain component is added, collision of a PhysX object # with terrain does not work. Consequently, PhysX material assignment to terrain cannot be tested. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/3510642 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044455_Material_libraryChangesInstantly.py b/AutomatedTesting/Gem/PythonTests/physics/C4044455_Material_libraryChangesInstantly.py index 5f2c40f11e..a7916129e8 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044455_Material_libraryChangesInstantly.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044455_Material_libraryChangesInstantly.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : 4044455 # Test Case Title : Verify that any change in any of the values including the name of the material, # once saved, is immediately reflected in the component and functionality -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044455 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044456_Material_FrictionCombine.py b/AutomatedTesting/Gem/PythonTests/physics/C4044456_Material_FrictionCombine.py index b71c1e8ede..eced55fc76 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044456_Material_FrictionCombine.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044456_Material_FrictionCombine.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4044456 # Test Case Title : Verify that when two objects with different materials collide, the friction combine works -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044456 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044457_Material_RestitutionCombine.py b/AutomatedTesting/Gem/PythonTests/physics/C4044457_Material_RestitutionCombine.py index 1ed2e8086c..5969541a86 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044457_Material_RestitutionCombine.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044457_Material_RestitutionCombine.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4044457 # Test Case Title : Verify that when two objects with different materials collide, the restitution combine works -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044457 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044459_Material_DynamicFriction.py b/AutomatedTesting/Gem/PythonTests/physics/C4044459_Material_DynamicFriction.py index c420250dfa..d414bc4813 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044459_Material_DynamicFriction.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044459_Material_DynamicFriction.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4044459 # Test Case Title : Verify the functionality of dynamic friction -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044459 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044460_Material_StaticFriction.py b/AutomatedTesting/Gem/PythonTests/physics/C4044460_Material_StaticFriction.py index 4e330002ff..6e864c554b 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044460_Material_StaticFriction.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044460_Material_StaticFriction.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4044460 # Test Case Title : Verify the functionality of static friction -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044460 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044461_Material_Restitution.py b/AutomatedTesting/Gem/PythonTests/physics/C4044461_Material_Restitution.py index af8990d87f..a5219ed2c7 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044461_Material_Restitution.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044461_Material_Restitution.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4044461 # Test Case Title : Verify the functionality of restitution -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044461 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044694_Material_EmptyLibraryUsesDefault.py b/AutomatedTesting/Gem/PythonTests/physics/C4044694_Material_EmptyLibraryUsesDefault.py index a8375114d5..e9106d89eb 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044694_Material_EmptyLibraryUsesDefault.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044694_Material_EmptyLibraryUsesDefault.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C4044694 # Test Case Title : Verify that if we add an empty Material library in Collider Component, the object continues to use Default material values -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/4044694 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py b/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py index 858e778f07..d65e9050bd 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044695_PhysXCollider_AddMultipleSurfaceFbx.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C4044695 Test Case Title : Verify that when you add a multiple surface fbx in PxMesh in PhysxCollider, multiple number of Material Slots populate in the Materials Section -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044695 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4044697_Material_PerfaceMaterialValidation.py b/AutomatedTesting/Gem/PythonTests/physics/C4044697_Material_PerfaceMaterialValidation.py index dba759015f..435e8242d5 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4044697_Material_PerfaceMaterialValidation.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4044697_Material_PerfaceMaterialValidation.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4044697 # Test Case Title : Verify that each surface picks up the material assigned to it and behaves accordingly. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4044697 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4888315_Material_AddModifyDeleteOnCollider.py b/AutomatedTesting/Gem/PythonTests/physics/C4888315_Material_AddModifyDeleteOnCollider.py index 145a5e1b60..b7b3ed855f 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4888315_Material_AddModifyDeleteOnCollider.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4888315_Material_AddModifyDeleteOnCollider.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C4888315 # Test Case Title : Check that any change (Add/Delete/Modify) made to the material surface in the material library reflects immediately in the PhysX Collider component -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/4888315 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4925577_Materials_MaterialAssignedToTerrain.py b/AutomatedTesting/Gem/PythonTests/physics/C4925577_Materials_MaterialAssignedToTerrain.py index 59b6a3fdfc..7ebb62eaf3 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4925577_Materials_MaterialAssignedToTerrain.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4925577_Materials_MaterialAssignedToTerrain.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4925577 # Test Case Title : Verify that material can be assigned to PhysX terrain in Terrain Texture Layers -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4925577 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4925579_Material_AddModifyDeleteOnTerrain.py b/AutomatedTesting/Gem/PythonTests/physics/C4925579_Material_AddModifyDeleteOnTerrain.py index e0425c35be..315cf9c3bd 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4925579_Material_AddModifyDeleteOnTerrain.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4925579_Material_AddModifyDeleteOnTerrain.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C4925579 # Test Case Title : Check that any change (Add/Delete/Modify) made to the material surface in the material library reflects immediately in the PhysX Terrain layers -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/4925579 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4925580_Material_RagdollBonesMaterial.py b/AutomatedTesting/Gem/PythonTests/physics/C4925580_Material_RagdollBonesMaterial.py index 9944a033e3..5fae373f47 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4925580_Material_RagdollBonesMaterial.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4925580_Material_RagdollBonesMaterial.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C4925580 # Test Case Title : Verify that Material can be assigned to Ragdoll Bones and they behave as per their material -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/4925580 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4925582_Material_AddModifyDeleteOnRagdollBones.py b/AutomatedTesting/Gem/PythonTests/physics/C4925582_Material_AddModifyDeleteOnRagdollBones.py index ed872ae99e..ca37be6ff0 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4925582_Material_AddModifyDeleteOnRagdollBones.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4925582_Material_AddModifyDeleteOnRagdollBones.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C4925582 # Test Case Title : Check that any change (Add/Delete/Modify) made to the material surface in the material library reflects immediately in the ragdoll bones -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/4925582 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976194_RigidBody_PhysXComponentIsValid.py b/AutomatedTesting/Gem/PythonTests/physics/C4976194_RigidBody_PhysXComponentIsValid.py index aa059eb224..8bb005711e 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976194_RigidBody_PhysXComponentIsValid.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976194_RigidBody_PhysXComponentIsValid.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976194 # Test Case Title : Verify that you can add PhysX Rigid Bodies Physics component to an Entity without any warning or Error. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976194 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976195_RigidBodies_InitialLinearVelocity.py b/AutomatedTesting/Gem/PythonTests/physics/C4976195_RigidBodies_InitialLinearVelocity.py index c5740b2798..3dbf26a0ac 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976195_RigidBodies_InitialLinearVelocity.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976195_RigidBodies_InitialLinearVelocity.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976195 # Test Case Title : Verify that when you assign an Initial Linear Velocity to an object, # ... it moves with that linear velocity when we switch to game mode. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976195 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976197_RigidBodies_InitialAngularVelocity.py b/AutomatedTesting/Gem/PythonTests/physics/C4976197_RigidBodies_InitialAngularVelocity.py index 08e171269e..7a17eb5941 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976197_RigidBodies_InitialAngularVelocity.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976197_RigidBodies_InitialAngularVelocity.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976197 # Test Case Title : Verify that when you assign an Initial Angular Velocity to an object, # it moves with that Angular velocity when we switch to game mode -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976197 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976199_RigidBodies_LinearDampingObjectMotion.py b/AutomatedTesting/Gem/PythonTests/physics/C4976199_RigidBodies_LinearDampingObjectMotion.py index 2e19b633c4..457cb18640 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976199_RigidBodies_LinearDampingObjectMotion.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976199_RigidBodies_LinearDampingObjectMotion.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976199 # Test Case Title : Verify that with higher linear damping, the object in motion comes to rest faster -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976199 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976200_RigidBody_AngularDampingObjectRotation.py b/AutomatedTesting/Gem/PythonTests/physics/C4976200_RigidBody_AngularDampingObjectRotation.py index b90b34be53..f423821757 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976200_RigidBody_AngularDampingObjectRotation.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976200_RigidBody_AngularDampingObjectRotation.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976200 # Test Case Title : Verify that with higher angular damping, the object in rotation comes to rest faster -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976200 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976201_RigidBody_MassIsAssigned.py b/AutomatedTesting/Gem/PythonTests/physics/C4976201_RigidBody_MassIsAssigned.py index 7fb0ff84ce..fd15cbbb0f 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976201_RigidBody_MassIsAssigned.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976201_RigidBody_MassIsAssigned.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976201 # Test Case Title : Verify that the value assigned to the Mass of the object, gets actually assigned to the object -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976201 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976202_RigidBody_StopsWhenBelowKineticThreshold.py b/AutomatedTesting/Gem/PythonTests/physics/C4976202_RigidBody_StopsWhenBelowKineticThreshold.py index 7d4cf1066e..c66f5cf7b6 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976202_RigidBody_StopsWhenBelowKineticThreshold.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976202_RigidBody_StopsWhenBelowKineticThreshold.py @@ -14,7 +14,7 @@ Test case ID : C4976202 Test Case Title : Verify that if the object is moving with Kinetic energy less than the sleep threshold value, then physX will put it to stop after 0.4 secs (once the wake counter goes to zero) if the KE is still below the threshold -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976202 + """ # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976204_Verify_Start_Asleep_Condition.py b/AutomatedTesting/Gem/PythonTests/physics/C4976204_Verify_Start_Asleep_Condition.py index 29fc2ec2a3..6b29062adf 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976204_Verify_Start_Asleep_Condition.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976204_Verify_Start_Asleep_Condition.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976204 # Test Case Title : Verify that when Start Asleep is checked, the object in air does not fall down due to # gravity or does not start moving with initial linear velocity assigned to it when switched to game mode -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976204 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976206_RigidBodies_GravityEnabledActive.py b/AutomatedTesting/Gem/PythonTests/physics/C4976206_RigidBodies_GravityEnabledActive.py index b97c590a93..934e546d65 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976206_RigidBodies_GravityEnabledActive.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976206_RigidBodies_GravityEnabledActive.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976206 # Test Case Title : VErify that when Gravity enables is checked, the object falls down due to gravity [sic] -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976206 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976207_PhysXRigidBodies_KinematicBehavior.py b/AutomatedTesting/Gem/PythonTests/physics/C4976207_PhysXRigidBodies_KinematicBehavior.py index 4481c00fc5..58193a1e9b 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976207_PhysXRigidBodies_KinematicBehavior.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976207_PhysXRigidBodies_KinematicBehavior.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976207 # Test Case Title : Verify that when Kinematic is checked, the object behaves as a Kinematic object -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976207 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976209_RigidBody_ComputesCOM.py b/AutomatedTesting/Gem/PythonTests/physics/C4976209_RigidBody_ComputesCOM.py index 79ea6e5dc7..600b20d98d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976209_RigidBody_ComputesCOM.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976209_RigidBody_ComputesCOM.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976209 # Test Case Title : Verify that when Compute COM is enabled, the PhysX system computes the COM of the object on its own -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976209 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976210_COM_ManualSetting.py b/AutomatedTesting/Gem/PythonTests/physics/C4976210_COM_ManualSetting.py index 451081ba23..c53fb3508d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976210_COM_ManualSetting.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976210_COM_ManualSetting.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976210 # Test Case Title : Verify that when Compute COM is disabled, the user gets an option to add the co-ordinates of # the COM and the COM gets implemented at those co-ordinates. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976210 + import os diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976218_RigidBodies_InertiaObjectsNotComputed.py b/AutomatedTesting/Gem/PythonTests/physics/C4976218_RigidBodies_InertiaObjectsNotComputed.py index 63f0d382c3..dada67548b 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976218_RigidBodies_InertiaObjectsNotComputed.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976218_RigidBodies_InertiaObjectsNotComputed.py @@ -9,7 +9,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ # Test case ID : C4976218 # Test Case Title: Verify that when compute inertia is checked, the physX engine does compute the inertia of the objects -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976218 + # fmt: off class Tests(): diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976227_Collider_NewGroup.py b/AutomatedTesting/Gem/PythonTests/physics/C4976227_Collider_NewGroup.py index 8d9dc01396..78c031870d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976227_Collider_NewGroup.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976227_Collider_NewGroup.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976227 # Test Case Title : Validate that a Collision Group can be added -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976227 + # Level has entity with custom collision group added. # If level enters game mode, collision group addition is validated. diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976236_AddPhysxColliderComponent.py b/AutomatedTesting/Gem/PythonTests/physics/C4976236_AddPhysxColliderComponent.py index 72442601e4..fdb862005f 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976236_AddPhysxColliderComponent.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976236_AddPhysxColliderComponent.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C4976236 Test Case Title : Verify that you can add the physX collider component to an entity without it throwing an error or warning -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976236 + """ # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976242_Collision_SameCollisionlayerSameCollisiongroup.py b/AutomatedTesting/Gem/PythonTests/physics/C4976242_Collision_SameCollisionlayerSameCollisiongroup.py index bb6234b69e..ac14164f45 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976242_Collision_SameCollisionlayerSameCollisiongroup.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976242_Collision_SameCollisionlayerSameCollisiongroup.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976242 # Test Case Title : Assign same collision layer and same collision group to two entities and # verify that they collide or not -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976242 + # fmt: off class Tests(): diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976243_Collision_SameCollisionGroupDiffCollisionLayers.py b/AutomatedTesting/Gem/PythonTests/physics/C4976243_Collision_SameCollisionGroupDiffCollisionLayers.py index 949ebb2b2a..44a8b15169 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976243_Collision_SameCollisionGroupDiffCollisionLayers.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976243_Collision_SameCollisionGroupDiffCollisionLayers.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976243 # Test Case Title : Assign different collision layers and same collision group # (such that this group has both these collision layers enabled) to two entities and verify that they collide -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976243 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976244_Collider_SameGroupSameLayerCollision.py b/AutomatedTesting/Gem/PythonTests/physics/C4976244_Collider_SameGroupSameLayerCollision.py index c35b9fab81..ca1e7f57f5 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976244_Collider_SameGroupSameLayerCollision.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976244_Collider_SameGroupSameLayerCollision.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976244 # Test Case Title : Checks that two entities of similar custom layer collide -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976244 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4976245_PhysXCollider_CollisionLayerTest.py b/AutomatedTesting/Gem/PythonTests/physics/C4976245_PhysXCollider_CollisionLayerTest.py index dafb8d9014..5f8c0a8d67 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4976245_PhysXCollider_CollisionLayerTest.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4976245_PhysXCollider_CollisionLayerTest.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4976245 # Test Case Title : Check that two entities of collision group "None" do not collide, # even though they have the same collision layer -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4976245 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982593_PhysXCollider_CollisionLayerTest.py b/AutomatedTesting/Gem/PythonTests/physics/C4982593_PhysXCollider_CollisionLayerTest.py index 8d985de402..126ebf48dc 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982593_PhysXCollider_CollisionLayerTest.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982593_PhysXCollider_CollisionLayerTest.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4982593 # Test Case Title : Check that two entities with different collision groups and layers do not collide. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4982593 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982595_Collider_TriggerDisablesCollision.py b/AutomatedTesting/Gem/PythonTests/physics/C4982595_Collider_TriggerDisablesCollision.py index 8746996ca8..c50c517086 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982595_Collider_TriggerDisablesCollision.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982595_Collider_TriggerDisablesCollision.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case ID : C4982595 # Test Case Title : Verify that when the Trigger Checkbox is ticked, the object no longer collides with another object # but simply passes through it -# Test Case URL : https://testrail.agscollab.com/index.php?/cases/view/4982595 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982797_Collider_ColliderOffset.py b/AutomatedTesting/Gem/PythonTests/physics/C4982797_Collider_ColliderOffset.py index 2bd4fc5adc..29a3b7f89d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982797_Collider_ColliderOffset.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982797_Collider_ColliderOffset.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4982797 # Test Case Title : Check that collision offsets trigger collision events, # not entity transform locations -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4982797 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982798_Collider_ColliderRotationOffset.py b/AutomatedTesting/Gem/PythonTests/physics/C4982798_Collider_ColliderRotationOffset.py index f86890d8bf..6276c81871 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982798_Collider_ColliderRotationOffset.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982798_Collider_ColliderRotationOffset.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C4982798 # Test Case Title : Verify that when the x,y,z values are defined in the offset, the collider frame # rotates from its original orientation in the direction defined by the x,y,z units -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4982798 + import os diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982800_PhysXColliderShape_CanBeSelected.py b/AutomatedTesting/Gem/PythonTests/physics/C4982800_PhysXColliderShape_CanBeSelected.py index c37ad2b2d2..1822a1efa7 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982800_PhysXColliderShape_CanBeSelected.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982800_PhysXColliderShape_CanBeSelected.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C4982800 Test Case Title : Verify that the shape Sphere can be selected from the drop downlist and the value for its radius can be set -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4982800 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982801_PhysXColliderShape_CanBeSelected.py b/AutomatedTesting/Gem/PythonTests/physics/C4982801_PhysXColliderShape_CanBeSelected.py index 19a835da18..ef9b8171c4 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982801_PhysXColliderShape_CanBeSelected.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982801_PhysXColliderShape_CanBeSelected.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C4982801 Test Case Title : Verify that the shape Box can be selected from drop downlist and the value for its dimensions in x,y,z can be set after that -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4982801 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982802_PhysXColliderShape_CanBeSelected.py b/AutomatedTesting/Gem/PythonTests/physics/C4982802_PhysXColliderShape_CanBeSelected.py index e1365d0887..642dea48de 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982802_PhysXColliderShape_CanBeSelected.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982802_PhysXColliderShape_CanBeSelected.py @@ -10,7 +10,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C4982802 Test Case Title : Verify that the shape capsule can be selected from drop downlist and the value for its height and radius can be set after that -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4982802 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C4982803_Enable_PxMesh_Option.py b/AutomatedTesting/Gem/PythonTests/physics/C4982803_Enable_PxMesh_Option.py index 4ae177934a..99e93c26c9 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C4982803_Enable_PxMesh_Option.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C4982803_Enable_PxMesh_Option.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Test case ID : C4982803 Test Case Title : Verify that when the shape Physics Asset is selected, PxMesh option gets enabled and a Px Mesh can be selected and assigned to the object -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/4982803 + """ # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5296614_PhysXMaterial_ColliderShape.py b/AutomatedTesting/Gem/PythonTests/physics/C5296614_PhysXMaterial_ColliderShape.py index 9d2a49ac70..b4af6ab506 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5296614_PhysXMaterial_ColliderShape.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5296614_PhysXMaterial_ColliderShape.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5296614 # Test Case Title : Check that unless you assign a shape to a physX collider component, # the material assigned to it does not take affect -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5296614 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5340400_RigidBody_ManualMomentOfInertia.py b/AutomatedTesting/Gem/PythonTests/physics/C5340400_RigidBody_ManualMomentOfInertia.py index 7617e41cad..838007436c 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5340400_RigidBody_ManualMomentOfInertia.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5340400_RigidBody_ManualMomentOfInertia.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5340400 # Test Case Title : Verify that when Compute inertia is disabled, the user gets to set the moment of inertia # and physX engine work accordingly -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5340400 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5689518_PhysXTerrain_CollidesWithPhysXTerrain.py b/AutomatedTesting/Gem/PythonTests/physics/C5689518_PhysXTerrain_CollidesWithPhysXTerrain.py index 0686adf15d..f17bf2492f 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5689518_PhysXTerrain_CollidesWithPhysXTerrain.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5689518_PhysXTerrain_CollidesWithPhysXTerrain.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5689518 # Test Case Title : PhysX entities collide with PhysX Terrain -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5689518 + # A ball is suspended slightly over PhysX Terrain to check that it collides when dropped diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5689522_Physxterrain_AddPhysxterrainNoEditorCrash.py b/AutomatedTesting/Gem/PythonTests/physics/C5689522_Physxterrain_AddPhysxterrainNoEditorCrash.py index ffafeaab34..61ef63c4ae 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5689522_Physxterrain_AddPhysxterrainNoEditorCrash.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5689522_Physxterrain_AddPhysxterrainNoEditorCrash.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5689522 # Test Case Title : Create an entity with PhysX terrain. Add another PhysX terrain and verify that # you are able to add it without any crash or error. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5689522 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5689524_MultipleTerrains_CheckWarningInConsole.py b/AutomatedTesting/Gem/PythonTests/physics/C5689524_MultipleTerrains_CheckWarningInConsole.py index 2b1a73f1f3..c395507ea0 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5689524_MultipleTerrains_CheckWarningInConsole.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5689524_MultipleTerrains_CheckWarningInConsole.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5689524 # Test Case Title : Create multiple entities each with one or more terrain components and verify that you are # able to successfully add the PhysX Terrain components to them. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5689524 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5689528_Terrain_MultipleTerrainComponents.py b/AutomatedTesting/Gem/PythonTests/physics/C5689528_Terrain_MultipleTerrainComponents.py index 265836489d..12f3955bf6 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5689528_Terrain_MultipleTerrainComponents.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5689528_Terrain_MultipleTerrainComponents.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5689528 # Test Case Title : Create multiple entities each with one PhysX terrain component and verify that a warning # is thrown to the user -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5689528 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5689529_Verify_Terrain_RigidBody_Collider_Mesh.py b/AutomatedTesting/Gem/PythonTests/physics/C5689529_Verify_Terrain_RigidBody_Collider_Mesh.py index 138ae68408..c5342d7421 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5689529_Verify_Terrain_RigidBody_Collider_Mesh.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5689529_Verify_Terrain_RigidBody_Collider_Mesh.py @@ -14,7 +14,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test Case Title : Create an entity with PhysX Terrain component and add # PhysX Rigid Body PhysX, PhysX Collider and Rendering Mesh to it and # verify that it works in game mode -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5689529 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5689531_Warning_TerrainSliceTerrainComponent.py b/AutomatedTesting/Gem/PythonTests/physics/C5689531_Warning_TerrainSliceTerrainComponent.py index 7d60a61ec1..85a9037a36 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5689531_Warning_TerrainSliceTerrainComponent.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5689531_Warning_TerrainSliceTerrainComponent.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5689531 # Test Case Title : Check that when you add a spawner component to a level to spawn a # terrain and also add a terrain component explicitly, no crash happens -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5689531 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5932040_ForceRegion_CubeExertsWorldForce.py b/AutomatedTesting/Gem/PythonTests/physics/C5932040_ForceRegion_CubeExertsWorldForce.py index f01dd4582f..b1f9f8f934 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5932040_ForceRegion_CubeExertsWorldForce.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5932040_ForceRegion_CubeExertsWorldForce.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5932040 # Test Case Title : Check that force region exerts world space force on rigid bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5932040 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5932041_PhysXForceRegion_LocalSpaceForceOnRigidBodies.py b/AutomatedTesting/Gem/PythonTests/physics/C5932041_PhysXForceRegion_LocalSpaceForceOnRigidBodies.py index 095a669541..5fc07fdc67 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5932041_PhysXForceRegion_LocalSpaceForceOnRigidBodies.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5932041_PhysXForceRegion_LocalSpaceForceOnRigidBodies.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5932041 # Test Case Title : Check that force region exerts local space force on rigid bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5932041 + # Sphere drops and is acted upon in an upward and positive x-ward direction by a force # with a magnitude close to the assigned force region magnitude when it reaches the force region. diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5932042_PhysXForceRegion_LinearDamping.py b/AutomatedTesting/Gem/PythonTests/physics/C5932042_PhysXForceRegion_LinearDamping.py index 21d386954d..b55ce59d7a 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5932042_PhysXForceRegion_LinearDamping.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5932042_PhysXForceRegion_LinearDamping.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5932042 # Test Case Title : Check that force region exerts linear damping force on rigid bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5932042 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py b/AutomatedTesting/Gem/PythonTests/physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py index 512698ce4b..b4d29f8065 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5932043_ForceRegion_SimpleDragOnRigidBodies.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5932043 # Test Case Title : Check that force region exerts simple drag force on rigid bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5932043 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5932044_ForceRegion_PointForceOnRigidBody.py b/AutomatedTesting/Gem/PythonTests/physics/C5932044_ForceRegion_PointForceOnRigidBody.py index b7257b488b..6cfaf857a4 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5932044_ForceRegion_PointForceOnRigidBody.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5932044_ForceRegion_PointForceOnRigidBody.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5932044 # Test Case Title : Check that force region exerts point force on rigid bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5932044 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5932045_ForceRegion_Spline.py b/AutomatedTesting/Gem/PythonTests/physics/C5932045_ForceRegion_Spline.py index eca0679921..298265966c 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5932045_ForceRegion_Spline.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5932045_ForceRegion_Spline.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5932045 # Test Case Title : Check that force region exerts spline follow force on rigid bodies -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5932045 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959759_RigidBody_ForceRegionSpherePointForce.py b/AutomatedTesting/Gem/PythonTests/physics/C5959759_RigidBody_ForceRegionSpherePointForce.py index 6aff0a7145..a8ef614f75 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959759_RigidBody_ForceRegionSpherePointForce.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959759_RigidBody_ForceRegionSpherePointForce.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959759 # Test Case Title : Check that force region (sphere) exerts point force -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959759 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959760_PhysXForceRegion_PointForceExertion.py b/AutomatedTesting/Gem/PythonTests/physics/C5959760_PhysXForceRegion_PointForceExertion.py index 89eb1842be..4cb1cffd16 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959760_PhysXForceRegion_PointForceExertion.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959760_PhysXForceRegion_PointForceExertion.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959760 # Test Case Title : Check that force region (capsule) exerts point force -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959760 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959761_ForceRegion_PhysAssetExertsPointForce.py b/AutomatedTesting/Gem/PythonTests/physics/C5959761_ForceRegion_PhysAssetExertsPointForce.py index ba0475266b..27f9e41a7d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959761_ForceRegion_PhysAssetExertsPointForce.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959761_ForceRegion_PhysAssetExertsPointForce.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959761 # Test Case Title : Check that force region (physics asset) exerts point force -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959761 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959763_ForceRegion_ForceRegionImpulsesCube.py b/AutomatedTesting/Gem/PythonTests/physics/C5959763_ForceRegion_ForceRegionImpulsesCube.py index 76130d25eb..4b62f9a029 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959763_ForceRegion_ForceRegionImpulsesCube.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959763_ForceRegion_ForceRegionImpulsesCube.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959764 # Test Case Title : Check that rigid body (Cube) gets impulse from force region -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959764 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959764_ForceRegion_ForceRegionImpulsesCapsule.py b/AutomatedTesting/Gem/PythonTests/physics/C5959764_ForceRegion_ForceRegionImpulsesCapsule.py index f314dae5b7..aadc07b09b 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959764_ForceRegion_ForceRegionImpulsesCapsule.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959764_ForceRegion_ForceRegionImpulsesCapsule.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959764 # Test Case Title : Check that rigid body (Capsule) gets impulse from force region -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959764 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959765_ForceRegion_AssetGetsImpulsed.py b/AutomatedTesting/Gem/PythonTests/physics/C5959765_ForceRegion_AssetGetsImpulsed.py index ddcba5996b..ed007594c2 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959765_ForceRegion_AssetGetsImpulsed.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959765_ForceRegion_AssetGetsImpulsed.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959765 # Test Case Title : Check that rigid body (asset) gets impulse from force region -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959765 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959808_ForceRegion_PositionOffset.py b/AutomatedTesting/Gem/PythonTests/physics/C5959808_ForceRegion_PositionOffset.py index 175f73a420..7c3f8a43aa 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959808_ForceRegion_PositionOffset.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959808_ForceRegion_PositionOffset.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959808 # Test Case Title : Verify Force Region Position Offset -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959808 + # fmt:off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959809_ForceRegion_RotationalOffset.py b/AutomatedTesting/Gem/PythonTests/physics/C5959809_ForceRegion_RotationalOffset.py index 1ad53194d3..dc84be8798 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959809_ForceRegion_RotationalOffset.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959809_ForceRegion_RotationalOffset.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959809 # Test Case Title : Verify Force Region Rotational Offset -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959809 + # fmt:off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5959810_ForceRegion_ForceRegionCombinesForces.py b/AutomatedTesting/Gem/PythonTests/physics/C5959810_ForceRegion_ForceRegionCombinesForces.py index 212f7cc86b..8efc3dc635 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5959810_ForceRegion_ForceRegionCombinesForces.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5959810_ForceRegion_ForceRegionCombinesForces.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5959810 # Test Case Title : Check that multiple forces in single force region create correct net force -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5959810 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5968759_ForceRegion_ExertsSeveralForcesOnRigidBody.py b/AutomatedTesting/Gem/PythonTests/physics/C5968759_ForceRegion_ExertsSeveralForcesOnRigidBody.py index 4aa0fef642..948e172962 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5968759_ForceRegion_ExertsSeveralForcesOnRigidBody.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5968759_ForceRegion_ExertsSeveralForcesOnRigidBody.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5968759 # Test Case Title : Check nested force regions exert forces simultaneously on rigid body -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5968759 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C5968760_ForceRegion_CheckNetForceChange.py b/AutomatedTesting/Gem/PythonTests/physics/C5968760_ForceRegion_CheckNetForceChange.py index ba491c96a7..0897fcb0d7 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C5968760_ForceRegion_CheckNetForceChange.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C5968760_ForceRegion_CheckNetForceChange.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C5968760 # Test Case Title : Check moving force region changes net force -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/5968760 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6032082_Terrain_MultipleResolutionsValid.py b/AutomatedTesting/Gem/PythonTests/physics/C6032082_Terrain_MultipleResolutionsValid.py index 4543b0b8f6..00d53a2d6c 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6032082_Terrain_MultipleResolutionsValid.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6032082_Terrain_MultipleResolutionsValid.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6032082 # Test Case Title : Verify multiple terrain resolutions are supported -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6032082 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090546_ForceRegion_SliceFileInstantiates.py b/AutomatedTesting/Gem/PythonTests/physics/C6090546_ForceRegion_SliceFileInstantiates.py index 557b7e7ec5..2b427468b7 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090546_ForceRegion_SliceFileInstantiates.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090546_ForceRegion_SliceFileInstantiates.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6090546 # Test Case Title : Check that a force region slice can be saved and instantiated -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090546 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090547_ForceRegion_ParentChildForceRegions.py b/AutomatedTesting/Gem/PythonTests/physics/C6090547_ForceRegion_ParentChildForceRegions.py index a07fd1861b..84474f0226 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090547_ForceRegion_ParentChildForceRegions.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090547_ForceRegion_ParentChildForceRegions.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6090547 # Test Case Title : Check that force regions in parent and child entities work together. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090547 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090550_ForceRegion_WorldSpaceForceNegative.py b/AutomatedTesting/Gem/PythonTests/physics/C6090550_ForceRegion_WorldSpaceForceNegative.py index f8da62ebac..e2c55a024d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090550_ForceRegion_WorldSpaceForceNegative.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090550_ForceRegion_WorldSpaceForceNegative.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ Test case ID : C6090550 Test Case Title : Check that force region exerts world space force on rigid bodies (negative test) -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090550 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090551_ForceRegion_LocalSpaceForceNegative.py b/AutomatedTesting/Gem/PythonTests/physics/C6090551_ForceRegion_LocalSpaceForceNegative.py index 0788b1da66..2e201e20bd 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090551_ForceRegion_LocalSpaceForceNegative.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090551_ForceRegion_LocalSpaceForceNegative.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ Test case ID : C6090551 Test Case Title : Check that force region exerts local space force on rigid bodies (negative test) -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090551 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090552_ForceRegion_LinearDampingNegative.py b/AutomatedTesting/Gem/PythonTests/physics/C6090552_ForceRegion_LinearDampingNegative.py index a878819045..585a337389 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090552_ForceRegion_LinearDampingNegative.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090552_ForceRegion_LinearDampingNegative.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ Test case ID : C6090552 Test Case Title : Check that force region exerts linear damping force on rigid bodies (negative test) -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090552 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090553_ForceRegion_SimpleDragForceOnRigidBodies.py b/AutomatedTesting/Gem/PythonTests/physics/C6090553_ForceRegion_SimpleDragForceOnRigidBodies.py index 43c4335918..6abee0ad64 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090553_ForceRegion_SimpleDragForceOnRigidBodies.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090553_ForceRegion_SimpleDragForceOnRigidBodies.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6090553 # Test Case Title : Check that force region exerts simple drag force on rigid bodies (negative test) -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090553 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090554_ForceRegion_PointForceNegative.py b/AutomatedTesting/Gem/PythonTests/physics/C6090554_ForceRegion_PointForceNegative.py index d7781b6040..0969cebd8d 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090554_ForceRegion_PointForceNegative.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090554_ForceRegion_PointForceNegative.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. """ Test case ID : C6090554 Test Case Title : Check that force region exerts point force on rigid bodies (negative test) -URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090554 + """ diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6090555_ForceRegion_SplineFollowOnRigidBodies.py b/AutomatedTesting/Gem/PythonTests/physics/C6090555_ForceRegion_SplineFollowOnRigidBodies.py index b1b76d896d..90f67391ad 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6090555_ForceRegion_SplineFollowOnRigidBodies.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6090555_ForceRegion_SplineFollowOnRigidBodies.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6090555 # Test Case Title : Check that force region exerts spline follow force on rigid bodies(negative test) -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6090555 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6131473_StaticSlice_OnDynamicSliceSpawn.py b/AutomatedTesting/Gem/PythonTests/physics/C6131473_StaticSlice_OnDynamicSliceSpawn.py index 11281df4eb..ee68ef6049 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6131473_StaticSlice_OnDynamicSliceSpawn.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6131473_StaticSlice_OnDynamicSliceSpawn.py @@ -13,7 +13,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6131473 # Test Case Title : Verify a static slice is not spawned automatically everytime a dynamic slice with # PhysX Components is spawned -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6131473 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6224408_ScriptCanvas_EntitySpawn.py b/AutomatedTesting/Gem/PythonTests/physics/C6224408_ScriptCanvas_EntitySpawn.py index 6501e11e68..6693c17dff 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6224408_ScriptCanvas_EntitySpawn.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6224408_ScriptCanvas_EntitySpawn.py @@ -11,7 +11,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6224408 # Test Case Title : Entity using PhysX nodes in Script Canvas can be spawned. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6224408 + # fmt: off class Tests: diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6274125_ScriptCanvas_TriggerEvents.py b/AutomatedTesting/Gem/PythonTests/physics/C6274125_ScriptCanvas_TriggerEvents.py index 44c8be9e1e..c360473b7f 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6274125_ScriptCanvas_TriggerEvents.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6274125_ScriptCanvas_TriggerEvents.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6274125 # Test Case Title : Verify ScriptCanvas Trigger Events. -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6274125 + # fmt: off diff --git a/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py b/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py index c1a51f2887..4b0b036970 100755 --- a/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py +++ b/AutomatedTesting/Gem/PythonTests/physics/C6321601_Force_HighValuesDirectionAxes.py @@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # Test case ID : C6321601 # Test Case Title : Check that very high values of direction axes of forces do not throw error -# URL of the test case : https://testrail.agscollab.com/index.php?/cases/view/6321601 + # fmt: off From 5783bf635bb25001430b5fbebd11a2e053b4da55 Mon Sep 17 00:00:00 2001 From: bosnichd Date: Wed, 5 May 2021 13:35:50 -0600 Subject: [PATCH 6/9] Fix for LoadLevel not being called. (#584) --- Code/Sandbox/Editor/CryEdit.cpp | 2 +- Code/Sandbox/Editor/CryEditDoc.cpp | 5 +++++ Code/Sandbox/Editor/GameEngine.cpp | 9 +-------- Code/Sandbox/Editor/GameEngine.h | 6 ------ 4 files changed, 7 insertions(+), 15 deletions(-) diff --git a/Code/Sandbox/Editor/CryEdit.cpp b/Code/Sandbox/Editor/CryEdit.cpp index 9ad57d6581..b88aee8bd9 100644 --- a/Code/Sandbox/Editor/CryEdit.cpp +++ b/Code/Sandbox/Editor/CryEdit.cpp @@ -3200,7 +3200,7 @@ CCryEditApp::ECreateLevelResult CCryEditApp::CreateLevel(const QString& levelNam m_bIsExportingLegacyData = false; } - GetIEditor()->GetGameEngine()->LoadLevel(GetIEditor()->GetGameEngine()->GetMissionName(), true, true); + GetIEditor()->GetGameEngine()->LoadLevel(true, true); GetIEditor()->GetSystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_PRECACHE_START, 0, 0); GetIEditor()->GetSystem()->GetISystemEventDispatcher()->OnSystemEvent(ESYSTEM_EVENT_LEVEL_PRECACHE_END, 0, 0); diff --git a/Code/Sandbox/Editor/CryEditDoc.cpp b/Code/Sandbox/Editor/CryEditDoc.cpp index 557341f28c..ffcbd00a5f 100644 --- a/Code/Sandbox/Editor/CryEditDoc.cpp +++ b/Code/Sandbox/Editor/CryEditDoc.cpp @@ -459,6 +459,11 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename) Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequestBlocking, oAudioRequestData); } + { + CAutoLogTime logtime("Game Engine level load"); + GetIEditor()->GetGameEngine()->LoadLevel(true, true); + } + if (!isPrefabEnabled) { ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Sandbox/Editor/GameEngine.cpp b/Code/Sandbox/Editor/GameEngine.cpp index 6c1bef7a68..073684eaad 100644 --- a/Code/Sandbox/Editor/GameEngine.cpp +++ b/Code/Sandbox/Editor/GameEngine.cpp @@ -539,19 +539,12 @@ void CGameEngine::SetLevelPath(const QString& path) } } -void CGameEngine::SetMissionName(const QString& mission) -{ - m_missionName = mission; -} - bool CGameEngine::LoadLevel( - const QString& mission, [[maybe_unused]] bool bDeleteAIGraph, bool bReleaseResources) { LOADING_TIME_PROFILE_SECTION(GetIEditor()->GetSystem()); m_bLevelLoaded = false; - m_missionName = mission; CLogFile::FormatLine("Loading map '%s' into engine...", m_levelPath.toUtf8().data()); // Switch the current directory back to the Primary CD folder first. // The engine might have trouble to find some files when the current @@ -600,7 +593,7 @@ bool CGameEngine::LoadLevel( bool CGameEngine::ReloadLevel() { - if (!LoadLevel(GetMissionName(), false, false)) + if (!LoadLevel(false, false)) { return false; } diff --git a/Code/Sandbox/Editor/GameEngine.h b/Code/Sandbox/Editor/GameEngine.h index c660f971f2..b59e2c9ac8 100644 --- a/Code/Sandbox/Editor/GameEngine.h +++ b/Code/Sandbox/Editor/GameEngine.h @@ -89,7 +89,6 @@ public: //! Load new terrain level into 3d engine. //! Also load AI triangulation for this level. bool LoadLevel( - const QString& mission, bool bDeleteAIGraph, bool bReleaseResources); //!* Reload level if it was already loaded. @@ -107,14 +106,10 @@ public: bool IsLevelLoaded() const { return m_bLevelLoaded; }; //! Assign new level path name. void SetLevelPath(const QString& path); - //! Assign new current mission name. - void SetMissionName(const QString& mission); //! Return name of currently loaded level. const QString& GetLevelName() const { return m_levelName; }; //! Return extension of currently loaded level. const QString& GetLevelExtension() const { return m_levelExtension; }; - //! Return name of currently active mission. - const QString& GetMissionName() const { return m_missionName; }; //! Get fully specified level path. const QString& GetLevelPath() const { return m_levelPath; }; //! Query if engine is in game mode. @@ -172,7 +167,6 @@ private: CLogFile m_logFile; QString m_levelName; QString m_levelExtension; - QString m_missionName; QString m_levelPath; QString m_MOD; bool m_bLevelLoaded; From 1455fcbde617213e86174e4095dd3191e1796010 Mon Sep 17 00:00:00 2001 From: Zaladane <47538439+Zaladane@users.noreply.github.com> Date: Wed, 5 May 2021 13:59:37 -0700 Subject: [PATCH 7/9] Asset Bundler - Minor Feedback (#550) Asset Bundler - Minor Feedback * updated the formatting so all lines are shorter than 140 characters * fixed a few nitpicks that came up on a recent PR * removed a function that wasn't being used anymore * updated some error messages based on PR feedback --- .../AssetBundlerAbstractFileTableModel.cpp | 19 +++- .../AssetBundlerAbstractFileTableModel.h | 21 ++++- .../source/models/AssetListFileTableModel.cpp | 8 +- .../source/models/AssetListFileTableModel.h | 5 +- .../source/models/AssetListTableModel.h | 5 +- .../source/models/BundleFileListModel.cpp | 10 ++- .../source/models/BundleFileListModel.h | 5 +- .../source/models/RulesFileTableModel.cpp | 19 ++-- .../source/models/RulesFileTableModel.h | 5 +- .../source/models/SeedListFileTableModel.cpp | 50 ++++++++--- .../source/models/SeedListFileTableModel.h | 21 ++++- .../source/models/SeedListTableModel.cpp | 17 +++- .../source/models/SeedListTableModel.h | 6 +- .../AssetBundler/source/ui/AddSeedDialog.cpp | 10 ++- .../AssetBundler/source/ui/AddSeedDialog.h | 5 +- .../source/ui/AssetBundlerTabWidget.cpp | 25 ++++-- .../source/ui/AssetBundlerTabWidget.h | 4 +- .../source/ui/AssetListTabWidget.cpp | 38 +++++--- .../source/ui/AssetListTabWidget.h | 4 +- .../source/ui/BundleListTabWidget.cpp | 16 +++- .../source/ui/BundleListTabWidget.h | 4 +- .../source/ui/ComparisonDataWidget.cpp | 29 ++++-- .../AssetBundler/source/ui/EditSeedDialog.cpp | 9 +- .../AssetBundler/source/ui/EditSeedDialog.h | 4 +- .../source/ui/GenerateBundlesModal.cpp | 45 +++++++--- .../AssetBundler/source/ui/MainWindow.cpp | 5 +- .../AssetBundler/source/ui/NewFileDialog.cpp | 31 +++++-- .../AssetBundler/source/ui/NewFileDialog.h | 11 ++- .../source/ui/PlatformSelectionWidget.cpp | 4 +- .../source/ui/PlatformSelectionWidget.h | 4 +- .../AssetBundler/source/ui/RulesTabWidget.cpp | 49 +++++++--- .../AssetBundler/source/ui/RulesTabWidget.h | 8 +- .../AssetBundler/source/ui/SeedTabWidget.cpp | 90 ++++++++++++++----- .../AssetBundler/source/ui/SeedTabWidget.h | 6 +- .../source/utils/GUIApplicationManager.cpp | 27 ++++-- .../Tools/AssetBundler/source/utils/utils.cpp | 72 +++++++-------- Code/Tools/AssetBundler/source/utils/utils.h | 45 ++++++---- 37 files changed, 529 insertions(+), 207 deletions(-) diff --git a/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.cpp b/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.cpp index c2aac4e943..73bc075deb 100644 --- a/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.cpp +++ b/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.cpp @@ -20,13 +20,18 @@ namespace AssetBundler { const char* DateTimeFormat = "hh:mm:ss MMM dd, yyyy"; + const char* ReadOnlyFileErrorMessage = "File (%s) is Read-Only. Please check your version control and try again."; AssetBundlerAbstractFileTableModel::AssetBundlerAbstractFileTableModel(QObject* parent) : QAbstractTableModel(parent) { } - void AssetBundlerAbstractFileTableModel::Reload(const char* fileExtension, const QSet& watchedFolders, const QSet& watchedFiles, const AZStd::unordered_map& pathToProjectNameMap) + void AssetBundlerAbstractFileTableModel::Reload( + const char* fileExtension, + const QSet& watchedFolders, + const QSet& watchedFiles, + const AZStd::unordered_map& pathToProjectNameMap) { AZStd::vector keysToRemove = m_fileListKeys; @@ -49,7 +54,9 @@ namespace AssetBundler // If a project name is already specified, then the associated file is a default file LoadFile(absolutePath, projectName, !projectName.empty()); - keysToRemove.erase(AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)), keysToRemove.end()); + keysToRemove.erase( + AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)), + keysToRemove.end()); } } @@ -63,7 +70,9 @@ namespace AssetBundler // If a project name is already specified, then the associated file is a default file LoadFile(absolutePath, projectName, !projectName.empty()); - keysToRemove.erase(AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)), keysToRemove.end()); + keysToRemove.erase( + AZStd::remove(keysToRemove.begin(), keysToRemove.end(), AssetBundler::GenerateKeyFromAbsolutePath(absolutePath)), + keysToRemove.end()); } } @@ -74,7 +83,9 @@ namespace AssetBundler } } - void AssetBundlerAbstractFileTableModel::ReloadFiles(const AZStd::vector& absoluteFilePathList, AZStd::unordered_map pathToProjectNameMap) + void AssetBundlerAbstractFileTableModel::ReloadFiles( + const AZStd::vector& absoluteFilePathList, + AZStd::unordered_map pathToProjectNameMap) { for (const AZStd::string& absoluteFilePath : absoluteFilePathList) { diff --git a/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.h b/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.h index cfe3e3f241..6c7ae81254 100644 --- a/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.h +++ b/Code/Tools/AssetBundler/source/models/AssetBundlerAbstractFileTableModel.h @@ -30,6 +30,7 @@ namespace AssetBundler { extern const char* DateTimeFormat; + extern const char* ReadOnlyFileErrorMessage; //! Provides an abstract model that can be subclassed to create table models used to store information about files found on-disk. class AssetBundlerAbstractFileTableModel @@ -47,9 +48,15 @@ namespace AssetBundler ////////////////////////////////////////////////////////////////////////// // Pure virtual functions - virtual AZStd::vector CreateNewFiles(const AZStd::string& absoluteFilePath, const AzFramework::PlatformFlags& platforms, const QString& project = QString()) = 0; + virtual AZStd::vector CreateNewFiles( + const AZStd::string& absoluteFilePath, + const AzFramework::PlatformFlags& platforms, + const QString& project = QString()) = 0; virtual bool DeleteFile(const QModelIndex& index) = 0; - virtual void LoadFile(const AZStd::string& absoluteFilePath, const AZStd::string& projectName = "", bool isDefaultFile = false) = 0; + virtual void LoadFile( + const AZStd::string& absoluteFilePath, + const AZStd::string& projectName = "", + bool isDefaultFile = false) = 0; virtual bool WriteToDisk(const AZStd::string& key) = 0; //! Returns the absolute path of the file at the given index on success, returns an empty string on failure. @@ -60,9 +67,15 @@ namespace AssetBundler ////////////////////////////////////////////////////////////////////////// //! Reload all the data based on the watched folders and files - virtual void Reload(const char* fileExtension, const QSet& watchedFolders, const QSet& watchedFiles = QSet(), const AZStd::unordered_map& pathToProjectNameMap = AZStd::unordered_map()); + virtual void Reload( + const char* fileExtension, + const QSet& watchedFolders, + const QSet& watchedFiles = QSet(), + const AZStd::unordered_map& pathToProjectNameMap = AZStd::unordered_map()); - virtual void ReloadFiles(const AZStd::vector& absoluteFilePathList, AZStd::unordered_map pathToProjectNameMap = AZStd::unordered_map()); + virtual void ReloadFiles( + const AZStd::vector& absoluteFilePathList, + AZStd::unordered_map pathToProjectNameMap = AZStd::unordered_map()); bool Save(const QModelIndex& selectedIndex); diff --git a/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.cpp b/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.cpp index e4bb7b6ca2..a2502c73a5 100644 --- a/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.cpp +++ b/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.cpp @@ -87,12 +87,15 @@ namespace AssetBundler { if (AZ::IO::FileIOBase::GetInstance()->IsReadOnly(absolutePath)) { + AZ_Error(AssetBundler::AppWindowName, false, ReadOnlyFileErrorMessage, absolutePath); return false; } auto deleteResult = AZ::IO::FileIOBase::GetInstance()->Remove(absolutePath); if (!deleteResult) { + AZ_Error(AssetBundler::AppWindowName, false, + "Unable to delete (%s). Result code: %u", absolutePath, deleteResult.GetResultCode()); return false; } } @@ -104,7 +107,10 @@ namespace AssetBundler return true; } - void AssetListFileTableModel::LoadFile(const AZStd::string& absoluteFilePath, const AZStd::string& /*projectName*/, bool /*isDefaultFile*/) + void AssetListFileTableModel::LoadFile( + const AZStd::string& absoluteFilePath, + const AZStd::string& /*projectName*/, + bool /*isDefaultFile*/) { AZStd::string fullFileName; AzFramework::StringFunc::Path::GetFullFileName(absoluteFilePath.c_str(), fullFileName); diff --git a/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.h b/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.h index 61f1455130..699122a1ea 100644 --- a/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.h +++ b/Code/Tools/AssetBundler/source/models/AssetListFileTableModel.h @@ -56,7 +56,10 @@ namespace AssetBundler ////////////////////////////////////////////////////////////////////////// // AssetBundlerAbstractFileTableModel overrides - AZStd::vector CreateNewFiles(const AZStd::string& /*absoluteFilePath*/, const AzFramework::PlatformFlags& /*platforms*/, const QString& /*project*/) override { return {}; } + AZStd::vector CreateNewFiles( + const AZStd::string& /*absoluteFilePath*/, + const AzFramework::PlatformFlags& /*platforms*/, + const QString& /*project*/) override { return {}; } bool DeleteFile(const QModelIndex& index) override; void LoadFile(const AZStd::string& absoluteFilePath, const AZStd::string& projectName = "", bool isDefaultFile = false) override; bool WriteToDisk(const AZStd::string& key) override; diff --git a/Code/Tools/AssetBundler/source/models/AssetListTableModel.h b/Code/Tools/AssetBundler/source/models/AssetListTableModel.h index 94500f520f..f05fa0572b 100644 --- a/Code/Tools/AssetBundler/source/models/AssetListTableModel.h +++ b/Code/Tools/AssetBundler/source/models/AssetListTableModel.h @@ -23,7 +23,10 @@ namespace AssetBundler : public QAbstractTableModel { public: - explicit AssetListTableModel(QObject* parent = nullptr, const AZStd::string& absolutePath = AZStd::string(), const AZStd::string& platform = ""); + explicit AssetListTableModel( + QObject* parent = nullptr, + const AZStd::string& absolutePath = AZStd::string(), + const AZStd::string& platform = ""); virtual ~AssetListTableModel() {} AZStd::shared_ptr GetSeedListManager() { return m_seedListManager; } diff --git a/Code/Tools/AssetBundler/source/models/BundleFileListModel.cpp b/Code/Tools/AssetBundler/source/models/BundleFileListModel.cpp index d7c0e93279..a2bb6ef91f 100644 --- a/Code/Tools/AssetBundler/source/models/BundleFileListModel.cpp +++ b/Code/Tools/AssetBundler/source/models/BundleFileListModel.cpp @@ -73,14 +73,15 @@ namespace AssetBundler { if (AZ::IO::FileIOBase::GetInstance()->IsReadOnly(absolutePath)) { - AZ_Error(AssetBundler::AppWindowName, false, "File (%s) is Read-Only. Please check your version control and try again.", absolutePath); + AZ_Error(AssetBundler::AppWindowName, false, ReadOnlyFileErrorMessage, absolutePath); return false; } auto deleteResult = AZ::IO::FileIOBase::GetInstance()->Remove(absolutePath); if (!deleteResult) { - AZ_Error(AssetBundler::AppWindowName, false, "Unable to delete: %s", absolutePath); + AZ_Error(AssetBundler::AppWindowName, false, + "Unable to delete (%s). Result code: %u", absolutePath, deleteResult.GetResultCode()); return false; } } @@ -175,7 +176,10 @@ namespace AssetBundler return Column::ColumnFileCreationTime; } - void BundleFileListModel::LoadFile(const AZStd::string& absoluteFilePath, const AZStd::string& /*projectName*/, bool /*isDefaultFile*/) + void BundleFileListModel::LoadFile( + const AZStd::string& absoluteFilePath, + const AZStd::string& /*projectName*/, + bool /*isDefaultFile*/) { AZStd::string key = AssetBundler::GenerateKeyFromAbsolutePath(absoluteFilePath); diff --git a/Code/Tools/AssetBundler/source/models/BundleFileListModel.h b/Code/Tools/AssetBundler/source/models/BundleFileListModel.h index 13e5838c57..320c2b2d59 100644 --- a/Code/Tools/AssetBundler/source/models/BundleFileListModel.h +++ b/Code/Tools/AssetBundler/source/models/BundleFileListModel.h @@ -43,7 +43,10 @@ namespace AssetBundler explicit BundleFileListModel(); virtual ~BundleFileListModel() {} - AZStd::vector CreateNewFiles(const AZStd::string& /*absoluteFilePath*/, const AzFramework::PlatformFlags& /*platforms*/, const QString& /*project*/) override { return {}; } + AZStd::vector CreateNewFiles( + const AZStd::string& /*absoluteFilePath*/, + const AzFramework::PlatformFlags& /*platforms*/, + const QString& /*project*/) override { return {}; } bool DeleteFile(const QModelIndex& index) override; void LoadFile(const AZStd::string& absoluteFilePath, const AZStd::string& projectName = "", bool isDefaultFile = false) override; bool WriteToDisk(const AZStd::string& /*key*/) override { return true; } diff --git a/Code/Tools/AssetBundler/source/models/RulesFileTableModel.cpp b/Code/Tools/AssetBundler/source/models/RulesFileTableModel.cpp index c7ae384d6e..b452dee6bf 100644 --- a/Code/Tools/AssetBundler/source/models/RulesFileTableModel.cpp +++ b/Code/Tools/AssetBundler/source/models/RulesFileTableModel.cpp @@ -67,7 +67,10 @@ namespace AssetBundler { } - AZStd::vector RulesFileTableModel::CreateNewFiles(const AZStd::string& absoluteFilePath, const AzFramework::PlatformFlags& /*platforms*/, const QString& /*project*/) + AZStd::vector RulesFileTableModel::CreateNewFiles( + const AZStd::string& absoluteFilePath, + const AzFramework::PlatformFlags& /*platforms*/, + const QString& /*project*/) { if (absoluteFilePath.empty()) { @@ -116,14 +119,16 @@ namespace AssetBundler // Remove file from disk if (AZ::IO::FileIOBase::GetInstance()->IsReadOnly(rulesFileInfo->m_absolutePath.c_str())) { - AZ_Error(AssetBundler::AppWindowName, false, "File (%s) is Read-Only. Please check your version control and try again.", rulesFileInfo->m_absolutePath.c_str()); + AZ_Error(AssetBundler::AppWindowName, false, ReadOnlyFileErrorMessage, rulesFileInfo->m_absolutePath.c_str()); return false; } auto deleteResult = AZ::IO::FileIOBase::GetInstance()->Remove(rulesFileInfo->m_absolutePath.c_str()); if (!deleteResult) { - AZ_Error(AssetBundler::AppWindowName, false, "Unable to delete: %s", rulesFileInfo->m_absolutePath.c_str()); + AZ_Error(AssetBundler::AppWindowName, false, + "Unable to delete (%s). Result code: %u", rulesFileInfo->m_absolutePath.c_str(), + deleteResult.GetResultCode()); return false; } @@ -134,7 +139,10 @@ namespace AssetBundler return true; } - void RulesFileTableModel::LoadFile(const AZStd::string& absoluteFilePath, const AZStd::string& /*projectName*/, bool /*isDefaultFile*/) + void RulesFileTableModel::LoadFile( + const AZStd::string& absoluteFilePath, + const AZStd::string& /*projectName*/, + bool /*isDefaultFile*/) { // Get the file name without the extension for display purposes AZStd::string fileName(absoluteFilePath); @@ -145,7 +153,8 @@ namespace AssetBundler auto fileInfoIt = m_rulesFileInfoMap.find(key); if (fileInfoIt != m_rulesFileInfoMap.end() && fileInfoIt->second->m_hasUnsavedChanges) { - AZ_Warning(AssetBundler::AppWindowName, false, "Rules File %s has unsaved changes and couldn't be reloaded", absoluteFilePath.c_str()); + AZ_Warning(AssetBundler::AppWindowName, false, + "Rules File %s has unsaved changes and couldn't be reloaded", absoluteFilePath.c_str()); return; } diff --git a/Code/Tools/AssetBundler/source/models/RulesFileTableModel.h b/Code/Tools/AssetBundler/source/models/RulesFileTableModel.h index a9931a9819..7808fc2479 100644 --- a/Code/Tools/AssetBundler/source/models/RulesFileTableModel.h +++ b/Code/Tools/AssetBundler/source/models/RulesFileTableModel.h @@ -48,7 +48,10 @@ namespace AssetBundler RulesFileTableModel(); virtual ~RulesFileTableModel() {} - AZStd::vector CreateNewFiles(const AZStd::string& absoluteFilePath, const AzFramework::PlatformFlags& platforms = AzFramework::PlatformFlags::Platform_NONE, const QString& project = QString()) override; + AZStd::vector CreateNewFiles( + const AZStd::string& absoluteFilePath, + const AzFramework::PlatformFlags& platforms = AzFramework::PlatformFlags::Platform_NONE, + const QString& project = QString()) override; bool DeleteFile(const QModelIndex& index) override; diff --git a/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.cpp b/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.cpp index 1e7ec36bac..36622c809d 100644 --- a/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.cpp +++ b/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.cpp @@ -91,12 +91,19 @@ namespace AssetBundler m_seedTabWidget = nullptr; } - void SeedListFileTableModel::AddDefaultSeedsToInMemoryList(const AZStd::vector& defaultSeeds, const char* projectName, const AzFramework::PlatformFlags& platforms) + void SeedListFileTableModel::AddDefaultSeedsToInMemoryList( + const AZStd::vector& defaultSeeds, + const char* projectName, + const AzFramework::PlatformFlags& platforms) { - m_inMemoryDefaultSeedList.reset(new SeedListFileInfo(m_inMemoryDefaultSeedListKey, tr("DefaultSeeds"), QString(projectName), false, true, defaultSeeds, platforms)); + m_inMemoryDefaultSeedList.reset( + new SeedListFileInfo(m_inMemoryDefaultSeedListKey, tr("DefaultSeeds"), QString(projectName), false, true, defaultSeeds, platforms)); } - AZStd::vector SeedListFileTableModel::CreateNewFiles(const AZStd::string& absoluteFilePath, const AzFramework::PlatformFlags& /*platforms*/, const QString& project) + AZStd::vector SeedListFileTableModel::CreateNewFiles( + const AZStd::string& absoluteFilePath, + const AzFramework::PlatformFlags& /*platforms*/, + const QString& project) { if (absoluteFilePath.empty()) { @@ -111,7 +118,8 @@ namespace AssetBundler // Create a Seed List File and save it to disk AZStd::string key = AssetBundler::GenerateKeyFromAbsolutePath(absoluteFilePath); - AZStd::shared_ptr newSeedListFile = AZStd::make_shared(absoluteFilePath, QString(fileName.c_str()), project, false); + AZStd::shared_ptr newSeedListFile = + AZStd::make_shared(absoluteFilePath, QString(fileName.c_str()), project, false); newSeedListFile->m_seedListModel->SetHasUnsavedChanges(true); bool saveResult = newSeedListFile->SaveSeedFile(); if (!saveResult) @@ -151,14 +159,15 @@ namespace AssetBundler { if (AZ::IO::FileIOBase::GetInstance()->IsReadOnly(absolutePath)) { - AZ_Error(AssetBundler::AppWindowName, false, "File (%s) is Read-Only. Please check your version control and try again.", absolutePath); + AZ_Error(AssetBundler::AppWindowName, false, ReadOnlyFileErrorMessage, absolutePath); return false; } auto deleteResult = AZ::IO::FileIOBase::GetInstance()->Remove(absolutePath); if (!deleteResult) { - AZ_Error(AssetBundler::AppWindowName, false, "Unable to delete: %s", absolutePath); + AZ_Error(AssetBundler::AppWindowName, false, + "Unable to delete (%s). Result code: %u", absolutePath, deleteResult.GetResultCode()); return false; } } @@ -170,7 +179,11 @@ namespace AssetBundler return true; } - void SeedListFileTableModel::Reload(const char* fileExtension, const QSet& watchedFolders, const QSet& watchedFiles, const AZStd::unordered_map& pathToProjectNameMap) + void SeedListFileTableModel::Reload( + const char* fileExtension, + const QSet& watchedFolders, + const QSet& watchedFiles, + const AZStd::unordered_map& pathToProjectNameMap) { // Load in the Seed List files from disk AssetBundlerAbstractFileTableModel::Reload(fileExtension, watchedFolders, watchedFiles, pathToProjectNameMap); @@ -191,7 +204,8 @@ namespace AssetBundler auto fileInfoIt = m_seedListFileInfoMap.find(key); if (fileInfoIt != m_seedListFileInfoMap.end() && fileInfoIt->second->HasUnsavedChanges()) { - AZ_Warning(AssetBundler::AppWindowName, false, "Seed List File %s has unsaved changes and couldn't be reloaded", absoluteFilePath.c_str()); + AZ_Warning(AssetBundler::AppWindowName, false, + "Seed List File %s has unsaved changes and couldn't be reloaded", absoluteFilePath.c_str()); return; } @@ -208,7 +222,8 @@ namespace AssetBundler projectNameOnDisplay = outcome.TakeValue(); } - m_seedListFileInfoMap[key].reset(new SeedListFileInfo(absoluteFilePath, QString(fileName.c_str()), QString(projectNameOnDisplay.c_str()), true, isDefaultFile)); + m_seedListFileInfoMap[key].reset( + new SeedListFileInfo(absoluteFilePath, QString(fileName.c_str()), QString(projectNameOnDisplay.c_str()), true, isDefaultFile)); AddFileKey(key); } @@ -241,7 +256,9 @@ namespace AssetBundler emit dataChanged(firstIndex, lastIndex, { Qt::CheckStateRole }); } - AZStd::vector SeedListFileTableModel::GenerateAssetLists(const AZStd::string& absoluteFilePath, const AzFramework::PlatformFlags& platforms) + AZStd::vector SeedListFileTableModel::GenerateAssetLists( + const AZStd::string& absoluteFilePath, + const AzFramework::PlatformFlags& platforms) { if (!m_checkedSeedListFiles.size()) { @@ -280,7 +297,8 @@ namespace AssetBundler AZStd::vector createdFiles; for (const auto& platformIndex : AzFramework::PlatformHelper::GetPlatformIndicesInterpreted(platforms)) { - AZStd::string platformSpecificCachePath = AzToolsFramework::PlatformAddressedAssetCatalog::GetCatalogRegistryPathForPlatform(platformIndex); + AZStd::string platformSpecificCachePath = + AzToolsFramework::PlatformAddressedAssetCatalog::GetCatalogRegistryPathForPlatform(platformIndex); AzFramework::StringFunc::Path::StripFullName(platformSpecificCachePath); FilePath platformSpecificPath(absoluteFilePath, AZStd::string(AzFramework::PlatformHelper::GetPlatformName(platformIndex))); @@ -304,7 +322,10 @@ namespace AssetBundler return seedFileInfoOutcome.GetValue()->m_seedListModel; } - bool SeedListFileTableModel::SetSeedPlatforms(const QModelIndex& seedFileIndex, const QModelIndex& seedIndex, const AzFramework::PlatformFlags& platforms) + bool SeedListFileTableModel::SetSeedPlatforms( + const QModelIndex& seedFileIndex, + const QModelIndex& seedIndex, + const AzFramework::PlatformFlags& platforms) { AZStd::string key = GetFileKey(seedFileIndex); if (key.empty()) @@ -334,7 +355,10 @@ namespace AssetBundler return true; } - bool SeedListFileTableModel::AddSeed(const QModelIndex& seedFileIndex, const AZStd::string& seedRelativePath, const AzFramework::PlatformFlags& platforms) + bool SeedListFileTableModel::AddSeed( + const QModelIndex& seedFileIndex, + const AZStd::string& seedRelativePath, + const AzFramework::PlatformFlags& platforms) { AZStd::string key = GetFileKey(seedFileIndex); if (key.empty()) diff --git a/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.h b/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.h index 3bd8fbd600..9adac6a64b 100644 --- a/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.h +++ b/Code/Tools/AssetBundler/source/models/SeedListFileTableModel.h @@ -71,15 +71,28 @@ namespace AssetBundler explicit SeedListFileTableModel(SeedTabWidget* parentSeedTabWidget); virtual ~SeedListFileTableModel(); - void AddDefaultSeedsToInMemoryList(const AZStd::vector& defaultSeeds, const char* projectName, const AzFramework::PlatformFlags& platforms); + void AddDefaultSeedsToInMemoryList( + const AZStd::vector& defaultSeeds, + const char* projectName, + const AzFramework::PlatformFlags& platforms); - AZStd::vector CreateNewFiles(const AZStd::string& absoluteFilePath, const AzFramework::PlatformFlags& platforms, const QString& project) override; + AZStd::vector CreateNewFiles( + const AZStd::string& absoluteFilePath, + const AzFramework::PlatformFlags& platforms, + const QString& project) override; bool DeleteFile(const QModelIndex& index) override; - void Reload(const char* fileExtension, const QSet& watchedFolders, const QSet& watchedFiles = QSet(), const AZStd::unordered_map& pathToProjectNameMap = AZStd::unordered_map()) override; + void Reload( + const char* fileExtension, + const QSet& watchedFolders, + const QSet& watchedFiles = QSet(), + const AZStd::unordered_map& pathToProjectNameMap = AZStd::unordered_map()) override; - void LoadFile(const AZStd::string& absoluteFilePath, const AZStd::string& projectName = "", bool isDefaultFile = false) override; + void LoadFile( + const AZStd::string& absoluteFilePath, + const AZStd::string& projectName = "", + bool isDefaultFile = false) override; void SelectDefaultSeedLists(bool setSelected); diff --git a/Code/Tools/AssetBundler/source/models/SeedListTableModel.cpp b/Code/Tools/AssetBundler/source/models/SeedListTableModel.cpp index fc04686436..8b721d961c 100644 --- a/Code/Tools/AssetBundler/source/models/SeedListTableModel.cpp +++ b/Code/Tools/AssetBundler/source/models/SeedListTableModel.cpp @@ -38,7 +38,11 @@ namespace AssetBundler ////////////////////////////////////////////////////////////////////////////////////////////////// // SeedListTableModel ////////////////////////////////////////////////////////////////////////////////////////////////// - SeedListTableModel::SeedListTableModel(QObject* parent, const AZStd::string& absolutePath, const AZStd::vector& defaultSeeds, const AzFramework::PlatformFlags& platforms) + SeedListTableModel::SeedListTableModel( + QObject* parent, + const AZStd::string& absolutePath, + const AZStd::vector& defaultSeeds, + const AzFramework::PlatformFlags& platforms) : QAbstractTableModel(parent) { m_seedListManager.reset(new AzToolsFramework::AssetSeedManager()); @@ -66,7 +70,10 @@ namespace AssetBundler QString platformList; for (const auto& seed : m_seedListManager->GetAssetSeedList()) { - assetInfo = AzToolsFramework::AssetSeedManager::GetAssetInfoById(seed.m_assetId, AzFramework::PlatformHelper::GetPlatformIndicesInterpreted(seed.m_platformFlags)[0], absolutePath); + assetInfo = AzToolsFramework::AssetSeedManager::GetAssetInfoById( + seed.m_assetId, + AzFramework::PlatformHelper::GetPlatformIndicesInterpreted(seed.m_platformFlags)[0], + absolutePath); platformList = QString(m_seedListManager->GetReadablePlatformList(seed).c_str()); m_additionalSeedInfoMap[seed.m_assetId].reset(new AdditionalSeedInfo(assetInfo.m_relativePath.c_str(), platformList)); @@ -126,7 +133,8 @@ namespace AssetBundler AZ_Error(AssetBundler::AppWindowName, false, "Unable to find additional Seed info"); return false; } - additionalSeedInfo->second->m_platformList = QString(AzFramework::PlatformHelper::GetCommaSeparatedPlatformList(platforms).c_str()); + additionalSeedInfo->second->m_platformList = + QString(AzFramework::PlatformHelper::GetCommaSeparatedPlatformList(platforms).c_str()); SetHasUnsavedChanges(true); @@ -140,7 +148,8 @@ namespace AssetBundler bool SeedListTableModel::AddSeed(const AZStd::string& seedRelativePath, const AzFramework::PlatformFlags& platforms) { - AZStd::pair addSeedsResult = m_seedListManager->AddSeedAssetForValidPlatforms(seedRelativePath, platforms); + AZStd::pair addSeedsResult = + m_seedListManager->AddSeedAssetForValidPlatforms(seedRelativePath, platforms); if (!addSeedsResult.first.IsValid() || addSeedsResult.second == AzFramework::PlatformFlags::Platform_NONE) { diff --git a/Code/Tools/AssetBundler/source/models/SeedListTableModel.h b/Code/Tools/AssetBundler/source/models/SeedListTableModel.h index b8cbe95201..37d52717a7 100644 --- a/Code/Tools/AssetBundler/source/models/SeedListTableModel.h +++ b/Code/Tools/AssetBundler/source/models/SeedListTableModel.h @@ -36,7 +36,11 @@ namespace AssetBundler : public QAbstractTableModel { public: - explicit SeedListTableModel(QObject* parent = nullptr, const AZStd::string& absolutePath = AZStd::string(), const AZStd::vector& defaultSeeds = AZStd::vector(), const AzFramework::PlatformFlags& platforms = AzFramework::PlatformFlags::Platform_NONE); + explicit SeedListTableModel( + QObject* parent = nullptr, + const AZStd::string& absolutePath = AZStd::string(), + const AZStd::vector& defaultSeeds = AZStd::vector(), + const AzFramework::PlatformFlags& platforms = AzFramework::PlatformFlags::Platform_NONE); virtual ~SeedListTableModel() {} AZStd::shared_ptr GetSeedListManager() { return m_seedListManager; } diff --git a/Code/Tools/AssetBundler/source/ui/AddSeedDialog.cpp b/Code/Tools/AssetBundler/source/ui/AddSeedDialog.cpp index be156efde2..214fe7e850 100644 --- a/Code/Tools/AssetBundler/source/ui/AddSeedDialog.cpp +++ b/Code/Tools/AssetBundler/source/ui/AddSeedDialog.cpp @@ -22,7 +22,10 @@ const char QtRelativePathPrefix[] = "../"; namespace AssetBundler { - AddSeedDialog::AddSeedDialog(QWidget* parent, const AzFramework::PlatformFlags& enabledPlatforms, const AZStd::string& platformSpecificCachePath) + AddSeedDialog::AddSeedDialog( + QWidget* parent, + const AzFramework::PlatformFlags& enabledPlatforms, + const AZStd::string& platformSpecificCachePath) : QDialog(parent) , m_platformSpecificCachePath(platformSpecificCachePath.c_str()) { @@ -35,7 +38,10 @@ namespace AssetBundler // Set up Platform selection m_ui->platformSelectionWidget->Init(enabledPlatforms); - connect(m_ui->platformSelectionWidget, &PlatformSelectionWidget::PlatformsSelected, this, &AddSeedDialog::OnPlatformSelectionChanged); + connect(m_ui->platformSelectionWidget, + &PlatformSelectionWidget::PlatformsSelected, + this, + &AddSeedDialog::OnPlatformSelectionChanged); // Set up Cancel and Create New File buttons m_ui->addSeedButton->setEnabled(false); diff --git a/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h b/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h index fed6b031d1..7699f0a820 100644 --- a/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h +++ b/Code/Tools/AssetBundler/source/ui/AddSeedDialog.h @@ -34,7 +34,10 @@ namespace AssetBundler Q_OBJECT public: - explicit AddSeedDialog(QWidget* parent, const AzFramework::PlatformFlags& enabledPlatforms, const AZStd::string& platformSpecificCachePath); + explicit AddSeedDialog( + QWidget* parent, + const AzFramework::PlatformFlags& enabledPlatforms, + const AZStd::string& platformSpecificCachePath); virtual ~AddSeedDialog() {} AZStd::string GetFileName(); diff --git a/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.cpp b/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.cpp index 9dcfd34c35..2d2f40e038 100644 --- a/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.cpp +++ b/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.cpp @@ -73,7 +73,10 @@ namespace AssetBundler SetupContextMenu(); Reload(); - connect(GetFileTableView()->header(), &QHeaderView::sortIndicatorChanged, m_fileTableFilterModel.get(), &AssetBundlerFileTableFilterModel::sort); + connect(GetFileTableView()->header(), + &QHeaderView::sortIndicatorChanged, + m_fileTableFilterModel.get(), + &AssetBundlerFileTableFilterModel::sort); GetFileTableView()->header()->setSortIndicatorShown(true); // Setting this in descending order will ensure the most recent files are at the top GetFileTableView()->header()->setSortIndicator(GetFileTableModel()->GetTimeStampColumnIndex(), Qt::DescendingOrder); @@ -163,9 +166,11 @@ namespace AssetBundler return; } - QString messageBoxText = QString(tr("Are you sure you would like to delete %1? \n\nThis will permanently delete the file.")).arg(QString(selectedFileAbsolutePath.c_str())); + QString messageBoxText = + QString(tr("Are you sure you would like to delete %1? \n\nThis will permanently delete the file.")).arg(QString(selectedFileAbsolutePath.c_str())); - QMessageBox::StandardButton confirmDeleteFileResult = QMessageBox::question(this, QString(tr("Delete %1")).arg(GetFileTypeDisplayName()), messageBoxText); + QMessageBox::StandardButton confirmDeleteFileResult = + QMessageBox::question(this, QString(tr("Delete %1")).arg(GetFileTypeDisplayName()), messageBoxText); if (confirmDeleteFileResult != QMessageBox::StandardButton::Yes) { // User canceled out of the confirmation dialog @@ -206,7 +211,8 @@ namespace AssetBundler defaultFolderPath = m_guiApplicationManager->GetBundlesFolder(); break; default: - AZ_Warning(AssetBundler::AppWindowName, false, "No default folder is defined for AssetBundlingFileType ( %i ).", static_cast(fileType)); + AZ_Warning(AssetBundler::AppWindowName, false, + "No default folder is defined for AssetBundlingFileType ( %i ).", static_cast(fileType)); break; } @@ -224,7 +230,8 @@ namespace AssetBundler void AssetBundlerTabWidget::AddScanPathToAssetBundlerSettings(AssetBundlingFileType fileType, const QString& filePath) { - AZStd::string assetBundlerSettingsFileAbsolutePath = GetAssetBundlerUserSettingsFile(m_guiApplicationManager->GetCurrentProjectFolder().c_str()); + AZStd::string assetBundlerSettingsFileAbsolutePath = + GetAssetBundlerUserSettingsFile(m_guiApplicationManager->GetCurrentProjectFolder().c_str()); QJsonObject assetBundlerSettings = AssetBundler::ReadJson(assetBundlerSettingsFileAbsolutePath); QJsonObject scanPathsSettings = assetBundlerSettings[ScanPathsKey].toObject(); QJsonArray scanPaths = scanPathsSettings[AssetBundlingFileTypes[fileType]].toArray(); @@ -256,7 +263,8 @@ namespace AssetBundler void AssetBundlerTabWidget::RemoveScanPathFromAssetBundlerSettings(AssetBundlingFileType fileType, const QString& filePath) { - AZStd::string assetBundlerSettingsFileAbsolutePath = GetAssetBundlerUserSettingsFile(m_guiApplicationManager->GetCurrentProjectFolder().c_str()); + AZStd::string assetBundlerSettingsFileAbsolutePath = + GetAssetBundlerUserSettingsFile(m_guiApplicationManager->GetCurrentProjectFolder().c_str()); QJsonObject assetBundlerSettings = AssetBundler::ReadJson(assetBundlerSettingsFileAbsolutePath); QJsonObject scanPathsSettings = assetBundlerSettings[ScanPathsKey].toObject(); QJsonArray scanPaths = scanPathsSettings[AssetBundlingFileTypes[fileType]].toArray(); @@ -305,7 +313,10 @@ namespace AssetBundler void AssetBundlerTabWidget::SetupContextMenu() { GetFileTableView()->setContextMenuPolicy(Qt::CustomContextMenu); - connect(GetFileTableView(), &QTreeView::customContextMenuRequested, this, &AssetBundlerTabWidget::OnFileTableContextMenuRequested); + connect(GetFileTableView(), + &QTreeView::customContextMenuRequested, + this, + &AssetBundlerTabWidget::OnFileTableContextMenuRequested); } void AssetBundlerTabWidget::ReadAssetBundlerSettings(const AZStd::string& filePath, AssetBundlingFileType fileType) diff --git a/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.h b/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.h index edef5c0437..17eb171d6d 100644 --- a/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.h +++ b/Code/Tools/AssetBundler/source/ui/AssetBundlerTabWidget.h @@ -78,7 +78,9 @@ namespace AssetBundler virtual void ApplyConfig() = 0; - virtual void FileSelectionChanged(const QItemSelection& /*selected*/ = QItemSelection(), const QItemSelection& /*deselected*/ = QItemSelection()) = 0; + virtual void FileSelectionChanged( + const QItemSelection& /*selected*/ = QItemSelection(), + const QItemSelection& /*deselected*/ = QItemSelection()) = 0; static void InitAssetBundlerSettings(const char* currentProjectFolderPath); diff --git a/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.cpp b/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.cpp index 339dc080fa..2f0351e39e 100644 --- a/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.cpp +++ b/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.cpp @@ -44,14 +44,22 @@ namespace AssetBundler m_ui->mainVerticalLayout->setContentsMargins(10, 10, 10, 10); // File view of all Asset List Files - m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel(this, m_fileTableModel->GetFileNameColumnIndex(), m_fileTableModel->GetTimeStampColumnIndex())); + m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel( + this, + m_fileTableModel->GetFileNameColumnIndex(), + m_fileTableModel->GetTimeStampColumnIndex())); m_fileTableFilterModel->setSourceModel(m_fileTableModel.data()); m_ui->assetListsTable->setModel(m_fileTableFilterModel.data()); - connect(m_ui->fileFilteredSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, - m_fileTableFilterModel.data(), static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); + connect(m_ui->fileFilteredSearchWidget, + &AzQtComponents::FilteredSearchWidget::TextFilterChanged, + m_fileTableFilterModel.data(), + static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); - connect(m_ui->assetListsTable->selectionModel(), &QItemSelectionModel::selectionChanged, this, &AssetListTabWidget::FileSelectionChanged); + connect(m_ui->assetListsTable->selectionModel(), + &QItemSelectionModel::selectionChanged, + this, + &AssetListTabWidget::FileSelectionChanged); m_ui->fileTableHeaderLayout->setContentsMargins(0, 0, 0, 0); m_ui->fileTableVerticalLayout->setContentsMargins(0, 0, 0, 0); @@ -70,8 +78,10 @@ namespace AssetBundler m_assetListContentsFilterModel->setSourceModel(m_assetListContentsModel.data()); m_ui->assetListContentsTable->setModel(m_assetListContentsFilterModel.data()); - connect(m_ui->assetListContentsFilteredSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, - m_assetListContentsFilterModel.data(), static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); + connect(m_ui->assetListContentsFilteredSearchWidget, + &AzQtComponents::FilteredSearchWidget::TextFilterChanged, + m_assetListContentsFilterModel.data(), + static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); m_ui->fileContentsHeaderLayout->setContentsMargins(0, 0, 0, 0); @@ -121,13 +131,21 @@ namespace AssetBundler m_ui->fileTableFrame->setFixedWidth(config.fileTableWidth); - m_ui->assetListsTable->header()->resizeSection(AssetListFileTableModel::Column::ColumnFileName, config.assetListFileNameColumnWidth); - m_ui->assetListsTable->header()->resizeSection(AssetListFileTableModel::Column::ColumnPlatform, config.assetListPlatformColumnWidth); + m_ui->assetListsTable->header()->resizeSection( + AssetListFileTableModel::Column::ColumnFileName, + config.assetListFileNameColumnWidth); + m_ui->assetListsTable->header()->resizeSection( + AssetListFileTableModel::Column::ColumnPlatform, + config.assetListPlatformColumnWidth); m_ui->assetListContentsFilteredSearchWidget->setFixedWidth(config.fileTableWidth); - m_ui->assetListContentsTable->header()->resizeSection(AssetListTableModel::Column::ColumnAssetName, config.productAssetNameColumnWidth); - m_ui->assetListContentsTable->header()->resizeSection(AssetListTableModel::Column::ColumnRelativePath, config.productAssetRelativePathColumnWidth); + m_ui->assetListContentsTable->header()->resizeSection( + AssetListTableModel::Column::ColumnAssetName, + config.productAssetNameColumnWidth); + m_ui->assetListContentsTable->header()->resizeSection( + AssetListTableModel::Column::ColumnRelativePath, + config.productAssetRelativePathColumnWidth); } diff --git a/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.h b/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.h index 890f45a0c9..294c32ed38 100644 --- a/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.h +++ b/Code/Tools/AssetBundler/source/ui/AssetListTabWidget.h @@ -65,7 +65,9 @@ namespace AssetBundler AssetBundlerAbstractFileTableModel* GetFileTableModel() override; void SetActiveProjectLabel(const QString& labelText) override; void ApplyConfig() override; - void FileSelectionChanged(const QItemSelection& /*selected*/ = QItemSelection(), const QItemSelection& /*deselected*/ = QItemSelection()) override; + void FileSelectionChanged( + const QItemSelection& /*selected*/ = QItemSelection(), + const QItemSelection& /*deselected*/ = QItemSelection()) override; ////////////////////////////////////////////////////////////////////////// private: diff --git a/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.cpp b/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.cpp index b670fd0ebd..53f0acc0fe 100644 --- a/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.cpp +++ b/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.cpp @@ -34,14 +34,22 @@ namespace AssetBundler m_ui->mainVerticalLayout->setContentsMargins(MarginSize, MarginSize, MarginSize, MarginSize); m_fileTableModel.reset(new BundleFileListModel); - m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel(this, m_fileTableModel->GetFileNameColumnIndex(), m_fileTableModel->GetTimeStampColumnIndex())); + m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel( + this, + m_fileTableModel->GetFileNameColumnIndex(), + m_fileTableModel->GetTimeStampColumnIndex())); m_fileTableFilterModel->setSourceModel(m_fileTableModel.data()); m_ui->fileTableView->setModel(m_fileTableFilterModel.data()); - connect(m_ui->fileFilteredSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, - m_fileTableFilterModel.data(), static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); + connect(m_ui->fileFilteredSearchWidget, + &AzQtComponents::FilteredSearchWidget::TextFilterChanged, + m_fileTableFilterModel.data(), + static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); - connect(m_ui->fileTableView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &BundleListTabWidget::FileSelectionChanged); + connect(m_ui->fileTableView->selectionModel(), + &QItemSelectionModel::selectionChanged, + this, + &BundleListTabWidget::FileSelectionChanged); m_ui->fileTableView->setIndentation(0); diff --git a/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.h b/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.h index c05e1078fa..83439539c8 100644 --- a/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.h +++ b/Code/Tools/AssetBundler/source/ui/BundleListTabWidget.h @@ -53,7 +53,9 @@ namespace AssetBundler AssetBundlerAbstractFileTableModel* GetFileTableModel() override; void SetActiveProjectLabel(const QString& labelText) override; void ApplyConfig() override; - void FileSelectionChanged(const QItemSelection& /*selected*/ = QItemSelection(), const QItemSelection& /*deselected*/ = QItemSelection()) override; + void FileSelectionChanged( + const QItemSelection& /*selected*/ = QItemSelection(), + const QItemSelection& /*deselected*/ = QItemSelection()) override; private: void ClearDisplayedBundleValues(); diff --git a/Code/Tools/AssetBundler/source/ui/ComparisonDataWidget.cpp b/Code/Tools/AssetBundler/source/ui/ComparisonDataWidget.cpp index b5c2d78030..81055676fb 100644 --- a/Code/Tools/AssetBundler/source/ui/ComparisonDataWidget.cpp +++ b/Code/Tools/AssetBundler/source/ui/ComparisonDataWidget.cpp @@ -42,7 +42,8 @@ namespace AssetBundler if (!IsComparisonDataIndexValid()) { - AZ_Error("AssetBundler", false, "ComparisonData index ( %u ) is out of bounds. ComparisonData cannot be displayed.", m_comparisonDataIndex); + AZ_Error("AssetBundler", false, + "ComparisonData index ( %u ) is out of bounds. ComparisonData cannot be displayed.", m_comparisonDataIndex); return; } @@ -64,14 +65,26 @@ namespace AssetBundler connect(m_ui->nameLineEdit, &QLineEdit::textEdited, this, &ComparisonDataWidget::OnNameLineEditChanged); m_ui->comparisonTypeComboBox->installEventFilter(mouseWheelEventFilter); - connect(m_ui->comparisonTypeComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &ComparisonDataWidget::OnComparisonTypeComboBoxChanged); + connect(m_ui->comparisonTypeComboBox, + QOverload::of(&QComboBox::currentIndexChanged), + this, + &ComparisonDataWidget::OnComparisonTypeComboBoxChanged); m_ui->firstInputComboBox->installEventFilter(mouseWheelEventFilter); - connect(m_ui->firstInputComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &ComparisonDataWidget::OnFirstInputComboBoxChanged); - connect(m_ui->firstInputBrowseButton, &QPushButton::pressed, this, &ComparisonDataWidget::OnFirstInputBrowseButtonPressed); + connect(m_ui->firstInputComboBox, + QOverload::of(&QComboBox::currentIndexChanged), + this, + &ComparisonDataWidget::OnFirstInputComboBoxChanged); + connect(m_ui->firstInputBrowseButton, + &QPushButton::pressed, + this, + &ComparisonDataWidget::OnFirstInputBrowseButtonPressed); m_ui->secondInputComboBox->installEventFilter(mouseWheelEventFilter); - connect(m_ui->secondInputComboBox, QOverload::of(&QComboBox::currentIndexChanged), this, &ComparisonDataWidget::OnSecondInputComboBoxChanged); + connect(m_ui->secondInputComboBox, + QOverload::of(&QComboBox::currentIndexChanged), + this, + &ComparisonDataWidget::OnSecondInputComboBoxChanged); connect(m_ui->secondInputBrowseButton, &QPushButton::pressed, this, &ComparisonDataWidget::OnSecondInputBrowseButtonPressed); connect(m_ui->filePatternLineEdit, &QLineEdit::textEdited, this, &ComparisonDataWidget::OnFilePatternLineEditChanged); @@ -187,7 +200,8 @@ namespace AssetBundler m_ui->filePatternLineEdit->setText(comparisonData.m_filePattern.c_str()); } - void ComparisonDataWidget::InitComparisonTypeComboBox(const AzToolsFramework::AssetFileInfoListComparison::ComparisonData& comparisonData) + void ComparisonDataWidget::InitComparisonTypeComboBox( + const AzToolsFramework::AssetFileInfoListComparison::ComparisonData& comparisonData) { using namespace AzToolsFramework; @@ -225,7 +239,8 @@ namespace AssetBundler initialSelectionIndex = ComparisonTypeIndex::Complement; break; default: - AZ_Warning("AssetBundler", false, "ComparisonType ( %u ) is not supported in the Asset Bundler", comparisonData.m_comparisonType); + AZ_Warning("AssetBundler", false, + "ComparisonType ( %u ) is not supported in the Asset Bundler", comparisonData.m_comparisonType); } } diff --git a/Code/Tools/AssetBundler/source/ui/EditSeedDialog.cpp b/Code/Tools/AssetBundler/source/ui/EditSeedDialog.cpp index a42e0cd0f0..db243f6bc2 100644 --- a/Code/Tools/AssetBundler/source/ui/EditSeedDialog.cpp +++ b/Code/Tools/AssetBundler/source/ui/EditSeedDialog.cpp @@ -32,7 +32,10 @@ namespace AssetBundler m_ui->platformSelectionWidget->Init(enabledPlatforms); m_ui->platformSelectionWidget->SetSelectedPlatforms(selectedPlatforms, partiallySelectedPlatforms); - connect(m_ui->platformSelectionWidget, &PlatformSelectionWidget::PlatformsSelected, this, &EditSeedDialog::OnPlatformSelectionChanged); + connect(m_ui->platformSelectionWidget, + &PlatformSelectionWidget::PlatformsSelected, + this, + &EditSeedDialog::OnPlatformSelectionChanged); // Set up confirm and cancel buttons connect(m_ui->applyChangesButton, &QPushButton::clicked, this, &QDialog::accept); @@ -49,7 +52,9 @@ namespace AssetBundler return m_ui->platformSelectionWidget->GetPartiallySelectedPlatforms(); } - void EditSeedDialog::OnPlatformSelectionChanged(const AzFramework::PlatformFlags& selectedPlatforms, const AzFramework::PlatformFlags& partiallySelectedPlatforms) + void EditSeedDialog::OnPlatformSelectionChanged( + const AzFramework::PlatformFlags& selectedPlatforms, + const AzFramework::PlatformFlags& partiallySelectedPlatforms) { // Disable the "Apply Changes" button if no platforms are selected bool areAnyPlatformsSelected = selectedPlatforms != AzFramework::PlatformFlags::Platform_NONE || diff --git a/Code/Tools/AssetBundler/source/ui/EditSeedDialog.h b/Code/Tools/AssetBundler/source/ui/EditSeedDialog.h index 751c1eae3d..189212ddbd 100644 --- a/Code/Tools/AssetBundler/source/ui/EditSeedDialog.h +++ b/Code/Tools/AssetBundler/source/ui/EditSeedDialog.h @@ -44,7 +44,9 @@ namespace AssetBundler AzFramework::PlatformFlags GetPartiallySelectedPlatformFlags(); private: - void OnPlatformSelectionChanged(const AzFramework::PlatformFlags& selectedPlatforms, const AzFramework::PlatformFlags& partiallySelectedPlatforms); + void OnPlatformSelectionChanged( + const AzFramework::PlatformFlags& selectedPlatforms, + const AzFramework::PlatformFlags& partiallySelectedPlatforms); QSharedPointer m_ui; }; diff --git a/Code/Tools/AssetBundler/source/ui/GenerateBundlesModal.cpp b/Code/Tools/AssetBundler/source/ui/GenerateBundlesModal.cpp index 3724bc8753..326251af88 100644 --- a/Code/Tools/AssetBundler/source/ui/GenerateBundlesModal.cpp +++ b/Code/Tools/AssetBundler/source/ui/GenerateBundlesModal.cpp @@ -52,26 +52,41 @@ namespace AssetBundler // Bundle Output m_ui->outputBundlePathLineEdit->setReadOnly(true); - connect(m_ui->outputBundlePathBrowseButton, &QPushButton::clicked, this, &GenerateBundlesModal::OnOutputBundleLocationBrowseButtonPressed); + connect(m_ui->outputBundlePathBrowseButton, + &QPushButton::clicked, + this, + &GenerateBundlesModal::OnOutputBundleLocationBrowseButtonPressed); // Bundle Settings files m_ui->bundleSettingsFileLineEdit->setReadOnly(true); m_ui->bundleSettingsFileLineEdit->setText(tr(CustomBundleSettingsText)); - connect(m_ui->bundleSettingsFileBrowseButton, &QPushButton::clicked, this, &GenerateBundlesModal::OnBundleSettingsBrowseButtonPressed); - connect(m_ui->bundleSettingsFileSaveButton, &QPushButton::clicked, this, &GenerateBundlesModal::OnBundleSettingsSaveButtonPressed); + connect(m_ui->bundleSettingsFileBrowseButton, + &QPushButton::clicked, + this, + &GenerateBundlesModal::OnBundleSettingsBrowseButtonPressed); + connect(m_ui->bundleSettingsFileSaveButton, + &QPushButton::clicked, + this, + &GenerateBundlesModal::OnBundleSettingsSaveButtonPressed); // Max Bundle Size m_ui->maxBundleSizeSpinBox->setRange(1, AzToolsFramework::MaxBundleSizeInMB); m_ui->maxBundleSizeSpinBox->setValue(AzToolsFramework::MaxBundleSizeInMB); m_ui->maxBundleSizeSpinBox->setButtonSymbols(QAbstractSpinBox::ButtonSymbols::NoButtons); m_ui->maxBundleSizeSpinBox->setSuffix(" MB"); - connect(m_ui->maxBundleSizeSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &GenerateBundlesModal::OnMaxBundleSizeChanged); + connect(m_ui->maxBundleSizeSpinBox, + QOverload::of(&QSpinBox::valueChanged), + this, + &GenerateBundlesModal::OnMaxBundleSizeChanged); // Bundle Version m_ui->bundleVersionSpinBox->setRange(1, AzFramework::AssetBundleManifest::CurrentBundleVersion); m_ui->bundleVersionSpinBox->setValue(AzFramework::AssetBundleManifest::CurrentBundleVersion); m_ui->bundleVersionSpinBox->setButtonSymbols(QAbstractSpinBox::ButtonSymbols::NoButtons); - connect(m_ui->bundleVersionSpinBox, QOverload::of(&QSpinBox::valueChanged), this, &GenerateBundlesModal::OnBundleVersionChanged); + connect(m_ui->bundleVersionSpinBox, + QOverload::of(&QSpinBox::valueChanged), + this, + &GenerateBundlesModal::OnBundleVersionChanged); // Cancel and Generate Bundles buttons m_ui->generateBundlesButton->setEnabled(false); @@ -197,9 +212,11 @@ namespace AssetBundler if (AZ::IO::FileIOBase::GetInstance()->Exists(bundleSettingsAbsolutePath.c_str())) { - QString messageBoxText = QString(tr("Bundle Settings ( %1 ) already exists on-disk. Saving the current settings will override the existing settings. \n\nDo you wish to continue?")).arg(bundleSettingsAbsolutePath.c_str()); + QString messageBoxText = QString(tr( + "Bundle Settings ( %1 ) already exists on-disk. Saving the current settings will override the existing settings. \n\nDo you wish to continue?")).arg(bundleSettingsAbsolutePath.c_str()); - QMessageBox::StandardButton confirmDeleteFileResult = QMessageBox::question(this, QString(tr("Replace Existing Settings")), messageBoxText); + QMessageBox::StandardButton confirmDeleteFileResult = + QMessageBox::question(this, QString(tr("Replace Existing Settings")), messageBoxText); if (confirmDeleteFileResult != QMessageBox::StandardButton::Yes) { // User canceled out of the operation @@ -237,9 +254,11 @@ namespace AssetBundler if (AZ::IO::FileIOBase::GetInstance()->Exists(m_bundleSettings.m_bundleFilePath.c_str())) { - QString messageBoxText = QString(tr("Asset Bundle ( %1 ) already exists on-disk. Generating a new Bundle will override the existing Bundle. \n\nDo you wish to permanently delete the existing Bundle?")).arg(m_bundleSettings.m_bundleFilePath.c_str()); + QString messageBoxText = QString(tr( + "Asset Bundle ( %1 ) already exists on-disk. Generating a new Bundle will override the existing Bundle. \n\nDo you wish to permanently delete the existing Bundle?")).arg(m_bundleSettings.m_bundleFilePath.c_str()); - QMessageBox::StandardButton confirmDeleteFileResult = QMessageBox::question(this, QString(tr("Replace Existing Bundle")), messageBoxText); + QMessageBox::StandardButton confirmDeleteFileResult = + QMessageBox::question(this, QString(tr("Replace Existing Bundle")), messageBoxText); if (confirmDeleteFileResult != QMessageBox::StandardButton::Yes) { // User canceled out of the operation @@ -259,10 +278,14 @@ namespace AssetBundler if (result) { - m_assetListTabWidget->AddScanPathToAssetBundlerSettings(AssetBundlingFileType::BundleFileType, m_bundleSettings.m_bundleFilePath); + m_assetListTabWidget->AddScanPathToAssetBundlerSettings( + AssetBundlingFileType::BundleFileType, + m_bundleSettings.m_bundleFilePath); // The watched files list was updated after the files were created, so we need to force-reload them - m_assetListTabWidget->GetGUIApplicationManager()->UpdateFiles(AssetBundlingFileType::BundleFileType, { m_bundleSettings.m_bundleFilePath }); + m_assetListTabWidget->GetGUIApplicationManager()->UpdateFiles( + AssetBundlingFileType::BundleFileType, + { m_bundleSettings.m_bundleFilePath }); } AZStd::vector generatedFilePaths = { m_bundleSettings.m_bundleFilePath }; diff --git a/Code/Tools/AssetBundler/source/ui/MainWindow.cpp b/Code/Tools/AssetBundler/source/ui/MainWindow.cpp index c0e30c01f2..53b1c07943 100644 --- a/Code/Tools/AssetBundler/source/ui/MainWindow.cpp +++ b/Code/Tools/AssetBundler/source/ui/MainWindow.cpp @@ -63,7 +63,10 @@ namespace AssetBundler // Set up Tabs AssetBundlerTabWidget::InitAssetBundlerSettings(m_guiApplicationManager->GetCurrentProjectFolder().c_str()); - m_seedListTab.reset(new SeedTabWidget(this, m_guiApplicationManager, QString(m_guiApplicationManager->GetAssetBundlingFolder().c_str()))); + m_seedListTab.reset(new SeedTabWidget( + this, + m_guiApplicationManager, + QString(m_guiApplicationManager->GetAssetBundlingFolder().c_str()))); m_ui->tabWidget->addTab(m_seedListTab.data(), m_seedListTab->GetTabTitle()); m_assetListTab.reset(new AssetListTabWidget(this, m_guiApplicationManager)); diff --git a/Code/Tools/AssetBundler/source/ui/NewFileDialog.cpp b/Code/Tools/AssetBundler/source/ui/NewFileDialog.cpp index 170da4a659..00a63d193b 100644 --- a/Code/Tools/AssetBundler/source/ui/NewFileDialog.cpp +++ b/Code/Tools/AssetBundler/source/ui/NewFileDialog.cpp @@ -51,7 +51,8 @@ namespace AssetBundler m_newFileDialog.setNameFilter(fileNameFilter); m_newFileDialog.setViewMode(QFileDialog::Detail); m_newFileDialog.setDirectory(m_startingPath); - // We are not creating a new file when Qt thinks we are, so we need to block signals or else the file watcher will be triggered too soon + // We are not creating a new file when Qt thinks we are, so we need to block signals or else the file watcher will be + // triggered too soon m_newFileDialog.blockSignals(true); // Set up Platform selection @@ -61,7 +62,10 @@ namespace AssetBundler disabledPatformMessageOverride = tr("This platform is not valid for all input Asset Lists."); } m_ui->platformSelectionWidget->Init(enabledPlatforms, disabledPatformMessageOverride); - connect(m_ui->platformSelectionWidget, &PlatformSelectionWidget::PlatformsSelected, this, &NewFileDialog::OnPlatformSelectionChanged); + connect(m_ui->platformSelectionWidget, + &PlatformSelectionWidget::PlatformsSelected, + this, + &NewFileDialog::OnPlatformSelectionChanged); // Set up Cancel and Create New File buttons m_ui->createFileButton->setEnabled(false); @@ -112,7 +116,8 @@ namespace AssetBundler { // Check to see if any of the selected platform-specific files already exist on-disk QString overwriteExistingFilesList; - AZStd::fixed_vector selectedPlatformNames = AzFramework::PlatformHelper::GetPlatforms(GetPlatformFlags()); + AZStd::fixed_vector selectedPlatformNames = + AzFramework::PlatformHelper::GetPlatforms(GetPlatformFlags()); for (const AZStd::string& platformName : selectedPlatformNames) { FilePath platformSpecificFilePath(GetAbsoluteFilePath(), platformName); @@ -126,9 +131,11 @@ namespace AssetBundler // Ask the user if they are sure they want to overwrite existing files if (!overwriteExistingFilesList.isEmpty()) { - QString messageBoxText = QString(tr("The following files already exist on-disk. Generating new files will overwrite the existing ones.\n\n%1\n\nDo you wish to permanently delete the existing files?")).arg(overwriteExistingFilesList); + QString messageBoxText = QString(tr( + "The following files already exist on-disk. Generating new files will overwrite the existing ones.\n\n%1\n\nDo you wish to permanently delete the existing files?")).arg(overwriteExistingFilesList); - QMessageBox::StandardButton confirmDeleteFileResult = QMessageBox::question(this, QString(tr("Replace Existing Files")), messageBoxText); + QMessageBox::StandardButton confirmDeleteFileResult = + QMessageBox::question(this, QString(tr("Replace Existing Files")), messageBoxText); if (confirmDeleteFileResult != QMessageBox::StandardButton::Yes) { // User canceled out of the operation @@ -139,7 +146,11 @@ namespace AssetBundler emit QDialog::accept(); } - AZStd::string NewFileDialog::OSNewFileDialog(QWidget* parent, const char* fileExtension, const char* fileTypeDisplayName, const AZStd::string& startingDirectory) + AZStd::string NewFileDialog::OSNewFileDialog( + QWidget* parent, + const char* fileExtension, + const char* fileTypeDisplayName, + const AZStd::string& startingDirectory) { QFileDialog filePathDialog(parent); filePathDialog.setFileMode(QFileDialog::AnyFile); @@ -160,13 +171,17 @@ namespace AssetBundler AZStd::string absoluteFilePath(filePathDialog.selectedFiles()[0].toUtf8().data()); if (!AzFramework::StringFunc::Path::HasExtension(absoluteFilePath.c_str())) { - absoluteFilePath = AZStd::string::format("%s%c%s", absoluteFilePath.c_str(), AZ_FILESYSTEM_EXTENSION_SEPARATOR, fileExtension); + absoluteFilePath = + AZStd::string::format("%s%c%s", absoluteFilePath.c_str(), AZ_FILESYSTEM_EXTENSION_SEPARATOR, fileExtension); } return absoluteFilePath; } - int NewFileDialog::FileGenerationResultMessageBox(QWidget* parent, const AZStd::vector& generatedFiles, bool generatedWithErrors) + int NewFileDialog::FileGenerationResultMessageBox( + QWidget* parent, + const AZStd::vector& generatedFiles, + bool generatedWithErrors) { QMessageBox messageBox(parent); messageBox.setStandardButtons(QMessageBox::Ok); diff --git a/Code/Tools/AssetBundler/source/ui/NewFileDialog.h b/Code/Tools/AssetBundler/source/ui/NewFileDialog.h index 5974d3da6a..37cb81a3d3 100644 --- a/Code/Tools/AssetBundler/source/ui/NewFileDialog.h +++ b/Code/Tools/AssetBundler/source/ui/NewFileDialog.h @@ -51,9 +51,16 @@ namespace AssetBundler //! A standard OS-specific New File Dialog, but blocks all Qt signals from the dialog and does NOT create a new file. //! Use in place of the static QFileDialog functions to avoid unexpected file watcher updates. //! Returns the absolute path of the file the user either selected or attempted to create, or an empty string if the user canceled out of the dialog. - static AZStd::string OSNewFileDialog(QWidget* parent, const char* fileExtension, const char* fileTypeDisplayName, const AZStd::string& startingDirectory); + static AZStd::string OSNewFileDialog( + QWidget* parent, + const char* fileExtension, + const char* fileTypeDisplayName, + const AZStd::string& startingDirectory); - static int FileGenerationResultMessageBox(QWidget* parent, const AZStd::vector& generatedFiles, bool generatedWithErrors); + static int FileGenerationResultMessageBox( + QWidget* parent, + const AZStd::vector& generatedFiles, + bool generatedWithErrors); private: void OnBrowseButtonPressed(); diff --git a/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.cpp b/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.cpp index 80b4590c3c..ae203077fe 100644 --- a/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.cpp +++ b/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.cpp @@ -66,7 +66,9 @@ namespace AssetBundler } } - void PlatformSelectionWidget::SetSelectedPlatforms(const AzFramework::PlatformFlags& selectedPlatforms, const AzFramework::PlatformFlags& partiallySelectedPlatforms) + void PlatformSelectionWidget::SetSelectedPlatforms( + const AzFramework::PlatformFlags& selectedPlatforms, + const AzFramework::PlatformFlags& partiallySelectedPlatforms) { m_selectedPlatforms = AzFramework::PlatformFlags::Platform_NONE; m_partiallySelectedPlatforms = AzFramework::PlatformFlags::Platform_NONE; diff --git a/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.h b/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.h index 223044478f..10e47d0385 100644 --- a/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.h +++ b/Code/Tools/AssetBundler/source/ui/PlatformSelectionWidget.h @@ -39,7 +39,9 @@ namespace AssetBundler void Init(const AzFramework::PlatformFlags& enabledPlatforms, const QString& disabledPatformMessageOverride = ""); - void SetSelectedPlatforms(const AzFramework::PlatformFlags& selectedPlatforms, const AzFramework::PlatformFlags& partiallySelectedPlatforms); + void SetSelectedPlatforms( + const AzFramework::PlatformFlags& selectedPlatforms, + const AzFramework::PlatformFlags& partiallySelectedPlatforms); AzFramework::PlatformFlags GetSelectedPlatforms(); AzFramework::PlatformFlags GetPartiallySelectedPlatforms(); diff --git a/Code/Tools/AssetBundler/source/ui/RulesTabWidget.cpp b/Code/Tools/AssetBundler/source/ui/RulesTabWidget.cpp index 56447f4a57..81eb5f3b61 100644 --- a/Code/Tools/AssetBundler/source/ui/RulesTabWidget.cpp +++ b/Code/Tools/AssetBundler/source/ui/RulesTabWidget.cpp @@ -45,14 +45,22 @@ namespace AssetBundler m_ui->fileTableView->setModel(m_fileTableModel.data()); // Table View of all Rules files - m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel(this, m_fileTableModel->GetFileNameColumnIndex(), m_fileTableModel->GetTimeStampColumnIndex())); + m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel( + this, + m_fileTableModel->GetFileNameColumnIndex(), + m_fileTableModel->GetTimeStampColumnIndex())); m_fileTableFilterModel->setSourceModel(m_fileTableModel.data()); m_ui->fileTableView->setModel(m_fileTableFilterModel.data()); - connect(m_ui->fileFilteredSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, - m_fileTableFilterModel.data(), static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); + connect(m_ui->fileFilteredSearchWidget, + &AzQtComponents::FilteredSearchWidget::TextFilterChanged, + m_fileTableFilterModel.data(), + static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); - connect(m_ui->fileTableView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &RulesTabWidget::FileSelectionChanged); + connect(m_ui->fileTableView->selectionModel(), + &QItemSelectionModel::selectionChanged, + this, + &RulesTabWidget::FileSelectionChanged); m_ui->fileTableView->setIndentation(0); @@ -76,7 +84,10 @@ namespace AssetBundler void RulesTabWidget::Reload() { - m_fileTableModel->Reload(AzToolsFramework::AssetFileInfoListComparison::GetComparisonRulesFileExtension(), m_watchedFolders, m_watchedFiles); + m_fileTableModel->Reload( + AzToolsFramework::AssetFileInfoListComparison::GetComparisonRulesFileExtension(), + m_watchedFolders, + m_watchedFiles); FileSelectionChanged(); } @@ -223,7 +234,8 @@ namespace AssetBundler AZStd::vector outputFilePaths; bool hasFileGenerationErrors = false; - AZStd::fixed_vector selectedPlatformNames = AzFramework::PlatformHelper::GetPlatforms(runRuleDialog.GetPlatformFlags()); + AZStd::fixed_vector selectedPlatformNames = + AzFramework::PlatformHelper::GetPlatforms(runRuleDialog.GetPlatformFlags()); for (const AZStd::string& platformName : selectedPlatformNames) { // We do not want to modify the original Rules file, as we do not save Asset List file paths to disk @@ -238,7 +250,8 @@ namespace AssetBundler { if (comparisonStep.m_cachedFirstInputPath.empty()) { - AZ_Error("AssetBundler", false, "Unable to run Rule: Comparison Step #%u has no specified first input.", comparisonStepIndex); + AZ_Error("AssetBundler", false, + "Unable to run Rule: Comparison Step #%u has no specified first input.", comparisonStepIndex); return; } @@ -251,7 +264,8 @@ namespace AssetBundler { if (comparisonStep.m_cachedSecondInputPath.empty()) { - AZ_Error("AssetBundler", false, "Unable to run Rule: Comparison Step #%u has no specified second input.", comparisonStepIndex); + AZ_Error("AssetBundler", false, + "Unable to run Rule: Comparison Step #%u has no specified second input.", comparisonStepIndex); return; } @@ -313,17 +327,28 @@ namespace AssetBundler } } - void RulesTabWidget::CreateComparisonDataCard(AZStd::shared_ptr comparisonList, size_t comparisonDataIndex) + void RulesTabWidget::CreateComparisonDataCard( + AZStd::shared_ptr comparisonList, + size_t comparisonDataIndex) { - ComparisonDataCard* comparisonDataCard = new ComparisonDataCard(comparisonList, comparisonDataIndex, m_guiApplicationManager->GetAssetListsFolder()); + ComparisonDataCard* comparisonDataCard = new ComparisonDataCard( + comparisonList, + comparisonDataIndex, + m_guiApplicationManager->GetAssetListsFolder()); comparisonDataCard->setTitle(tr("Step %1").arg(static_cast(comparisonDataIndex) + 1)); m_ui->comparisonDataListLayout->addWidget(comparisonDataCard); m_comparisonDataCardList.push_back(comparisonDataCard); ComparisonDataWidget* comparisonDataWidget = comparisonDataCard->GetComparisonDataWidget(); - connect(comparisonDataCard, &ComparisonDataCard::comparisonDataCardContextMenuRequested, this, &RulesTabWidget::OnComparisonDataCardContextMenuRequested); + connect(comparisonDataCard, + &ComparisonDataCard::comparisonDataCardContextMenuRequested, + this, + &RulesTabWidget::OnComparisonDataCardContextMenuRequested); connect(comparisonDataWidget, &ComparisonDataWidget::comparisonDataChanged, this, &RulesTabWidget::MarkFileChanged); - connect(comparisonDataWidget, &ComparisonDataWidget::comparisonDataTokenNameChanged, this, &RulesTabWidget::OnAnyTokenNameChanged); + connect(comparisonDataWidget, + &ComparisonDataWidget::comparisonDataTokenNameChanged, + this, + &RulesTabWidget::OnAnyTokenNameChanged); comparisonDataCard->show(); } diff --git a/Code/Tools/AssetBundler/source/ui/RulesTabWidget.h b/Code/Tools/AssetBundler/source/ui/RulesTabWidget.h index 7dedce3efe..a48bd47617 100644 --- a/Code/Tools/AssetBundler/source/ui/RulesTabWidget.h +++ b/Code/Tools/AssetBundler/source/ui/RulesTabWidget.h @@ -81,7 +81,9 @@ namespace AssetBundler void ApplyConfig() override; - void FileSelectionChanged(const QItemSelection& /*selected*/ = QItemSelection(), const QItemSelection& /*deselected*/ = QItemSelection()) override; + void FileSelectionChanged( + const QItemSelection& /*selected*/ = QItemSelection(), + const QItemSelection& /*deselected*/ = QItemSelection()) override; private: void OnNewFileButtonPressed(); @@ -94,7 +96,9 @@ namespace AssetBundler void PopulateComparisonDataCardList(); - void CreateComparisonDataCard(AZStd::shared_ptr comparisonList, size_t comparisonDataIndex); + void CreateComparisonDataCard( + AZStd::shared_ptr comparisonList, + size_t comparisonDataIndex); void RemoveAllComparisonDataCards(); diff --git a/Code/Tools/AssetBundler/source/ui/SeedTabWidget.cpp b/Code/Tools/AssetBundler/source/ui/SeedTabWidget.cpp index 60b4104c5a..26e700a170 100644 --- a/Code/Tools/AssetBundler/source/ui/SeedTabWidget.cpp +++ b/Code/Tools/AssetBundler/source/ui/SeedTabWidget.cpp @@ -56,14 +56,22 @@ namespace AssetBundler AZ::Debug::TraceMessageBus::Handler::BusConnect(); // File view of all Seed List Files - m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel(this, m_fileTableModel->GetFileNameColumnIndex(), m_fileTableModel->GetTimeStampColumnIndex())); + m_fileTableFilterModel.reset(new AssetBundlerFileTableFilterModel( + this, + m_fileTableModel->GetFileNameColumnIndex(), + m_fileTableModel->GetTimeStampColumnIndex())); m_fileTableFilterModel->setSourceModel(m_fileTableModel.data()); m_ui->fileTableView->setModel(m_fileTableFilterModel.data()); - connect(m_ui->fileFilteredSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, - m_fileTableFilterModel.data(), static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); + connect(m_ui->fileFilteredSearchWidget, + &AzQtComponents::FilteredSearchWidget::TextFilterChanged, + m_fileTableFilterModel.data(), + static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); - connect(m_ui->fileTableView->selectionModel(), &QItemSelectionModel::selectionChanged, this, &SeedTabWidget::FileSelectionChanged); + connect(m_ui->fileTableView->selectionModel(), + &QItemSelectionModel::selectionChanged, + this, + &SeedTabWidget::FileSelectionChanged); m_ui->fileTableView->setIndentation(CheckBoxTableIndentationSize); @@ -82,11 +90,16 @@ namespace AssetBundler m_seedListContentsFilterModel->setSourceModel(m_seedListContentsModel.data()); m_ui->seedFileContentsTable->setModel(m_seedListContentsFilterModel.data()); - connect(m_ui->seedListContentsFilteredSearchWidget, &AzQtComponents::FilteredSearchWidget::TextFilterChanged, - m_seedListContentsFilterModel.data(), static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); + connect(m_ui->seedListContentsFilteredSearchWidget, + &AzQtComponents::FilteredSearchWidget::TextFilterChanged, + m_seedListContentsFilterModel.data(), + static_cast(&AssetBundlerFileTableFilterModel::FilterChanged)); m_ui->seedFileContentsTable->setContextMenuPolicy(Qt::CustomContextMenu); - connect(m_ui->seedFileContentsTable, &QTreeView::customContextMenuRequested, this, &SeedTabWidget::OnSeedListContentsTableContextMenuRequested); + connect(m_ui->seedFileContentsTable, + &QTreeView::customContextMenuRequested, + this, + &SeedTabWidget::OnSeedListContentsTableContextMenuRequested); m_ui->seedFileContentsTable->setIndentation(0); @@ -112,7 +125,11 @@ namespace AssetBundler void SeedTabWidget::Reload() { // Reload all the seed list files - m_fileTableModel->Reload(AzToolsFramework::AssetSeedManager::GetSeedFileExtension(), m_watchedFolders, m_watchedFiles, m_filePathToGemNameMap); + m_fileTableModel->Reload( + AzToolsFramework::AssetSeedManager::GetSeedFileExtension(), + m_watchedFolders, + m_watchedFiles, + m_filePathToGemNameMap); // Update the selected row FileSelectionChanged(); @@ -138,12 +155,18 @@ namespace AssetBundler m_watchedFolders.insert(m_guiApplicationManager->GetSeedListsFolder().c_str()); // Get the list of default Seed List files - m_filePathToGemNameMap = AssetBundler::GetDefaultSeedListFiles(AZStd::string_view{ AZ::Utils::GetEnginePath() }, m_guiApplicationManager->GetCurrentProjectName(), + m_filePathToGemNameMap = AssetBundler::GetDefaultSeedListFiles( + AZStd::string_view{ AZ::Utils::GetEnginePath() }, + m_guiApplicationManager->GetCurrentProjectName(), m_guiApplicationManager->GetGemInfoList(), m_guiApplicationManager->GetEnabledPlatforms()); // Get the list of default Seeds that are not stored in a Seed List file on-disk - AZStd::vector defaultSeeds = GetDefaultSeeds(AZ::Utils::GetProjectPath(), m_guiApplicationManager->GetCurrentProjectName()); - m_fileTableModel->AddDefaultSeedsToInMemoryList(defaultSeeds, m_guiApplicationManager->GetCurrentProjectName().c_str(), m_guiApplicationManager->GetEnabledPlatforms()); + AZStd::vector defaultSeeds = + GetDefaultSeeds(AZ::Utils::GetProjectPath(), m_guiApplicationManager->GetCurrentProjectName()); + m_fileTableModel->AddDefaultSeedsToInMemoryList( + defaultSeeds, + m_guiApplicationManager->GetCurrentProjectName().c_str(), + m_guiApplicationManager->GetEnabledPlatforms()); // Set the new watched filess for the model m_watchedFiles.clear(); @@ -185,7 +208,9 @@ namespace AssetBundler m_ui->fileTableView->header()->resizeSection(SeedListFileTableModel::Column::ColumnCheckBox, config.checkBoxColumnWidth); m_ui->fileTableView->header()->resizeSection(SeedListFileTableModel::Column::ColumnProject, config.projectNameColumnWidth); - m_ui->seedFileContentsTable->header()->resizeSection(SeedListTableModel::Column::ColumnRelativePath, config.seedListContentsNameColumnWidth); + m_ui->seedFileContentsTable->header()->resizeSection( + SeedListTableModel::Column::ColumnRelativePath, + config.seedListContentsNameColumnWidth); } void SeedTabWidget::UncheckSelectDefaultSeedListsCheckBox() @@ -198,15 +223,25 @@ namespace AssetBundler m_ui->generateAssetListsButton->setEnabled(isEnabled); } - bool SeedTabWidget::OnPreError(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) + bool SeedTabWidget::OnPreError( + const char* /*window*/, + const char* /*fileName*/, + int /*line*/, + const char* /*func*/, + const char* /*message*/) { - m_hasWarnings = true; + m_hasWarningsOrErrors = true; return false; } - bool SeedTabWidget::OnPreWarning(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) + bool SeedTabWidget::OnPreWarning( + const char* /*window*/, + const char* /*fileName*/, + int /*line*/, + const char* /*func*/, + const char* /*message*/) { - m_hasWarnings = true; + m_hasWarningsOrErrors = true; return false; } @@ -275,11 +310,13 @@ namespace AssetBundler return; } - m_hasWarnings = false; - auto createdFiles = m_fileTableModel->GenerateAssetLists(m_generateAssetListsDialog->GetAbsoluteFilePath(), m_generateAssetListsDialog->GetPlatformFlags()); + m_hasWarningsOrErrors = false; + auto createdFiles = m_fileTableModel->GenerateAssetLists( + m_generateAssetListsDialog->GetAbsoluteFilePath(), + m_generateAssetListsDialog->GetPlatformFlags()); // Warnings will not prevent the generation of Asset List files, we must track them separately - NewFileDialog::FileGenerationResultMessageBox(this, createdFiles, m_hasWarnings); + NewFileDialog::FileGenerationResultMessageBox(this, createdFiles, m_hasWarningsOrErrors); if (createdFiles.empty()) { @@ -306,7 +343,8 @@ namespace AssetBundler } // Get the current platforms of the selected Seed so we can display them as already checked - QModelIndex currentSeedIndex = m_seedListContentsFilterModel->mapToSource(m_ui->seedFileContentsTable->selectionModel()->currentIndex()); + QModelIndex currentSeedIndex = + m_seedListContentsFilterModel->mapToSource(m_ui->seedFileContentsTable->selectionModel()->currentIndex()); auto getPlatformOutcome = m_seedListContentsModel->GetSeedPlatforms(currentSeedIndex); if (!getPlatformOutcome.IsSuccess()) { @@ -375,7 +413,8 @@ namespace AssetBundler AzFramework::PlatformFlags checkedPlatforms = m_editSeedDialog->GetPlatformFlags(); AzFramework::PlatformFlags partiallyCheckedPlatforms = m_editSeedDialog->GetPartiallySelectedPlatformFlags(); // If the platform is partially checked, we want to keep its original status when saving the changes - AzFramework::PlatformFlags platformFlags = indexToPlatformFlagsMap[currentSeedIndex] & partiallyCheckedPlatforms | checkedPlatforms; + AzFramework::PlatformFlags platformFlags = + indexToPlatformFlagsMap[currentSeedIndex] & partiallyCheckedPlatforms | checkedPlatforms; m_fileTableModel->SetSeedPlatforms(m_selectedFileTableIndex, currentSeedIndex, platformFlags); } @@ -391,8 +430,10 @@ namespace AssetBundler // Get path to the platform-specific cache folder of one of the enabled platforms AzFramework::PlatformFlags enabledPlatforms = m_guiApplicationManager->GetEnabledPlatforms(); - AZStd::fixed_vector enabledPlatformIndices = AzFramework::PlatformHelper::GetPlatformIndicesInterpreted(enabledPlatforms); - AZStd::string platformSpecificCachePath = AzToolsFramework::PlatformAddressedAssetCatalog::GetCatalogRegistryPathForPlatform(enabledPlatformIndices[0]); + AZStd::fixed_vector enabledPlatformIndices = + AzFramework::PlatformHelper::GetPlatformIndicesInterpreted(enabledPlatforms); + AZStd::string platformSpecificCachePath = + AzToolsFramework::PlatformAddressedAssetCatalog::GetCatalogRegistryPathForPlatform(enabledPlatformIndices[0]); // Create and display the Add Seed Dialog m_addSeedDialog.reset(new AddSeedDialog(this, enabledPlatforms, platformSpecificCachePath)); @@ -416,7 +457,8 @@ namespace AssetBundler } // Set the data in the model - QModelIndex currentSeedIndex = m_seedListContentsFilterModel->mapToSource(m_ui->seedFileContentsTable->selectionModel()->currentIndex()); + QModelIndex currentSeedIndex = + m_seedListContentsFilterModel->mapToSource(m_ui->seedFileContentsTable->selectionModel()->currentIndex()); m_fileTableModel->RemoveSeed(m_selectedFileTableIndex, currentSeedIndex); } diff --git a/Code/Tools/AssetBundler/source/ui/SeedTabWidget.h b/Code/Tools/AssetBundler/source/ui/SeedTabWidget.h index c1383cdd08..784b8edd80 100644 --- a/Code/Tools/AssetBundler/source/ui/SeedTabWidget.h +++ b/Code/Tools/AssetBundler/source/ui/SeedTabWidget.h @@ -82,7 +82,9 @@ namespace AssetBundler void ApplyConfig() override; - void FileSelectionChanged(const QItemSelection& /*selected*/ = QItemSelection(), const QItemSelection& /*deselected*/ = QItemSelection()) override; + void FileSelectionChanged( + const QItemSelection& /*selected*/ = QItemSelection(), + const QItemSelection& /*deselected*/ = QItemSelection()) override; void UncheckSelectDefaultSeedListsCheckBox(); @@ -124,6 +126,6 @@ namespace AssetBundler QSharedPointer m_editSeedDialog; QSharedPointer m_addSeedDialog; - bool m_hasWarnings = false; + bool m_hasWarningsOrErrors = false; }; } // namespace AssetBundler diff --git a/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp b/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp index d278b9bd2c..e4dd5edba7 100644 --- a/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp +++ b/Code/Tools/AssetBundler/source/utils/GUIApplicationManager.cpp @@ -83,7 +83,8 @@ namespace AssetBundler ConfigHelpers::read(settings, QStringLiteral("AssetListFileNameColumnWidth"), config.assetListFileNameColumnWidth); ConfigHelpers::read(settings, QStringLiteral("AssetListPlatformColumnWidth"), config.assetListPlatformColumnWidth); ConfigHelpers::read(settings, QStringLiteral("ProductAssetNameColumnWidth"), config.productAssetNameColumnWidth); - ConfigHelpers::read(settings, QStringLiteral("ProductAssetRelativePathColumnWidth"), config.productAssetRelativePathColumnWidth); + ConfigHelpers::read( + settings, QStringLiteral("ProductAssetRelativePathColumnWidth"), config.productAssetRelativePathColumnWidth); } return config; @@ -159,8 +160,7 @@ namespace AssetBundler m_platformCatalogManager = AZStd::make_unique(); // Define some application-level settings - QApplication::setOrganizationName("Amazon"); - QApplication::setOrganizationDomain("amazon.com"); + QApplication::setOrganizationName("O3DE"); QApplication::setApplicationName("Asset Bundler"); QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates)); @@ -194,7 +194,12 @@ namespace AssetBundler engineRoot); AzQtComponents::StyleManager::setStyleSheet(m_mainWindow.data(), QStringLiteral("style:AssetBundler.qss")); - AzQtComponents::ConfigHelpers::loadConfig(&m_fileWatcher, &m_config, QStringLiteral("style:AssetBundlerConfig.ini"), this, std::bind(&GUIApplicationManager::ApplyConfig, this)); + AzQtComponents::ConfigHelpers::loadConfig( + &m_fileWatcher, + &m_config, + QStringLiteral("style:AssetBundlerConfig.ini"), + this, + std::bind(&GUIApplicationManager::ApplyConfig, this)); ApplyConfig(); qApp->setWindowIcon(QIcon("style:AssetBundler-Icon-256x256@x2.ico")); @@ -238,7 +243,12 @@ namespace AssetBundler m_fileWatcher.removePaths(paths.values()); } - bool GUIApplicationManager::OnPreError(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* message) + bool GUIApplicationManager::OnPreError( + const char* /*window*/, + const char* /*fileName*/, + int /*line*/, + const char* /*func*/, + const char* message) { // We want to display errors during initialization, then let the MainWindow handle errors during runtime if (m_isInitializing) @@ -258,7 +268,12 @@ namespace AssetBundler return false; } - bool GUIApplicationManager::OnPreWarning(const char* /*window*/, const char* /*fileName*/, int /*line*/, const char* /*func*/, const char* /*message*/) + bool GUIApplicationManager::OnPreWarning( + const char* /*window*/, + const char* /*fileName*/, + int /*line*/, + const char* /*func*/, + const char* /*message*/) { // Don't handle warnings, let the MainWindow print them return false; diff --git a/Code/Tools/AssetBundler/source/utils/utils.cpp b/Code/Tools/AssetBundler/source/utils/utils.cpp index 39bc1a7e13..b91dcde9e2 100644 --- a/Code/Tools/AssetBundler/source/utils/utils.cpp +++ b/Code/Tools/AssetBundler/source/utils/utils.cpp @@ -155,8 +155,10 @@ namespace AssetBundler if (fileIO->Exists(platformDirectory.c_str())) { bool recurse = true; - AZ::Outcome, AZStd::string> result = AzFramework::FileFunc::FindFileList(platformDirectory.String(), - AZStd::string::format("*.%s", AzToolsFramework::AssetSeedManager::GetSeedFileExtension()).c_str(), recurse); + AZ::Outcome, AZStd::string> result = AzFramework::FileFunc::FindFileList( + platformDirectory.String(), + AZStd::string::format("*.%s", AzToolsFramework::AssetSeedManager::GetSeedFileExtension()).c_str(), + recurse); if (result.IsSuccess()) { @@ -233,8 +235,11 @@ namespace AssetBundler return platformFlags; } - AZStd::unordered_map GetDefaultSeedListFiles(AZStd::string_view enginePath, AZStd::string_view projectPath, - const AZStd::vector& gemInfoList, AzFramework::PlatformFlags platformFlag) + AZStd::unordered_map GetDefaultSeedListFiles( + AZStd::string_view enginePath, + AZStd::string_view projectPath, + const AZStd::vector& gemInfoList, + AzFramework::PlatformFlags platformFlag) { AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); AZ_Assert(fileIO, "AZ::IO::FileIOBase must be ready for use.\n"); @@ -299,7 +304,9 @@ namespace AssetBundler return relativeProductPath; } - AZStd::unordered_map GetGemSeedListFilePathToGemNameMap(const AZStd::vector& gemInfoList, AzFramework::PlatformFlags platformFlags) + AZStd::unordered_map GetGemSeedListFilePathToGemNameMap( + const AZStd::vector& gemInfoList, + AzFramework::PlatformFlags platformFlags) { AZStd::unordered_map filePathToGemNameMap; for (const AzFramework::GemInfo& gemInfo : gemInfoList) @@ -325,7 +332,11 @@ namespace AssetBundler return filePathToGemNameMap; } - bool IsGemSeedFilePathValid(AZStd::string_view engineRoot, AZStd::string seedAbsoluteFilePath, const AZStd::vector& gemInfoList, AzFramework::PlatformFlags platformFlags) + bool IsGemSeedFilePathValid( + AZStd::string_view engineRoot, + AZStd::string seedAbsoluteFilePath, + const AZStd::vector& gemInfoList, + AzFramework::PlatformFlags platformFlags) { AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance(); AZ_Assert(fileIO, "AZ::IO::FileIOBase must be ready for use.\n"); @@ -369,7 +380,10 @@ namespace AssetBundler return false; } - AzFramework::PlatformFlags GetEnabledPlatformFlags(AZStd::string_view engineRoot, AZStd::string_view assetRoot, AZStd::string_view projectPath) + AzFramework::PlatformFlags GetEnabledPlatformFlags( + AZStd::string_view engineRoot, + AZStd::string_view assetRoot, + AZStd::string_view projectPath) { auto settingsRegistry = AZ::SettingsRegistry::Get(); if (settingsRegistry == nullptr) @@ -391,7 +405,8 @@ namespace AssetBundler } else { - AZ_Warning(AssetBundler::AppWindowName, false, "Platform Helper is not aware of the platform (%s).\n ", enabledPlatform.c_str()); + AZ_Warning(AssetBundler::AppWindowName, false, + "Platform Helper is not aware of the platform (%s).\n ", enabledPlatform.c_str()); } } @@ -457,31 +472,6 @@ namespace AssetBundler AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder)); } - AZ::Outcome GetPlatformNamesFromCacheFolder(AZStd::vector& platformNames) - { - AZ::Outcome projectCacheRootFolder = GetProjectCacheFolderPath(); - if (!projectCacheRootFolder) - { - return AZ::Failure(projectCacheRootFolder.TakeError()); - } - - const AZStd::string& projectCacheRootPath = projectCacheRootFolder.GetValue().Native(); - QDir projectCacheDir(QString::fromUtf8(projectCacheRootPath.c_str(), aznumeric_cast(projectCacheRootPath.size()))); - auto tempPlatformList = projectCacheDir.entryList(QDir::Filter::Dirs | QDir::Filter::NoDotAndDotDot); - - if (tempPlatformList.empty()) - { - return AZ::Failure(AZStd::string("Cache is empty. Please run the Open 3D Engine Asset Processor to generate a Cache and build assets.")); - } - - for (const QString& platform : tempPlatformList) - { - platformNames.push_back(AZStd::string(platform.toUtf8().data())); - } - - return AZ::Success(); - } - AZ::Outcome GetAssetCatalogFilePath() { AZ::IO::Path assetCatalogFilePath = GetPlatformSpecificCacheFolderPath(); @@ -501,7 +491,9 @@ namespace AssetBundler AZ::IO::Path platformSpecificCacheFolderPath; if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) { - settingsRegistry->Get(platformSpecificCacheFolderPath.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder); + settingsRegistry->Get( + platformSpecificCacheFolderPath.Native(), + AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder); } return platformSpecificCacheFolderPath; } @@ -701,7 +693,8 @@ namespace AssetBundler m_errors.swap(AZStd::vector()); } - AZ::Outcome ParseComparisonType(const AZStd::string& comparisonType) + AZ::Outcome ParseComparisonType( + const AZStd::string& comparisonType) { using namespace AzToolsFramework; @@ -729,7 +722,8 @@ namespace AssetBundler } // Failure case - AZStd::string failureMessage = AZStd::string::format("Invalid Comparison Type ( %s ). Valid types are: ", comparisonType.c_str()); + AZStd::string failureMessage = AZStd::string::format( + "Invalid Comparison Type ( %s ). Valid types are: ", comparisonType.c_str()); for (size_t i = 0; i < numTypes - 1; ++i) { failureMessage.append(AZStd::string::format("%s, ", AssetFileInfoListComparison::ComparisonTypeNames[i])); @@ -738,7 +732,8 @@ namespace AssetBundler return AZ::Failure(failureMessage); } - AZ::Outcome ParseFilePatternType(const AZStd::string& filePatternType) + AZ::Outcome ParseFilePatternType( + const AZStd::string& filePatternType) { using namespace AzToolsFramework; @@ -766,7 +761,8 @@ namespace AssetBundler } // Failure case - AZStd::string failureMessage = AZStd::string::format("Invalid File Pattern Type ( %s ). Valid types are: ", filePatternType.c_str()); + AZStd::string failureMessage = AZStd::string::format( + "Invalid File Pattern Type ( %s ). Valid types are: ", filePatternType.c_str()); for (size_t i = 0; i < numTypes - 1; ++i) { failureMessage.append(AZStd::string::format("%s, ", AssetFileInfoListComparison::FilePatternTypeNames[i])); diff --git a/Code/Tools/AssetBundler/source/utils/utils.h b/Code/Tools/AssetBundler/source/utils/utils.h index 454a279878..211096e07c 100644 --- a/Code/Tools/AssetBundler/source/utils/utils.h +++ b/Code/Tools/AssetBundler/source/utils/utils.h @@ -158,17 +158,6 @@ namespace AssetBundler */ AZ::Outcome GetProjectCacheFolderPath(); - /** - * Calculates the list of enabled platforms for the input project by reading the folder names inside the project-specific cache folder. - * If the Asset Processor has not been run yet, or has not been run since the enabled platform list inside AssetProcessorPlatformConfig.setreg - * was changed, the output of this function will be incorrect. - * - * @param projectCacheFolder The directory of a project-specific cache folder: /ProjectPath/Cache - * @param platformNames [out] The list of platforms enabled in the project - * @return void on success, error message on failure - */ - AZ::Outcome GetPlatformNamesFromCacheFolder(AZStd::vector& platformNames); - /** * Computes the absolute path to the Asset Catalog file for a specified project and platform. * With platform set as "pc" and project as "ProjectName", the path will resemble: C:/ProjectPath/Cache/pc/assetcatalog.xml @@ -204,8 +193,11 @@ namespace AssetBundler AzFramework::PlatformFlags GetPlatformsOnDiskForPlatformSpecificFile(const AZStd::string& platformIndependentAbsolutePath); //! Returns a map of of all default Seed List files for the current game project. - AZStd::unordered_map GetDefaultSeedListFiles(AZStd::string_view enginePath, AZStd::string_view projectPath, - const AZStd::vector& gemInfoList, AzFramework::PlatformFlags platformFlags); + AZStd::unordered_map GetDefaultSeedListFiles( + AZStd::string_view enginePath, + AZStd::string_view projectPath, + const AZStd::vector& gemInfoList, + AzFramework::PlatformFlags platformFlags); //! Returns a vector of relative paths to Assets that should be included as default Seeds, but are not already in a Seed List file. AZStd::vector GetDefaultSeeds(AZStd::string_view projectPath, AZStd::string_view projectName); @@ -217,15 +209,24 @@ namespace AssetBundler AZ::IO::Path GetProjectDependenciesAssetPath(AZStd::string_view projectPath, AZStd::string_view projectName); //! Returns the map from gem seed list file path to gem name - AZStd::unordered_map GetGemSeedListFilePathToGemNameMap(const AZStd::vector& gemInfoList, AzFramework::PlatformFlags platformFlags); + AZStd::unordered_map GetGemSeedListFilePathToGemNameMap( + const AZStd::vector& gemInfoList, + AzFramework::PlatformFlags platformFlags); //! Given an absolute gem seed file path determines whether the file is valid for the current game project. //! This method is for validating gem seed list files only. - bool IsGemSeedFilePathValid(AZStd::string_view enginePath, AZStd::string seedAbsoluteFilePath, const AZStd::vector& gemInfoList, AzFramework::PlatformFlags platformFlags); + bool IsGemSeedFilePathValid( + AZStd::string_view enginePath, + AZStd::string seedAbsoluteFilePath, + const AZStd::vector& gemInfoList, + AzFramework::PlatformFlags platformFlags); //! Returns platformFlags of all enabled platforms by parsing all the asset processor config files. //! Please note that the game project could be in a different location to the engine therefore we need the assetRoot param. - AzFramework::PlatformFlags GetEnabledPlatformFlags(AZStd::string_view enginePath, AZStd::string_view assetRoot, AZStd::string_view projectPath); + AzFramework::PlatformFlags GetEnabledPlatformFlags( + AZStd::string_view enginePath, + AZStd::string_view assetRoot, + AZStd::string_view projectPath); QJsonObject ReadJson(const AZStd::string& filePath); void SaveJson(const AZStd::string& filePath, const QJsonObject& jsonObject); @@ -239,7 +240,11 @@ namespace AssetBundler { public: AZ_CLASS_ALLOCATOR(FilePath, AZ::SystemAllocator, 0); - explicit FilePath(const AZStd::string& filePath, AZStd::string platformIdentifier = AZStd::string(), bool checkFileCase = false, bool ignoreFileCase = false); + explicit FilePath( + const AZStd::string& filePath, + AZStd::string platformIdentifier = AZStd::string(), + bool checkFileCase = false, + bool ignoreFileCase = false); explicit FilePath(const AZStd::string& filePath, bool checkFileCase, bool ignoreFileCase); FilePath() = default; const AZStd::string& AbsolutePath() const; @@ -279,8 +284,10 @@ namespace AssetBundler bool m_reportingError = false; }; - AZ::Outcome ParseComparisonType(const AZStd::string& comparisonType); - AZ::Outcome ParseFilePatternType(const AZStd::string& filePatternType); + AZ::Outcome ParseComparisonType( + const AZStd::string& comparisonType); + AZ::Outcome ParseFilePatternType( + const AZStd::string& filePatternType); bool LooksLikePath(const AZStd::string& inputString); bool LooksLikeWildcardPattern(const AZStd::string& inputPattern); } From 724add63658d44fb381e73af81c02e092042570a Mon Sep 17 00:00:00 2001 From: AMZN-nggieber <52797929+AMZN-nggieber@users.noreply.github.com> Date: Wed, 5 May 2021 15:45:39 -0700 Subject: [PATCH 8/9] Fix Project Manager Qt Ui files not Being Autogenerated (#588) * Moved Qt files into to renamed 'S'ource * Updated files after moving all Qt folder into Source * Updated Source capitalization in cmake files list * Adding newline to the end of project_manager_files.cmake Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> --- Code/Tools/ProjectManager/CMakeLists.txt | 2 +- .../{source/Qt => Source}/EngineSettings.cpp | 4 +- .../{source/Qt => Source}/EngineSettings.h | 2 +- .../{source/Qt => Source}/EngineSettings.ui | 0 .../{source/Qt => Source}/FirstTimeUse.cpp | 4 +- .../{source/Qt => Source}/FirstTimeUse.h | 2 +- .../{source/Qt => Source}/FirstTimeUse.ui | 0 .../{source/Qt => Source}/GemCatalog.cpp | 4 +- .../{source/Qt => Source}/GemCatalog.h | 2 +- .../{source/Qt => Source}/GemCatalog.ui | 0 .../Qt => Source}/NewProjectSettings.cpp | 4 +- .../Qt => Source}/NewProjectSettings.h | 2 +- .../Qt => Source}/NewProjectSettings.ui | 0 .../Qt => Source}/ProjectManagerWindow.cpp | 4 +- .../Qt => Source}/ProjectManagerWindow.h | 0 .../Qt => Source}/ProjectManagerWindow.ui | 0 .../{source/Qt => Source}/ProjectSettings.cpp | 4 +- .../{source/Qt => Source}/ProjectSettings.h | 2 +- .../{source/Qt => Source}/ProjectSettings.ui | 0 .../{source/Qt => Source}/ProjectsHome.cpp | 4 +- .../{source/Qt => Source}/ProjectsHome.h | 2 +- .../{source/Qt => Source}/ProjectsHome.ui | 0 .../{source => Source}/ScreenDefs.h | 0 .../{source => Source}/ScreenFactory.cpp | 12 ++--- .../{source => Source}/ScreenFactory.h | 2 +- .../{source/Qt => Source}/ScreenWidget.h | 2 +- .../{source => Source}/main.cpp | 2 +- .../project_manager_files.cmake | 54 +++++++++---------- 28 files changed, 57 insertions(+), 57 deletions(-) rename Code/Tools/ProjectManager/{source/Qt => Source}/EngineSettings.cpp (93%) rename Code/Tools/ProjectManager/{source/Qt => Source}/EngineSettings.h (97%) rename Code/Tools/ProjectManager/{source/Qt => Source}/EngineSettings.ui (100%) rename Code/Tools/ProjectManager/{source/Qt => Source}/FirstTimeUse.cpp (95%) rename Code/Tools/ProjectManager/{source/Qt => Source}/FirstTimeUse.h (97%) rename Code/Tools/ProjectManager/{source/Qt => Source}/FirstTimeUse.ui (100%) rename Code/Tools/ProjectManager/{source/Qt => Source}/GemCatalog.cpp (96%) rename Code/Tools/ProjectManager/{source/Qt => Source}/GemCatalog.h (97%) rename Code/Tools/ProjectManager/{source/Qt => Source}/GemCatalog.ui (100%) rename Code/Tools/ProjectManager/{source/Qt => Source}/NewProjectSettings.cpp (95%) rename Code/Tools/ProjectManager/{source/Qt => Source}/NewProjectSettings.h (97%) rename Code/Tools/ProjectManager/{source/Qt => Source}/NewProjectSettings.ui (100%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectManagerWindow.cpp (97%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectManagerWindow.h (100%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectManagerWindow.ui (100%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectSettings.cpp (94%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectSettings.h (97%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectSettings.ui (100%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectsHome.cpp (96%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectsHome.h (97%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ProjectsHome.ui (100%) rename Code/Tools/ProjectManager/{source => Source}/ScreenDefs.h (100%) rename Code/Tools/ProjectManager/{source => Source}/ScreenFactory.cpp (88%) rename Code/Tools/ProjectManager/{source => Source}/ScreenFactory.h (95%) rename Code/Tools/ProjectManager/{source/Qt => Source}/ScreenWidget.h (96%) rename Code/Tools/ProjectManager/{source => Source}/main.cpp (98%) diff --git a/Code/Tools/ProjectManager/CMakeLists.txt b/Code/Tools/ProjectManager/CMakeLists.txt index 0961acd354..e4354bac32 100644 --- a/Code/Tools/ProjectManager/CMakeLists.txt +++ b/Code/Tools/ProjectManager/CMakeLists.txt @@ -27,7 +27,7 @@ ly_add_target( PUBLIC . PRIVATE - source + Source BUILD_DEPENDENCIES PRIVATE diff --git a/Code/Tools/ProjectManager/source/Qt/EngineSettings.cpp b/Code/Tools/ProjectManager/Source/EngineSettings.cpp similarity index 93% rename from Code/Tools/ProjectManager/source/Qt/EngineSettings.cpp rename to Code/Tools/ProjectManager/Source/EngineSettings.cpp index 03040781f7..bc359637e4 100644 --- a/Code/Tools/ProjectManager/source/Qt/EngineSettings.cpp +++ b/Code/Tools/ProjectManager/Source/EngineSettings.cpp @@ -10,9 +10,9 @@ * */ -#include +#include -#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/Qt/EngineSettings.h b/Code/Tools/ProjectManager/Source/EngineSettings.h similarity index 97% rename from Code/Tools/ProjectManager/source/Qt/EngineSettings.h rename to Code/Tools/ProjectManager/Source/EngineSettings.h index 5f2aa5310a..f90f760798 100644 --- a/Code/Tools/ProjectManager/source/Qt/EngineSettings.h +++ b/Code/Tools/ProjectManager/Source/EngineSettings.h @@ -12,7 +12,7 @@ #pragma once #if !defined(Q_MOC_RUN) -#include +#include #endif namespace Ui diff --git a/Code/Tools/ProjectManager/source/Qt/EngineSettings.ui b/Code/Tools/ProjectManager/Source/EngineSettings.ui similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/EngineSettings.ui rename to Code/Tools/ProjectManager/Source/EngineSettings.ui diff --git a/Code/Tools/ProjectManager/source/Qt/FirstTimeUse.cpp b/Code/Tools/ProjectManager/Source/FirstTimeUse.cpp similarity index 95% rename from Code/Tools/ProjectManager/source/Qt/FirstTimeUse.cpp rename to Code/Tools/ProjectManager/Source/FirstTimeUse.cpp index 9ba4eba2a6..5f5dcd5087 100644 --- a/Code/Tools/ProjectManager/source/Qt/FirstTimeUse.cpp +++ b/Code/Tools/ProjectManager/Source/FirstTimeUse.cpp @@ -10,9 +10,9 @@ * */ -#include +#include -#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/Qt/FirstTimeUse.h b/Code/Tools/ProjectManager/Source/FirstTimeUse.h similarity index 97% rename from Code/Tools/ProjectManager/source/Qt/FirstTimeUse.h rename to Code/Tools/ProjectManager/Source/FirstTimeUse.h index 677ca398fa..708513d493 100644 --- a/Code/Tools/ProjectManager/source/Qt/FirstTimeUse.h +++ b/Code/Tools/ProjectManager/Source/FirstTimeUse.h @@ -12,7 +12,7 @@ #pragma once #if !defined(Q_MOC_RUN) -#include +#include #endif namespace Ui diff --git a/Code/Tools/ProjectManager/source/Qt/FirstTimeUse.ui b/Code/Tools/ProjectManager/Source/FirstTimeUse.ui similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/FirstTimeUse.ui rename to Code/Tools/ProjectManager/Source/FirstTimeUse.ui diff --git a/Code/Tools/ProjectManager/source/Qt/GemCatalog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog.cpp similarity index 96% rename from Code/Tools/ProjectManager/source/Qt/GemCatalog.cpp rename to Code/Tools/ProjectManager/Source/GemCatalog.cpp index 6377eb5c8d..9d89740816 100644 --- a/Code/Tools/ProjectManager/source/Qt/GemCatalog.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog.cpp @@ -10,9 +10,9 @@ * */ -#include +#include -#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/Qt/GemCatalog.h b/Code/Tools/ProjectManager/Source/GemCatalog.h similarity index 97% rename from Code/Tools/ProjectManager/source/Qt/GemCatalog.h rename to Code/Tools/ProjectManager/Source/GemCatalog.h index aee7b3a988..e45d865e58 100644 --- a/Code/Tools/ProjectManager/source/Qt/GemCatalog.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog.h @@ -12,7 +12,7 @@ #pragma once #if !defined(Q_MOC_RUN) -#include +#include #endif namespace Ui diff --git a/Code/Tools/ProjectManager/source/Qt/GemCatalog.ui b/Code/Tools/ProjectManager/Source/GemCatalog.ui similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/GemCatalog.ui rename to Code/Tools/ProjectManager/Source/GemCatalog.ui diff --git a/Code/Tools/ProjectManager/source/Qt/NewProjectSettings.cpp b/Code/Tools/ProjectManager/Source/NewProjectSettings.cpp similarity index 95% rename from Code/Tools/ProjectManager/source/Qt/NewProjectSettings.cpp rename to Code/Tools/ProjectManager/Source/NewProjectSettings.cpp index 7289c73329..2ebe54e682 100644 --- a/Code/Tools/ProjectManager/source/Qt/NewProjectSettings.cpp +++ b/Code/Tools/ProjectManager/Source/NewProjectSettings.cpp @@ -10,9 +10,9 @@ * */ -#include +#include -#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/Qt/NewProjectSettings.h b/Code/Tools/ProjectManager/Source/NewProjectSettings.h similarity index 97% rename from Code/Tools/ProjectManager/source/Qt/NewProjectSettings.h rename to Code/Tools/ProjectManager/Source/NewProjectSettings.h index 5790772a0c..f5fa91a9b9 100644 --- a/Code/Tools/ProjectManager/source/Qt/NewProjectSettings.h +++ b/Code/Tools/ProjectManager/Source/NewProjectSettings.h @@ -12,7 +12,7 @@ #pragma once #if !defined(Q_MOC_RUN) -#include +#include #endif namespace Ui diff --git a/Code/Tools/ProjectManager/source/Qt/NewProjectSettings.ui b/Code/Tools/ProjectManager/Source/NewProjectSettings.ui similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/NewProjectSettings.ui rename to Code/Tools/ProjectManager/Source/NewProjectSettings.ui diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectManagerWindow.cpp b/Code/Tools/ProjectManager/Source/ProjectManagerWindow.cpp similarity index 97% rename from Code/Tools/ProjectManager/source/Qt/ProjectManagerWindow.cpp rename to Code/Tools/ProjectManager/Source/ProjectManagerWindow.cpp index b37f73a0c5..12980fc836 100644 --- a/Code/Tools/ProjectManager/source/Qt/ProjectManagerWindow.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectManagerWindow.cpp @@ -10,7 +10,7 @@ * */ -#include +#include #include #include @@ -18,7 +18,7 @@ #include -#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectManagerWindow.h b/Code/Tools/ProjectManager/Source/ProjectManagerWindow.h similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/ProjectManagerWindow.h rename to Code/Tools/ProjectManager/Source/ProjectManagerWindow.h diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectManagerWindow.ui b/Code/Tools/ProjectManager/Source/ProjectManagerWindow.ui similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/ProjectManagerWindow.ui rename to Code/Tools/ProjectManager/Source/ProjectManagerWindow.ui diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectSettings.cpp b/Code/Tools/ProjectManager/Source/ProjectSettings.cpp similarity index 94% rename from Code/Tools/ProjectManager/source/Qt/ProjectSettings.cpp rename to Code/Tools/ProjectManager/Source/ProjectSettings.cpp index 56b27f5fe3..bc653f9c5b 100644 --- a/Code/Tools/ProjectManager/source/Qt/ProjectSettings.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectSettings.cpp @@ -10,9 +10,9 @@ * */ -#include +#include -#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectSettings.h b/Code/Tools/ProjectManager/Source/ProjectSettings.h similarity index 97% rename from Code/Tools/ProjectManager/source/Qt/ProjectSettings.h rename to Code/Tools/ProjectManager/Source/ProjectSettings.h index c9356db9bf..e7781d3a2a 100644 --- a/Code/Tools/ProjectManager/source/Qt/ProjectSettings.h +++ b/Code/Tools/ProjectManager/Source/ProjectSettings.h @@ -12,7 +12,7 @@ #pragma once #if !defined(Q_MOC_RUN) -#include +#include #endif namespace Ui diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectSettings.ui b/Code/Tools/ProjectManager/Source/ProjectSettings.ui similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/ProjectSettings.ui rename to Code/Tools/ProjectManager/Source/ProjectSettings.ui diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectsHome.cpp b/Code/Tools/ProjectManager/Source/ProjectsHome.cpp similarity index 96% rename from Code/Tools/ProjectManager/source/Qt/ProjectsHome.cpp rename to Code/Tools/ProjectManager/Source/ProjectsHome.cpp index ef85d71950..1a451f3d10 100644 --- a/Code/Tools/ProjectManager/source/Qt/ProjectsHome.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectsHome.cpp @@ -10,9 +10,9 @@ * */ -#include +#include -#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectsHome.h b/Code/Tools/ProjectManager/Source/ProjectsHome.h similarity index 97% rename from Code/Tools/ProjectManager/source/Qt/ProjectsHome.h rename to Code/Tools/ProjectManager/Source/ProjectsHome.h index b5a062f2dd..4cc2918a38 100644 --- a/Code/Tools/ProjectManager/source/Qt/ProjectsHome.h +++ b/Code/Tools/ProjectManager/Source/ProjectsHome.h @@ -12,7 +12,7 @@ #pragma once #if !defined(Q_MOC_RUN) -#include +#include #endif namespace Ui diff --git a/Code/Tools/ProjectManager/source/Qt/ProjectsHome.ui b/Code/Tools/ProjectManager/Source/ProjectsHome.ui similarity index 100% rename from Code/Tools/ProjectManager/source/Qt/ProjectsHome.ui rename to Code/Tools/ProjectManager/Source/ProjectsHome.ui diff --git a/Code/Tools/ProjectManager/source/ScreenDefs.h b/Code/Tools/ProjectManager/Source/ScreenDefs.h similarity index 100% rename from Code/Tools/ProjectManager/source/ScreenDefs.h rename to Code/Tools/ProjectManager/Source/ScreenDefs.h diff --git a/Code/Tools/ProjectManager/source/ScreenFactory.cpp b/Code/Tools/ProjectManager/Source/ScreenFactory.cpp similarity index 88% rename from Code/Tools/ProjectManager/source/ScreenFactory.cpp rename to Code/Tools/ProjectManager/Source/ScreenFactory.cpp index e29994d162..b07816e69e 100644 --- a/Code/Tools/ProjectManager/source/ScreenFactory.cpp +++ b/Code/Tools/ProjectManager/Source/ScreenFactory.cpp @@ -11,12 +11,12 @@ */ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/source/ScreenFactory.h b/Code/Tools/ProjectManager/Source/ScreenFactory.h similarity index 95% rename from Code/Tools/ProjectManager/source/ScreenFactory.h rename to Code/Tools/ProjectManager/Source/ScreenFactory.h index addc868dfa..ea68534a08 100644 --- a/Code/Tools/ProjectManager/source/ScreenFactory.h +++ b/Code/Tools/ProjectManager/Source/ScreenFactory.h @@ -13,7 +13,7 @@ #include -#include +#include #include diff --git a/Code/Tools/ProjectManager/source/Qt/ScreenWidget.h b/Code/Tools/ProjectManager/Source/ScreenWidget.h similarity index 96% rename from Code/Tools/ProjectManager/source/Qt/ScreenWidget.h rename to Code/Tools/ProjectManager/Source/ScreenWidget.h index 0cec4bed03..b4c4fd190c 100644 --- a/Code/Tools/ProjectManager/source/Qt/ScreenWidget.h +++ b/Code/Tools/ProjectManager/Source/ScreenWidget.h @@ -12,7 +12,7 @@ #pragma once #if !defined(Q_MOC_RUN) -#include +#include #include #endif diff --git a/Code/Tools/ProjectManager/source/main.cpp b/Code/Tools/ProjectManager/Source/main.cpp similarity index 98% rename from Code/Tools/ProjectManager/source/main.cpp rename to Code/Tools/ProjectManager/Source/main.cpp index 7ae977818b..149da79491 100644 --- a/Code/Tools/ProjectManager/source/main.cpp +++ b/Code/Tools/ProjectManager/Source/main.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake index 0616b28e1e..333180ea78 100644 --- a/Code/Tools/ProjectManager/project_manager_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_files.cmake @@ -11,30 +11,30 @@ set(FILES project_manager.qrc - source/main.cpp - source/ScreenDefs.h - source/ScreenFactory.h - source/ScreenFactory.cpp - source/Qt/ScreenWidget.h - source/Qt/FirstTimeUse.h - source/Qt/FirstTimeUse.cpp - source/Qt/FirstTimeUse.ui - source/Qt/ProjectManagerWindow.h - source/Qt/ProjectManagerWindow.cpp - source/Qt/ProjectManagerWindow.ui - source/Qt/NewProjectSettings.h - source/Qt/NewProjectSettings.cpp - source/Qt/NewProjectSettings.ui - source/Qt/GemCatalog.h - source/Qt/GemCatalog.cpp - source/Qt/GemCatalog.ui - source/Qt/ProjectsHome.h - source/Qt/ProjectsHome.cpp - source/Qt/ProjectsHome.ui - source/Qt/ProjectSettings.h - source/Qt/ProjectSettings.cpp - source/Qt/ProjectSettings.ui - source/Qt/EngineSettings.h - source/Qt/EngineSettings.cpp - source/Qt/EngineSettings.ui -) \ No newline at end of file + Source/main.cpp + Source/ScreenDefs.h + Source/ScreenFactory.h + Source/ScreenFactory.cpp + Source/ScreenWidget.h + Source/FirstTimeUse.h + Source/FirstTimeUse.cpp + Source/FirstTimeUse.ui + Source/ProjectManagerWindow.h + Source/ProjectManagerWindow.cpp + Source/ProjectManagerWindow.ui + Source/NewProjectSettings.h + Source/NewProjectSettings.cpp + Source/NewProjectSettings.ui + Source/GemCatalog.h + Source/GemCatalog.cpp + Source/GemCatalog.ui + Source/ProjectsHome.h + Source/ProjectsHome.cpp + Source/ProjectsHome.ui + Source/ProjectSettings.h + Source/ProjectSettings.cpp + Source/ProjectSettings.ui + Source/EngineSettings.h + Source/EngineSettings.cpp + Source/EngineSettings.ui +) From 46b4b76682b9ff1587d3243cb846a93699c17885 Mon Sep 17 00:00:00 2001 From: moudgils Date: Wed, 5 May 2021 17:17:47 -0700 Subject: [PATCH 9/9] Add Vulkan and DX12 builders as Mac should be able to build assets from other platforms --- AutomatedTesting/Gem/Code/Platform/Mac/tool_dependencies.cmake | 2 ++ 1 file changed, 2 insertions(+) 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