diff --git a/Assets/Editor/Icons/Components/Viewport/Non Uniform Scale.svg b/Assets/Editor/Icons/Components/Viewport/NonUniformScale.svg
similarity index 100%
rename from Assets/Editor/Icons/Components/Viewport/Non Uniform Scale.svg
rename to Assets/Editor/Icons/Components/Viewport/NonUniformScale.svg
diff --git a/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg b/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg
new file mode 100644
index 0000000000..5457b3f1ca
--- /dev/null
+++ b/AutomatedTesting/AssetProcessorGamePlatformConfig.setreg
@@ -0,0 +1,19 @@
+{
+ "Amazon": {
+ "AssetProcessor": {
+ "Settings": {
+ "RC cgf": {
+ "ignore": true
+ },
+ "RC fbx": {
+ "ignore": true
+ },
+ "ScanFolder AtomTestData": {
+ "watch": "@ENGINEROOT@/Gems/Atom/TestData",
+ "recursive": 1,
+ "order": 1000
+ }
+ }
+ }
+ }
+}
diff --git a/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt
index 7048a6bd46..172eded09a 100644
--- a/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/Blast/CMakeLists.txt
@@ -12,7 +12,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE main
TEST_SERIAL TRUE
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Active.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py
index cec1b6456b..985e32ede5 100644
--- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py
+++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_editor_utils.py
@@ -8,6 +8,7 @@ SPDX-License-Identifier: Apache-2.0 OR MIT
import azlmbr.bus as bus
import azlmbr.editor as editor
import azlmbr.entity as entity
+import azlmbr.legacy.general as general
import azlmbr.object
from typing import List
@@ -428,3 +429,32 @@ def get_component_type_id_map(component_name_list):
type_ids_by_component[component_names[i]] = typeId
return type_ids_by_component
+
+
+def attach_component_to_entity(entity_id, component_name):
+ # type: (azlmbr.entity.EntityId, str) -> azlmbr.entity.EntityComponentIdPair
+ """
+ Adds the component if not added already.
+ :param entity_id: EntityId of the entity to attach the component to
+ :param component_name: name of the component
+ :return: If successful, returns the EntityComponentIdPair, otherwise returns None.
+ """
+ type_ids_list = editor.EditorComponentAPIBus(
+ bus.Broadcast, 'FindComponentTypeIdsByEntityType', [component_name], 0)
+ general.log(f"Components found = {len(type_ids_list)}")
+ if len(type_ids_list) < 1:
+ general.log(f"ERROR: A component class with name {component_name} doesn't exist")
+ return None
+ elif len(type_ids_list) > 1:
+ general.log(f"ERROR: Found more than one component classes with same name: {component_name}")
+ return None
+ # Before adding the component let's check if it is already attached to the entity.
+ component_outcome = editor.EditorComponentAPIBus(bus.Broadcast, 'GetComponentOfType', entity_id, type_ids_list[0])
+ if component_outcome.IsSuccess():
+ return component_outcome.GetValue() # In this case the value is not a list.
+ component_outcome = editor.EditorComponentAPIBus(bus.Broadcast, 'AddComponentsOfType', entity_id, type_ids_list)
+ if component_outcome.IsSuccess():
+ general.log(f"{component_name} Component added to entity.")
+ return component_outcome.GetValue()[0]
+ general.log(f"ERROR: Failed to add component [{component_name}] to entity")
+ return None
diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py
index 3004b9ec7d..3d4d9ea419 100644
--- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py
+++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/editor_python_test_tools/hydra_test_utils.py
@@ -29,7 +29,7 @@ def teardown_editor(editor):
def launch_and_validate_results(request, test_directory, editor, editor_script, expected_lines, unexpected_lines=[],
halt_on_unexpected=False, run_python="--runpythontest", auto_test_mode=True, null_renderer=True, cfg_args=[],
- timeout=300):
+ timeout=300, log_file_name="Editor.log"):
"""
Runs the Editor with the specified script, and monitors for expected log lines.
:param request: Special fixture providing information of the requesting test function.
@@ -44,6 +44,7 @@ def launch_and_validate_results(request, test_directory, editor, editor_script,
:param null_renderer: Specifies the test does not require the renderer. Defaults to True.
:param cfg_args: Additional arguments for CFG, such as LevelName.
:param timeout: Length of time for test to run. Default is 60.
+ :param log_file_name: Name of the log file created by the editor. Defaults to 'Editor.log'
"""
test_case = os.path.join(test_directory, editor_script)
request.addfinalizer(lambda: teardown_editor(editor))
@@ -58,7 +59,17 @@ def launch_and_validate_results(request, test_directory, editor, editor_script,
with editor.start():
- editorlog_file = os.path.join(editor.workspace.paths.project_log(), 'Editor.log')
+ editorlog_file = os.path.join(editor.workspace.paths.project_log(), log_file_name)
+
+ # Log monitor requires the file to exist.
+ logger.debug(f"Waiting until log file <{editorlog_file}> exists...")
+ waiter.wait_for(
+ lambda: os.path.exists(editorlog_file),
+ timeout=60,
+ exc=f"Log file '{editorlog_file}' was never created by another process.",
+ interval=1,
+ )
+ logger.debug(f"Done! log file <{editorlog_file}> exists.")
# Initialize the log monitor and set time to wait for log creation
log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=editor, log_file_path=editorlog_file)
diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/NvCloth/CMakeLists.txt
index a39cdf04cf..3913041f88 100644
--- a/AutomatedTesting/Gem/PythonTests/NvCloth/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/NvCloth/CMakeLists.txt
@@ -13,7 +13,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_REQUIRES gpu
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Active.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/CMakeLists.txt
index 9b6542b3e3..905470e08f 100644
--- a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/CMakeLists.txt
@@ -12,7 +12,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE periodic
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt
index b5fcfcc44c..1c7a02862d 100644
--- a/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/CMakeLists.txt
@@ -12,7 +12,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE main
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Active.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt
index 0170d73af0..3d7a9204e2 100644
--- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/CMakeLists.txt
@@ -92,17 +92,17 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
AZ::AssetProcessor
)
- ly_add_pytest(
- NAME AssetPipelineTests.AssetBundler
- PATH ${CMAKE_CURRENT_LIST_DIR}/asset_bundler_batch_tests.py
- EXCLUDE_TEST_RUN_TARGET_FROM_IDE
- TEST_SERIAL
- TIMEOUT 2400
- TEST_SUITE periodic
- RUNTIME_DEPENDENCIES
- AZ::AssetProcessor
- AZ::AssetBundlerBatch
- )
+ # Issue #3017
+ #ly_add_pytest(
+ # NAME AssetPipelineTests.AssetBundler
+ # PATH ${CMAKE_CURRENT_LIST_DIR}/asset_bundler_batch_tests.py
+ # EXCLUDE_TEST_RUN_TARGET_FROM_IDE
+ # TEST_SERIAL
+ # TEST_SUITE periodic
+ # RUNTIME_DEPENDENCIES
+ # AZ::AssetProcessor
+ # AZ::AssetBundlerBatch
+ #)
ly_add_pytest(
NAME AssetPipelineTests.AssetBundler_SandBox
@@ -111,7 +111,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
PYTEST_MARKS "SUITE_sandbox" # run only sandbox tests in this file
EXCLUDE_TEST_RUN_TARGET_FROM_IDE
TEST_SERIAL
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
AZ::AssetBundlerBatch
@@ -133,7 +132,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
PATH ${CMAKE_CURRENT_LIST_DIR}/missing_dependency_tests.py
EXCLUDE_TEST_RUN_TARGET_FROM_IDE
TEST_SERIAL
- TIMEOUT 1500
TEST_SUITE periodic
RUNTIME_DEPENDENCIES
AZ::AssetProcessorBatch
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt
index d4f036faeb..f056623ecd 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/CMakeLists.txt
@@ -39,7 +39,7 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_BUILD_TESTS_SUPPORTED AND AutomatedT
TEST_SUITE main
TEST_REQUIRES gpu
TEST_SERIAL
- TIMEOUT 800
+ TIMEOUT 1200
PATH ${CMAKE_CURRENT_LIST_DIR}/test_Atom_GPUTests.py
RUNTIME_DEPENDENCIES
AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py
index b4031d2ffa..cd10caf57b 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_AddedToEntity.py
@@ -206,8 +206,8 @@ def run():
# PostFX Layer Component
ComponentTests("PostFX Layer")
- # Radius Weight Modifier Component
- ComponentTests("Radius Weight Modifier")
+ # PostFX Radius Weight Modifier Component
+ ComponentTests("PostFX Radius Weight Modifier")
# Light Component
ComponentTests("Light")
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_LightComponent.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_LightComponent.py
index ec8dc199ae..24866f3b19 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_LightComponent.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomEditorComponents_LightComponent.py
@@ -19,7 +19,7 @@ import azlmbr.legacy.general as general
sys.path.append(os.path.join(azlmbr.paths.devassets, "Gem", "PythonTests"))
import editor_python_test_tools.hydra_editor_utils as hydra
-from atom_renderer.atom_utils.atom_component_helper import LIGHT_TYPES
+from atom_renderer.atom_utils.atom_constants import LIGHT_TYPES
LIGHT_TYPE_PROPERTY = 'Controller|Configuration|Light type'
SPHERE_AND_SPOT_DISK_LIGHT_PROPERTIES = [
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomMaterialEditor_BasicTests.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomMaterialEditor_BasicTests.py
new file mode 100644
index 0000000000..b3c51ca912
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_AtomMaterialEditor_BasicTests.py
@@ -0,0 +1,183 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+
+import azlmbr.materialeditor will fail with a ModuleNotFound error when using this script with Editor.exe
+This is because azlmbr.materialeditor only binds to MaterialEditor.exe and not Editor.exe
+You need to launch this script with MaterialEditor.exe in order for azlmbr.materialeditor to appear.
+"""
+
+import os
+import sys
+import time
+
+import azlmbr.math as math
+import azlmbr.paths
+
+sys.path.append(os.path.join(azlmbr.paths.devassets, "Gem", "PythonTests"))
+
+import atom_renderer.atom_utils.material_editor_utils as material_editor
+
+NEW_MATERIAL = "test_material.material"
+NEW_MATERIAL_1 = "test_material_1.material"
+NEW_MATERIAL_2 = "test_material_2.material"
+TEST_MATERIAL_1 = "001_DefaultWhite.material"
+TEST_MATERIAL_2 = "002_BaseColorLerp.material"
+TEST_MATERIAL_3 = "003_MetalMatte.material"
+TEST_DATA_PATH = os.path.join(
+ azlmbr.paths.devroot, "Gems", "Atom", "TestData", "TestData", "Materials", "StandardPbrTestCases"
+)
+MATERIAL_TYPE_PATH = os.path.join(
+ azlmbr.paths.devroot, "Gems", "Atom", "Feature", "Common", "Assets",
+ "Materials", "Types", "StandardPBR.materialtype",
+)
+
+
+def run():
+ """
+ Summary:
+ Material Editor basic tests including the below
+ 1. Opening an Existing Asset
+ 2. Creating a New Asset
+ 3. Closing Selected Material
+ 4. Closing All Materials
+ 5. Closing all but Selected Material
+ 6. Saving Material
+ 7. Saving as a New Material
+ 8. Saving as a Child Material
+ 9. Saving all Open Materials
+
+ Expected Result:
+ All the above functions work as expected in Material Editor.
+
+ :return: None
+ """
+
+ # 1) Test Case: Opening an Existing Asset
+ document_id = material_editor.open_material(MATERIAL_TYPE_PATH)
+ print(f"Material opened: {material_editor.is_open(document_id)}")
+
+ # Verify if the test material exists initially
+ target_path = os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Materials", NEW_MATERIAL)
+ print(f"Test asset doesn't exist initially: {not os.path.exists(target_path)}")
+
+ # 2) Test Case: Creating a New Material Using Existing One
+ material_editor.save_document_as_child(document_id, target_path)
+ material_editor.wait_for_condition(lambda: os.path.exists(target_path), 2.0)
+ print(f"New asset created: {os.path.exists(target_path)}")
+
+ # Verify if the newly created document is open
+ new_document_id = material_editor.open_material(target_path)
+ material_editor.wait_for_condition(lambda: material_editor.is_open(new_document_id))
+ print(f"New Material opened: {material_editor.is_open(new_document_id)}")
+
+ # 3) Test Case: Closing Selected Material
+ print(f"Material closed: {material_editor.close_document(new_document_id)}")
+
+ # Open materials initially
+ document1_id, document2_id, document3_id = (
+ material_editor.open_material(os.path.join(TEST_DATA_PATH, material))
+ for material in [TEST_MATERIAL_1, TEST_MATERIAL_2, TEST_MATERIAL_3]
+ )
+
+ # 4) Test Case: Closing All Materials
+ print(f"All documents closed: {material_editor.close_all_documents()}")
+
+ # 5) Test Case: Closing all but Selected Material
+ document1_id, document2_id, document3_id = (
+ material_editor.open_material(os.path.join(TEST_DATA_PATH, material))
+ for material in [TEST_MATERIAL_1, TEST_MATERIAL_2, TEST_MATERIAL_3]
+ )
+ result = material_editor.close_all_except_selected(document1_id)
+ print(f"Close All Except Selected worked as expected: {result and material_editor.is_open(document1_id)}")
+
+ # 6) Test Case: Saving Material
+ document_id = material_editor.open_material(os.path.join(TEST_DATA_PATH, TEST_MATERIAL_1))
+ property_name = azlmbr.name.Name("baseColor.color")
+ initial_color = material_editor.get_property(document_id, property_name)
+ # Assign new color to the material file and save the actual material
+ expected_color = math.Color(0.25, 0.25, 0.25, 1.0)
+ material_editor.set_property(document_id, property_name, expected_color)
+ material_editor.save_document(document_id)
+
+ # 7) Test Case: Saving as a New Material
+ # Assign new color to the material file and save the document as copy
+ expected_color_1 = math.Color(0.5, 0.5, 0.5, 1.0)
+ material_editor.set_property(document_id, property_name, expected_color_1)
+ target_path_1 = os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Materials", NEW_MATERIAL_1)
+ material_editor.save_document_as_copy(document_id, target_path_1)
+ time.sleep(2.0)
+
+ # 8) Test Case: Saving as a Child Material
+ # Assign new color to the material file save the document as child
+ expected_color_2 = math.Color(0.75, 0.75, 0.75, 1.0)
+ material_editor.set_property(document_id, property_name, expected_color_2)
+ target_path_2 = os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Materials", NEW_MATERIAL_2)
+ material_editor.save_document_as_child(document_id, target_path_2)
+ time.sleep(2.0)
+
+ # Close/Reopen documents
+ material_editor.close_all_documents()
+ document_id = material_editor.open_material(os.path.join(TEST_DATA_PATH, TEST_MATERIAL_1))
+ document1_id = material_editor.open_material(target_path_1)
+ document2_id = material_editor.open_material(target_path_2)
+
+ # Verify if the changes are saved in the actual document
+ actual_color = material_editor.get_property(document_id, property_name)
+ print(f"Actual Document saved with changes: {material_editor.compare_colors(actual_color, expected_color)}")
+
+ # Verify if the changes are saved in the document saved as copy
+ actual_color = material_editor.get_property(document1_id, property_name)
+ result_copy = material_editor.compare_colors(actual_color, expected_color_1)
+ print(f"Document saved as copy is saved with changes: {result_copy}")
+
+ # Verify if the changes are saved in the document saved as child
+ actual_color = material_editor.get_property(document2_id, property_name)
+ result_child = material_editor.compare_colors(actual_color, expected_color_2)
+ print(f"Document saved as child is saved with changes: {result_child}")
+
+ # Revert back the changes in the actual document
+ material_editor.set_property(document_id, property_name, initial_color)
+ material_editor.save_document(document_id)
+ material_editor.close_all_documents()
+
+ # 9) Test Case: Saving all Open Materials
+ # Open first material and make change to the values
+ document1_id = material_editor.open_material(os.path.join(TEST_DATA_PATH, TEST_MATERIAL_1))
+ property1_name = azlmbr.name.Name("metallic.factor")
+ initial_metallic_factor = material_editor.get_property(document1_id, property1_name)
+ expected_metallic_factor = 0.444
+ material_editor.set_property(document1_id, property1_name, expected_metallic_factor)
+
+ # Open second material and make change to the values
+ document2_id = material_editor.open_material(os.path.join(TEST_DATA_PATH, TEST_MATERIAL_2))
+ property2_name = azlmbr.name.Name("baseColor.color")
+ initial_color = material_editor.get_property(document2_id, property2_name)
+ expected_color = math.Color(0.4156, 0.0196, 0.6862, 1.0)
+ material_editor.set_property(document2_id, property2_name, expected_color)
+
+ # Save all and close all documents
+ material_editor.save_all()
+ material_editor.close_all_documents()
+
+ # Reopen materials and verify values
+ document1_id = material_editor.open_material(os.path.join(TEST_DATA_PATH, TEST_MATERIAL_1))
+ result = material_editor.is_close(
+ material_editor.get_property(document1_id, property1_name), expected_metallic_factor, 0.00001
+ )
+ document2_id = material_editor.open_material(os.path.join(TEST_DATA_PATH, TEST_MATERIAL_2))
+ result = result and material_editor.compare_colors(
+ expected_color, material_editor.get_property(document2_id, property2_name))
+ print(f"Save All worked as expected: {result}")
+
+ # Revert the changes made
+ material_editor.set_property(document1_id, property1_name, initial_metallic_factor)
+ material_editor.set_property(document2_id, property2_name, initial_color)
+ material_editor.save_all()
+ material_editor.close_all_documents()
+
+
+if __name__ == "__main__":
+ run()
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_GPUTest_LightComponent.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_GPUTest_LightComponent.py
new file mode 100644
index 0000000000..8063445608
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_hydra_scripts/hydra_GPUTest_LightComponent.py
@@ -0,0 +1,267 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+
+Hydra script that is used to create an entity with a Light component attached.
+It then updates the property values of the Light component and takes a screenshot.
+The screenshot is compared against an expected golden image for test verification.
+
+See the run() function for more in-depth test info.
+"""
+import os
+import sys
+
+import azlmbr.asset as asset
+import azlmbr.bus as bus
+import azlmbr.editor as editor
+import azlmbr.math as math
+import azlmbr.paths
+import azlmbr.legacy.general as general
+
+sys.path.append(os.path.join(azlmbr.paths.devroot, "AutomatedTesting", "Gem", "PythonTests"))
+
+import editor_python_test_tools.hydra_editor_utils as hydra
+from atom_renderer.atom_utils import atom_component_helper, atom_constants, screenshot_utils
+from editor_python_test_tools.editor_test_helper import EditorTestHelper
+
+helper = EditorTestHelper(log_prefix="Atom_EditorTestHelper")
+
+LEVEL_NAME = "auto_test"
+LIGHT_COMPONENT = "Light"
+LIGHT_TYPE_PROPERTY = 'Controller|Configuration|Light type'
+DEGREE_RADIAN_FACTOR = 0.0174533
+
+
+def run():
+ """
+ Sets up the tests by making sure the required level is created & setup correctly.
+ It then executes 2 test cases - see each associated test function's docstring for more info.
+
+ Finally prints the string "Light component tests completed" after completion
+
+ Tests will fail immediately if any of these log lines are found:
+ 1. Trace::Assert
+ 2. Trace::Error
+ 3. Traceback (most recent call last):
+
+ :return: None
+ """
+ atom_component_helper.create_basic_atom_level(level_name=LEVEL_NAME)
+
+ # Run tests.
+ area_light_test()
+ spot_light_test()
+ general.log("Light component tests completed.")
+
+
+def area_light_test():
+ """
+ Basic test for the "Light" component attached to an "area_light" entity.
+
+ Test Case - Light Component: Capsule, Spot (disk), and Point (sphere):
+ 1. Creates "area_light" entity w/ a Light component that has a Capsule Light type w/ the color set to 255, 0, 0
+ 2. Enters game mode to take a screenshot for comparison, then exits game mode.
+ 3. Sets the Light component Intensity Mode to Lumens (default).
+ 4. Ensures the Light component Mode is Automatic (default).
+ 5. Sets the Intensity value of the Light component to 0.0
+ 6. Enters game mode again, takes another screenshot for comparison, then exits game mode.
+ 7. Updates the Intensity value of the Light component to 1000.0
+ 8. Enters game mode again, takes another screenshot for comparison, then exits game mode.
+ 9. Swaps the Capsule light type option to Spot (disk) light type on the Light component
+ 10. Updates "area_light" entity Transform rotate value to x: 90.0, y:0.0, z:0.0
+ 11. Enters game mode again, takes another screenshot for comparison, then exits game mode.
+ 12. Swaps the Spot (disk) light type for the Point (sphere) light type in the Light component.
+ 13. Enters game mode again, takes another screenshot for comparison, then exits game mode.
+ 14. Deletes the Light component from the "area_light" entity and verifies its successful.
+ """
+ # Create an "area_light" entity with "Light" component using Light type of "Capsule"
+ area_light_entity_name = "area_light"
+ area_light = hydra.Entity(area_light_entity_name)
+ area_light.create_entity(math.Vector3(-1.0, -2.0, 3.0), [LIGHT_COMPONENT])
+ general.log(
+ f"{area_light_entity_name}_test: Component added to the entity: "
+ f"{hydra.has_components(area_light.id, [LIGHT_COMPONENT])}")
+ light_component_id_pair = hydra.attach_component_to_entity(area_light.id, LIGHT_COMPONENT)
+
+ # Select the "Capsule" light type option.
+ azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ light_component_id_pair,
+ LIGHT_TYPE_PROPERTY,
+ atom_constants.LIGHT_TYPES['capsule']
+ )
+
+ # Update color and take screenshot in game mode
+ color = math.Color(255.0, 0.0, 0.0, 0.0)
+ area_light.get_set_test(0, "Controller|Configuration|Color", color)
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("AreaLight_1", area_light_entity_name)
+
+ # Update intensity value to 0.0 and take screenshot in game mode
+ area_light.get_set_test(0, "Controller|Configuration|Attenuation Radius|Mode", 1)
+ area_light.get_set_test(0, "Controller|Configuration|Intensity", 0.0)
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("AreaLight_2", area_light_entity_name)
+
+ # Update intensity value to 1000.0 and take screenshot in game mode
+ area_light.get_set_test(0, "Controller|Configuration|Intensity", 1000.0)
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("AreaLight_3", area_light_entity_name)
+
+ # Swap the "Capsule" light type option to "Spot (disk)" light type
+ azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ light_component_id_pair,
+ LIGHT_TYPE_PROPERTY,
+ atom_constants.LIGHT_TYPES['spot_disk']
+ )
+ area_light_rotation = math.Vector3(DEGREE_RADIAN_FACTOR * 90.0, 0.0, 0.0)
+ azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", area_light.id, area_light_rotation)
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("AreaLight_4", area_light_entity_name)
+
+ # Swap the "Spot (disk)" light type to the "Point (sphere)" light type and take screenshot.
+ azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ light_component_id_pair,
+ LIGHT_TYPE_PROPERTY,
+ atom_constants.LIGHT_TYPES['sphere']
+ )
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("AreaLight_5", area_light_entity_name)
+
+ editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntityById", area_light.id)
+
+
+def spot_light_test():
+ """
+ Basic test for the Light component attached to a "spot_light" entity.
+
+ Test Case - Light Component: Spot (disk) with shadows & colors:
+ 1. Creates "spot_light" entity w/ a Light component attached to it.
+ 2. Selects the "directional_light" entity already present in the level and disables it.
+ 3. Selects the "global_skylight" entity already present in the level and disables the HDRi Skybox component,
+ as well as the Global Skylight (IBL) component.
+ 4. Enters game mode to take a screenshot for comparison, then exits game mode.
+ 5. Selects the "ground_plane" entity and changes updates the material to a new material.
+ 6. Enters game mode to take a screenshot for comparison, then exits game mode.
+ 7. Selects the "spot_light" entity and increases the Light component Intensity to 800 lm
+ 8. Enters game mode to take a screenshot for comparison, then exits game mode.
+ 9. Selects the "spot_light" entity and sets the Light component Color to 47, 75, 37
+ 10. Enters game mode to take a screenshot for comparison, then exits game mode.
+ 11. Selects the "spot_light" entity and modifies the Shutter controls to the following values:
+ - Enable shutters: True
+ - Inner Angle: 60.0
+ - Outer Angle: 75.0
+ 12. Enters game mode to take a screenshot for comparison, then exits game mode.
+ 13. Selects the "spot_light" entity and modifies the Shadow controls to the following values:
+ - Enable Shadow: True
+ - ShadowmapSize: 256
+ 14. Modifies the world translate position of the "spot_light" entity to 0.7, -2.0, 1.9 (for casting shadows better)
+ 15. Enters game mode to take a screenshot for comparison, then exits game mode.
+ """
+ # Disable "Directional Light" component for the "directional_light" entity
+ # "directional_light" entity is created by the create_basic_atom_level() function by default.
+ directional_light_entity_id = hydra.find_entity_by_name("directional_light")
+ directional_light = hydra.Entity(name='directional_light', id=directional_light_entity_id)
+ directional_light_component_type = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Directional Light"], 0)[0]
+ directional_light_component = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'GetComponentOfType', directional_light.id, directional_light_component_type
+ ).GetValue()
+ editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [directional_light_component])
+ general.idle_wait(0.5)
+
+ # Disable "Global Skylight (IBL)" and "HDRi Skybox" components for the "global_skylight" entity
+ global_skylight_entity_id = hydra.find_entity_by_name("global_skylight")
+ global_skylight = hydra.Entity(name='global_skylight', id=global_skylight_entity_id)
+ global_skylight_component_type = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Global Skylight (IBL)"], 0)[0]
+ global_skylight_component = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'GetComponentOfType', global_skylight.id, global_skylight_component_type
+ ).GetValue()
+ editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [global_skylight_component])
+ hdri_skybox_component_type = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["HDRi Skybox"], 0)[0]
+ hdri_skybox_component = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'GetComponentOfType', global_skylight.id, hdri_skybox_component_type
+ ).GetValue()
+ editor.EditorComponentAPIBus(bus.Broadcast, "DisableComponents", [hdri_skybox_component])
+ general.idle_wait(0.5)
+
+ # Create a "spot_light" entity with "Light" component using Light Type of "Spot (disk)"
+ spot_light_entity_name = "spot_light"
+ spot_light = hydra.Entity(spot_light_entity_name)
+ spot_light.create_entity(math.Vector3(0.7, -2.0, 1.0), [LIGHT_COMPONENT])
+ general.log(
+ f"{spot_light_entity_name}_test: Component added to the entity: "
+ f"{hydra.has_components(spot_light.id, [LIGHT_COMPONENT])}")
+ rotation = math.Vector3(DEGREE_RADIAN_FACTOR * 300.0, 0.0, 0.0)
+ azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", spot_light.id, rotation)
+ light_component_type = hydra.attach_component_to_entity(spot_light.id, LIGHT_COMPONENT)
+ editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ light_component_type,
+ LIGHT_TYPE_PROPERTY,
+ atom_constants.LIGHT_TYPES['spot_disk']
+ )
+
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("SpotLight_1", spot_light_entity_name)
+
+ # Change default material of ground plane entity and take screenshot
+ ground_plane_entity_id = hydra.find_entity_by_name("ground_plane")
+ ground_plane = hydra.Entity(name='ground_plane', id=ground_plane_entity_id)
+ ground_plane_asset_path = os.path.join("Materials", "Presets", "MacBeth", "22_neutral_5-0_0-70d.azmaterial")
+ ground_plane_asset_value = asset.AssetCatalogRequestBus(
+ bus.Broadcast, "GetAssetIdByPath", ground_plane_asset_path, math.Uuid(), False)
+ material_property_path = "Default Material|Material Asset"
+ material_component_type = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'FindComponentTypeIdsByEntityType', ["Material"], 0)[0]
+ material_component = azlmbr.editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast, 'GetComponentOfType', ground_plane.id, material_component_type).GetValue()
+ editor.EditorComponentAPIBus(
+ azlmbr.bus.Broadcast,
+ 'SetComponentProperty',
+ material_component,
+ material_property_path,
+ ground_plane_asset_value
+ )
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("SpotLight_2", spot_light_entity_name)
+
+ # Increase intensity value of the Spot light and take screenshot in game mode
+ spot_light.get_set_test(0, "Controller|Configuration|Intensity", 800.0)
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("SpotLight_3", spot_light_entity_name)
+
+ # Update the Spot light color and take screenshot in game mode
+ color_value = math.Color(47.0 / 255.0, 75.0 / 255.0, 37.0 / 255.0, 255.0 / 255.0)
+ spot_light.get_set_test(0, "Controller|Configuration|Color", color_value)
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("SpotLight_4", spot_light_entity_name)
+
+ # Update the Shutter controls of the Light component and take screenshot
+ spot_light.get_set_test(0, "Controller|Configuration|Shutters|Enable shutters", True)
+ spot_light.get_set_test(0, "Controller|Configuration|Shutters|Inner angle", 60.0)
+ spot_light.get_set_test(0, "Controller|Configuration|Shutters|Outer angle", 75.0)
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("SpotLight_5", spot_light_entity_name)
+
+ # Update the Shadow controls, move the spot_light entity world translate position and take screenshot
+ spot_light.get_set_test(0, "Controller|Configuration|Shadows|Enable shadow", True)
+ spot_light.get_set_test(0, "Controller|Configuration|Shadows|Shadowmap size", 256.0)
+ azlmbr.components.TransformBus(
+ azlmbr.bus.Event, "SetWorldTranslation", spot_light.id, math.Vector3(0.7, -2.0, 1.9))
+ general.idle_wait(1.0)
+ screenshot_utils.take_screenshot_game_mode("SpotLight_6", spot_light_entity_name)
+
+
+if __name__ == "__main__":
+ run()
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_component_helper.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_component_helper.py
index de4e28bb36..58b72ef01a 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_component_helper.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_component_helper.py
@@ -3,17 +3,184 @@ Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright
SPDX-License-Identifier: Apache-2.0 OR MIT
-File to assist with common hydra component functions or constants used across various Atom tests.
+File to assist with common hydra component functions used across various Atom tests.
"""
+import os
-# Light type options for the Light component.
-LIGHT_TYPES = {
- 'unknown': 0,
- 'sphere': 1,
- 'spot_disk': 2,
- 'capsule': 3,
- 'quad': 4,
- 'polygon': 5,
- 'simple_point': 6,
- 'simple_spot': 7,
-}
+from editor_python_test_tools.editor_test_helper import EditorTestHelper
+
+helper = EditorTestHelper(log_prefix="Atom_EditorTestHelper")
+
+
+def create_basic_atom_level(level_name):
+ """
+ Creates a new level inside the Editor matching level_name & adds the following:
+ 1. "default_level" entity to hold all other entities.
+ 2. Adds Grid, Global Skylight (IBL), ground Mesh, Directional Light, Sphere w/ material+mesh, & Camera components.
+ 3. Each of these components has its settings tweaked slightly to match the ideal scene to test Atom rendering.
+ :param level_name: name of the level to create and apply this basic setup to.
+ :return: None
+ """
+ import azlmbr.asset as asset
+ import azlmbr.bus as bus
+ import azlmbr.camera as camera
+ import azlmbr.editor as editor
+ import azlmbr.entity as entity
+ import azlmbr.legacy.general as general
+ import azlmbr.math as math
+ import azlmbr.object
+
+ import editor_python_test_tools.hydra_editor_utils as hydra
+
+ # Create a new level.
+ new_level_name = level_name
+ heightmap_resolution = 512
+ heightmap_meters_per_pixel = 1
+ terrain_texture_resolution = 412
+ use_terrain = False
+
+ # Return codes are ECreateLevelResult defined in CryEdit.h
+ return_code = general.create_level_no_prompt(
+ new_level_name, heightmap_resolution, heightmap_meters_per_pixel, terrain_texture_resolution, use_terrain)
+ if return_code == 1:
+ general.log(f"{new_level_name} level already exists")
+ elif return_code == 2:
+ general.log("Failed to create directory")
+ elif return_code == 3:
+ general.log("Directory length is too long")
+ elif return_code != 0:
+ general.log("Unknown error, failed to create level")
+ else:
+ general.log(f"{new_level_name} level created successfully")
+
+ # Enable idle and update viewport.
+ general.idle_enable(True)
+ general.idle_wait(1.0)
+ general.update_viewport()
+ general.idle_wait(0.5) # half a second is more than enough for updating the viewport.
+
+ # Close out problematic windows, FPS meters, and anti-aliasing.
+ if general.is_helpers_shown(): # Turn off the helper gizmos if visible
+ general.toggle_helpers()
+ general.idle_wait(1.0)
+ if general.is_pane_visible("Error Report"): # Close Error Report windows that block focus.
+ general.close_pane("Error Report")
+ if general.is_pane_visible("Error Log"): # Close Error Log windows that block focus.
+ general.close_pane("Error Log")
+ general.idle_wait(1.0)
+ general.run_console("r_displayInfo=0")
+ general.run_console("r_antialiasingmode=0")
+ general.idle_wait(1.0)
+
+ # Delete all existing entities & create default_level entity
+ search_filter = azlmbr.entity.SearchFilter()
+ all_entities = entity.SearchBus(azlmbr.bus.Broadcast, "SearchEntities", search_filter)
+ editor.ToolsApplicationRequestBus(bus.Broadcast, "DeleteEntities", all_entities)
+ default_level = hydra.Entity("default_level")
+ default_position = math.Vector3(0.0, 0.0, 0.0)
+ default_level.create_entity(default_position, ["Grid"])
+ default_level.get_set_test(0, "Controller|Configuration|Secondary Grid Spacing", 1.0)
+
+ # Set the viewport up correctly after adding the parent default_level entity.
+ screen_width = 1280
+ screen_height = 720
+ degree_radian_factor = 0.0174533 # Used by "Rotation" property for the Transform component.
+ general.set_viewport_size(screen_width, screen_height)
+ general.update_viewport()
+ helper.wait_for_condition(
+ function=lambda: helper.isclose(a=general.get_viewport_size().x, b=screen_width, rel_tol=0.1)
+ and helper.isclose(a=general.get_viewport_size().y, b=screen_height, rel_tol=0.1),
+ timeout_in_seconds=4.0
+ )
+ result = helper.isclose(a=general.get_viewport_size().x, b=screen_width, rel_tol=0.1) and helper.isclose(
+ a=general.get_viewport_size().y, b=screen_height, rel_tol=0.1)
+ general.log(general.get_viewport_size().x)
+ general.log(general.get_viewport_size().y)
+ general.log(general.get_viewport_size().z)
+ general.log(f"Viewport is set to the expected size: {result}")
+ general.log("Basic level created")
+ general.run_console("r_DisplayInfo = 0")
+
+ # Create global_skylight entity and set the properties
+ global_skylight = hydra.Entity("global_skylight")
+ global_skylight.create_entity(
+ entity_position=default_position,
+ components=["HDRi Skybox", "Global Skylight (IBL)"],
+ parent_id=default_level.id)
+ global_skylight_asset_path = os.path.join(
+ "LightingPresets", "greenwich_park_02_4k_iblskyboxcm_iblspecular.exr.streamingimage")
+ global_skylight_asset_value = asset.AssetCatalogRequestBus(
+ bus.Broadcast, "GetAssetIdByPath", global_skylight_asset_path, math.Uuid(), False)
+ global_skylight.get_set_test(0, "Controller|Configuration|Cubemap Texture", global_skylight_asset_value)
+ global_skylight.get_set_test(1, "Controller|Configuration|Diffuse Image", global_skylight_asset_value)
+ global_skylight.get_set_test(1, "Controller|Configuration|Specular Image", global_skylight_asset_value)
+
+ # Create ground_plane entity and set the properties
+ ground_plane = hydra.Entity("ground_plane")
+ ground_plane.create_entity(
+ entity_position=default_position,
+ components=["Material"],
+ parent_id=default_level.id)
+ azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalUniformScale", ground_plane.id, 32.0)
+ ground_plane_material_asset_path = os.path.join(
+ "Materials", "Presets", "PBR", "metal_chrome.azmaterial")
+ ground_plane_material_asset_value = asset.AssetCatalogRequestBus(
+ bus.Broadcast, "GetAssetIdByPath", ground_plane_material_asset_path, math.Uuid(), False)
+ ground_plane.get_set_test(0, "Default Material|Material Asset", ground_plane_material_asset_value)
+
+ # Work around to add the correct Atom Mesh component
+ mesh_type_id = azlmbr.globals.property.EditorMeshComponentTypeId
+ ground_plane.components.append(
+ editor.EditorComponentAPIBus(
+ bus.Broadcast, "AddComponentsOfType", ground_plane.id, [mesh_type_id]
+ ).GetValue()[0]
+ )
+ ground_plane_mesh_asset_path = os.path.join("Models", "plane.azmodel")
+ ground_plane_mesh_asset_value = asset.AssetCatalogRequestBus(
+ bus.Broadcast, "GetAssetIdByPath", ground_plane_mesh_asset_path, math.Uuid(), False)
+ ground_plane.get_set_test(1, "Controller|Configuration|Mesh Asset", ground_plane_mesh_asset_value)
+
+ # Create directional_light entity and set the properties
+ directional_light = hydra.Entity("directional_light")
+ directional_light.create_entity(
+ entity_position=math.Vector3(0.0, 0.0, 10.0),
+ components=["Directional Light"],
+ parent_id=default_level.id)
+ directional_light_rotation = math.Vector3(degree_radian_factor * -90.0, 0.0, 0.0)
+ azlmbr.components.TransformBus(
+ azlmbr.bus.Event, "SetLocalRotation", directional_light.id, directional_light_rotation)
+
+ # Create sphere entity and set the properties
+ sphere_entity = hydra.Entity("sphere")
+ sphere_entity.create_entity(
+ entity_position=math.Vector3(0.0, 0.0, 1.0),
+ components=["Material"],
+ parent_id=default_level.id)
+ sphere_material_asset_path = os.path.join("Materials", "Presets", "PBR", "metal_brass_polished.azmaterial")
+ sphere_material_asset_value = asset.AssetCatalogRequestBus(
+ bus.Broadcast, "GetAssetIdByPath", sphere_material_asset_path, math.Uuid(), False)
+ sphere_entity.get_set_test(0, "Default Material|Material Asset", sphere_material_asset_value)
+
+ # Work around to add the correct Atom Mesh component
+ sphere_entity.components.append(
+ editor.EditorComponentAPIBus(
+ bus.Broadcast, "AddComponentsOfType", sphere_entity.id, [mesh_type_id]
+ ).GetValue()[0]
+ )
+ sphere_mesh_asset_path = os.path.join("Models", "sphere.azmodel")
+ sphere_mesh_asset_value = asset.AssetCatalogRequestBus(
+ bus.Broadcast, "GetAssetIdByPath", sphere_mesh_asset_path, math.Uuid(), False)
+ sphere_entity.get_set_test(1, "Controller|Configuration|Mesh Asset", sphere_mesh_asset_value)
+
+ # Create camera component and set the properties
+ camera_entity = hydra.Entity("camera")
+ camera_entity.create_entity(
+ entity_position=math.Vector3(5.5, -12.0, 9.0),
+ components=["Camera"],
+ parent_id=default_level.id)
+ rotation = math.Vector3(
+ degree_radian_factor * -27.0, degree_radian_factor * -12.0, degree_radian_factor * 25.0
+ )
+ azlmbr.components.TransformBus(azlmbr.bus.Event, "SetLocalRotation", camera_entity.id, rotation)
+ camera_entity.get_set_test(0, "Controller|Configuration|Field of view", 60.0)
+ camera.EditorCameraViewRequestBus(azlmbr.bus.Event, "ToggleCameraAsActiveView", camera_entity.id)
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_constants.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_constants.py
new file mode 100644
index 0000000000..88a959f198
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/atom_constants.py
@@ -0,0 +1,19 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+
+Hold constants used across both hydra and non-hydra scripts.
+"""
+
+# Light type options for the Light component.
+LIGHT_TYPES = {
+ 'unknown': 0,
+ 'sphere': 1,
+ 'spot_disk': 2,
+ 'capsule': 3,
+ 'quad': 4,
+ 'polygon': 5,
+ 'simple_point': 6,
+ 'simple_spot': 7,
+}
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/material_editor_utils.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/material_editor_utils.py
new file mode 100644
index 0000000000..1d72885504
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/material_editor_utils.py
@@ -0,0 +1,274 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+
+import azlmbr.materialeditor will fail with a ModuleNotFound error when using this script with Editor.exe
+This is because azlmbr.materialeditor only binds to MaterialEditor.exe and not Editor.exe
+You need to launch this script with MaterialEditor.exe in order for azlmbr.materialeditor to appear.
+"""
+
+import os
+import sys
+import time
+import azlmbr.atom
+import azlmbr.atomtools as atomtools
+import azlmbr.materialeditor as materialeditor
+import azlmbr.bus as bus
+
+
+def is_close(actual, expected, buffer=sys.float_info.min):
+ """
+ :param actual: actual value
+ :param expected: expected value
+ :param buffer: acceptable variation from expected
+ :return: bool
+ """
+ return abs(actual - expected) < buffer
+
+
+def compare_colors(color1, color2, buffer=0.00001):
+ """
+ Compares the red, green and blue properties of a color allowing a slight variance of buffer
+ :param color1: first color to compare
+ :param color2: second color
+ :param buffer: allowed variance in individual color value
+ :return: bool
+ """
+ return (
+ is_close(color1.r, color2.r, buffer)
+ and is_close(color1.g, color2.g, buffer)
+ and is_close(color1.b, color2.b, buffer)
+ )
+
+
+def open_material(file_path):
+ """
+ :return: uuid of material document opened
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(bus.Broadcast, "OpenDocument", file_path)
+
+
+def is_open(document_id):
+ """
+ :return: bool
+ """
+ return materialeditor.MaterialDocumentRequestBus(bus.Event, "IsOpen", document_id)
+
+
+def save_document(document_id):
+ """
+ :return: bool success
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(bus.Broadcast, "SaveDocument", document_id)
+
+
+def save_document_as_copy(document_id, target_path):
+ """
+ :return: bool success
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(
+ bus.Broadcast, "SaveDocumentAsCopy", document_id, target_path
+ )
+
+
+def save_document_as_child(document_id, target_path):
+ """
+ :return: bool success
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(
+ bus.Broadcast, "SaveDocumentAsChild", document_id, target_path
+ )
+
+
+def save_all():
+ """
+ :return: bool success
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(bus.Broadcast, "SaveAllDocuments")
+
+
+def close_document(document_id):
+ """
+ :return: bool success
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(bus.Broadcast, "CloseDocument", document_id)
+
+
+def close_all_documents():
+ """
+ :return: bool success
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(bus.Broadcast, "CloseAllDocuments")
+
+
+def close_all_except_selected(document_id):
+ """
+ :return: bool success
+ """
+ return materialeditor.MaterialDocumentSystemRequestBus(bus.Broadcast, "CloseAllDocumentsExcept", document_id)
+
+
+def get_property(document_id, property_name):
+ """
+ :return: property value or invalid value if the document is not open or the property_name can't be found
+ """
+ return materialeditor.MaterialDocumentRequestBus(bus.Event, "GetPropertyValue", document_id, property_name)
+
+
+def set_property(document_id, property_name, value):
+ materialeditor.MaterialDocumentRequestBus(bus.Event, "SetPropertyValue", document_id, property_name, value)
+
+
+def is_pane_visible(pane_name):
+ """
+ :return: bool
+ """
+ return atomtools.AtomToolsWindowRequestBus(bus.Broadcast, "IsDockWidgetVisible", pane_name)
+
+
+def set_pane_visibility(pane_name, value):
+ atomtools.AtomToolsWindowRequestBus(bus.Broadcast, "SetDockWidgetVisible", pane_name, value)
+
+
+def select_lighting_config(config_name):
+ azlmbr.materialeditor.MaterialViewportRequestBus(azlmbr.bus.Broadcast, "SelectLightingPresetByName", config_name)
+
+
+def set_grid_enable_disable(value):
+ azlmbr.materialeditor.MaterialViewportRequestBus(azlmbr.bus.Broadcast, "SetGridEnabled", value)
+
+
+def get_grid_enable_disable():
+ """
+ :return: bool
+ """
+ return azlmbr.materialeditor.MaterialViewportRequestBus(azlmbr.bus.Broadcast, "GetGridEnabled")
+
+
+def set_shadowcatcher_enable_disable(value):
+ azlmbr.materialeditor.MaterialViewportRequestBus(azlmbr.bus.Broadcast, "SetShadowCatcherEnabled", value)
+
+
+def get_shadowcatcher_enable_disable():
+ """
+ :return: bool
+ """
+ return azlmbr.materialeditor.MaterialViewportRequestBus(azlmbr.bus.Broadcast, "GetShadowCatcherEnabled")
+
+
+def select_model_config(configname):
+ azlmbr.materialeditor.MaterialViewportRequestBus(azlmbr.bus.Broadcast, "SelectModelPresetByName", configname)
+
+
+def wait_for_condition(function, timeout_in_seconds=1.0):
+ # type: (function, float) -> bool
+ """
+ Function to run until it returns True or timeout is reached
+ the function can have no parameters and
+ waiting idle__wait_* is handled here not in the function
+
+ :param function: a function that returns a boolean indicating a desired condition is achieved
+ :param timeout_in_seconds: when reached, function execution is abandoned and False is returned
+ """
+ with Timeout(timeout_in_seconds) as t:
+ while True:
+ try:
+ atomtools.general.idle_wait_frames(1)
+ except Exception:
+ print("WARNING: Couldn't wait for frame")
+
+ if t.timed_out:
+ return False
+
+ ret = function()
+ if not isinstance(ret, bool):
+ raise TypeError("return value for wait_for_condition function must be a bool")
+ if ret:
+ return True
+
+
+class Timeout:
+ # type: (float) -> None
+ """
+ contextual timeout
+ :param seconds: float seconds to allow before timed_out is True
+ """
+
+ def __init__(self, seconds):
+ self.seconds = seconds
+
+ def __enter__(self):
+ self.die_after = time.time() + self.seconds
+ return self
+
+ def __exit__(self, type, value, traceback):
+ pass
+
+ @property
+ def timed_out(self):
+ return time.time() > self.die_after
+
+
+screenshotsFolder = os.path.join(azlmbr.paths.devroot, "AtomTest", "Cache" "pc", "Screenshots")
+
+
+class ScreenshotHelper:
+ """
+ A helper to capture screenshots and wait for them.
+ """
+
+ def __init__(self, idle_wait_frames_callback):
+ super().__init__()
+ self.done = False
+ self.capturedScreenshot = False
+ self.max_frames_to_wait = 60
+
+ self.idle_wait_frames_callback = idle_wait_frames_callback
+
+ def capture_screenshot_blocking(self, filename):
+ """
+ Capture a screenshot and block the execution until the screenshot has been written to the disk.
+ """
+ self.handler = azlmbr.atom.FrameCaptureNotificationBusHandler()
+ self.handler.connect()
+ self.handler.add_callback("OnCaptureFinished", self.on_screenshot_captured)
+
+ self.done = False
+ self.capturedScreenshot = False
+ success = azlmbr.atom.FrameCaptureRequestBus(azlmbr.bus.Broadcast, "CaptureScreenshot", filename)
+ if success:
+ self.wait_until_screenshot()
+ print("Screenshot taken.")
+ else:
+ print("screenshot failed")
+ return self.capturedScreenshot
+
+ def on_screenshot_captured(self, parameters):
+ # the parameters come in as a tuple
+ if parameters[0]:
+ print("screenshot saved: {}".format(parameters[1]))
+ self.capturedScreenshot = True
+ else:
+ print("screenshot failed: {}".format(parameters[1]))
+ self.done = True
+ self.handler.disconnect()
+
+ def wait_until_screenshot(self):
+ frames_waited = 0
+ while self.done == False:
+ self.idle_wait_frames_callback(1)
+ if frames_waited > self.max_frames_to_wait:
+ print("timeout while waiting for the screenshot to be written")
+ self.handler.disconnect()
+ break
+ else:
+ frames_waited = frames_waited + 1
+ print("(waited {} frames)".format(frames_waited))
+
+
+def capture_screenshot(file_path):
+ return ScreenshotHelper(atomtools.general.idle_wait_frames).capture_screenshot_blocking(
+ os.path.join(file_path)
+ )
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/screenshot_utils.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/screenshot_utils.py
index 28a4037dcc..a7a02816ac 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/screenshot_utils.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/atom_utils/screenshot_utils.py
@@ -91,3 +91,20 @@ class ScreenshotHelper(object):
else:
frames_waited = frames_waited + 1
general.log(f"(waited {frames_waited} frames)")
+
+
+def take_screenshot_game_mode(screenshot_name, entity_name=None):
+ """
+ Enters game mode & takes a screenshot, then exits game mode after.
+ :param screenshot_name: name to give the captured screenshot .ppm file.
+ :param entity_name: name of the entity being tested (for generating unique log lines).
+ :return: None
+ """
+ general.enter_game_mode()
+ helper.wait_for_condition(lambda: general.is_in_game_mode(), 2.0)
+ general.log(f"{entity_name}_test: Entered game mode: {general.is_in_game_mode()}")
+ ScreenshotHelper(general.idle_wait_frames).capture_screenshot_blocking(f"{screenshot_name}.ppm")
+ general.idle_wait(1.0)
+ general.exit_game_mode()
+ helper.wait_for_condition(lambda: not general.is_in_game_mode(), 2.0)
+ general.log(f"{entity_name}_test: Exit game mode: {not general.is_in_game_mode()}")
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_1.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_1.ppm
new file mode 100644
index 0000000000..0725999dcf
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_1.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:954d7d0df47c840a24e313893800eb3126d0c0d47c3380926776b51833778db7
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_2.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_2.ppm
new file mode 100644
index 0000000000..3a45bd31e3
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_2.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e81c19128f42ba362a2d5f3ccf159dfbc942d67ceeb1ac8c21f295a6fd9d2ce5
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_3.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_3.ppm
new file mode 100644
index 0000000000..15d679b784
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_3.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:5e20801213e065b6ea8c95ede81c23faa9b6dc70a2002dc5bced293e1bed989f
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_4.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_4.ppm
new file mode 100644
index 0000000000..85c083a386
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_4.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:e250f812e594e5152bf2d6f23caa8b53b78276bfdf344d7a8d355dd96cb995c0
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_5.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_5.ppm
new file mode 100644
index 0000000000..d575de761e
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/AreaLight_5.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:95be359041f8291c74b335297a4dfe9902a180510f24a181b15e1a5ba4d3b024
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_1.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_1.ppm
new file mode 100644
index 0000000000..bbbd127929
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_1.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:118e43e4b915e262726183467cc4b82f244565213fea5b6bfe02be07f0851ab1
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_2.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_2.ppm
new file mode 100644
index 0000000000..8e716fabcc
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_2.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:dc2ce3256a6552975962c9e113c52c1a22bf3817d417151f6f60640dd568e0fa
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_3.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_3.ppm
new file mode 100644
index 0000000000..6b6a5a5d6e
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_3.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:287d98890b35427688999760f9d066bcbff1a3bc9001534241dc212b32edabd8
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_4.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_4.ppm
new file mode 100644
index 0000000000..eb05228cc2
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_4.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:66e91c92c868167c850078cd91714db47e10a96e23cc30191994486bd79c353f
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_5.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_5.ppm
new file mode 100644
index 0000000000..5e12edc46d
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_5.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:d950d173f5101820c5e18205401ca08ce5feeff2302ac2920b292750d86a8fa4
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_6.ppm b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_6.ppm
new file mode 100644
index 0000000000..d442d90287
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/golden_images/SpotLight_6.ppm
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:72eddb7126eae0c839b933886e0fb69d78229f72d49ef13199de28df2b7879db
+size 6220817
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py
index 9165bced90..7be1ed1b12 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_GPUTests.py
@@ -15,11 +15,11 @@ import pytest
import ly_test_tools.environment.file_system as file_system
from ly_test_tools.image.screenshot_compare_qssim import qssim as compare_screenshots
from ly_test_tools.benchmark.data_aggregator import BenchmarkDataAggregator
+
import editor_python_test_tools.hydra_test_utils as hydra
logger = logging.getLogger(__name__)
DEFAULT_SUBFOLDER_PATH = 'user/PythonTests/Automated/Screenshots'
-EDITOR_TIMEOUT = 600
TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "atom_hydra_scripts")
@@ -67,6 +67,7 @@ class TestAllComponentsIndepthTests(object):
"Trace::Assert",
"Trace::Error",
"Traceback (most recent call last):",
+ "Screenshot failed"
]
hydra.launch_and_validate_results(
@@ -74,7 +75,7 @@ class TestAllComponentsIndepthTests(object):
TEST_DIRECTORY,
editor,
"hydra_GPUTest_BasicLevelSetup.py",
- timeout=EDITOR_TIMEOUT,
+ timeout=180,
expected_lines=level_creation_expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
@@ -85,6 +86,60 @@ class TestAllComponentsIndepthTests(object):
for test_screenshot, golden_screenshot in zip(test_screenshots, golden_images):
compare_screenshots(test_screenshot, golden_screenshot)
+ def test_LightComponent_ScreenshotMatchesGoldenImage(
+ self, request, editor, workspace, project, launcher_platform, level):
+ """
+ Please review the hydra script run by this test for more specific test info.
+ Tests that the Light component screenshots in a rendered level appear the same as the golden images.
+ """
+ screenshot_names = [
+ "AreaLight_1.ppm",
+ "AreaLight_2.ppm",
+ "AreaLight_3.ppm",
+ "AreaLight_4.ppm",
+ "AreaLight_5.ppm",
+ "SpotLight_1.ppm",
+ "SpotLight_2.ppm",
+ "SpotLight_3.ppm",
+ "SpotLight_4.ppm",
+ "SpotLight_5.ppm",
+ "SpotLight_6.ppm",
+ ]
+ test_screenshots = []
+ for screenshot in screenshot_names:
+ screenshot_path = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH, screenshot)
+ test_screenshots.append(screenshot_path)
+ file_system.delete(test_screenshots, True, True)
+
+ golden_images = []
+ for golden_image in screenshot_names:
+ golden_image_path = os.path.join(golden_images_directory(), golden_image)
+ golden_images.append(golden_image_path)
+
+ expected_lines = ["Light component tests completed."]
+ unexpected_lines = [
+ "Trace::Assert",
+ "Trace::Error",
+ "Traceback (most recent call last):",
+ "Screenshot failed",
+ ]
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ editor,
+ "hydra_GPUTest_LightComponent.py",
+ timeout=180,
+ expected_lines=expected_lines,
+ unexpected_lines=unexpected_lines,
+ halt_on_unexpected=True,
+ cfg_args=[level],
+ null_renderer=False,
+ )
+
+ for test_screenshot, golden_screenshot in zip(test_screenshots, golden_images):
+ compare_screenshots(test_screenshot, golden_screenshot)
+
+
@pytest.mark.parametrize('rhi', ['dx12', 'vulkan'])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("launcher_platform", ["windows_editor"])
@@ -116,7 +171,7 @@ class TestPerformanceBenchmarkSuite(object):
TEST_DIRECTORY,
editor,
"hydra_GPUTest_AtomFeatureIntegrationBenchmark.py",
- timeout=EDITOR_TIMEOUT,
+ timeout=600,
expected_lines=expected_lines,
unexpected_lines=unexpected_lines,
halt_on_unexpected=True,
diff --git a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
index 98d2ba0632..55c049b929 100644
--- a/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
+++ b/AutomatedTesting/Gem/PythonTests/atom_renderer/test_Atom_MainSuite.py
@@ -11,8 +11,9 @@ import os
import pytest
+import ly_test_tools.environment.file_system as file_system
import editor_python_test_tools.hydra_test_utils as hydra
-from atom_renderer.atom_utils.atom_component_helper import LIGHT_TYPES
+from atom_renderer.atom_utils.atom_constants import LIGHT_TYPES
logger = logging.getLogger(__name__)
EDITOR_TIMEOUT = 120
@@ -31,7 +32,7 @@ class TestAtomEditorComponentsMain(object):
Tests the following Atom components and verifies all "expected_lines" appear in Editor.log:
1. Display Mapper
2. Light
- 3. Radius Weight Modifier
+ 3. PostFX Radius Weight Modifier
4. PostFX Layer
5. Physical Sky
6. Global Skylight (IBL)
@@ -125,18 +126,18 @@ class TestAtomEditorComponentsMain(object):
"PostFX Layer_test: Entity deleted: True",
"PostFX Layer_test: UNDO entity deletion works: True",
"PostFX Layer_test: REDO entity deletion works: True",
- # Radius Weight Modifier Component
- "Radius Weight Modifier Entity successfully created",
- "Radius Weight Modifier_test: Component added to the entity: True",
- "Radius Weight Modifier_test: Component removed after UNDO: True",
- "Radius Weight Modifier_test: Component added after REDO: True",
- "Radius Weight Modifier_test: Entered game mode: True",
- "Radius Weight Modifier_test: Exit game mode: True",
- "Radius Weight Modifier_test: Entity is hidden: True",
- "Radius Weight Modifier_test: Entity is shown: True",
- "Radius Weight Modifier_test: Entity deleted: True",
- "Radius Weight Modifier_test: UNDO entity deletion works: True",
- "Radius Weight Modifier_test: REDO entity deletion works: True",
+ # PostFX Radius Weight Modifier Component
+ "PostFX Radius Weight Modifier Entity successfully created",
+ "PostFX Radius Weight Modifier_test: Component added to the entity: True",
+ "PostFX Radius Weight Modifier_test: Component removed after UNDO: True",
+ "PostFX Radius Weight Modifier_test: Component added after REDO: True",
+ "PostFX Radius Weight Modifier_test: Entered game mode: True",
+ "PostFX Radius Weight Modifier_test: Exit game mode: True",
+ "PostFX Radius Weight Modifier_test: Entity is hidden: True",
+ "PostFX Radius Weight Modifier_test: Entity is shown: True",
+ "PostFX Radius Weight Modifier_test: Entity deleted: True",
+ "PostFX Radius Weight Modifier_test: UNDO entity deletion works: True",
+ "PostFX Radius Weight Modifier_test: REDO entity deletion works: True",
# Light Component
"Light Entity successfully created",
"Light_test: Component added to the entity: True",
@@ -242,3 +243,65 @@ class TestAtomEditorComponentsMain(object):
null_renderer=True,
cfg_args=cfg_args,
)
+
+
+@pytest.mark.parametrize("project", ["AutomatedTesting"])
+@pytest.mark.parametrize("launcher_platform", ['windows_generic'])
+@pytest.mark.system
+class TestMaterialEditorBasicTests(object):
+ @pytest.fixture(autouse=True)
+ def setup_teardown(self, request, workspace, project):
+ def delete_files():
+ file_system.delete(
+ [
+ os.path.join(workspace.paths.project(), "Materials", "test_material.material"),
+ os.path.join(workspace.paths.project(), "Materials", "test_material_1.material"),
+ os.path.join(workspace.paths.project(), "Materials", "test_material_2.material"),
+ ],
+ True,
+ True,
+ )
+ # Cleanup our newly created materials
+ delete_files()
+
+ def teardown():
+ # Cleanup our newly created materials
+ delete_files()
+
+ request.addfinalizer(teardown)
+
+ @pytest.mark.parametrize("exe_file_name", ["MaterialEditor"])
+ def test_MaterialEditorBasicTests(
+ self, request, workspace, project, launcher_platform, generic_launcher, exe_file_name):
+
+ expected_lines = [
+ "Material opened: True",
+ "Test asset doesn't exist initially: True",
+ "New asset created: True",
+ "New Material opened: True",
+ "Material closed: True",
+ "All documents closed: True",
+ "Close All Except Selected worked as expected: True",
+ "Actual Document saved with changes: True",
+ "Document saved as copy is saved with changes: True",
+ "Document saved as child is saved with changes: True",
+ "Save All worked as expected: True",
+ ]
+ unexpected_lines = [
+ # "Trace::Assert",
+ # "Trace::Error",
+ "Traceback (most recent call last):"
+ ]
+
+ hydra.launch_and_validate_results(
+ request,
+ TEST_DIRECTORY,
+ generic_launcher,
+ "hydra_AtomMaterialEditor_BasicTests.py",
+ run_python="--runpython",
+ timeout=80,
+ expected_lines=expected_lines,
+ unexpected_lines=unexpected_lines,
+ halt_on_unexpected=True,
+ log_file_name="MaterialEditor.log",
+ )
diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt
index afde0a0d94..fa35bb25c6 100644
--- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt
@@ -13,7 +13,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}
PYTEST_MARKS "SUITE_main and not REQUIRES_gpu"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -28,7 +27,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}
PYTEST_MARKS "SUITE_periodic and not REQUIRES_gpu"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -44,7 +42,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_REQUIRES gpu
PATH ${CMAKE_CURRENT_LIST_DIR}
PYTEST_MARKS "SUITE_main and REQUIRES_gpu"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -59,7 +56,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}
PYTEST_MARKS "SUITE_sandbox"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
index 351ca19031..043485d869 100644
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/CMakeLists.txt
@@ -16,7 +16,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -33,7 +32,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE sandbox
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "SUITE_sandbox"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -49,7 +47,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "SUITE_periodic and dynveg_filter"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -64,7 +61,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "SUITE_periodic and dynveg_modifier"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -79,7 +75,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "SUITE_periodic and dynveg_regression"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -94,7 +89,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "SUITE_periodic and dynveg_area"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -109,7 +103,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "SUITE_periodic and dynveg_misc"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -124,7 +117,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/dyn_veg
PYTEST_MARKS "SUITE_periodic and dynveg_surfacetagemitter"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -140,7 +132,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE main
PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas
PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -155,7 +146,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/landscape_canvas
PYTEST_MARKS "SUITE_periodic"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
@@ -170,7 +160,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_
TEST_SERIAL
TEST_SUITE periodic
PATH ${CMAKE_CURRENT_LIST_DIR}/gradient_signal
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
Legacy::Editor
diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py
old mode 100755
new mode 100644
index d191a82a58..4ab5a41b85
--- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py
+++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/test_GeneralGraphFunctionality.py
@@ -105,7 +105,7 @@ class TestGeneralGraphFunctionality(object):
@pytest.mark.test_case_id("C17488412")
@pytest.mark.SUITE_periodic
- @pytest.mark.xfail # https://github.com/o3de/o3de/issues/2201
+ @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/2201")
def test_LandscapeCanvas_GraphClosed_OnEntityDelete(self, request, editor, level, launcher_platform):
cfg_args = [level]
diff --git a/AutomatedTesting/Gem/PythonTests/physics/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/physics/CMakeLists.txt
index 248bf3fdc5..eb37db1943 100644
--- a/AutomatedTesting/Gem/PythonTests/physics/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/physics/CMakeLists.txt
@@ -12,7 +12,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE main
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -25,7 +24,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE periodic
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Periodic.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -38,7 +36,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE sandbox
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/prefab/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/prefab/CMakeLists.txt
index 1d9c54fa40..48c24d1ebf 100644
--- a/AutomatedTesting/Gem/PythonTests/prefab/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/prefab/CMakeLists.txt
@@ -13,7 +13,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE main
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Main.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/prefab/PrefabLevel_BasicWorkflow.py b/AutomatedTesting/Gem/PythonTests/prefab/PrefabLevel_BasicWorkflow.py
new file mode 100644
index 0000000000..44b7dc2ee4
--- /dev/null
+++ b/AutomatedTesting/Gem/PythonTests/prefab/PrefabLevel_BasicWorkflow.py
@@ -0,0 +1,66 @@
+"""
+Copyright (c) Contributors to the Open 3D Engine Project.
+For complete copyright and license terms please see the LICENSE at the root of this distribution.
+
+SPDX-License-Identifier: Apache-2.0 OR MIT
+"""
+
+# fmt:off
+class Tests():
+ create_new_entity = ("Entity: 'CreateNewEntity' passed", "Entity: 'CreateNewEntity' failed")
+ create_prefab = ("Prefab: 'CreatePrefab' passed", "Prefab: 'CreatePrefab' failed")
+ instantiate_prefab = ("Prefab: 'InstantiatePrefab' passed", "Prefab: 'InstantiatePrefab' failed")
+ new_prefab_position = ("Prefab: new prefab's position is at the expected position", "Prefab: new prefab's position is *not* at the expected position")
+# fmt:on
+
+def PrefabLevel_BasicWorkflow():
+ """
+ This test will help verify if the following functions related to Prefab work as expected:
+ - CreatePrefab
+ - InstantiatePrefab
+ """
+
+ import os
+ import sys
+
+ from editor_python_test_tools.utils import Report
+ from editor_python_test_tools.utils import TestHelper as helper
+ import editor_python_test_tools.hydra_editor_utils as hydra
+
+ import azlmbr.bus as bus
+ import azlmbr.entity as entity
+ from azlmbr.entity import EntityId
+ import azlmbr.editor as editor
+ import azlmbr.prefab as prefab
+ from azlmbr.math import Vector3
+ import azlmbr.legacy.general as general
+
+ EXPECTED_NEW_PREFAB_POSITION = Vector3(10.00, 20.0, 30.0)
+
+ helper.init_idle()
+ helper.open_level("Prefab", "Base")
+
+# Create a new Entity at the root level
+ new_entity_id = editor.ToolsApplicationRequestBus(bus.Broadcast, 'CreateNewEntity', EntityId())
+ Report.result(Tests.create_new_entity, new_entity_id.IsValid())
+
+# Checks for prefab creation passed or not
+ new_prefab_file_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'new_prefab.prefab')
+ create_prefab_result = prefab.PrefabPublicRequestBus(bus.Broadcast, 'CreatePrefabInMemory', [new_entity_id], new_prefab_file_path)
+ Report.result(Tests.create_prefab, create_prefab_result)
+
+# Checks for prefab instantiation passed or not
+ container_entity_id = prefab.PrefabPublicRequestBus(bus.Broadcast, 'InstantiatePrefab', new_prefab_file_path, EntityId(), EXPECTED_NEW_PREFAB_POSITION)
+ Report.result(Tests.instantiate_prefab, container_entity_id.IsValid())
+
+# Checks if the new prefab is at the correct position and if it fails, it will provide the expected postion and the actual postion of the entity in the Editor log
+ new_prefab_position = azlmbr.components.TransformBus(azlmbr.bus.Event, "GetWorldTranslation", container_entity_id)
+ is_at_position = new_prefab_position.IsClose(EXPECTED_NEW_PREFAB_POSITION)
+ Report.result(Tests.new_prefab_position, is_at_position)
+ if not is_at_position:
+ Report.info(f'Expected position: {EXPECTED_NEW_PREFAB_POSITION.ToString()}, actual position: {new_prefab_position.ToString()}')
+
+
+if __name__ == "__main__":
+ from editor_python_test_tools.utils import Report
+ Report.start_test(PrefabLevel_BasicWorkflow)
diff --git a/AutomatedTesting/Gem/PythonTests/prefab/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/prefab/TestSuite_Main.py
index acd8f60b07..4e3d6ba77f 100644
--- a/AutomatedTesting/Gem/PythonTests/prefab/TestSuite_Main.py
+++ b/AutomatedTesting/Gem/PythonTests/prefab/TestSuite_Main.py
@@ -16,6 +16,7 @@ from ly_test_tools import LAUNCHERS
sys.path.append (os.path.dirname (os.path.abspath (__file__)) + '/../automatedtesting_shared')
+import ly_test_tools.environment.file_system as file_system
from base import TestAutomationBase
@pytest.mark.SUITE_main
@@ -29,3 +30,8 @@ class TestAutomation(TestAutomationBase):
def test_PrefabLevel_OpensLevelWithEntities(self, request, workspace, editor, launcher_platform):
from . import PrefabLevel_OpensLevelWithEntities as test_module
self._run_prefab_test(request, workspace, editor, test_module)
+
+ def test_PrefabLevel_BasicWorkflow(self, request, workspace, editor, launcher_platform):
+ from . import PrefabLevel_BasicWorkflow as test_module
+ self._run_prefab_test(request, workspace, editor, test_module)
+
diff --git a/AutomatedTesting/Gem/PythonTests/scripting/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/scripting/CMakeLists.txt
index 80b6e9a54e..25988216b2 100644
--- a/AutomatedTesting/Gem/PythonTests/scripting/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/scripting/CMakeLists.txt
@@ -12,7 +12,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE periodic
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Periodic.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
@@ -25,7 +24,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SUITE sandbox
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}/TestSuite_Sandbox.py
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
Legacy::Editor
AZ::AssetProcessor
diff --git a/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt
index 2c1d03b5a2..5374b0d318 100644
--- a/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt
+++ b/AutomatedTesting/Gem/PythonTests/smoke/CMakeLists.txt
@@ -18,7 +18,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
TEST_SERIAL
PATH ${CMAKE_CURRENT_LIST_DIR}
PYTEST_MARKS "SUITE_smoke"
- TIMEOUT 1500
RUNTIME_DEPENDENCIES
AZ::AssetProcessor
AZ::PythonBindingsExample
@@ -74,5 +73,17 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS)
AutomatedTesting.GameLauncher
AutomatedTesting.Assets
)
+ ly_add_pytest(
+ NAME AutomatedTesting::LoadLevelCPU
+ TEST_SUITE sandbox
+ PATH ${CMAKE_CURRENT_LIST_DIR}/test_RemoteConsole_CPULoadLevel_Works.py
+ TIMEOUT 100
+ RUNTIME_DEPENDENCIES
+ AZ::AssetProcessor
+ AZ::PythonBindingsExample
+ Legacy::Editor
+ AutomatedTesting.GameLauncher
+ AutomatedTesting.Assets
+ )
endif()
diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_RemoteConsole_CPULoadLevel_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_RemoteConsole_CPULoadLevel_Works.py
index 6522514f2f..701dcfab10 100644
--- a/AutomatedTesting/Gem/PythonTests/smoke/test_RemoteConsole_CPULoadLevel_Works.py
+++ b/AutomatedTesting/Gem/PythonTests/smoke/test_RemoteConsole_CPULoadLevel_Works.py
@@ -24,7 +24,7 @@ from ly_remote_console.remote_console_commands import (
@pytest.mark.parametrize("launcher_platform", ["windows"])
@pytest.mark.parametrize("project", ["AutomatedTesting"])
@pytest.mark.parametrize("level", ["Simple"])
-@pytest.mark.SUITE_smoke
+@pytest.mark.SUITE_sandbox
class TestRemoteConsoleLoadLevelWorks(object):
@pytest.fixture
def remote_console_instance(self, request):
diff --git a/AutomatedTesting/Levels/Prefab/Base/Base.prefab b/AutomatedTesting/Levels/Prefab/Base/Base.prefab
new file mode 100644
index 0000000000..f7e42e7731
--- /dev/null
+++ b/AutomatedTesting/Levels/Prefab/Base/Base.prefab
@@ -0,0 +1,53 @@
+{
+ "ContainerEntity": {
+ "Id": "Entity_[1146574390643]",
+ "Name": "Level",
+ "Components": {
+ "Component_[10641544592923449938]": {
+ "$type": "EditorInspectorComponent",
+ "Id": 10641544592923449938
+ },
+ "Component_[12039882709170782873]": {
+ "$type": "EditorOnlyEntityComponent",
+ "Id": 12039882709170782873
+ },
+ "Component_[12265484671603697631]": {
+ "$type": "EditorPendingCompositionComponent",
+ "Id": 12265484671603697631
+ },
+ "Component_[14126657869720434043]": {
+ "$type": "EditorEntitySortComponent",
+ "Id": 14126657869720434043
+ },
+ "Component_[15230859088967841193]": {
+ "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent",
+ "Id": 15230859088967841193,
+ "Parent Entity": ""
+ },
+ "Component_[16239496886950819870]": {
+ "$type": "EditorDisabledCompositionComponent",
+ "Id": 16239496886950819870
+ },
+ "Component_[5688118765544765547]": {
+ "$type": "EditorEntityIconComponent",
+ "Id": 5688118765544765547
+ },
+ "Component_[6545738857812235305]": {
+ "$type": "SelectionComponent",
+ "Id": 6545738857812235305
+ },
+ "Component_[7247035804068349658]": {
+ "$type": "EditorPrefabComponent",
+ "Id": 7247035804068349658
+ },
+ "Component_[9307224322037797205]": {
+ "$type": "EditorLockComponent",
+ "Id": 9307224322037797205
+ },
+ "Component_[9562516168917670048]": {
+ "$type": "EditorVisibilityComponent",
+ "Id": 9562516168917670048
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/Jack.fbx b/AutomatedTesting/Objects/Characters/Jack/Jack.fbx
index bccd5cce24..2e55fdd1e7 100644
--- a/AutomatedTesting/Objects/Characters/Jack/Jack.fbx
+++ b/AutomatedTesting/Objects/Characters/Jack/Jack.fbx
@@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
-oid sha256:ba9a2cd047a5ee696aaeed882869017a02fd4f5eeee91b6b2bfb830ad1e5ee15
-size 10927631
+oid sha256:c285cdf72ebe4c274f8d1fbab6ff558f9344d4fa62fb9d07cf11f7511ffaaac9
+size 2177072
diff --git a/AutomatedTesting/Objects/Characters/Jack/Jack.fbx.assetinfo b/AutomatedTesting/Objects/Characters/Jack/Jack.fbx.assetinfo
new file mode 100644
index 0000000000..2de6d987d7
--- /dev/null
+++ b/AutomatedTesting/Objects/Characters/Jack/Jack.fbx.assetinfo
@@ -0,0 +1,328 @@
+{
+ "values": [
+ {
+ "$type": "ActorGroup",
+ "name": "Jack",
+ "selectedRootBone": "RootNode.jack_root",
+ "id": "{B7194F91-D8A1-5D5D-AC6D-DDEBC087D80D}",
+ "rules": {
+ "rules": [
+ {
+ "$type": "MetaDataRule",
+ "metaData": "AdjustActor -actorID $(ACTORID) -name \"Jack\"\nActorSetCollisionMeshes -actorID $(ACTORID) -lod 0 -nodeList \"\"\nAdjustActor -actorID $(ACTORID) -nodesExcludedFromBounds \"\" -nodeAction \"select\"\nAdjustActor -actorID $(ACTORID) -nodeAction \"replace\" -attachmentNodes \"\"\nAdjustActor -actorID $(ACTORID) -motionExtractionNodeName \"jack_root\"\nAdjustActor -actorID $(ACTORID) -mirrorSetup \"\"\n"
+ }
+ ]
+ }
+ },
+ {
+ "$type": "{5B03C8E6-8CEE-4DA0-A7FA-CD88689DD45B} MeshGroup",
+ "id": "{BF2CCF49-9BE0-5103-987A-84649A974991}",
+ "name": "Jack",
+ "NodeSelectionList": {
+ "unselectedNodes": [
+ "RootNode",
+ "RootNode.jack_root",
+ "RootNode.jack_meshZUp",
+ "RootNode.jack_root.Bip01__pelvis",
+ "RootNode.jack_meshZUp.jack_meshZUp_1",
+ "RootNode.jack_meshZUp.jack_meshZUp_2",
+ "RootNode.jack_root.Bip01__pelvis.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg",
+ "RootNode.jack_root.Bip01__pelvis.spine1",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.Bitangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.SkinWeight_",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.transform",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.Tangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.map1",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.jack",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.Bitangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.SkinWeight_",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.transform",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.Tangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.map1",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.jack",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg",
+ "RootNode.jack_root.Bip01__pelvis.spine1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3.transform"
+ ]
+ }
+ },
+ {
+ "$type": "{07B356B7-3635-40B5-878A-FAC4EFD5AD86} MeshGroup",
+ "name": "Jack",
+ "nodeSelectionList": {
+ "selectedNodes": [
+ "RootNode",
+ "RootNode.jack_root",
+ "RootNode.jack_meshZUp",
+ "RootNode.jack_root.Bip01__pelvis",
+ "RootNode.jack_meshZUp.jack_meshZUp_1",
+ "RootNode.jack_meshZUp.jack_meshZUp_2",
+ "RootNode.jack_root.Bip01__pelvis.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg",
+ "RootNode.jack_root.Bip01__pelvis.spine1",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.Bitangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.SkinWeight_",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.transform",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.Tangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.map1",
+ "RootNode.jack_meshZUp.jack_meshZUp_1.jack",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.Bitangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.SkinWeight_",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.transform",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.Tangent",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.map1",
+ "RootNode.jack_meshZUp.jack_meshZUp_2.jack",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg",
+ "RootNode.jack_root.Bip01__pelvis.spine1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_upLegRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_upLegRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.transform",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr",
+ "RootNode.jack_root.Bip01__pelvis.l_upLeg.l_loLeg.l_ankle.l_ball.transform",
+ "RootNode.jack_root.Bip01__pelvis.r_upLeg.r_loLeg.r_ankle.r_ball.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.neck.head.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_upArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_upArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_loArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_loArmRoll.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_handProp.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_handProp.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_thumb1.l_thumb2.l_thumb3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_index1.l_index2.l_index3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_mid1.l_mid2.l_mid3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_thumb1.r_thumb2.r_thumb3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_index1.r_index2.r_index3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_mid1.r_mid2.r_mid3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_ring1.l_ring2.l_ring3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.l_shldr.l_upArm.l_loArm.l_hand.l_metacarpal.l_pinky1.l_pinky2.l_pinky3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_ring1.r_ring2.r_ring3.transform",
+ "RootNode.jack_root.Bip01__pelvis.spine1.spine2.spine3.r_shldr.r_upArm.r_loArm.r_hand.r_metacarpal.r_pinky1.r_pinky2.r_pinky3.transform"
+ ]
+ },
+ "rules": {
+ "rules": [
+ {
+ "$type": "SkinRule"
+ },
+ {
+ "$type": "MaterialRule"
+ }
+ ]
+ },
+ "id": "{59B1DB76-5B27-5569-8DF6-55296FD0E5D8}"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/Jack.mtl b/AutomatedTesting/Objects/Characters/Jack/Jack.mtl
deleted file mode 100644
index 2af23cc798..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/Jack.mtl
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/Characters/Jack/attachments/arm_plates_lower_01.cgf b/AutomatedTesting/Objects/Characters/Jack/attachments/arm_plates_lower_01.cgf
deleted file mode 100644
index a9530b6d1b..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/attachments/arm_plates_lower_01.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:bb1c97394454a0a0c3b4aaf8380878aac3f7bedc9091ec920963932ad6ad2290
-size 30484
diff --git a/AutomatedTesting/Objects/Characters/Jack/attachments/arm_plates_upper_01.cgf b/AutomatedTesting/Objects/Characters/Jack/attachments/arm_plates_upper_01.cgf
deleted file mode 100644
index 781ff1fe50..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/attachments/arm_plates_upper_01.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d090219fc20e7c1d9f0c187f976a7cb55e5b27b39e087aa8281ac794f314cb32
-size 22364
diff --git a/AutomatedTesting/Objects/Characters/Jack/attachments/back_pack_01.cgf b/AutomatedTesting/Objects/Characters/Jack/attachments/back_pack_01.cgf
deleted file mode 100644
index 0e59a1393d..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/attachments/back_pack_01.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:8fa78264ca46a2f201e24c3ba6a543e713bf9fd984df0a10f52b191d21077227
-size 106676
diff --git a/AutomatedTesting/Objects/Characters/Jack/attachments/head_aerial_01.cgf b/AutomatedTesting/Objects/Characters/Jack/attachments/head_aerial_01.cgf
deleted file mode 100644
index cc54ba4b64..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/attachments/head_aerial_01.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ebf610eecec9a4da2d5c9260c48b81f6a04eaf7686d69850ad9f5d06fdbcf183
-size 12940
diff --git a/AutomatedTesting/Objects/Characters/Jack/attachments/jack_matGroup.mtl b/AutomatedTesting/Objects/Characters/Jack/attachments/jack_matGroup.mtl
deleted file mode 100644
index ebade464ec..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/attachments/jack_matGroup.mtl
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/Characters/Jack/attachments/leg_plate_l_01.cgf b/AutomatedTesting/Objects/Characters/Jack/attachments/leg_plate_l_01.cgf
deleted file mode 100644
index 3ffabb1464..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/attachments/leg_plate_l_01.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:30afe8cf6e4aca846b07ef81747607afb47c0ff88283f363aca29ded9818c3db
-size 8148
diff --git a/AutomatedTesting/Objects/Characters/Jack/attachments/leg_plate_r_01.cgf b/AutomatedTesting/Objects/Characters/Jack/attachments/leg_plate_r_01.cgf
deleted file mode 100644
index e98083d030..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/attachments/leg_plate_r_01.cgf
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:dba25dd8b3840d01aefb69007919b07befc5365fff714493c87cf1eff644d5dc
-size 8148
diff --git a/AutomatedTesting/Objects/Characters/Jack/dummyPlane_mat_group.mtl b/AutomatedTesting/Objects/Characters/Jack/dummyPlane_mat_group.mtl
deleted file mode 100644
index 4545010b7e..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/dummyPlane_mat_group.mtl
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/Characters/Jack/enemy_matGroup.mtl b/AutomatedTesting/Objects/Characters/Jack/enemy_matGroup.mtl
deleted file mode 100644
index 523dac897f..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/enemy_matGroup.mtl
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/Characters/Jack/enemy_runner_matGroup.mtl b/AutomatedTesting/Objects/Characters/Jack/enemy_runner_matGroup.mtl
deleted file mode 100644
index 95c40eeb65..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/enemy_runner_matGroup.mtl
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/Characters/Jack/enemy_tank_matGroup.mtl b/AutomatedTesting/Objects/Characters/Jack/enemy_tank_matGroup.mtl
deleted file mode 100644
index e0f18e9f69..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/enemy_tank_matGroup.mtl
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/Characters/Jack/jack_matGroup.mtl b/AutomatedTesting/Objects/Characters/Jack/jack_matGroup.mtl
deleted file mode 100644
index 3927661f97..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/jack_matGroup.mtl
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_01_ddna.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_01_ddna.tif
deleted file mode 100644
index 378e0ea6ed..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_01_ddna.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:ca5c900fabf8b5c8c9313a0144886f4da3f812c82e8cffd652d9c61b9bb5b953
-size 4221960
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_01_ddna.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_01_ddna.tif.exportsettings
deleted file mode 100644
index 10f3182ac9..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_01_ddna.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_diff.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_diff.tif
deleted file mode 100644
index 5b4a3c3518..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_diff.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:80f40a78e4b21dd27f5ddf34337e7d0e2119b7cfa08f0eea38d4b1d63808821f
-size 3178996
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_diff.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_diff.tif.exportsettings
deleted file mode 100644
index 2d1dccbf99..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_diff.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_emis.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_emis.tif
deleted file mode 100644
index a85ac62f6c..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_emis.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e5f5e327624e0f1fd35fac141019941b12ad0642c25853be9f7fd5b9b6f91bc5
-size 3168212
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_emis.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_emis.tif.exportsettings
deleted file mode 100644
index 2d1dccbf99..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_White_emis.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_black_diff.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_black_diff.tif
deleted file mode 100644
index c861056eea..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_black_diff.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:089e74ca9a41967038e16a9107099a73f8e93d39c487ff5bacdde18f418bf761
-size 3176732
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_emis.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_emis.tif
deleted file mode 100644
index 6909252726..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_emis.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:d45cd564d2b52575d1ad37b907a7d378871f05f6c9e5569ec73d7973d56599c9
-size 3167984
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_emis.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_emis.tif.exportsettings
deleted file mode 100644
index 2d1dccbf99..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_emis.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_green_diff.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_green_diff.tif
deleted file mode 100644
index 3254f98355..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_green_diff.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:83a872c07f7cbbcb868903429dd8d5a71e8c0b7b0e2cb16cb08b5cb26b02251c
-size 3177492
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_green_diff.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_green_diff.tif.exportsettings
deleted file mode 100644
index 2d1dccbf99..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_green_diff.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_red_diff.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_red_diff.tif
deleted file mode 100644
index b00a8cd13b..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_red_diff.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:81c1bc9545a17232523fd97561013534221b3bf8927feefa52bdc757e294c2e2
-size 3179140
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_red_diff.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_red_diff.tif.exportsettings
deleted file mode 100644
index 2d1dccbf99..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_red_diff.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_spec.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_spec.tif
deleted file mode 100644
index 3e2fb9a003..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_spec.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:99f476a56205c80878be7472857a6430ce6dc40f2eb1558de4933a5b79fa2420
-size 814244
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_spec.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_spec.tif.exportsettings
deleted file mode 100644
index aaaf14a9fe..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_spec.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Reflectance /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_diff.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_diff.tif
deleted file mode 100644
index 2c44044576..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_diff.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:366959c8a31356669d47f58d07157171ed369b3e7549b3b65a8b8d153a1477a6
-size 3179956
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_diff.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_diff.tif.exportsettings
deleted file mode 100644
index 2d1dccbf99..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_diff.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_emis.tif b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_emis.tif
deleted file mode 100644
index 4dea311abb..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_emis.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:e839924e03ba99459547df1cf5334de3bdad75b18e76176e430e343a979d9f05
-size 3168472
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_emis.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_emis.tif.exportsettings
deleted file mode 100644
index 2d1dccbf99..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/BrokenRobot_yellow_emis.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_ddna.tif b/AutomatedTesting/Objects/Characters/Jack/textures/jack_ddna.tif
deleted file mode 100644
index 57d61f505a..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_ddna.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:36f537bb5be89fccba1502e9e8f8dfffbf05ea8aa82ac439305e8c2502b01691
-size 16804800
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_ddna.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/jack_ddna.tif.exportsettings
deleted file mode 100644
index a90d724812..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_ddna.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_diff.tif b/AutomatedTesting/Objects/Characters/Jack/textures/jack_diff.tif
deleted file mode 100644
index a8f5db9a96..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_diff.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b0457cbbbe1fe7e52fdb9af7ee2bc32df96a453fe248738b35ffe0b8087a28c5
-size 12615988
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_diff.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/jack_diff.tif.exportsettings
deleted file mode 100644
index f35416077f..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_diff.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /M=50,50,50,0,50,50 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_emis.tif b/AutomatedTesting/Objects/Characters/Jack/textures/jack_emis.tif
deleted file mode 100644
index f5ee4b43b2..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_emis.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4ba741103d039bddf72d4834c92a5e069285e31b8be2e7f4e8103f9c5c81694f
-size 3167864
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_emis.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/jack_emis.tif.exportsettings
deleted file mode 100644
index 8177b5abe6..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_emis.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Albedo /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec.tif b/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec.tif
deleted file mode 100644
index 20fb2114c0..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:4d7cb58f48e4df76214509fc01d5170fd38bc447d56af61f008c04a1653c2d20
-size 12614884
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec.tif.exportsettings
deleted file mode 100644
index 7fbb585758..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /M=50,50,50,0,50,50 /preset=Reflectance /reduce=0
\ No newline at end of file
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec_02_spec.tif b/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec_02_spec.tif
deleted file mode 100644
index 3334a5c39b..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec_02_spec.tif
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:80a2c56bfcb8c98bf5a72ec9fdb5fcc6eae28ba1c3c26efad5c8a36e6105f1d0
-size 3173936
diff --git a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec_02_spec.tif.exportsettings b/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec_02_spec.tif.exportsettings
deleted file mode 100644
index aaaf14a9fe..0000000000
--- a/AutomatedTesting/Objects/Characters/Jack/textures/jack_spec_02_spec.tif.exportsettings
+++ /dev/null
@@ -1 +0,0 @@
-/autooptimizefile=0 /preset=Reflectance /reduce=0
\ No newline at end of file
diff --git a/Code/Editor/Animation/SkeletonHierarchy.cpp b/Code/Editor/Animation/SkeletonHierarchy.cpp
deleted file mode 100644
index d1cc44b31d..0000000000
--- a/Code/Editor/Animation/SkeletonHierarchy.cpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#include "EditorDefs.h"
-#include "SkeletonHierarchy.h"
-
-using namespace Skeleton;
-
-/*
-
- CHierarchy
-
-*/
-
-CHierarchy::CHierarchy()
-{
-}
-
-CHierarchy::~CHierarchy()
-{
-}
-
-//
-
-uint32 CHierarchy::AddNode(const char* name, const QuatT& pose, int32 parent)
-{
- int32 index = FindNodeIndexByName(name);
-
- if (index < 0)
- {
- m_nodes.push_back(SNode());
- index = int32(m_nodes.size() - 1);
- }
-
- m_nodes[index].name = name;
- m_nodes[index].pose = pose;
- m_nodes[index].parent = parent;
- return uint32(index);
-}
-
-int32 CHierarchy::FindNodeIndexByName(const char* name) const
-{
- uint32 count = uint32(m_nodes.size());
- for (uint32 i = 0; i < count; ++i)
- {
- if (::_stricmp(m_nodes[i].name, name))
- {
- continue;
- }
-
- return i;
- }
-
- return -1;
-}
-
-const CHierarchy::SNode* CHierarchy::FindNode(const char* name) const
-{
- int32 index = FindNodeIndexByName(name);
- return index < 0 ? nullptr : &m_nodes[index];
-}
-
-void CHierarchy::CreateFrom(IDefaultSkeleton* pIDefaultSkeleton)
-{
- const uint32 jointCount = pIDefaultSkeleton->GetJointCount();
-
- m_nodes.clear();
- m_nodes.reserve(jointCount);
- for (uint32 i = 0; i < jointCount; ++i)
- {
- m_nodes.push_back(SNode());
-
- m_nodes.back().name = pIDefaultSkeleton->GetJointNameByID(int32(i));
- m_nodes.back().pose = pIDefaultSkeleton->GetDefaultAbsJointByID(int32(i));
-
- m_nodes.back().parent = pIDefaultSkeleton->GetJointParentIDByID(int32(i));
- }
-
- ValidateReferences();
-}
-
-void CHierarchy::ValidateReferences()
-{
- uint32 nodeCount = m_nodes.size();
- if (!nodeCount)
- {
- return;
- }
-
- for (uint32 i = 0; i < nodeCount; ++i)
- {
- if (m_nodes[i].parent < nodeCount)
- {
- continue;
- }
-
- m_nodes[i].parent = -1;
- }
-}
-
-void CHierarchy::AbsoluteToRelative(const QuatT* pSource, QuatT* pDestination)
-{
- uint32 count = uint32(m_nodes.size());
- std::vector absolutes(count);
- for (uint32 i = 0; i < count; ++i)
- {
- absolutes[i] = pSource[i];
- }
-
- for (uint32 i = 0; i < count; ++i)
- {
- int32 parent = m_nodes[i].parent;
- if (parent < 0)
- {
- pDestination[i] = absolutes[i];
- continue;
- }
-
- pDestination[i].t = (absolutes[i].t - absolutes[parent].t) * absolutes[parent].q;
- pDestination[i].q = absolutes[parent].q.GetInverted() * absolutes[i].q;
- }
-}
-
-bool CHierarchy::SerializeTo(XmlNodeRef& node)
-{
- XmlNodeRef hierarchy = node->newChild("Hierarchy");
-
- uint32 nodeCount = uint32(m_nodes.size());
- std::vector nodes(nodeCount);
- for (uint32 i = 0; i < nodeCount; ++i)
- {
- XmlNodeRef parent = hierarchy;
- if (m_nodes[i].parent > -1)
- {
- parent = nodes[m_nodes[i].parent];
- }
-
- nodes[i] = parent->newChild("Node");
- nodes[i]->setAttr("name", m_nodes[i].name);
- }
-
- return true;
-}
diff --git a/Code/Editor/Animation/SkeletonHierarchy.h b/Code/Editor/Animation/SkeletonHierarchy.h
deleted file mode 100644
index ad0d8fc7fc..0000000000
--- a/Code/Editor/Animation/SkeletonHierarchy.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#ifndef CRYINCLUDE_EDITOR_ANIMATION_SKELETONHIERARCHY_H
-#define CRYINCLUDE_EDITOR_ANIMATION_SKELETONHIERARCHY_H
-#pragma once
-
-namespace Skeleton {
- class CHierarchy
- : public _reference_target_t
- {
- public:
- struct SNode
- {
- string name;
- QuatT pose;
-
- int32 parent;
-
- /* TODO: Implement
- uint32 childrenIndex;
- uint32 childrenCount;
- */
- };
-
- public:
- CHierarchy();
- ~CHierarchy();
-
- public:
- uint32 AddNode(const char* name, const QuatT& pose, int32 parent = -1);
- uint32 GetNodeCount() const { return uint32(m_nodes.size()); }
- SNode* GetNode(uint32 index) { return &m_nodes[index]; }
- const SNode* GetNode(uint32 index) const { return &m_nodes[index]; }
- int32 FindNodeIndexByName(const char* name) const;
- const SNode* FindNode(const char* name) const;
- void ClearNodes() { m_nodes.clear(); }
-
- void CreateFrom(IDefaultSkeleton* rIDefaultSkeleton);
- void ValidateReferences();
-
- void AbsoluteToRelative(const QuatT* pSource, QuatT* pDestination);
-
- bool SerializeTo(XmlNodeRef& node);
-
- private:
- std::vector m_nodes;
- };
-} // namespace Skeleton
-
-#endif // CRYINCLUDE_EDITOR_ANIMATION_SKELETONHIERARCHY_H
diff --git a/Code/Editor/Animation/SkeletonMapper.cpp b/Code/Editor/Animation/SkeletonMapper.cpp
deleted file mode 100644
index 24f01f56ad..0000000000
--- a/Code/Editor/Animation/SkeletonMapper.cpp
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#include "EditorDefs.h"
-
-#include "SkeletonMapper.h"
-
-using namespace Skeleton;
-
-/*
-
- CMapper
-
-*/
-
-CMapper::CMapper()
-{
-}
-
-CMapper::~CMapper()
-{
-}
-
-//
-
-void CMapper::CreateFromHierarchy()
-{
- m_nodes.clear();
-
- uint32 nodeCount = m_hierarchy.GetNodeCount();
- m_nodes.resize(nodeCount);
-}
-
-//
-
-uint32 CMapper::CreateLocation(const char* name)
-{
- int32 index = FindLocation(name);
- if (index < 1)
- {
- CMapperLocation* pLocation = new CMapperLocation();
- pLocation->SetName(name);
- m_locations.push_back(pLocation);
- }
- return uint32(m_locations.size() - 1);
-}
-
-void CMapper::ClearLocations()
-{
- uint32 count = uint32(m_nodes.size());
- for (uint32 i = 0; i < count; ++i)
- {
- m_nodes[i].position = nullptr;
- m_nodes[i].orientation = nullptr;
- }
-
- m_locations.clear();
-}
-
-int32 CMapper::FindLocation(const char* name) const
-{
- uint32 count = uint32(m_locations.size());
- for (uint32 i = 0; i < count; ++i)
- {
- if (::_stricmp(m_locations[i]->GetName(), name))
- {
- continue;
- }
-
- return int32(i);
- }
-
- return -1;
-}
-
-void CMapper::SetLocation(CMapperLocation& location)
-{
- int32 index = FindLocation(location.GetName());
- if (index < 0)
- {
- m_locations.push_back(&location);
- return;
- }
-
- m_locations[index] = &location;
-}
-
-//
-
-bool CMapper::CreateLocationsHierarchy(uint32 index, CHierarchy& hierarchy, int32 hierarchyParent)
-{
- if (NodeHasLocation(index))
- {
- const CHierarchy::SNode* pNode = m_hierarchy.GetNode(index);
- uint32 nodeIndex = hierarchy.AddNode(pNode->name, pNode->pose, hierarchyParent);
- hierarchyParent = uint32(nodeIndex);
- }
-
- std::vector children;
- GetChildrenIndices(index, children);
- uint32 childCount = uint32(children.size());
- for (uint32 i = 0; i < childCount; ++i)
- {
- CreateLocationsHierarchy(children[i], hierarchy, hierarchyParent);
- }
-
- return hierarchy.GetNodeCount() != 0;
-}
-
-bool CMapper::CreateLocationsHierarchy(CHierarchy& hierarchy)
-{
- hierarchy.ClearNodes();
- if (!CreateLocationsHierarchy(0, hierarchy, -1))
- {
- return false;
- }
-
- hierarchy.ValidateReferences();
- return true;
-}
-
-void CMapper::Map(QuatT* pResult)
-{
- uint32 outputCount = m_hierarchy.GetNodeCount();
- std::vector absolutes(outputCount);
- for (uint32 i = 0; i < outputCount; ++i)
- {
- pResult[i].SetIdentity();
- absolutes[i].SetIdentity();
-
- CHierarchy::SNode* pNode = m_hierarchy.GetNode(i);
- if (!pNode)
- {
- continue;
- }
-
- CHierarchy::SNode* pParent = pNode->parent < 0 ?
- nullptr : m_hierarchy.GetNode(pNode->parent);
- if (pParent)
- {
- pResult[i].t =
- (pNode->pose.t - pParent->pose.t) * pParent->pose.q;
- }
-
- if (m_nodes[i].position)
- {
- pResult[i].t = m_nodes[i].position->Compute().t;
- }
-
- if (m_nodes[i].orientation)
- {
- absolutes[i] = m_nodes[i].orientation->Compute().q;
- }
- else if (pParent)
- {
- Quat relative = pParent->pose.q.GetInverted() * pNode->pose.q;
- absolutes[i] = absolutes[pNode->parent] * relative;
- }
- }
-
- for (uint32 i = 0; i < outputCount; ++i)
- {
- CHierarchy::SNode* pNode = m_hierarchy.GetNode(i);
- if (!pNode)
- {
- continue;
- }
-
- CHierarchy::SNode* pParent = pNode->parent < 0 ?
- nullptr : m_hierarchy.GetNode(pNode->parent);
- if (!pParent)
- {
- pResult[i].q = absolutes[i];
- continue;
- }
-
- pResult[i].q = absolutes[i];
- if (!m_nodes[i].position)
- {
- pResult[i].t = pResult[pNode->parent].t +
- pResult[i].t * absolutes[pNode->parent].GetInverted();
- }
- }
-}
-
-//
-
-bool CMapper::NodeHasLocation(uint32 index)
-{
- if (CMapperOperator* pOperator = m_nodes[index].position)
- {
- if (pOperator->IsOfClass("Location"))
- {
- return true;
- }
- if (pOperator->HasLinksOfClass("Location"))
- {
- return true;
- }
- }
-
- if (CMapperOperator* pOperator = m_nodes[index].orientation)
- {
- if (pOperator->IsOfClass("Location"))
- {
- return true;
- }
- if (pOperator->HasLinksOfClass("Location"))
- {
- return true;
- }
- }
-
- return false;
-}
-
-void CMapper::GetChildrenIndices(uint32 parent, std::vector& children)
-{
- uint32 nodeCount = m_hierarchy.GetNodeCount();
- for (uint32 i = 0; i < nodeCount; ++i)
- {
- if (m_hierarchy.GetNode(i)->parent != parent)
- {
- continue;
- }
-
- children.push_back(i);
- }
-}
-
-bool CMapper::ChildrenHaveLocation(uint32 index)
-{
- std::vector children;
- GetChildrenIndices(index, children);
-
- uint32 childrenCount = uint32(children.size());
- for (uint32 i = 0; i < childrenCount; ++i)
- {
- if (ChildrenHaveLocation(children[i]))
- {
- return true;
- }
- }
-
- return false;
-}
-
-bool CMapper::NodeOrChildrenHaveLocation(uint32 index)
-{
- if (NodeHasLocation(index))
- {
- return true;
- }
-
- std::vector children;
- GetChildrenIndices(index, children);
-
- uint32 childrenCount = uint32(children.size());
- for (uint32 i = 0; i < childrenCount; ++i)
- {
- if (NodeOrChildrenHaveLocation(children[i]))
- {
- return true;
- }
- }
-
- return false;
-}
-
-bool CMapper::SerializeTo(XmlNodeRef& node)
-{
- XmlNodeRef hierarchy = node->newChild("Hierarchy");
-
- uint32 nodeCount = GetNodeCount();
- std::vector nodes(nodeCount);
- for (uint32 i = 0; i < nodeCount; ++i)
- {
- if (!NodeOrChildrenHaveLocation(i))
- {
- continue;
- }
-
- CHierarchy::SNode* pNode = m_hierarchy.GetNode(i);
- if (!pNode)
- {
- return false;
- }
-
- XmlNodeRef xmlParent = hierarchy;
- int32 parent = pNode->parent;
- if (parent > -1)
- {
- xmlParent = nodes[parent];
- }
-
- nodes[i] = xmlParent->newChild("Node");
- nodes[i]->setAttr("name", pNode->name);
-
- if (CMapperOperator* pOperator = m_nodes[i].position)
- {
- XmlNodeRef position = nodes[i]->newChild("Position");
- XmlNodeRef child = position->newChild("Operator");
- if (!pOperator->SerializeWithLinksTo(child))
- {
- return false;
- }
- }
-
- if (CMapperOperator* pOperator = m_nodes[i].orientation)
- {
- XmlNodeRef orientation = nodes[i]->newChild("Orientation");
- XmlNodeRef child = orientation->newChild("Operator");
- if (!pOperator->SerializeWithLinksTo(child))
- {
- return false;
- }
- }
- }
-
- return true;
-}
-
-bool CMapper::SerializeFrom(XmlNodeRef& node, int32 parent)
-{
- int childCount = uint32(node->getChildCount());
- for (int i = 0; i < childCount; ++i)
- {
- XmlNodeRef child = node->getChild(i);
- if (::_stricmp(child->getTag(), "Node"))
- {
- continue;
- }
-
- uint32 index = m_hierarchy.AddNode(child->getAttr("name"), QuatT(IDENTITY), parent);
- if (!SerializeFrom(child, int32(index)))
- {
- return false;
- }
- }
-
- return true;
-}
-
-bool CMapper::SerializeFrom(XmlNodeRef& node)
-{
- XmlNodeRef hierarchy = node->findChild("Hierarchy");
- if (!hierarchy)
- {
- return false;
- }
-
- m_hierarchy.ClearNodes();
-
- if (!SerializeFrom(hierarchy, -1))
- {
- return false;
- }
-
- m_nodes.resize(m_hierarchy.GetNodeCount());
-
- return true;
-}
diff --git a/Code/Editor/Animation/SkeletonMapper.h b/Code/Editor/Animation/SkeletonMapper.h
deleted file mode 100644
index 159b019396..0000000000
--- a/Code/Editor/Animation/SkeletonMapper.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#ifndef CRYINCLUDE_EDITOR_ANIMATION_SKELETONMAPPER_H
-#define CRYINCLUDE_EDITOR_ANIMATION_SKELETONMAPPER_H
-#pragma once
-
-
-#include "SkeletonHierarchy.h"
-#include "SkeletonMapperOperator.h"
-
-namespace Skeleton {
- class CMapper
- {
- public:
- struct SNode
- {
- _smart_ptr position;
- _smart_ptr orientation;
- };
-
- public:
- CMapper();
- ~CMapper();
-
- public:
- CHierarchy& GetHierarchy() { return m_hierarchy; }
- void CreateFromHierarchy();
-
- uint32 GetNodeCount() const { return uint32(m_nodes.size()); }
- SNode* GetNode(uint32 index) { return &m_nodes[index]; }
- const SNode* GetNode(uint32 index) const { return &m_nodes[index]; }
-
- uint32 CreateLocation(const char* name);
- void ClearLocations();
- int32 FindLocation(const char* name) const;
-
- uint32 GetLocationCount() const { return uint32(m_locations.size()); }
- void SetLocation(CMapperLocation& location);
- CMapperLocation* GetLocation(uint32 index) { return m_locations[index]; }
- const CMapperLocation* GetLocation(uint32 index) const { return m_locations[index]; }
-
- bool CreateLocationsHierarchy(CHierarchy& hierarchy);
-
- void Map(QuatT* pResult);
-
- bool SerializeTo(XmlNodeRef& node);
- bool SerializeFrom(XmlNodeRef& node);
-
- private:
- bool NodeHasLocation(uint32 index);
- bool ChildrenHaveLocation(uint32 index);
- bool NodeOrChildrenHaveLocation(uint32 index);
-
- bool SerializeFrom(XmlNodeRef& node, int32 parent);
-
- bool CreateLocationsHierarchy(uint32 index, CHierarchy& hierarchy, int32 hierarchyParent = -1);
-
- // TEMP
- void GetChildrenIndices(uint32 parent, std::vector& children);
-
- private:
- CHierarchy m_hierarchy;
- std::vector<_smart_ptr > m_locations;
-
- std::vector m_nodes;
- };
-} // namespace Skeleton
-
-#endif // CRYINCLUDE_EDITOR_ANIMATION_SKELETONMAPPER_H
diff --git a/Code/Editor/Animation/SkeletonMapperOperator.cpp b/Code/Editor/Animation/SkeletonMapperOperator.cpp
deleted file mode 100644
index cc53957115..0000000000
--- a/Code/Editor/Animation/SkeletonMapperOperator.cpp
+++ /dev/null
@@ -1,284 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#include "EditorDefs.h"
-
-#include "SkeletonMapperOperator.h"
-
-using namespace Skeleton;
-
-/*
-
- CMapperOperatorDesc
-
-*/
-
-std::vector CMapperOperatorDesc::s_descs;
-
-//
-
-CMapperOperatorDesc::CMapperOperatorDesc(const char* name)
-{
- s_descs.push_back(this);
-}
-
-/*
-
- CMapperOperator
-
-*/
-
-CMapperOperator::CMapperOperator(const char* className, uint32 positionCount, uint32 orientationCount)
-{
- m_className = className;
- m_position.resize(positionCount, nullptr);
- m_orientation.resize(orientationCount, nullptr);
-}
-
-CMapperOperator::~CMapperOperator()
-{
-}
-
-//
-
-bool CMapperOperator::IsOfClass(const char* className)
-{
- if (::_stricmp(m_className, className))
- {
- return false;
- }
-
- return true;
-}
-
-uint32 CMapperOperator::HasLinksOfClass(const char* className)
-{
- uint32 count = 0;
-
- uint32 positionCount = m_position.size();
- for (uint32 i = 0; i < positionCount; ++i)
- {
- CMapperOperator* pOperator = m_position[i];
- if (!pOperator)
- {
- continue;
- }
-
- if (pOperator->IsOfClass(className))
- {
- ++count;
- }
- }
-
- uint32 orientationCount = m_orientation.size();
- for (uint32 i = 0; i < orientationCount; ++i)
- {
- CMapperOperator* pOperator = m_orientation[i];
- if (!pOperator)
- {
- continue;
- }
-
- if (pOperator->IsOfClass(className))
- {
- ++count;
- }
- }
-
- return count;
-}
-
-//
-
-bool CMapperOperator::SerializeTo(XmlNodeRef& node)
-{
- node->setAttr("class", m_className);
-
- uint32 parameterCount = uint32(m_parameters.size());
- for (uint32 i = 0; i < parameterCount; ++i)
- {
- m_parameters[i]->Serialize(node, false);
- }
-
- return true;
-}
-
-bool CMapperOperator::SerializeFrom(XmlNodeRef& node)
-{
- uint32 parameterCount = uint32(m_parameters.size());
- for (uint32 i = 0; i < parameterCount; ++i)
- {
- m_parameters[i]->Serialize(node, true);
- }
-
- return true;
-}
-
-bool CMapperOperator::SerializeWithLinksTo(XmlNodeRef& node)
-{
- if (!SerializeTo(node))
- {
- return false;
- }
-
- uint32 positionCount = uint32(m_position.size());
- for (uint32 i = 0; i < positionCount; ++i)
- {
- CMapperOperator* pOperator = m_position[i];
- if (!pOperator)
- {
- continue;
- }
-
- XmlNodeRef position = node->newChild("Position");
- position->setAttr("index", i);
-
- XmlNodeRef child = position->newChild("Operator");
- if (!pOperator->SerializeWithLinksTo(child))
- {
- return false;
- }
- }
-
- uint32 orientationCount = uint32(m_orientation.size());
- for (uint32 i = 0; i < orientationCount; ++i)
- {
- CMapperOperator* pOperator = m_orientation[i];
- if (!pOperator)
- {
- continue;
- }
-
- XmlNodeRef orientation = node->newChild("Orientation");
- orientation->setAttr("index", i);
-
- XmlNodeRef child = orientation->newChild("Operator");
- if (!pOperator->SerializeWithLinksTo(child))
- {
- return false;
- }
- }
-
- return true;
-}
-
-bool CMapperOperator::SerializeWithLinksFrom(XmlNodeRef& node)
-{
- if (!SerializeFrom(node))
- {
- return false;
- }
-
- return true;
-}
-/*
-
- CMapperOperator_Transform
-
-*/
-
-class CMapperOperator_Transform
- : public CMapperOperator
-{
-public:
- CMapperOperator_Transform()
- : CMapperOperator("Transform", 1, 1)
- {
- m_pAngles = new CVariable();
- m_pAngles->SetName("rotation");
- m_pAngles->Set(Vec3(0.0f, 0.0f, 0.0f));
- m_pAngles->SetLimits(-180.0f, 180.0f);
- AddParameter(*m_pAngles);
-
- m_pVector = new CVariable();
- m_pVector->SetName("vector");
- m_pVector->Set(Vec3(0.0f, 0.0f, 0.0f));
- AddParameter(*m_pVector);
-
- m_pScale = new CVariable();
- m_pScale->SetName("scale");
- m_pScale->Set(Vec3(1.0f, 1.0f, 1.0f));
- AddParameter(*m_pScale);
- }
-
- // CMapperOperator
-public:
- virtual QuatT CMapperOperator_Transform::Compute()
- {
- QuatT result(IDENTITY);
- m_pVector->Get(result.t);
-
- Vec3 scale;
- m_pScale->Get(scale);
-
- Vec3 angles;
- m_pAngles->Get(angles);
-
- result.q = Quat::CreateRotationXYZ(
- Ang3(DEG2RAD(angles.x), DEG2RAD(angles.y), DEG2RAD(angles.z)));
-
- if (CMapperOperator* pOperator = GetPosition(0))
- {
- result.t = pOperator->Compute().t.CompMul(scale) + result.t;
- }
- if (CMapperOperator* pOperator = GetOrientation(0))
- {
- result.q = pOperator->Compute().q * result.q;
- }
- return result;
- }
-
-private:
- CVariable* m_pVector;
- CVariable* m_pAngles;
- CVariable* m_pScale;
-};
-
-SkeletonMapperOperatorRegister(Transform, CMapperOperator_Transform)
-
-class CMapperOperator_PositionsToOrientation
- : public CMapperOperator
-{
-public:
- CMapperOperator_PositionsToOrientation()
- : CMapperOperator("PositionsToOrientation", 3, 0)
- {
- }
-
- // CMapperOperator
-public:
- virtual QuatT Compute()
- {
- CMapperOperator* pOperator0 = GetPosition(0);
- CMapperOperator* pOperator1 = GetPosition(1);
- CMapperOperator* pOperator2 = GetPosition(2);
- if (!pOperator0 || !pOperator1 || !pOperator2)
- {
- return QuatT(IDENTITY);
- }
-
- Vec3 p0 = pOperator0->Compute().t;
- Vec3 p1 = pOperator1->Compute().t;
- Vec3 p2 = pOperator2->Compute().t;
-
- Vec3 m = (p1 + p2) * 0.5f;
- Vec3 y = (m - p0).GetNormalized();
- Vec3 z = (p1 - p2).GetNormalized();
- Vec3 x = y % z;
- z = x % y;
-
- Matrix33 m33;
- m33.SetFromVectors(x, y, z);
- QuatT result(IDENTITY);
- result.q = Quat(m33);
- return result;
- }
-};
-
-SkeletonMapperOperatorRegister(PositionsToOrientation, CMapperOperator_PositionsToOrientation)
diff --git a/Code/Editor/Animation/SkeletonMapperOperator.h b/Code/Editor/Animation/SkeletonMapperOperator.h
deleted file mode 100644
index 68bbb84ac7..0000000000
--- a/Code/Editor/Animation/SkeletonMapperOperator.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#ifndef CRYINCLUDE_EDITOR_ANIMATION_SKELETONMAPPEROPERATOR_H
-#define CRYINCLUDE_EDITOR_ANIMATION_SKELETONMAPPEROPERATOR_H
-#pragma once
-
-
-#include "../Util/Variable.h"
-
-#undef GetClassName
-
-#define SkeletonMapperOperatorRegister(name, className) \
- class CMapperOperatorDesc_##name \
- : public CMapperOperatorDesc \
- { \
- public: \
- CMapperOperatorDesc_##name() \
- : CMapperOperatorDesc(#name) { } \
- protected: \
- virtual const char* GetName() { return #name; } \
- virtual CMapperOperator* Create() { return new className(); } \
- } mapperOperatorDesc__##name;
-
-namespace Skeleton {
- class CMapperOperator;
-
- class CMapperOperatorDesc
- {
- public:
- static uint32 GetCount() { return uint32(s_descs.size()); }
- static const char* GetName(uint32 index) { return s_descs[index]->GetName(); }
- static CMapperOperator* Create(uint32 index) { return s_descs[index]->Create(); }
-
- private:
- static std::vector s_descs;
-
- public:
- CMapperOperatorDesc(const char* name);
-
- protected:
- virtual const char* GetName() = 0;
- virtual CMapperOperator* Create() = 0;
- };
-
- class CMapperOperator
- : public _reference_target_t
- {
- protected:
- CMapperOperator(const char* className, uint32 positionCount, uint32 orientationCount);
- ~CMapperOperator();
-
- public:
- const char* GetClassName() { return m_className; }
-
- uint32 GetPositionCount() const { return uint32(m_position.size()); }
- void SetPosition(uint32 index, CMapperOperator* pOperator) { m_position[index] = pOperator; }
- CMapperOperator* GetPosition(uint32 index) { return m_position[index]; }
-
- uint32 GetOrientationCount() const { return uint32(m_orientation.size()); }
- void SetOrientation(uint32 index, CMapperOperator* pOperator) { m_orientation[index] = pOperator; }
- CMapperOperator* GetOrientation(uint32 index) { return m_orientation[index]; }
-
- uint32 GetParameterCount() { return uint32(m_parameters.size()); }
- IVariable* GetParameter(uint32 index) { return m_parameters[index]; }
-
- bool IsOfClass(const char* className);
- uint32 HasLinksOfClass(const char* className);
-
- bool SerializeTo(XmlNodeRef& node);
- bool SerializeFrom(XmlNodeRef& node);
-
- bool SerializeWithLinksTo(XmlNodeRef& node);
- bool SerializeWithLinksFrom(XmlNodeRef& node);
-
- protected:
- void AddParameter(IVariable& variable) { m_parameters.push_back(&variable); }
-
- public:
- virtual QuatT Compute() = 0;
-
- private:
- const char* m_className;
- std::vector<_smart_ptr > m_position;
- std::vector<_smart_ptr > m_orientation;
-
- std::vector m_parameters;
- };
-
- class CMapperLocation
- : public CMapperOperator
- {
- public:
- CMapperLocation()
- : CMapperOperator("Location", 0, 0)
- {
- m_pName = new CVariable();
- m_pName->SetName("name");
- m_pName->SetFlags(m_pName->GetFlags() | IVariable::UI_INVISIBLE);
- AddParameter(*m_pName);
-
- m_pAxis = new CVariable();
- m_pAxis->SetName("axis");
- m_pAxis->SetLimits(-3.0f, +3.0f);
- m_pAxis->Set(Vec3(1.0f, 2.0f, 3.0f));
- AddParameter(*m_pAxis);
-
- m_location = QuatT(IDENTITY);
- }
-
- public:
- void SetName(const char* name) { m_pName->Set(name); }
- CString GetName() const { CString s; m_pName->Get(s); return s; }
-
- void SetLocation(const QuatT& location) { m_location = location; }
- const QuatT& GetLocation() const { return m_location; }
-
- // CMapperOperator
- public:
- virtual QuatT Compute()
- {
- Vec3 axis;
- m_pAxis->Get(axis);
-
- uint32 x = fabs_tpl(axis.x);
- uint32 y = fabs_tpl(axis.y);
- uint32 z = fabs_tpl(axis.z);
- if (x < 1 || y < 1 || z < 1 ||
- x > 3 || y > 3 || y > 3 ||
- x == y || x == z || y == z)
- {
- return QuatT(IDENTITY);
- }
-
- Matrix33 matrix;
- matrix.SetFromVectors(
- m_location.q.GetColumn(x - 1) * f32(::sgn(axis.x)),
- m_location.q.GetColumn(y - 1) * f32(::sgn(axis.y)),
- m_location.q.GetColumn(z - 1) * f32(::sgn(axis.z)));
- if (!matrix.IsOrthonormalRH(0.01f))
- {
- return QuatT(IDENTITY);
- }
-
- QuatT result = m_location;
- result.q = Quat(matrix);
- return result;
- }
-
- private:
- CVariable* m_pName;
- CVariable* m_pAxis;
-
- QuatT m_location;
- };
-} // namespace Skeleton
-
-#endif // CRYINCLUDE_EDITOR_ANIMATION_SKELETONMAPPEROPERATOR_H
diff --git a/Code/Editor/BaseLibrary.cpp b/Code/Editor/BaseLibrary.cpp
index 7c920a7f04..9f26630c2c 100644
--- a/Code/Editor/BaseLibrary.cpp
+++ b/Code/Editor/BaseLibrary.cpp
@@ -258,9 +258,8 @@ bool CBaseLibrary::SaveLibrary(const char* name, bool saveEmptyLibrary)
}
if (!bRes)
{
- string strMessage;
QByteArray filenameUtf8 = fileName.toUtf8();
- strMessage.Format("The file %s is read-only and the save of the library couldn't be performed. Try to remove the \"read-only\" flag or check-out the file and then try again.", filenameUtf8.data());
+ AZStd::string strMessage = AZStd::string::format("The file %s is read-only and the save of the library couldn't be performed. Try to remove the \"read-only\" flag or check-out the file and then try again.", filenameUtf8.data());
CryMessageBox(strMessage.c_str(), "Saving Error", MB_OK | MB_ICONWARNING);
}
return bRes;
diff --git a/Code/Editor/BaseLibraryManager.cpp b/Code/Editor/BaseLibraryManager.cpp
index 6dd7dc58a5..7346ffaf8c 100644
--- a/Code/Editor/BaseLibraryManager.cpp
+++ b/Code/Editor/BaseLibraryManager.cpp
@@ -526,7 +526,7 @@ void CBaseLibraryManager::Serialize(XmlNodeRef& node, bool bLoading)
QString CBaseLibraryManager::MakeUniqueItemName(const QString& srcName, const QString& libName)
{
// unlikely we'll ever encounter more than 16
- std::vector possibleDuplicates;
+ std::vector possibleDuplicates;
possibleDuplicates.reserve(16);
// search for strings in the database that might have a similar name (ignore case)
@@ -550,7 +550,7 @@ QString CBaseLibraryManager::MakeUniqueItemName(const QString& srcName, const QS
const QString& name = pItem->GetName();
if (name.startsWith(srcName, Qt::CaseInsensitive))
{
- possibleDuplicates.push_back(string(name.toUtf8().data()));
+ possibleDuplicates.push_back(AZStd::string(name.toUtf8().data()));
}
}
pEnum->Release();
@@ -560,7 +560,7 @@ QString CBaseLibraryManager::MakeUniqueItemName(const QString& srcName, const QS
return srcName;
}
- std::sort(possibleDuplicates.begin(), possibleDuplicates.end(), [](const string& strOne, const string& strTwo)
+ std::sort(possibleDuplicates.begin(), possibleDuplicates.end(), [](const AZStd::string& strOne, const AZStd::string& strTwo)
{
// I can assume size sorting since if the length is different, either one of the two strings doesn't
// closely match the string we are trying to duplicate, or it's a bigger number (X1 vs X10)
diff --git a/Code/Editor/Commands/CommandManager.cpp b/Code/Editor/Commands/CommandManager.cpp
index 0712e35e79..f28ca96ac8 100644
--- a/Code/Editor/Commands/CommandManager.cpp
+++ b/Code/Editor/Commands/CommandManager.cpp
@@ -79,9 +79,9 @@ CEditorCommandManager::~CEditorCommandManager()
m_uiCommands.clear();
}
-string CEditorCommandManager::GetFullCommandName(const string& module, const string& name)
+AZStd::string CEditorCommandManager::GetFullCommandName(const AZStd::string& module, const AZStd::string& name)
{
- string fullName = module;
+ AZStd::string fullName = module;
fullName += ".";
fullName += name;
return fullName;
@@ -91,10 +91,10 @@ bool CEditorCommandManager::AddCommand(CCommand* pCommand, TPfnDeleter deleter)
{
assert(pCommand);
- string module = pCommand->GetModule();
- string name = pCommand->GetName();
+ AZStd::string module = pCommand->GetModule();
+ AZStd::string name = pCommand->GetName();
- if (IsRegistered(module, name) && m_bWarnDuplicate)
+ if (IsRegistered(module.c_str(), name.c_str()) && m_bWarnDuplicate)
{
QString errMsg;
@@ -118,7 +118,7 @@ bool CEditorCommandManager::AddCommand(CCommand* pCommand, TPfnDeleter deleter)
bool CEditorCommandManager::UnregisterCommand(const char* module, const char* name)
{
- string fullName = GetFullCommandName(module, name);
+ AZStd::string fullName = GetFullCommandName(module, name);
CommandTable::iterator itr = m_commands.find(fullName);
if (itr != m_commands.end())
@@ -154,7 +154,7 @@ bool CEditorCommandManager::RegisterUICommand(
return false;
}
- return AttachUIInfo(GetFullCommandName(module, name), uiInfo);
+ return AttachUIInfo(GetFullCommandName(module, name).c_str(), uiInfo);
}
bool CEditorCommandManager::AttachUIInfo(const char* fullCmdName, const CCommand0::SUIInfo& uiInfo)
@@ -190,14 +190,14 @@ bool CEditorCommandManager::AttachUIInfo(const char* fullCmdName, const CCommand
return true;
}
-bool CEditorCommandManager::GetUIInfo(const string& module, const string& name, CCommand0::SUIInfo& uiInfo) const
+bool CEditorCommandManager::GetUIInfo(const AZStd::string& module, const AZStd::string& name, CCommand0::SUIInfo& uiInfo) const
{
- string fullName = GetFullCommandName(module, name);
+ AZStd::string fullName = GetFullCommandName(module, name);
return GetUIInfo(fullName, uiInfo);
}
-bool CEditorCommandManager::GetUIInfo(const string& fullCmdName, CCommand0::SUIInfo& uiInfo) const
+bool CEditorCommandManager::GetUIInfo(const AZStd::string& fullCmdName, CCommand0::SUIInfo& uiInfo) const
{
CommandTable::const_iterator iter = m_commands.find(fullCmdName);
@@ -223,9 +223,9 @@ int CEditorCommandManager::GenNewCommandId()
return uniqueId++;
}
-QString CEditorCommandManager::Execute(const string& module, const string& name, const CCommand::CArgs& args)
+QString CEditorCommandManager::Execute(const AZStd::string& module, const AZStd::string& name, const CCommand::CArgs& args)
{
- string fullName = GetFullCommandName(module, name);
+ AZStd::string fullName = GetFullCommandName(module, name);
CommandTable::iterator iter = m_commands.find(fullName);
if (iter != m_commands.end())
@@ -245,18 +245,18 @@ QString CEditorCommandManager::Execute(const string& module, const string& name,
return "";
}
-QString CEditorCommandManager::Execute(const string& cmdLine)
+QString CEditorCommandManager::Execute(const AZStd::string& cmdLine)
{
- string cmdTxt, argsTxt;
+ AZStd::string cmdTxt, argsTxt;
size_t argStart = cmdLine.find_first_of(' ');
cmdTxt = cmdLine.substr(0, argStart);
argsTxt = "";
- if (argStart != string::npos)
+ if (argStart != AZStd::string::npos)
{
argsTxt = cmdLine.substr(argStart + 1);
- argsTxt.Trim();
+ AZ::StringFunc::TrimWhiteSpace(argsTxt, true, true);
}
CommandTable::iterator itr = m_commands.find(cmdTxt);
@@ -301,7 +301,7 @@ void CEditorCommandManager::Execute(int commandId)
}
}
-void CEditorCommandManager::GetCommandList(std::vector& cmds) const
+void CEditorCommandManager::GetCommandList(std::vector& cmds) const
{
cmds.clear();
cmds.reserve(m_commands.size());
@@ -315,9 +315,9 @@ void CEditorCommandManager::GetCommandList(std::vector& cmds) const
std::sort(cmds.begin(), cmds.end());
}
-string CEditorCommandManager::AutoComplete(const string& substr) const
+AZStd::string CEditorCommandManager::AutoComplete(const AZStd::string& substr) const
{
- std::vector cmds;
+ std::vector cmds;
GetCommandList(cmds);
// If substring is empty return first command.
@@ -358,7 +358,7 @@ string CEditorCommandManager::AutoComplete(const string& substr) const
bool CEditorCommandManager::IsRegistered(const char* module, const char* name) const
{
- string fullName = GetFullCommandName(module, name);
+ AZStd::string fullName = GetFullCommandName(module, name);
CommandTable::const_iterator iter = m_commands.find(fullName);
if (iter != m_commands.end())
@@ -373,7 +373,7 @@ bool CEditorCommandManager::IsRegistered(const char* module, const char* name) c
bool CEditorCommandManager::IsRegistered(const char* cmdLine_) const
{
- string cmdTxt, argsTxt, cmdLine(cmdLine_);
+ AZStd::string cmdTxt, argsTxt, cmdLine(cmdLine_);
size_t argStart = cmdLine.find_first_of(' ');
cmdTxt = cmdLine.substr(0, argStart);
CommandTable::const_iterator iter = m_commands.find(cmdTxt);
@@ -402,9 +402,9 @@ bool CEditorCommandManager::IsRegistered(int commandId) const
return false;
}
-void CEditorCommandManager::SetCommandAvailableInScripting(const string& module, const string& name)
+void CEditorCommandManager::SetCommandAvailableInScripting(const AZStd::string& module, const AZStd::string& name)
{
- string fullName = GetFullCommandName(module, name);
+ AZStd::string fullName = GetFullCommandName(module, name);
CommandTable::iterator iter = m_commands.find(fullName);
if (iter != m_commands.end())
@@ -413,7 +413,7 @@ void CEditorCommandManager::SetCommandAvailableInScripting(const string& module,
}
}
-bool CEditorCommandManager::IsCommandAvailableInScripting(const string& fullCmdName) const
+bool CEditorCommandManager::IsCommandAvailableInScripting(const AZStd::string& fullCmdName) const
{
CommandTable::const_iterator iter = m_commands.find(fullCmdName);
@@ -425,16 +425,16 @@ bool CEditorCommandManager::IsCommandAvailableInScripting(const string& fullCmdN
return false;
}
-bool CEditorCommandManager::IsCommandAvailableInScripting(const string& module, const string& name) const
+bool CEditorCommandManager::IsCommandAvailableInScripting(const AZStd::string& module, const AZStd::string& name) const
{
- string fullName = GetFullCommandName(module, name);
+ AZStd::string fullName = GetFullCommandName(module, name);
return IsCommandAvailableInScripting(fullName);
}
-void CEditorCommandManager::LogCommand(const string& fullCmdName, const CCommand::CArgs& args) const
+void CEditorCommandManager::LogCommand(const AZStd::string& fullCmdName, const CCommand::CArgs& args) const
{
- string cmdLine = fullCmdName;
+ AZStd::string cmdLine = fullCmdName;
for (int i = 0; i < args.GetArgCount(); ++i)
{
@@ -509,7 +509,7 @@ void CEditorCommandManager::LogCommand(const string& fullCmdName, const CCommand
if (pScriptTermDialog)
{
- string text = "> ";
+ AZStd::string text = "> ";
text += cmdLine;
text += "\r\n";
pScriptTermDialog->AppendText(text.c_str());
@@ -526,14 +526,14 @@ QString CEditorCommandManager::ExecuteAndLogReturn(CCommand* pCommand, const CCo
return result;
}
-void CEditorCommandManager::GetArgsFromString(const string& argsTxt, CCommand::CArgs& argList)
+void CEditorCommandManager::GetArgsFromString(const AZStd::string& argsTxt, CCommand::CArgs& argList)
{
const char quoteSymbol = '\'';
int curPos = 0;
int prevPos = 0;
- string arg = argsTxt.Tokenize(" ", curPos);
-
- while (!arg.empty())
+ AZStd::vector tokens;
+ AZ::StringFunc::Tokenize(argsTxt, tokens, ' ');
+ for(AZStd::string& arg : tokens)
{
if (arg[0] == quoteSymbol) // A special consideration for a quoted string
{
@@ -542,11 +542,11 @@ void CEditorCommandManager::GetArgsFromString(const string& argsTxt, CCommand::C
size_t openingQuotePos = argsTxt.find(quoteSymbol, prevPos);
size_t closingQuotePos = argsTxt.find(quoteSymbol, curPos);
- if (closingQuotePos != string::npos)
+ if (closingQuotePos != AZStd::string::npos)
{
arg = argsTxt.substr(openingQuotePos + 1, closingQuotePos - openingQuotePos - 1);
size_t nextArgPos = argsTxt.find(' ', closingQuotePos + 1);
- curPos = nextArgPos != string::npos ? nextArgPos + 1 : argsTxt.length();
+ curPos = nextArgPos != AZStd::string::npos ? nextArgPos + 1 : argsTxt.length();
for (; curPos < argsTxt.length(); ++curPos) // Skip spaces.
{
@@ -565,6 +565,5 @@ void CEditorCommandManager::GetArgsFromString(const string& argsTxt, CCommand::C
argList.Add(arg.c_str());
prevPos = curPos;
- arg = argsTxt.Tokenize(" ", curPos);
}
}
diff --git a/Code/Editor/Commands/CommandManager.h b/Code/Editor/Commands/CommandManager.h
index 761c79f79c..599754c5d9 100644
--- a/Code/Editor/Commands/CommandManager.h
+++ b/Code/Editor/Commands/CommandManager.h
@@ -48,20 +48,20 @@ public:
const AZStd::function& functor,
const CCommand0::SUIInfo& uiInfo);
bool AttachUIInfo(const char* fullCmdName, const CCommand0::SUIInfo& uiInfo);
- bool GetUIInfo(const string& module, const string& name, CCommand0::SUIInfo& uiInfo) const;
- bool GetUIInfo(const string& fullCmdName, CCommand0::SUIInfo& uiInfo) const;
- QString Execute(const string& cmdLine);
- QString Execute(const string& module, const string& name, const CCommand::CArgs& args);
+ bool GetUIInfo(const AZStd::string& module, const AZStd::string& name, CCommand0::SUIInfo& uiInfo) const;
+ bool GetUIInfo(const AZStd::string& fullCmdName, CCommand0::SUIInfo& uiInfo) const;
+ QString Execute(const AZStd::string& cmdLine);
+ QString Execute(const AZStd::string& module, const AZStd::string& name, const CCommand::CArgs& args);
void Execute(int commandId);
- void GetCommandList(std::vector& cmds) const;
+ void GetCommandList(std::vector& cmds) const;
//! Used in the console dialog
- string AutoComplete(const string& substr) const;
+ AZStd::string AutoComplete(const AZStd::string& substr) const;
bool IsRegistered(const char* module, const char* name) const;
bool IsRegistered(const char* cmdLine) const;
bool IsRegistered(int commandId) const;
- void SetCommandAvailableInScripting(const string& module, const string& name);
- bool IsCommandAvailableInScripting(const string& module, const string& name) const;
- bool IsCommandAvailableInScripting(const string& fullCmdName) const;
+ void SetCommandAvailableInScripting(const AZStd::string& module, const AZStd::string& name);
+ bool IsCommandAvailableInScripting(const AZStd::string& module, const AZStd::string& name) const;
+ bool IsCommandAvailableInScripting(const AZStd::string& fullCmdName) const;
//! Turning off the warning is needed for reloading the ribbon bar.
void TurnDuplicateWarningOn() { m_bWarnDuplicate = true; }
void TurnDuplicateWarningOff() { m_bWarnDuplicate = false; }
@@ -74,7 +74,7 @@ protected:
};
//! A full command name to an actual command mapping
- typedef std::map CommandTable;
+ typedef std::map CommandTable;
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
CommandTable m_commands;
@@ -86,9 +86,9 @@ protected:
bool m_bWarnDuplicate;
static int GenNewCommandId();
- static string GetFullCommandName(const string& module, const string& name);
- static void GetArgsFromString(const string& argsTxt, CCommand::CArgs& argList);
- void LogCommand(const string& fullCmdName, const CCommand::CArgs& args) const;
+ static AZStd::string GetFullCommandName(const AZStd::string& module, const AZStd::string& name);
+ static void GetArgsFromString(const AZStd::string& argsTxt, CCommand::CArgs& argList);
+ void LogCommand(const AZStd::string& fullCmdName, const CCommand::CArgs& args) const;
QString ExecuteAndLogReturn(CCommand* pCommand, const CCommand::CArgs& args);
};
diff --git a/Code/Editor/ConfigGroup.cpp b/Code/Editor/ConfigGroup.cpp
index c1e0abbf31..b18edf1142 100644
--- a/Code/Editor/ConfigGroup.cpp
+++ b/Code/Editor/ConfigGroup.cpp
@@ -127,9 +127,9 @@ namespace Config
case IConfigVar::eType_STRING:
{
- string currentValue = nullptr;
+ AZStd::string currentValue;
var->Get(¤tValue);
- node->setAttr(szName, currentValue);
+ node->setAttr(szName, currentValue.c_str());
break;
}
}
@@ -186,7 +186,7 @@ namespace Config
case IConfigVar::eType_STRING:
{
- string currentValue = nullptr;
+ AZStd::string currentValue;
var->GetDefault(¤tValue);
QString readValue(currentValue.c_str());
if (node->getAttr(szName, readValue))
diff --git a/Code/Editor/ConfigGroup.h b/Code/Editor/ConfigGroup.h
index f772823ad8..769a29ba8a 100644
--- a/Code/Editor/ConfigGroup.h
+++ b/Code/Editor/ConfigGroup.h
@@ -47,12 +47,12 @@ namespace Config
return m_type;
}
- ILINE const string& GetName() const
+ ILINE const AZStd::string& GetName() const
{
return m_name;
}
- ILINE const string& GetDescription() const
+ ILINE const AZStd::string& GetDescription() const
{
return m_description;
}
@@ -71,13 +71,13 @@ namespace Config
static EType TranslateType(const bool&) { return eType_BOOL; }
static EType TranslateType(const int&) { return eType_INT; }
static EType TranslateType(const float&) { return eType_FLOAT; }
- static EType TranslateType(const string&) { return eType_STRING; }
+ static EType TranslateType(const AZStd::string&) { return eType_STRING; }
protected:
EType m_type;
uint8 m_flags;
- string m_name;
- string m_description;
+ AZStd::string m_name;
+ AZStd::string m_description;
void* m_ptr;
ICVar* m_pCVar;
};
diff --git a/Code/Editor/ControlMRU.cpp b/Code/Editor/ControlMRU.cpp
deleted file mode 100644
index a721876624..0000000000
--- a/Code/Editor/ControlMRU.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#include "EditorDefs.h"
-#include "ControlMRU.h"
-
-IMPLEMENT_XTP_CONTROL(CControlMRU, CXTPControlRecentFileList)
-
-bool CControlMRU::DoesFileExist(CString& sFileName)
-{
- return (_access(sFileName.GetBuffer(), 0) == 0);
-}
-
-void CControlMRU::OnCalcDynamicSize(DWORD dwMode)
-{
- CRecentFileList* pRecentFileList = GetRecentFileList();
-
- if (!pRecentFileList)
- {
- return;
- }
-
- CString* pArrNames = pRecentFileList->m_arrNames;
-
- assert(pArrNames != nullptr);
- if (!pArrNames)
- {
- return;
- }
-
- while (m_nIndex + 1 < m_pControls->GetCount())
- {
- CXTPControl* pControl = m_pControls->GetAt(m_nIndex + 1);
- assert(pControl);
- if (pControl->GetID() >= GetFirstMruID()
- && pControl->GetID() <= GetFirstMruID() + pRecentFileList->m_nSize)
- {
- m_pControls->Remove(pControl);
- }
- else
- {
- break;
- }
- }
-
- if (m_pParent->IsCustomizeMode())
- {
- m_dwHideFlags = 0;
- SetEnabled(true);
- return;
- }
-
- if (pArrNames[0].IsEmpty())
- {
- SetCaption(CString(MAKEINTRESOURCE(IDS_NORECENTFILE_CAPTION)));
- SetDescription("No recently opened files");
- m_dwHideFlags = 0;
- SetEnabled(false);
-
- return;
- }
- else
- {
- SetCaption(CString(MAKEINTRESOURCE(IDS_RECENTFILE_CAPTION)));
- SetDescription("Open this document");
- }
-
- m_dwHideFlags |= xtpHideGeneric;
-
- CString sCurDir = (Path::GetEditingGameDataFolder() + "\\").c_str();
- int nCurDir = sCurDir.GetLength();
-
- CString strName;
- CString strTemp;
- int iLastValidMRU = 0;
-
- for (int iMRU = 0; iMRU < pRecentFileList->m_nSize; iMRU++)
- {
- if (!pRecentFileList->GetDisplayName(strName, iMRU, sCurDir.GetBuffer(), nCurDir))
- {
- break;
- }
-
- if (DoesFileExist(pArrNames[iMRU]))
- {
- CString sCurEntryDir = pArrNames[iMRU].Left(nCurDir);
-
- if (sCurEntryDir.CompareNoCase(sCurDir) != 0)
- {
- //unavailable entry (wrong directory)
- continue;
- }
- }
- else
- {
- //invalid entry (not existing)
- continue;
- }
-
- int nId = iMRU + GetFirstMruID();
-
- CXTPControl* pControl = m_pControls->Add(xtpControlButton, nId, _T(""), m_nIndex + iLastValidMRU + 1, true);
- assert(pControl);
-
- pControl->SetCaption(CXTPControlWindowList::ConstructCaption(strName, iLastValidMRU + 1));
- pControl->SetFlags(xtpFlagManualUpdate);
- pControl->SetBeginGroup(iLastValidMRU == 0 && m_nIndex != 0);
- pControl->SetParameter(pArrNames[iMRU]);
-
- CString sDescription = "Open file: " + pArrNames[iMRU];
- pControl->SetDescription(sDescription);
-
- if ((GetFlags() & xtpFlagWrapRow) && iMRU == 0)
- {
- pControl->SetFlags(pControl->GetFlags() | xtpFlagWrapRow);
- }
-
- ++iLastValidMRU;
- }
-
- //if no entry was valid, treat as none would exist
- if (iLastValidMRU == 0)
- {
- SetCaption(CString(MAKEINTRESOURCE(IDS_NORECENTFILE_CAPTION)));
- SetDescription("No recently opened files");
- m_dwHideFlags = 0;
- SetEnabled(false);
- }
-}
diff --git a/Code/Editor/ControlMRU.h b/Code/Editor/ControlMRU.h
deleted file mode 100644
index 4ca6562589..0000000000
--- a/Code/Editor/ControlMRU.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#pragma once
-#ifndef CRYINCLUDE_EDITOR_CONTROLMRU_H
-#define CRYINCLUDE_EDITOR_CONTROLMRU_H
-
-class CControlMRU
- : public CXTPControlRecentFileList
-{
-protected:
- virtual void OnCalcDynamicSize(DWORD dwMode);
-
-private:
- DECLARE_XTP_CONTROL(CControlMRU)
- bool DoesFileExist(CString& sFileName);
-};
-#endif // CRYINCLUDE_EDITOR_CONTROLMRU_H
diff --git a/Code/Editor/Controls/ConsoleSCB.cpp b/Code/Editor/Controls/ConsoleSCB.cpp
index 7f018e0286..093575d445 100644
--- a/Code/Editor/Controls/ConsoleSCB.cpp
+++ b/Code/Editor/Controls/ConsoleSCB.cpp
@@ -180,7 +180,7 @@ bool ConsoleLineEdit::event(QEvent* ev)
if (newStr.isEmpty())
{
- newStr = GetIEditor()->GetCommandManager()->AutoComplete(cstring.toUtf8().data());
+ newStr = GetIEditor()->GetCommandManager()->AutoComplete(cstring.toUtf8().data()).c_str();
}
}
@@ -211,7 +211,7 @@ void ConsoleLineEdit::keyPressEvent(QKeyEvent* ev)
{
if (commandManager->IsRegistered(str.toUtf8().data()))
{
- commandManager->Execute(QtUtil::ToString(str));
+ commandManager->Execute(str.toUtf8().data());
}
else
{
@@ -566,15 +566,15 @@ static void OnVariableUpdated([[maybe_unused]] int row, ICVar* pCVar)
static CVarBlock* VarBlockFromConsoleVars()
{
IConsole* console = GetIEditor()->GetSystem()->GetIConsole();
- std::vector cmds;
+ AZStd::vector cmds;
cmds.resize(console->GetNumVars());
- size_t cmdCount = console->GetSortedVars(&cmds[0], cmds.size());
+ size_t cmdCount = console->GetSortedVars(cmds);
CVarBlock* vb = new CVarBlock;
IVariable* pVariable = nullptr;
for (int i = 0; i < cmdCount; i++)
{
- ICVar* pCVar = console->GetCVar(cmds[i]);
+ ICVar* pCVar = console->GetCVar(cmds[i].data());
if (!pCVar)
{
continue;
@@ -606,7 +606,7 @@ static CVarBlock* VarBlockFromConsoleVars()
pCVar->AddOnChangeFunctor(onChange);
pVariable->SetDescription(pCVar->GetHelp());
- pVariable->SetName(cmds[i]);
+ pVariable->SetName(cmds[i].data());
// Transfer the custom limits have they have been set for this variable
if (pCVar->HasCustomLimits())
diff --git a/Code/Editor/Controls/ConsoleSCBMFC.cpp b/Code/Editor/Controls/ConsoleSCBMFC.cpp
deleted file mode 100644
index 3337997811..0000000000
--- a/Code/Editor/Controls/ConsoleSCBMFC.cpp
+++ /dev/null
@@ -1,543 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-#include "EditorDefs.h"
-#include "ConsoleSCBMFC.h"
-#include "PropertiesDialog.h"
-#include "QtViewPaneManager.h"
-#include "Core/QtEditorApplication.h"
-
-#include
-
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-#include
-
-namespace MFC
-{
-
-static CPropertiesDialog* gPropertiesDlg = nullptr;
-static CString mfc_popup_helper(HWND hwnd, int x, int y);
-static CConsoleSCB* s_consoleSCB = nullptr;
-
-static QString RemoveColorCode(const QString& text, int& iColorCode)
-{
- QString cleanString;
- cleanString.reserve(text.size());
-
- const int textSize = text.size();
- for (int i = 0; i < textSize; ++i)
- {
- QChar c = text.at(i);
- bool isLast = i == textSize - 1;
- if (c == '$' && !isLast && text.at(i + 1).isDigit())
- {
- if (iColorCode == 0)
- {
- iColorCode = text.at(i + 1).digitValue();
- }
- ++i;
- continue;
- }
-
- if (c == '\r' || c == '\n')
- {
- ++i;
- continue;
- }
-
- cleanString.append(c);
- }
-
- return cleanString;
-}
-
-ConsoleLineEdit::ConsoleLineEdit(QWidget* parent)
- : QLineEdit(parent)
- , m_historyIndex(0)
- , m_bReusedHistory(false)
-{
-}
-
-void ConsoleLineEdit::mousePressEvent(QMouseEvent* ev)
-{
- if (ev->type() == QEvent::MouseButtonPress && ev->button() & Qt::RightButton)
- {
- Q_EMIT variableEditorRequested();
- }
-
- QLineEdit::mousePressEvent(ev);
-}
-
-void ConsoleLineEdit::mouseDoubleClickEvent(QMouseEvent* ev)
-{
- Q_EMIT variableEditorRequested();
-}
-
-bool ConsoleLineEdit::event(QEvent* ev)
-{
- // Tab key doesn't go to keyPressEvent(), must be processed here
-
- if (ev->type() != QEvent::KeyPress)
- {
- return QLineEdit::event(ev);
- }
-
- QKeyEvent* ke = static_cast(ev);
- if (ke->key() != Qt::Key_Tab)
- {
- return QLineEdit::event(ev);
- }
-
- QString inputStr = text();
- QString newStr;
-
- QStringList tokens = inputStr.split(" ");
- inputStr = tokens.isEmpty() ? QString() : tokens.first();
- IConsole* console = GetIEditor()->GetSystem()->GetIConsole();
-
- const bool ctrlPressed = ke->modifiers() & Qt::ControlModifier;
- CString cstring = QtUtil::ToCString(inputStr); // TODO: Use QString once the backend stops using QString
- if (ctrlPressed)
- {
- newStr = QtUtil::ToString(console->AutoCompletePrev(cstring));
- }
- else
- {
- newStr = QtUtil::ToString(console->ProcessCompletion(cstring));
- newStr = QtUtil::ToString(console->AutoComplete(cstring));
-
- if (newStr.isEmpty())
- {
- newStr = QtUtil::ToQString(GetIEditor()->GetCommandManager()->AutoComplete(QtUtil::ToString(newStr)));
- }
- }
-
- if (!newStr.isEmpty())
- {
- newStr += " ";
- setText(newStr);
- }
-
- deselect();
- return true;
-}
-
-void ConsoleLineEdit::keyPressEvent(QKeyEvent* ev)
-{
- IConsole* console = GetIEditor()->GetSystem()->GetIConsole();
- auto commandManager = GetIEditor()->GetCommandManager();
-
- console->ResetAutoCompletion();
-
- switch (ev->key())
- {
- case Qt::Key_Enter:
- case Qt::Key_Return:
- {
- QString str = text().trimmed();
- if (!str.isEmpty())
- {
- if (commandManager->IsRegistered(QtUtil::ToCString(str)))
- {
- commandManager->Execute(QtUtil::ToString(str));
- }
- else
- {
- CLogFile::WriteLine(QtUtil::ToCString(str));
- GetIEditor()->GetSystem()->GetIConsole()->ExecuteString(QtUtil::ToCString(str));
- }
-
- // If a history command was reused directly via up arrow enter, do not reset history index
- if (m_history.size() > 0 && m_historyIndex < m_history.size() && m_history[m_historyIndex] == str)
- {
- m_bReusedHistory = true;
- }
- else
- {
- m_historyIndex = m_history.size();
- }
-
- // Do not add the same string if it is the top of the stack, but allow duplicate entries otherwise
- if (m_history.isEmpty() || m_history.back() != str)
- {
- m_history.push_back(str);
- if (!m_bReusedHistory)
- {
- m_historyIndex = m_history.size();
- }
- }
- }
- else
- {
- m_historyIndex = m_history.size();
- }
-
- setText(QString());
- break;
- }
- case Qt::Key_AsciiTilde: // ~
- case Qt::Key_Agrave: // `
- // disable log.
- GetIEditor()->ShowConsole(false);
- setText(QString());
- m_historyIndex = m_history.size();
- break;
- case Qt::Key_Escape:
- setText(QString());
- m_historyIndex = m_history.size();
- break;
- case Qt::Key_Up:
- DisplayHistory(false /*bForward*/);
- break;
- case Qt::Key_Down:
- DisplayHistory(true /*bForward*/);
- break;
- default:
- QLineEdit::keyPressEvent(ev);
- }
-}
-
-void ConsoleLineEdit::DisplayHistory(bool bForward)
-{
- if (m_history.isEmpty())
- {
- return;
- }
-
- // Immediately after reusing a history entry, ensure up arrow re-displays command just used
- if (!m_bReusedHistory || bForward)
- {
- m_historyIndex = static_cast(clamp_tpl(static_cast(m_historyIndex) + (bForward ? 1 : -1), 0, m_history.size() - 1));
- }
- m_bReusedHistory = false;
-
- setText(m_history[m_historyIndex]);
-}
-
-ConsoleTextEdit::ConsoleTextEdit(QWidget* parent)
- : QTextEdit(parent)
-{
-}
-
-
-Lines CConsoleSCB::s_pendingLines;
-
-CConsoleSCB::CConsoleSCB(QWidget* parent)
- : QWidget(parent)
- , ui(new Ui::ConsoleMFC())
- , m_richEditTextLength(0)
- , m_backgroundTheme(gSettings.consoleBackgroundColorTheme)
-{
- m_lines = s_pendingLines;
- s_pendingLines.clear();
- s_consoleSCB = this;
- ui->setupUi(this);
- setMinimumHeight(120);
-
- // Setup the color table for the default (light) theme
- m_colorTable << QColor(0, 0, 0)
- << QColor(0, 0, 0)
- << QColor(0, 0, 200) // blue
- << QColor(0, 200, 0) // green
- << QColor(200, 0, 0) // red
- << QColor(0, 200, 200) // cyan
- << QColor(128, 112, 0) // yellow
- << QColor(200, 0, 200) // red+blue
- << QColor(0x000080ff)
- << QColor(0x008f8f8f);
- OnStyleSettingsChanged();
-
- connect(ui->button, &QPushButton::clicked, this, &CConsoleSCB::showVariableEditor);
- connect(ui->lineEdit, &MFC::ConsoleLineEdit::variableEditorRequested, this, &MFC::CConsoleSCB::showVariableEditor);
- connect(Editor::EditorQtApplication::instance(), &Editor::EditorQtApplication::skinChanged, this, &MFC::CConsoleSCB::OnStyleSettingsChanged);
-
- if (GetIEditor()->IsInConsolewMode())
- {
- // Attach / register edit box
- //CLogFile::AttachEditBox(m_edit.GetSafeHwnd()); // FIXME
- }
-}
-
-CConsoleSCB::~CConsoleSCB()
-{
- s_consoleSCB = nullptr;
- delete gPropertiesDlg;
- gPropertiesDlg = nullptr;
- CLogFile::AttachEditBox(nullptr);
-}
-
-void CConsoleSCB::RegisterViewClass()
-{
- QtViewOptions opts;
- opts.preferedDockingArea = Qt::BottomDockWidgetArea;
- opts.isDeletable = false;
- opts.isStandard = true;
- opts.showInMenu = true;
- opts.builtInActionId = ID_VIEW_CONSOLEWINDOW;
- opts.sendViewPaneNameBackToAmazonAnalyticsServers = true;
- RegisterQtViewPane(GetIEditor(), LyViewPane::Console, LyViewPane::CategoryTools, opts);
-}
-
-void CConsoleSCB::OnStyleSettingsChanged()
-{
- ui->button->setIcon(QIcon(QString(":/controls/img/cvar_dark.bmp")));
-
- // Set the debug/warning text colors appropriately for the background theme
- // (e.g. not have black text on black background)
- QColor textColor = Qt::black;
- m_backgroundTheme = gSettings.consoleBackgroundColorTheme;
- if (m_backgroundTheme == SEditorSettings::ConsoleColorTheme::Dark)
- {
- textColor = Qt::white;
- }
- m_colorTable[0] = textColor;
- m_colorTable[1] = textColor;
-
- QColor bgColor;
- if (!GetIEditor()->IsInConsolewMode() && CConsoleSCB::GetCreatedInstance() && m_backgroundTheme == SEditorSettings::ConsoleColorTheme::Dark)
- {
- bgColor = Qt::black;
- }
- else
- {
- bgColor = Qt::white;
- }
-
- ui->textEdit->setStyleSheet(QString("QTextEdit{ background: %1 }").arg(bgColor.name(QColor::HexRgb)));
-
- // Clear out the console text when we change our background color since
- // some of the previous text colors may not be appropriate for the
- // new background color
- ui->textEdit->clear();
-}
-
-void CConsoleSCB::showVariableEditor()
-{
- const QPoint cursorPos = QCursor::pos();
- CString str = mfc_popup_helper(0, cursorPos.x(), cursorPos.y());
- if (!str.IsEmpty())
- {
- ui->lineEdit->setText(QtUtil::ToQString(str));
- }
-}
-
-void CConsoleSCB::SetInputFocus()
-{
- ui->lineEdit->setFocus();
- ui->lineEdit->setText(QString());
-}
-
-void CConsoleSCB::AddToConsole(const QString& text, bool bNewLine)
-{
- m_lines.push_back({ text, bNewLine });
- FlushText();
-}
-
-void CConsoleSCB::FlushText()
-{
- if (m_lines.empty())
- {
- return;
- }
-
- // Store our current cursor in case we need to restore it, and check if
- // the user has scrolled the text edit away from the bottom
- const QTextCursor oldCursor = ui->textEdit->textCursor();
- QScrollBar* scrollBar = ui->textEdit->verticalScrollBar();
- const int oldScrollValue = scrollBar->value();
- bool scrolledOffBottom = oldScrollValue != scrollBar->maximum();
-
- ui->textEdit->moveCursor(QTextCursor::End);
- QTextCursor textCursor = ui->textEdit->textCursor();
-
- while (!m_lines.empty())
- {
- ConsoleLine line = m_lines.front();
- m_lines.pop_front();
-
- int iColor = 0;
- QString text = MFC::RemoveColorCode(line.text, iColor);
- if (iColor < 0 || iColor >= m_colorTable.size())
- {
- iColor = 0;
- }
-
- if (line.newLine)
- {
- text = QtUtil::trimRight(text);
- text = "\r\n" + text;
- }
-
- QTextCharFormat format;
- const QColor color(m_colorTable[iColor]);
- format.setForeground(color);
-
- if (iColor != 0)
- {
- format.setFontWeight(QFont::Bold);
- }
-
- textCursor.setCharFormat(format);
- textCursor.insertText(text);
- }
-
- // If the user has selected some text in the text edit area or has scrolled
- // away from the bottom, then restore the previous cursor and keep the scroll
- // bar in the same location
- if (oldCursor.hasSelection() || scrolledOffBottom)
- {
- ui->textEdit->setTextCursor(oldCursor);
- scrollBar->setValue(oldScrollValue);
- }
- // Otherwise scroll to the bottom so the latest text can be seen
- else
- {
- scrollBar->setValue(scrollBar->maximum());
- }
-}
-
-QSize CConsoleSCB::minimumSizeHint() const
-{
- return QSize(-1, -1);
-}
-
-QSize CConsoleSCB::sizeHint() const
-{
- return QSize(100, 100);
-}
-
-/** static */
-void CConsoleSCB::AddToPendingLines(const QString& text, bool bNewLine)
-{
- s_pendingLines.push_back({ text, bNewLine });
-}
-
-static CVarBlock* VarBlockFromConsoleVars()
-{
- IConsole* console = GetIEditor()->GetSystem()->GetIConsole();
- std::vector cmds;
- cmds.resize(console->GetNumVars());
- size_t cmdCount = console->GetSortedVars(&cmds[0], cmds.size());
-
- CVarBlock* vb = new CVarBlock;
- IVariable* pVariable = 0;
- for (int i = 0; i < cmdCount; i++)
- {
- ICVar* pCVar = console->GetCVar(cmds[i]);
- if (!pCVar)
- {
- continue;
- }
- int varType = pCVar->GetType();
-
- switch (varType)
- {
- case CVAR_INT:
- pVariable = new CVariable();
- pVariable->Set(pCVar->GetIVal());
- break;
- case CVAR_FLOAT:
- pVariable = new CVariable();
- pVariable->Set(pCVar->GetFVal());
- break;
- case CVAR_STRING:
- pVariable = new CVariable();
- pVariable->Set(pCVar->GetString());
- break;
- default:
- assert(0);
- }
-
- pVariable->SetDescription(pCVar->GetHelp());
- pVariable->SetName(cmds[i]);
-
- if (pVariable)
- {
- vb->AddVariable(pVariable);
- }
- }
- return vb;
-}
-
-static void OnConsoleVariableUpdated(IVariable* pVar)
-{
- if (!pVar)
- {
- return;
- }
- CString varName = pVar->GetName();
- ICVar* pCVar = GetIEditor()->GetSystem()->GetIConsole()->GetCVar(varName);
- if (!pCVar)
- {
- return;
- }
- if (pVar->GetType() == IVariable::INT)
- {
- int val;
- pVar->Get(val);
- pCVar->Set(val);
- }
- else if (pVar->GetType() == IVariable::FLOAT)
- {
- float val;
- pVar->Get(val);
- pCVar->Set(val);
- }
- else if (pVar->GetType() == IVariable::STRING)
- {
- CString val;
- pVar->Get(val);
- pCVar->Set(val);
- }
-}
-
-static CString mfc_popup_helper(HWND hwnd, int x, int y)
-{
- IConsole* console = GetIEditor()->GetSystem()->GetIConsole();
-
- TSmartPtr vb = VarBlockFromConsoleVars();
- XmlNodeRef node;
- if (!gPropertiesDlg)
- {
- gPropertiesDlg = new CPropertiesDialog("Console Variables", node, AfxGetMainWnd(), true);
- }
- if (!gPropertiesDlg->m_hWnd)
- {
- gPropertiesDlg->Create(CPropertiesDialog::IDD, AfxGetMainWnd());
- gPropertiesDlg->SetUpdateCallback(AZStd::bind(OnConsoleVariableUpdated, AZStd::placeholders::_1));
- }
- gPropertiesDlg->ShowWindow(SW_SHOW);
- gPropertiesDlg->BringWindowToTop();
- gPropertiesDlg->GetPropertyCtrl()->AddVarBlock(vb);
-
- return "";
-}
-
-CConsoleSCB* CConsoleSCB::GetCreatedInstance()
-{
- return s_consoleSCB;
-}
-
-} // namespace MFC
-
-#include
diff --git a/Code/Editor/Controls/FolderTreeCtrl.cpp b/Code/Editor/Controls/FolderTreeCtrl.cpp
index 17b6dccac7..b1cbb9414e 100644
--- a/Code/Editor/Controls/FolderTreeCtrl.cpp
+++ b/Code/Editor/Controls/FolderTreeCtrl.cpp
@@ -400,7 +400,7 @@ void CFolderTreeCtrl::RemoveEmptyFolderItems(const QString& folder)
void CFolderTreeCtrl::Edit(const QString& path)
{
- CFileUtil::EditTextFile(QtUtil::ToString(path), 0, IFileUtil::FILE_TYPE_SCRIPT);
+ CFileUtil::EditTextFile(path.toUtf8().data(), 0, IFileUtil::FILE_TYPE_SCRIPT);
}
void CFolderTreeCtrl::ShowInExplorer(const QString& path)
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/PropertyCtrl.cpp b/Code/Editor/Controls/ReflectedPropertyControl/PropertyCtrl.cpp
index bf87f2017d..c228fbda09 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/PropertyCtrl.cpp
+++ b/Code/Editor/Controls/ReflectedPropertyControl/PropertyCtrl.cpp
@@ -10,7 +10,6 @@
// Editor
#include "PropertyCtrl.h"
-#include "PropertyAnimationCtrl.h"
#include "PropertyResourceCtrl.h"
#include "PropertyGenericCtrl.h"
#include "PropertyMiscCtrl.h"
@@ -22,9 +21,7 @@ void RegisterReflectedVarHandlers()
if (!registered)
{
registered = true;
- EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew AnimationPropertyWidgetHandler());
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew FileResourceSelectorWidgetHandler());
- EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew ReverbPresetPropertyHandler());
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew SequencePropertyHandler());
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew SequenceIdPropertyHandler());
EBUS_EVENT(AzToolsFramework::PropertyTypeRegistrationMessages::Bus, RegisterPropertyType, aznew LocalStringPropertyHandler());
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.cpp b/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.cpp
index 1916ce5e16..8ff83dd894 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.cpp
+++ b/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.cpp
@@ -73,16 +73,6 @@ void GenericPopupPropertyEditor::SetPropertyType(PropertyType type)
m_propertyType = type;
}
-void ReverbPresetPropertyEditor::onEditClicked()
-{
- CSelectEAXPresetDlg PresetDlg(this);
- PresetDlg.SetCurrPreset(GetValue());
- if (PresetDlg.exec() == QDialog::Accepted)
- {
- SetValue(PresetDlg.GetCurrPreset());
- }
-}
-
void SequencePropertyEditor::onEditClicked()
{
CSelectSequenceDialog gtDlg(this);
@@ -132,7 +122,9 @@ void LocalStringPropertyEditor::onEditClicked()
if (pMgr->GetLocalizedInfoByIndex(i, sInfo))
{
item.desc = tr("English Text:\r\n");
- item.desc += QString::fromWCharArray(Unicode::Convert(sInfo.sUtf8TranslatedText).c_str());
+ AZStd::wstring utf8TranslatedTextW;
+ AZStd::to_wstring(utf8TranslatedTextW, sInfo.sUtf8TranslatedText);
+ item.desc += QString::fromWCharArray(utf8TranslatedTextW.c_str());
item.name = sInfo.sKey;
items.push_back(item);
}
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.h b/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.h
index 2296773f0a..b6b14cf125 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.h
+++ b/Code/Editor/Controls/ReflectedPropertyControl/PropertyGenericCtrl.h
@@ -96,15 +96,6 @@ public:
}
};
-class ReverbPresetPropertyEditor
- : public GenericPopupPropertyEditor
-{
-public:
- ReverbPresetPropertyEditor(QWidget* pParent = nullptr)
- : GenericPopupPropertyEditor(pParent){}
- void onEditClicked() override;
-};
-
class MissionObjPropertyEditor
: public GenericPopupPropertyEditor
{
@@ -155,7 +146,6 @@ public:
// So we use our own
#define CONST_AZ_CRC(name, value) AZ::u32(value)
-using ReverbPresetPropertyHandler = GenericPopupWidgetHandler;
using MissionObjPropertyHandler = GenericPopupWidgetHandler;
using SequencePropertyHandler = GenericPopupWidgetHandler;
using SequenceIdPropertyHandler = GenericPopupWidgetHandler;
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/PropertyResourceCtrl.cpp b/Code/Editor/Controls/ReflectedPropertyControl/PropertyResourceCtrl.cpp
index d3ae6aaecf..c5ccc599d6 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/PropertyResourceCtrl.cpp
+++ b/Code/Editor/Controls/ReflectedPropertyControl/PropertyResourceCtrl.cpp
@@ -17,9 +17,9 @@
// AzToolsFramework
#include
#include
+#include
// Editor
-#include "IResourceSelectorHost.h"
#include "Controls/QToolTipWidget.h"
#include "Controls/BitmapToolTip.h"
@@ -35,8 +35,8 @@ BrowseButton::BrowseButton(PropertyType type, QWidget* parent /*= nullptr*/)
void BrowseButton::SetPathAndEmit(const QString& path)
{
- //only emit if path changes, except for ePropertyGeomCache. Old property control
- if (path != m_path || m_propertyType == ePropertyGeomCache)
+ //only emit if path changes. Old property control
+ if (path != m_path)
{
m_path = path;
emit PathChanged(m_path);
@@ -78,21 +78,6 @@ private:
// Filters for texture.
selection = AssetSelectionModel::AssetGroupSelection("Texture");
}
- else if (m_propertyType == ePropertyModel)
- {
- // Filters for models.
- selection = AssetSelectionModel::AssetGroupSelection("Geometry");
- }
- else if (m_propertyType == ePropertyGeomCache)
- {
- // Filters for geom caches.
- selection = AssetSelectionModel::AssetTypeSelection("Geom Cache");
- }
- else if (m_propertyType == ePropertyFile)
- {
- // Filters for files.
- selection = AssetSelectionModel::AssetTypeSelection("File");
- }
else
{
return;
@@ -106,14 +91,7 @@ private:
switch (m_propertyType)
{
case ePropertyTexture:
- case ePropertyModel:
newPath.replace("\\\\", "/");
- }
- switch (m_propertyType)
- {
- case ePropertyTexture:
- case ePropertyModel:
- case ePropertyFile:
if (newPath.size() > MAX_PATH)
{
newPath.resize(MAX_PATH);
@@ -125,26 +103,51 @@ private:
}
};
-class ResourceSelectorButton
+class AudioControlSelectorButton
: public BrowseButton
{
public:
- AZ_CLASS_ALLOCATOR(ResourceSelectorButton, AZ::SystemAllocator, 0);
+ AZ_CLASS_ALLOCATOR(AudioControlSelectorButton, AZ::SystemAllocator, 0);
- ResourceSelectorButton(PropertyType type, QWidget* pParent = nullptr)
+ AudioControlSelectorButton(PropertyType type, QWidget* pParent = nullptr)
: BrowseButton(type, pParent)
{
- setToolTip(tr("Select resource"));
+ setToolTip(tr("Select Audio Control"));
}
private:
void OnClicked() override
{
- SResourceSelectorContext x;
- x.parentWidget = this;
- x.typeName = Prop::GetPropertyTypeToResourceType(m_propertyType);
- QString newPath = GetIEditor()->GetResourceSelectorHost()->SelectResource(x, m_path);
- SetPathAndEmit(newPath);
+ AZStd::string resourceResult;
+ auto ConvertLegacyAudioPropertyType = [](const PropertyType type) -> AzToolsFramework::AudioPropertyType
+ {
+ switch (type)
+ {
+ case ePropertyAudioTrigger:
+ return AzToolsFramework::AudioPropertyType::Trigger;
+ case ePropertyAudioRTPC:
+ return AzToolsFramework::AudioPropertyType::Rtpc;
+ case ePropertyAudioSwitch:
+ return AzToolsFramework::AudioPropertyType::Switch;
+ case ePropertyAudioSwitchState:
+ return AzToolsFramework::AudioPropertyType::SwitchState;
+ case ePropertyAudioEnvironment:
+ return AzToolsFramework::AudioPropertyType::Environment;
+ case ePropertyAudioPreloadRequest:
+ return AzToolsFramework::AudioPropertyType::Preload;
+ default:
+ return AzToolsFramework::AudioPropertyType::NumTypes;
+ }
+ };
+
+ auto propType = ConvertLegacyAudioPropertyType(m_propertyType);
+ if (propType != AzToolsFramework::AudioPropertyType::NumTypes)
+ {
+ AzToolsFramework::AudioControlSelectorRequestBus::EventResult(
+ resourceResult, propType, &AzToolsFramework::AudioControlSelectorRequestBus::Events::SelectResource,
+ AZStd::string_view{ m_path.toUtf8().constData() });
+ SetPathAndEmit(QString{ resourceResult.c_str() });
+ }
}
};
@@ -235,18 +238,13 @@ void FileResourceSelectorWidget::SetPropertyType(PropertyType type)
AddButton(new TextureEditButton);
m_previewToolTip.reset(new CBitmapToolTip);
break;
- case ePropertyModel:
- case ePropertyGeomCache:
case ePropertyAudioTrigger:
case ePropertyAudioSwitch:
case ePropertyAudioSwitchState:
case ePropertyAudioRTPC:
case ePropertyAudioEnvironment:
case ePropertyAudioPreloadRequest:
- AddButton(new ResourceSelectorButton(type));
- break;
- case ePropertyFile:
- AddButton(new FileBrowseButton(type));
+ AddButton(new AudioControlSelectorButton(type));
break;
default:
break;
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertiesPanel.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertiesPanel.cpp
deleted file mode 100644
index 8651db7e96..0000000000
--- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertiesPanel.cpp
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-
-// Description : implementation file
-
-#include "EditorDefs.h"
-
-#include "ReflectedPropertiesPanel.h"
-
-/////////////////////////////////////////////////////////////////////////////
-// ReflectedPropertiesPanel dialog
-
-
-ReflectedPropertiesPanel::ReflectedPropertiesPanel(QWidget* pParent)
- : ReflectedPropertyControl(pParent)
-{
-}
-
-//////////////////////////////////////////////////////////////////////////
-void ReflectedPropertiesPanel::DeleteVars()
-{
- ClearVarBlock();
- m_updateCallbacks.clear();
- m_varBlock = nullptr;
-}
-
-//////////////////////////////////////////////////////////////////////////
-void ReflectedPropertiesPanel::SetVarBlock(class CVarBlock* vb, ReflectedPropertyControl::UpdateVarCallback* updCallback, const char* category)
-{
- assert(vb);
-
- m_varBlock = vb;
-
- RemoveAllItems();
- m_varBlock = vb;
- AddVarBlock(m_varBlock, category);
-
- SetUpdateCallback(AZStd::bind(&ReflectedPropertiesPanel::OnPropertyChanged, this, AZStd::placeholders::_1));
-
- // When new object set all previous callbacks freed.
- m_updateCallbacks.clear();
- if (updCallback)
- {
- stl::push_back_unique(m_updateCallbacks, updCallback);
- }
-}
-
-//////////////////////////////////////////////////////////////////////////
-void ReflectedPropertiesPanel::AddVars(CVarBlock* vb, ReflectedPropertyControl::UpdateVarCallback* updCallback, const char* category)
-{
- assert(vb);
-
- bool bNewBlock = false;
- // Make a clone of properties.
- if (!m_varBlock)
- {
- RemoveAllItems();
- m_varBlock = vb->Clone(true);
- AddVarBlock(m_varBlock, category);
- bNewBlock = true;
- }
- m_varBlock->Wire(vb);
-
- if (bNewBlock)
- {
- SetUpdateCallback(AZStd::bind(&ReflectedPropertiesPanel::OnPropertyChanged, this, AZStd::placeholders::_1));
-
- // When new object set all previous callbacks freed.
- m_updateCallbacks.clear();
- }
-
- if (updCallback)
- {
- stl::push_back_unique(m_updateCallbacks, updCallback);
- }
-}
-
-void ReflectedPropertiesPanel::OnPropertyChanged(IVariable* pVar)
-{
- std::list::iterator iter;
- for (iter = m_updateCallbacks.begin(); iter != m_updateCallbacks.end(); ++iter)
- {
- (*iter)->operator()(pVar);
- }
-}
-
-
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertiesPanel.h b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertiesPanel.h
deleted file mode 100644
index cd551c63e2..0000000000
--- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertiesPanel.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#ifndef CRYINCLUDE_EDITOR_REFLECTEDPROPERTIESPANEL_H
-#define CRYINCLUDE_EDITOR_REFLECTEDPROPERTIESPANEL_H
-
-#pragma once
-
-#include "Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.h"
-#include "Util/Variable.h"
-
-/////////////////////////////////////////////////////////////////////////////
-// ReflectedPropertiesPanel dialog
-
-AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING
-//This class is a port of ReflectedPropertiesPanel to use the ReflectedPropertyControl
-class SANDBOX_API ReflectedPropertiesPanel
- : public ReflectedPropertyControl
-{
-AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
-public:
- ReflectedPropertiesPanel(QWidget* pParent = nullptr); // standard constructor
-
- void DeleteVars();
- void AddVars(class CVarBlock* vb, ReflectedPropertyControl::UpdateVarCallback* func = nullptr, const char* category = nullptr);
-
- void SetVarBlock(class CVarBlock* vb, ReflectedPropertyControl::UpdateVarCallback* func = nullptr, const char* category = nullptr);
-
-protected:
- void OnPropertyChanged(IVariable* pVar);
-
-protected:
- AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
- TSmartPtr m_varBlock;
-
- std::list m_updateCallbacks;
- AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
-};
-
-
-#endif // CRYINCLUDE_EDITOR_REFLECTEDPROPERTIESPANEL_H
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp
index 5a9d61be42..303f86d270 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp
+++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp
@@ -255,9 +255,6 @@ void ReflectedPropertyItem::SetVariable(IVariable *var)
case ePropertySelection:
m_reflectedVarAdapter = new ReflectedVarEnumAdapter;
break;
- case ePropertyAnimation:
- m_reflectedVarAdapter = new ReflectedVarAnimationAdapter;
- break;
case ePropertyColor:
m_reflectedVarAdapter = new ReflectedVarColorAdapter;
break;
@@ -265,7 +262,6 @@ void ReflectedPropertyItem::SetVariable(IVariable *var)
m_reflectedVarAdapter = new ReflectedVarUserAdapter;
break;
case ePropertyEquip:
- case ePropertyReverbPreset:
case ePropertyGameToken:
case ePropertyMissionObj:
case ePropertySequence:
@@ -276,15 +272,12 @@ void ReflectedPropertyItem::SetVariable(IVariable *var)
m_reflectedVarAdapter = new ReflectedVarGenericPropertyAdapter(desc.m_type);
break;
case ePropertyTexture:
- case ePropertyModel:
- case ePropertyGeomCache:
case ePropertyAudioTrigger:
case ePropertyAudioSwitch:
case ePropertyAudioSwitchState:
case ePropertyAudioRTPC:
case ePropertyAudioEnvironment:
case ePropertyAudioPreloadRequest:
- case ePropertyFile:
m_reflectedVarAdapter = new ReflectedVarResourceAdapter;
break;
case ePropertyFloatCurve:
@@ -569,7 +562,6 @@ void ReflectedPropertyItem::SetValue(const QString& sValue, bool bRecordUndo, bo
break;
case ePropertyTexture:
- case ePropertyModel:
value.replace('\\', '/');
break;
}
@@ -578,8 +570,6 @@ void ReflectedPropertyItem::SetValue(const QString& sValue, bool bRecordUndo, bo
switch (m_type)
{
case ePropertyTexture:
- case ePropertyModel:
- case ePropertyFile:
if (value.length() >= MAX_PATH)
{
value = value.left(MAX_PATH);
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.cpp
index 5b9c5b8063..263c17a8bb 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.cpp
+++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.cpp
@@ -31,12 +31,6 @@ void ReflectedVarInit::setupReflection(AZ::SerializeContext* serializeContext)
->Field("description", &CReflectedVar::m_description)
->Field("varName", &CReflectedVar::m_varName);
- serializeContext->Class ()
- ->Version(1)
- ->Field("animation", &CReflectedVarAnimation::m_animation)
- ->Field("entityID", &CReflectedVarAnimation::m_entityID)
- ;
-
serializeContext->Class ()
->Version(1)
->Field("path", &CReflectedVarResource::m_path)
@@ -76,12 +70,6 @@ void ReflectedVarInit::setupReflection(AZ::SerializeContext* serializeContext)
AZ::EditContext* ec = serializeContext->GetEditContext();
if (ec)
{
- ec->Class< CReflectedVarAnimation >("VarAnimation", "Animation")
- ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
- ->Attribute(AZ::Edit::Attributes::NameLabelOverride, &CReflectedVarAnimation::varName)
- ->Attribute(AZ::Edit::Attributes::DescriptionTextOverride, &CReflectedVarAnimation::description)
- ;
-
ec->Class< CReflectedVarResource >("VarResource", "Resource")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::NameLabelOverride, &CReflectedVarResource::varName)
@@ -284,8 +272,6 @@ AZ::u32 CReflectedVarGenericProperty::handler()
return AZ_CRC("ePropertyShader", 0xc40932f1);
case ePropertyEquip:
return AZ_CRC("ePropertyEquip", 0x66ffd290);
- case ePropertyReverbPreset:
- return AZ_CRC("ePropertyReverbPreset", 0x51469f38);
case ePropertyDeprecated0:
return AZ_CRC("ePropertyCustomAction", 0x4ffa5ba5);
case ePropertyGameToken:
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.h b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.h
index 634f2efd3a..a15f8326d1 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.h
+++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVar.h
@@ -265,32 +265,8 @@ public:
AZ::Vector3 m_color;
};
-//Class to hold ePropertyAnimation (IVariable::DT_ANIMATION )
-class CReflectedVarAnimation
- : public CReflectedVar
-{
-public:
- AZ_RTTI(CReflectedVarAnimation, "{635D982E-23EC-463F-8F33-4FC2C19D5673}", CReflectedVar)
-
- CReflectedVarAnimation(const AZStd::string& name)
- : CReflectedVar(name)
- , m_entityID(0)
- {}
- CReflectedVarAnimation()
- : m_entityID(0){}
-
- AZStd::string varName() const { return m_varName; }
- AZStd::string description() const { return m_description; }
-
- AZStd::string m_animation;
- AZ::EntityId m_entityID;
-};
-
//Class to hold:
// ePropertyTexture (IVariable::DT_TEXTURE)
-// ePropertyMaterial (IVariable::DT_MATERIAL)
-// ePropertyModel (IVariable::DT_OBJECT)
-// ePropertyGeomCache (IVariable::DT_GEOM_CACHE)
// ePropertyAudioTrigger (IVariable::DT_AUDIO_TRIGGER)
// ePropertyAudioSwitch (IVariable::DT_AUDIO_SWITCH )
// ePropertyAudioSwitchState (IVariable::DT_AUDIO_SWITCH_STATE)
@@ -344,7 +320,6 @@ public:
AZStd::vector m_itemDescriptions;
};
-//Class to hold ePropertyAnimation (IVariable::DT_ANIMATION )
class CReflectedVarSpline
: public CReflectedVar
{
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp
index 5639fa95b0..aba346ce6a 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp
+++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp
@@ -392,25 +392,6 @@ void ReflectedVarColorAdapter::SyncIVarToReflectedVar(IVariable *pVariable)
-void ReflectedVarAnimationAdapter::SetVariable(IVariable *pVariable)
-{
- m_reflectedVar.reset(new CReflectedVarAnimation(pVariable->GetHumanName().toUtf8().data()));
- m_reflectedVar->m_description = pVariable->GetDescription().toUtf8().data();
-}
-
-void ReflectedVarAnimationAdapter::SyncReflectedVarToIVar(IVariable *pVariable)
-{
- m_reflectedVar->m_entityID = static_cast(pVariable->GetUserData().value());
- m_reflectedVar->m_animation = pVariable->GetDisplayValue().toUtf8().data();
-}
-
-void ReflectedVarAnimationAdapter::SyncIVarToReflectedVar(IVariable *pVariable)
-{
- pVariable->SetUserData(static_cast(m_reflectedVar->m_entityID));
- pVariable->SetDisplayValue(m_reflectedVar->m_animation.c_str());
-
-}
-
void ReflectedVarResourceAdapter::SetVariable(IVariable *pVariable)
{
m_reflectedVar.reset(new CReflectedVarResource(pVariable->GetHumanName().toUtf8().data()));
@@ -429,7 +410,7 @@ void ReflectedVarResourceAdapter::SyncReflectedVarToIVar(IVariable *pVariable)
void ReflectedVarResourceAdapter::SyncIVarToReflectedVar(IVariable *pVariable)
{
- const bool bForceModified = (m_reflectedVar->m_propertyType == ePropertyGeomCache);
+ const bool bForceModified = false;
pVariable->SetForceModified(bForceModified);
pVariable->SetDisplayValue(m_reflectedVar->m_path.c_str());
diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h
index 07bb72413a..9c49f1ae1a 100644
--- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h
+++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h
@@ -218,20 +218,6 @@ AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
};
-class EDITOR_CORE_API ReflectedVarAnimationAdapter
- : public ReflectedVarAdapter
-{
-public:
- void SetVariable(IVariable* pVariable) override;
- void SyncReflectedVarToIVar(IVariable* pVariable) override;
- void SyncIVarToReflectedVar(IVariable* pVariable) override;
- CReflectedVar* GetReflectedVar() override { return m_reflectedVar.data(); }
-private:
-AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
- QScopedPointer m_reflectedVar;
-AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
-};
-
class EDITOR_CORE_API ReflectedVarResourceAdapter
: public ReflectedVarAdapter
{
diff --git a/Code/Editor/Controls/SplineCtrlEx.cpp b/Code/Editor/Controls/SplineCtrlEx.cpp
index 36a9d8afef..5977aff105 100644
--- a/Code/Editor/Controls/SplineCtrlEx.cpp
+++ b/Code/Editor/Controls/SplineCtrlEx.cpp
@@ -127,7 +127,7 @@ private:
std::vector keySelectionFlags;
_smart_ptr undo;
_smart_ptr redo;
- string id;
+ AZStd::string id;
ISplineInterpolator* pSpline;
};
diff --git a/Code/Editor/Controls/SplineCtrlEx.h b/Code/Editor/Controls/SplineCtrlEx.h
index 8592febf88..add4bcb0a9 100644
--- a/Code/Editor/Controls/SplineCtrlEx.h
+++ b/Code/Editor/Controls/SplineCtrlEx.h
@@ -53,8 +53,8 @@ class QRubberBand;
class ISplineSet
{
public:
- virtual ISplineInterpolator* GetSplineFromID(const string& id) = 0;
- virtual string GetIDFromSpline(ISplineInterpolator* pSpline) = 0;
+ virtual ISplineInterpolator* GetSplineFromID(const AZStd::string& id) = 0;
+ virtual AZStd::string GetIDFromSpline(ISplineInterpolator* pSpline) = 0;
virtual int GetSplineCount() const = 0;
virtual int GetKeyCountAtTime(float time, float threshold) const = 0;
};
diff --git a/Code/Editor/Core/QtEditorApplication.cpp b/Code/Editor/Core/QtEditorApplication.cpp
index 0776a96a4d..dd784ce10d 100644
--- a/Code/Editor/Core/QtEditorApplication.cpp
+++ b/Code/Editor/Core/QtEditorApplication.cpp
@@ -206,11 +206,8 @@ namespace
static void LogToDebug([[maybe_unused]] QtMsgType Type, [[maybe_unused]] const QMessageLogContext& Context, const QString& message)
{
-#if defined(WIN32) || defined(WIN64)
- OutputDebugStringW(L"Qt: ");
- OutputDebugStringW(reinterpret_cast(message.utf16()));
- OutputDebugStringW(L"\n");
-#endif
+ AZ::Debug::Platform::OutputToDebugger("Qt", message.toUtf8().data());
+ AZ::Debug::Platform::OutputToDebugger(nullptr, "\n");
}
}
diff --git a/Code/Editor/Core/Tests/test_Main.cpp b/Code/Editor/Core/Tests/test_Main.cpp
index 6acedb6e57..3d3e286f18 100644
--- a/Code/Editor/Core/Tests/test_Main.cpp
+++ b/Code/Editor/Core/Tests/test_Main.cpp
@@ -52,7 +52,7 @@ protected:
}
private:
- AZ::AllocatorScope m_allocatorScope;
+ AZ::AllocatorScope m_allocatorScope;
SSystemGlobalEnvironment m_stubEnv;
AZ::IO::LocalFileIO m_fileIO;
NiceMock* m_cryPak;
diff --git a/Code/Editor/CryEdit.cpp b/Code/Editor/CryEdit.cpp
index bc96a8f3a8..8444f81317 100644
--- a/Code/Editor/CryEdit.cpp
+++ b/Code/Editor/CryEdit.cpp
@@ -286,7 +286,7 @@ bool CCryDocManager::DoPromptFileName(QString& fileName, [[maybe_unused]] UINT n
return false;
}
-CCryEditDoc* CCryDocManager::OpenDocumentFile(LPCTSTR lpszFileName, bool bAddToMRU)
+CCryEditDoc* CCryDocManager::OpenDocumentFile(const char* lpszFileName, bool bAddToMRU)
{
assert(lpszFileName != nullptr);
@@ -801,12 +801,12 @@ void CCryEditApp::InitDirectory()
// Needed to work with custom memory manager.
//////////////////////////////////////////////////////////////////////////
-CCryEditDoc* CCrySingleDocTemplate::OpenDocumentFile(LPCTSTR lpszPathName, bool bMakeVisible /*= true*/)
+CCryEditDoc* CCrySingleDocTemplate::OpenDocumentFile(const char* lpszPathName, bool bMakeVisible /*= true*/)
{
return OpenDocumentFile(lpszPathName, true, bMakeVisible);
}
-CCryEditDoc* CCrySingleDocTemplate::OpenDocumentFile(LPCTSTR lpszPathName, bool bAddToMRU, [[maybe_unused]] bool bMakeVisible)
+CCryEditDoc* CCrySingleDocTemplate::OpenDocumentFile(const char* lpszPathName, bool bAddToMRU, [[maybe_unused]] bool bMakeVisible)
{
CCryEditDoc* pCurDoc = GetIEditor()->GetDocument();
@@ -845,7 +845,7 @@ CCryEditDoc* CCrySingleDocTemplate::OpenDocumentFile(LPCTSTR lpszPathName, bool
return pCurDoc;
}
-CCrySingleDocTemplate::Confidence CCrySingleDocTemplate::MatchDocType(LPCTSTR lpszPathName, CCryEditDoc*& rpDocMatch)
+CCrySingleDocTemplate::Confidence CCrySingleDocTemplate::MatchDocType(const char* lpszPathName, CCryEditDoc*& rpDocMatch)
{
assert(lpszPathName != nullptr);
rpDocMatch = nullptr;
@@ -891,8 +891,7 @@ CCrySingleDocTemplate::Confidence CCrySingleDocTemplate::MatchDocType(LPCTSTR lp
/////////////////////////////////////////////////////////////////////////////
namespace
{
- CryMutex g_splashScreenStateLock;
- CryConditionVariable g_splashScreenStateChange;
+ AZStd::mutex g_splashScreenStateLock;
enum ESplashScreenState
{
eSplashScreenState_Init, eSplashScreenState_Started, eSplashScreenState_Destroy
@@ -923,7 +922,7 @@ QString FormatRichTextCopyrightNotice()
/////////////////////////////////////////////////////////////////////////////
void CCryEditApp::ShowSplashScreen(CCryEditApp* app)
{
- g_splashScreenStateLock.Lock();
+ g_splashScreenStateLock.lock();
CStartupLogoDialog* splashScreen = new CStartupLogoDialog(FormatVersion(app->m_pEditor->GetFileVersion()), FormatRichTextCopyrightNotice());
@@ -931,8 +930,7 @@ void CCryEditApp::ShowSplashScreen(CCryEditApp* app)
g_splashScreen = splashScreen;
g_splashScreenState = eSplashScreenState_Started;
- g_splashScreenStateLock.Unlock();
- g_splashScreenStateChange.Notify();
+ g_splashScreenStateLock.unlock();
splashScreen->show();
// Make sure the initial paint of the splash screen occurs so we dont get stuck with a blank window
@@ -940,10 +938,9 @@ void CCryEditApp::ShowSplashScreen(CCryEditApp* app)
QObject::connect(splashScreen, &QObject::destroyed, splashScreen, [=]
{
- g_splashScreenStateLock.Lock();
+ AZStd::scoped_lock lock(g_splashScreenStateLock);
g_pInitializeUIInfo = nullptr;
g_splashScreen = nullptr;
- g_splashScreenStateLock.Unlock();
});
}
@@ -973,9 +970,9 @@ void CCryEditApp::CloseSplashScreen()
if (CStartupLogoDialog::instance())
{
delete CStartupLogoDialog::instance();
- g_splashScreenStateLock.Lock();
+ g_splashScreenStateLock.lock();
g_splashScreenState = eSplashScreenState_Destroy;
- g_splashScreenStateLock.Unlock();
+ g_splashScreenStateLock.unlock();
}
GetIEditor()->Notify(eNotify_OnSplashScreenDestroyed);
@@ -984,12 +981,12 @@ void CCryEditApp::CloseSplashScreen()
/////////////////////////////////////////////////////////////////////////////
void CCryEditApp::OutputStartupMessage(QString str)
{
- g_splashScreenStateLock.Lock();
+ g_splashScreenStateLock.lock();
if (g_pInitializeUIInfo)
{
g_pInitializeUIInfo->SetInfoText(str.toUtf8().data());
}
- g_splashScreenStateLock.Unlock();
+ g_splashScreenStateLock.unlock();
}
//////////////////////////////////////////////////////////////////////////
@@ -1864,11 +1861,6 @@ void CCryEditApp::UnregisterEventLoopHook(IEventLoopHook* pHookToRemove)
//////////////////////////////////////////////////////////////////////////
void CCryEditApp::LoadFile(QString fileName)
{
- //CEditCommandLineInfo cmdLine;
- //ProcessCommandLine(cmdinfo);
-
- //bool bBuilding = false;
- //CString file = cmdLine.SpanExcluding()
if (GetIEditor()->GetViewManager()->GetViewCount() == 0)
{
return;
@@ -3193,7 +3185,7 @@ bool CCryEditApp::CreateLevel(bool& wasCreateLevelOperationCancelled)
GetIEditor()->GetDocument()->DeleteTemporaryLevel();
}
- if (levelName.length() == 0 || !CryStringUtils::IsValidFileName(levelName.toUtf8().data()))
+ if (levelName.length() == 0 || !AZ::StringFunc::Path::IsValid(levelName.toUtf8().data()))
{
QMessageBox::critical(AzToolsFramework::GetActiveWindow(), QString(), QObject::tr("Level name is invalid, please choose another name."));
return false;
@@ -3226,13 +3218,16 @@ bool CCryEditApp::CreateLevel(bool& wasCreateLevelOperationCancelled)
DWORD dw = GetLastError();
#ifdef WIN32
- FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+ wchar_t windowsErrorMessageW[ERROR_LEN];
+ windowsErrorMessageW[0] = L'\0';
+ FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
nullptr,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- windowsErrorMessage.data(),
- windowsErrorMessage.length(), nullptr);
+ windowsErrorMessageW,
+ ERROR_LEN, nullptr);
_getcwd(cwd.data(), cwd.length());
+ AZStd::to_string(windowsErrorMessage.data(), ERROR_LEN, windowsErrorMessageW);
#else
windowsErrorMessage = strerror(dw);
cwd = QDir::currentPath().toUtf8();
@@ -3306,7 +3301,7 @@ void CCryEditApp::OnOpenSlice()
}
//////////////////////////////////////////////////////////////////////////
-CCryEditDoc* CCryEditApp::OpenDocumentFile(LPCTSTR lpszFileName)
+CCryEditDoc* CCryEditApp::OpenDocumentFile(const char* lpszFileName)
{
if (m_openingLevel)
{
@@ -4001,15 +3996,12 @@ struct CryAllocatorsRAII
CryAllocatorsRAII()
{
AZ_Assert(!AZ::AllocatorInstance::IsReady(), "Expected allocator to not be initialized, hunt down the static that is initializing it");
- AZ_Assert(!AZ::AllocatorInstance::IsReady(), "Expected allocator to not be initialized, hunt down the static that is initializing it");
AZ::AllocatorInstance::Create();
- AZ::AllocatorInstance::Create();
}
~CryAllocatorsRAII()
{
- AZ::AllocatorInstance::Destroy();
AZ::AllocatorInstance::Destroy();
}
};
diff --git a/Code/Editor/CryEdit.h b/Code/Editor/CryEdit.h
index 9e3dfc98ff..4ab37ac1e5 100644
--- a/Code/Editor/CryEdit.h
+++ b/Code/Editor/CryEdit.h
@@ -174,7 +174,7 @@ public:
virtual bool InitInstance();
virtual int ExitInstance(int exitCode = 0);
virtual bool OnIdle(LONG lCount);
- virtual CCryEditDoc* OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual CCryEditDoc* OpenDocumentFile(const char* lpszFileName);
CCryDocManager* GetDocManager() { return m_pDocManager; }
@@ -448,9 +448,9 @@ public:
~CCrySingleDocTemplate() {};
// avoid creating another CMainFrame
// close other type docs before opening any things
- virtual CCryEditDoc* OpenDocumentFile(LPCTSTR lpszPathName, bool bAddToMRU, bool bMakeVisible);
- virtual CCryEditDoc* OpenDocumentFile(LPCTSTR lpszPathName, bool bMakeVisible = true);
- virtual Confidence MatchDocType(LPCTSTR lpszPathName, CCryEditDoc*& rpDocMatch);
+ virtual CCryEditDoc* OpenDocumentFile(const char* lpszPathName, bool bAddToMRU, bool bMakeVisible);
+ virtual CCryEditDoc* OpenDocumentFile(const char* lpszPathName, bool bMakeVisible = TRUE);
+ virtual Confidence MatchDocType(const char* lpszPathName, CCryEditDoc*& rpDocMatch);
private:
const QMetaObject* m_documentClass = nullptr;
@@ -467,7 +467,7 @@ public:
virtual void OnFileNew();
virtual bool DoPromptFileName(QString& fileName, UINT nIDSTitle,
DWORD lFlags, bool bOpenFileDialog, CDocTemplate* pTemplate);
- virtual CCryEditDoc* OpenDocumentFile(LPCTSTR lpszFileName, bool bAddToMRU);
+ virtual CCryEditDoc* OpenDocumentFile(const char* lpszFileName, bool bAddToMRU);
QVector m_templateList;
};
diff --git a/Code/Editor/CryEditDoc.cpp b/Code/Editor/CryEditDoc.cpp
index e372baf365..c720299ce8 100644
--- a/Code/Editor/CryEditDoc.cpp
+++ b/Code/Editor/CryEditDoc.cpp
@@ -418,8 +418,8 @@ void CCryEditDoc::Load(TDocMultiArchive& arrXmlAr, const QString& szFilename)
Audio::AudioSystemRequestBus::BroadcastResult(controlsPath, &Audio::AudioSystemRequestBus::Events::GetControlsPath);
QString sAudioLevelPath(controlsPath);
sAudioLevelPath += "levels/";
- string const sLevelNameOnly = PathUtil::GetFileName(fileName.toUtf8().data());
- sAudioLevelPath += sLevelNameOnly;
+ AZStd::string const sLevelNameOnly = PathUtil::GetFileName(fileName.toUtf8().data());
+ sAudioLevelPath += sLevelNameOnly.c_str();
QByteArray path = sAudioLevelPath.toUtf8();
Audio::SAudioManagerRequestData oAMData(path, Audio::eADS_LEVEL_SPECIFIC);
Audio::SAudioRequest oAudioRequestData;
@@ -1909,7 +1909,7 @@ void CCryEditDoc::LogLoadTime(int time) const
CLogFile::FormatLine("[LevelLoadTime] Level %s loaded in %d seconds", level.toUtf8().data(), time / 1000);
#if defined(AZ_PLATFORM_WINDOWS)
- SetFileAttributes(filename.toUtf8().data(), FILE_ATTRIBUTE_ARCHIVE);
+ SetFileAttributesW(filename.toStdWString().c_str(), FILE_ATTRIBUTE_ARCHIVE);
#endif
QFile file(filename);
@@ -2134,7 +2134,7 @@ void CCryEditDoc::OnEnvironmentPropertyChanged(IVariable* pVar)
childNode->setAttr("value", childValue.toUtf8().data());
}
-QString CCryEditDoc::GetCryIndexPath(const LPCTSTR levelFilePath) const
+QString CCryEditDoc::GetCryIndexPath(const char* levelFilePath) const
{
QString levelPath = Path::GetPath(levelFilePath);
QString levelName = Path::GetFileName(levelFilePath);
diff --git a/Code/Editor/CryEditDoc.h b/Code/Editor/CryEditDoc.h
index a5b3334818..a96e9428b6 100644
--- a/Code/Editor/CryEditDoc.h
+++ b/Code/Editor/CryEditDoc.h
@@ -180,7 +180,7 @@ protected:
void OnStartLevelResourceList();
static void OnValidateSurfaceTypesChanged(ICVar*);
- QString GetCryIndexPath(const LPCTSTR levelFilePath) const;
+ QString GetCryIndexPath(const char* levelFilePath) const;
//////////////////////////////////////////////////////////////////////////
// SliceEditorEntityOwnershipServiceNotificationBus::Handler
diff --git a/Code/Editor/CryEditPy.cpp b/Code/Editor/CryEditPy.cpp
index 21d2dcced9..2477cd2f35 100644
--- a/Code/Editor/CryEditPy.cpp
+++ b/Code/Editor/CryEditPy.cpp
@@ -210,7 +210,7 @@ namespace
const char* PyGetCurrentLevelName()
{
// Using static member to capture temporary data
- static string tempLevelName;
+ static AZ::IO::FixedMaxPathString tempLevelName;
tempLevelName = GetIEditor()->GetGameEngine()->GetLevelName().toUtf8().data();
return tempLevelName.c_str();
}
@@ -218,7 +218,7 @@ namespace
const char* PyGetCurrentLevelPath()
{
// Using static member to capture temporary data
- static string tempLevelPath;
+ static AZ::IO::FixedMaxPathString tempLevelPath;
tempLevelPath = GetIEditor()->GetGameEngine()->GetLevelPath().toUtf8().data();
return tempLevelPath.c_str();
}
diff --git a/Code/Editor/EditorFileMonitor.cpp b/Code/Editor/EditorFileMonitor.cpp
index 5e539f78a8..7feb9d32a8 100644
--- a/Code/Editor/EditorFileMonitor.cpp
+++ b/Code/Editor/EditorFileMonitor.cpp
@@ -55,10 +55,10 @@ bool CEditorFileMonitor::RegisterListener(IFileChangeListener* pListener, const
//////////////////////////////////////////////////////////////////////////
-static string CanonicalizePath(const char* path)
+static AZStd::string CanonicalizePath(const char* path)
{
auto canon = QFileInfo(path).canonicalFilePath();
- return canon.isEmpty() ? string(path) : string(canon.toUtf8());
+ return canon.isEmpty() ? AZStd::string(path) : AZStd::string(canon.toUtf8());
}
//////////////////////////////////////////////////////////////////////////
@@ -66,8 +66,8 @@ bool CEditorFileMonitor::RegisterListener(IFileChangeListener* pListener, const
{
bool success = true;
- string gameFolder = Path::GetEditingGameDataFolder().c_str();
- string naivePath;
+ AZStd::string gameFolder = Path::GetEditingGameDataFolder().c_str();
+ AZStd::string naivePath;
CFileChangeMonitor* fileChangeMonitor = CFileChangeMonitor::Instance();
AZ_Assert(fileChangeMonitor, "CFileChangeMonitor singleton missing.");
@@ -75,12 +75,12 @@ bool CEditorFileMonitor::RegisterListener(IFileChangeListener* pListener, const
// Append slash in preparation for appending the second part.
naivePath = PathUtil::AddSlash(naivePath);
naivePath += sFolderRelativeToGame;
- naivePath.replace('/', '\\');
+ AZ::StringFunc::Replace(naivePath, '/', '\\');
// Remove the final slash if the given item is a folder so the file change monitor correctly picks up on it.
naivePath = PathUtil::RemoveSlash(naivePath);
- string canonicalizedPath = CanonicalizePath(naivePath.c_str());
+ AZStd::string canonicalizedPath = CanonicalizePath(naivePath.c_str());
if (fileChangeMonitor->IsDirectory(canonicalizedPath.c_str()) || fileChangeMonitor->IsFile(canonicalizedPath.c_str()))
{
diff --git a/Code/Editor/EditorPanelUtils.cpp b/Code/Editor/EditorPanelUtils.cpp
index b19bde4583..12e9457474 100644
--- a/Code/Editor/EditorPanelUtils.cpp
+++ b/Code/Editor/EditorPanelUtils.cpp
@@ -130,7 +130,7 @@ public:
HotKey_BuildDefaults();
for (QPair key : keys)
{
- for (unsigned int j = 0; j < hotkeys.count(); j++)
+ for (int j = 0; j < hotkeys.count(); j++)
{
if (hotkeys[j].path.compare(key.first, Qt::CaseInsensitive) == 0)
{
@@ -256,7 +256,7 @@ public:
hotkey.second = settings.value("keySequence").toString();
if (!hotkey.first.isEmpty())
{
- for (unsigned int j = 0; j < hotkeys.count(); j++)
+ for (int j = 0; j < hotkeys.count(); j++)
{
if (hotkeys[j].path.compare(hotkey.first, Qt::CaseInsensitive) == 0)
{
diff --git a/Code/Editor/EditorPreferencesPageViewportMovement.cpp b/Code/Editor/EditorPreferencesPageViewportMovement.cpp
index 1efe64488d..988b4954d1 100644
--- a/Code/Editor/EditorPreferencesPageViewportMovement.cpp
+++ b/Code/Editor/EditorPreferencesPageViewportMovement.cpp
@@ -68,45 +68,21 @@ QIcon& CEditorPreferencesPage_ViewportMovement::GetIcon()
void CEditorPreferencesPage_ViewportMovement::OnApply()
{
- if (SandboxEditor::UsingNewCameraSystem())
- {
- SandboxEditor::SetCameraTranslateSpeed(m_cameraMovementSettings.m_moveSpeed);
- SandboxEditor::SetCameraRotateSpeed(m_cameraMovementSettings.m_rotateSpeed);
- SandboxEditor::SetCameraBoostMultiplier(m_cameraMovementSettings.m_fastMoveSpeed);
- SandboxEditor::SetCameraScrollSpeed(m_cameraMovementSettings.m_wheelZoomSpeed);
- SandboxEditor::SetCameraOrbitYawRotationInverted(m_cameraMovementSettings.m_invertYRotation);
- SandboxEditor::SetCameraPanInvertedX(m_cameraMovementSettings.m_invertPan);
- SandboxEditor::SetCameraPanInvertedY(m_cameraMovementSettings.m_invertPan);
- }
- else
- {
- gSettings.cameraMoveSpeed = m_cameraMovementSettings.m_moveSpeed;
- gSettings.cameraRotateSpeed = m_cameraMovementSettings.m_rotateSpeed;
- gSettings.cameraFastMoveSpeed = m_cameraMovementSettings.m_fastMoveSpeed;
- gSettings.wheelZoomSpeed = m_cameraMovementSettings.m_wheelZoomSpeed;
- gSettings.invertYRotation = m_cameraMovementSettings.m_invertYRotation;
- gSettings.invertPan = m_cameraMovementSettings.m_invertPan;
- }
+ SandboxEditor::SetCameraTranslateSpeed(m_cameraMovementSettings.m_moveSpeed);
+ SandboxEditor::SetCameraRotateSpeed(m_cameraMovementSettings.m_rotateSpeed);
+ SandboxEditor::SetCameraBoostMultiplier(m_cameraMovementSettings.m_fastMoveSpeed);
+ SandboxEditor::SetCameraScrollSpeed(m_cameraMovementSettings.m_wheelZoomSpeed);
+ SandboxEditor::SetCameraOrbitYawRotationInverted(m_cameraMovementSettings.m_invertYRotation);
+ SandboxEditor::SetCameraPanInvertedX(m_cameraMovementSettings.m_invertPan);
+ SandboxEditor::SetCameraPanInvertedY(m_cameraMovementSettings.m_invertPan);
}
void CEditorPreferencesPage_ViewportMovement::InitializeSettings()
{
- if (SandboxEditor::UsingNewCameraSystem())
- {
- m_cameraMovementSettings.m_moveSpeed = SandboxEditor::CameraTranslateSpeed();
- m_cameraMovementSettings.m_rotateSpeed = SandboxEditor::CameraRotateSpeed();
- m_cameraMovementSettings.m_fastMoveSpeed = SandboxEditor::CameraBoostMultiplier();
- m_cameraMovementSettings.m_wheelZoomSpeed = SandboxEditor::CameraScrollSpeed();
- m_cameraMovementSettings.m_invertYRotation = SandboxEditor::CameraOrbitYawRotationInverted();
- m_cameraMovementSettings.m_invertPan = SandboxEditor::CameraPanInvertedX() && SandboxEditor::CameraPanInvertedY();
- }
- else
- {
- m_cameraMovementSettings.m_moveSpeed = gSettings.cameraMoveSpeed;
- m_cameraMovementSettings.m_rotateSpeed = gSettings.cameraRotateSpeed;
- m_cameraMovementSettings.m_fastMoveSpeed = gSettings.cameraFastMoveSpeed;
- m_cameraMovementSettings.m_wheelZoomSpeed = gSettings.wheelZoomSpeed;
- m_cameraMovementSettings.m_invertYRotation = gSettings.invertYRotation;
- m_cameraMovementSettings.m_invertPan = gSettings.invertPan;
- }
+ m_cameraMovementSettings.m_moveSpeed = SandboxEditor::CameraTranslateSpeed();
+ m_cameraMovementSettings.m_rotateSpeed = SandboxEditor::CameraRotateSpeed();
+ m_cameraMovementSettings.m_fastMoveSpeed = SandboxEditor::CameraBoostMultiplier();
+ m_cameraMovementSettings.m_wheelZoomSpeed = SandboxEditor::CameraScrollSpeed();
+ m_cameraMovementSettings.m_invertYRotation = SandboxEditor::CameraOrbitYawRotationInverted();
+ m_cameraMovementSettings.m_invertPan = SandboxEditor::CameraPanInvertedX() && SandboxEditor::CameraPanInvertedY();
}
diff --git a/Code/Editor/EditorViewportSettings.h b/Code/Editor/EditorViewportSettings.h
index 1898cf642a..b1488c5528 100644
--- a/Code/Editor/EditorViewportSettings.h
+++ b/Code/Editor/EditorViewportSettings.h
@@ -118,8 +118,4 @@ namespace SandboxEditor
SANDBOX_API AzFramework::InputChannelId CameraOrbitPanChannelId();
SANDBOX_API void SetCameraOrbitPanChannelId(AZStd::string_view cameraOrbitPanId);
-
- //! Return if the new editor camera system is enabled or not.
- //! @note This is implemented in EditorViewportWidget.cpp
- SANDBOX_API bool UsingNewCameraSystem();
} // namespace SandboxEditor
diff --git a/Code/Editor/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp
index dd89d96dc3..28e8cce33e 100644
--- a/Code/Editor/EditorViewportWidget.cpp
+++ b/Code/Editor/EditorViewportWidget.cpp
@@ -72,7 +72,6 @@
#include "IPostEffectGroup.h"
#include "EditorPreferencesPageGeneral.h"
#include "ViewportManipulatorController.h"
-#include "LegacyViewportCameraController.h"
#include "EditorViewportSettings.h"
#include "ViewPane.h"
@@ -105,17 +104,8 @@
AZ_CVAR(
bool, ed_visibility_logTiming, false, nullptr, AZ::ConsoleFunctorFlags::Null, "Output the timing of the new IVisibilitySystem query");
-AZ_CVAR(bool, ed_useNewCameraSystem, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Use the new Editor camera system");
AZ_CVAR(bool, ed_showCursorCameraLook, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Show the cursor when using free look with the new camera system");
-namespace SandboxEditor
-{
- bool UsingNewCameraSystem()
- {
- return ed_useNewCameraSystem;
- }
-} // namespace SandboxEditor
-
EditorViewportWidget* EditorViewportWidget::m_pPrimaryViewport = nullptr;
#if AZ_TRAIT_OS_PLATFORM_APPLE
@@ -640,7 +630,7 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event)
if (m_renderViewport)
{
- m_renderViewport->GetControllerList()->SetEnabled(true);
+ m_renderViewport->SetInputProcessingEnabled(true);
}
break;
@@ -1274,15 +1264,8 @@ void EditorViewportWidget::SetViewportId(int id)
m_renderViewport->GetControllerList()->Add(AZStd::make_shared());
- if (ed_useNewCameraSystem)
- {
- m_renderViewport->GetControllerList()->Add(CreateModularViewportCameraController(AzFramework::ViewportId(id)));
- }
- else
- {
- m_renderViewport->GetControllerList()->Add(AZStd::make_shared());
- }
-
+ m_renderViewport->GetControllerList()->Add(CreateModularViewportCameraController(AzFramework::ViewportId(id)));
+
m_renderViewport->SetViewportSettings(&g_EditorViewportSettings);
UpdateScene();
@@ -2239,7 +2222,6 @@ void EditorViewportWidget::CenterOnAABB(const AABB& aabb)
orbitDistance = fabs(orbitDistance);
SetViewTM(newTM);
- SandboxEditor::OrbitCameraControlsBus::Event(GetViewportId(), &SandboxEditor::OrbitCameraControlsBus::Events::SetOrbitDistance, orbitDistance);
}
void EditorViewportWidget::CenterOnSliceInstance()
@@ -2715,8 +2697,7 @@ void EditorViewportWidget::RestoreViewportAfterGameMode()
QString(
tr("When leaving \" Game Mode \" the engine will automatically restore your camera position to the default position before you "
"had entered Game mode.
If you dislike this setting you can always change this anytime in the global "
- "preferences.
"))
- .arg(EditorPreferencesGeneralRestoreViewportCameraSettingName);
+ "preferences.
"));
QString restoreOnExitGameModePopupDisabledRegKey("Editor/AutoHide/ViewportCameraRestoreOnExitGameMode");
// Read the popup disabled registry value
diff --git a/Code/Editor/Export/ExportManager.cpp b/Code/Editor/Export/ExportManager.cpp
index 764cc7b6b3..5abd3ab5d0 100644
--- a/Code/Editor/Export/ExportManager.cpp
+++ b/Code/Editor/Export/ExportManager.cpp
@@ -45,7 +45,7 @@ namespace
SEfResTexture* pTex = pRes->GetTextureResource(nSlot);
if (pTex)
{
- cry_strcat(outName, Path::GamePathToFullPath(pTex->m_Name.c_str()).toUtf8().data());
+ azstrcat(outName, AZ_ARRAY_SIZE(outName), Path::GamePathToFullPath(pTex->m_Name.c_str()).toUtf8().data());
}
}
@@ -87,7 +87,7 @@ Export::CObject::CObject(const char* pName)
nParent = -1;
- cry_strcpy(name, pName);
+ azstrcpy(name, AZ_ARRAY_SIZE(name), pName);
materialName[0] = '\0';
@@ -101,7 +101,7 @@ Export::CObject::CObject(const char* pName)
void Export::CObject::SetMaterialName(const char* pName)
{
- cry_strcpy(materialName, pName);
+ azstrcpy(materialName, AZ_ARRAY_SIZE(materialName), pName);
}
diff --git a/Code/Editor/GameEngine.h b/Code/Editor/GameEngine.h
index 84df8bf002..4d183cc38e 100644
--- a/Code/Editor/GameEngine.h
+++ b/Code/Editor/GameEngine.h
@@ -116,11 +116,11 @@ public:
//! mutex used by other threads to lock up the PAK modification,
//! so only one thread can modify the PAK at once
- static CryMutex& GetPakModifyMutex()
+ static AZStd::recursive_mutex& GetPakModifyMutex()
{
//! mutex used to halt copy process while the export to game
//! or other pak operation is done in the main thread
- static CryMutex s_pakModifyMutex;
+ static AZStd::recursive_mutex s_pakModifyMutex;
return s_pakModifyMutex;
}
diff --git a/Code/Editor/GameExporter.cpp b/Code/Editor/GameExporter.cpp
index feea94b34b..415103e10d 100644
--- a/Code/Editor/GameExporter.cpp
+++ b/Code/Editor/GameExporter.cpp
@@ -136,7 +136,7 @@ bool CGameExporter::Export(unsigned int flags, [[maybe_unused]] EEndian eExportE
m_settings.SetHiQuality();
}
- CryAutoLock autoLock(CGameEngine::GetPakModifyMutex());
+ AZStd::scoped_lock autoLock(CGameEngine::GetPakModifyMutex());
// Close this pak file.
if (!CloseLevelPack(m_levelPak, true))
@@ -378,14 +378,14 @@ void CGameExporter::ExportFileList(const QString& path, const QString& levelName
{
// process the folder of the specified map name, producing a filelist.xml file
// that can later be used for map downloads
- string newpath;
+ AZStd::string newpath;
- QString filename = levelName;
- string mapname = (filename + ".dds").toUtf8().data();
- string metaname = (filename + ".xml").toUtf8().data();
+ AZStd::string filename = levelName.toUtf8().data();
+ AZStd::string mapname = (filename + ".dds");
+ AZStd::string metaname = (filename + ".xml");
XmlNodeRef rootNode = gEnv->pSystem->CreateXmlNode("download");
- rootNode->setAttr("name", filename.toUtf8().data());
+ rootNode->setAttr("name", filename.c_str());
rootNode->setAttr("type", "Map");
XmlNodeRef indexNode = rootNode->newChild("index");
if (indexNode)
@@ -434,9 +434,9 @@ void CGameExporter::ExportFileList(const QString& path, const QString& levelName
newFileNode->setAttr("size", handle.m_fileDesc.nSize);
unsigned char md5[16];
- string filenameToHash = GetIEditor()->GetGameEngine()->GetLevelPath().toUtf8().data();
+ AZStd::string filenameToHash = GetIEditor()->GetGameEngine()->GetLevelPath().toUtf8().data();
filenameToHash += "/";
- filenameToHash += string{ handle.m_filename.data(), handle.m_filename.size() };
+ filenameToHash += AZStd::string{ handle.m_filename.data(), handle.m_filename.size() };
if (gEnv->pCryPak->ComputeMD5(filenameToHash.data(), md5))
{
char md5string[33];
diff --git a/Code/Editor/GenericSelectItemDialog.cpp b/Code/Editor/GenericSelectItemDialog.cpp
index 3c51b38d0a..06f66c52eb 100644
--- a/Code/Editor/GenericSelectItemDialog.cpp
+++ b/Code/Editor/GenericSelectItemDialog.cpp
@@ -91,20 +91,6 @@ void CGenericSelectItemDialog::ReloadTree()
QTreeWidgetItem* hSelected = nullptr;
- /*
- std::vector::const_iterator iter = m_items.begin();
- while (iter != m_items.end())
- {
- const CString& itemName = *iter;
- HTREEITEM hItem = m_tree.InsertItem(itemName, 0, 0, TVI_ROOT, TVI_SORT);
- if (!m_preselect.IsEmpty() && m_preselect.CompareNoCase(itemName) == 0)
- {
- hSelected = hItem;
- }
- ++iter;
- }
- */
-
std::map items;
QRegularExpression sep(QStringLiteral("[\\/.") + m_treeSeparator + QStringLiteral("]+"));
diff --git a/Code/Editor/GotoPositionDlg.cpp b/Code/Editor/GotoPositionDlg.cpp
index c1e64ed1a9..aec5f03fbd 100644
--- a/Code/Editor/GotoPositionDlg.cpp
+++ b/Code/Editor/GotoPositionDlg.cpp
@@ -108,24 +108,12 @@ void GotoPositionDialog::OnUpdateNumbers()
void GotoPositionDialog::accept()
{
- if (SandboxEditor::UsingNewCameraSystem())
- {
- SandboxEditor::InterpolateDefaultViewportCameraToTransform(
- AZ::Vector3(
- aznumeric_cast(m_ui->m_dymX->value()), aznumeric_cast(m_ui->m_dymY->value()),
- aznumeric_cast(m_ui->m_dymZ->value())),
- AZ::DegToRad(aznumeric_cast(m_ui->m_dymAnglePitch->value())),
- AZ::DegToRad(aznumeric_cast(m_ui->m_dymAngleYaw->value())));
- }
- else
- {
- SandboxEditor::SetDefaultViewportCameraPosition(AZ::Vector3(
+ SandboxEditor::InterpolateDefaultViewportCameraToTransform(
+ AZ::Vector3(
aznumeric_cast(m_ui->m_dymX->value()), aznumeric_cast(m_ui->m_dymY->value()),
- aznumeric_cast(m_ui->m_dymZ->value())));
- SandboxEditor::SetDefaultViewportCameraRotation(
- AZ::DegToRad(aznumeric_cast(m_ui->m_dymAnglePitch->value())),
- AZ::DegToRad(aznumeric_cast(m_ui->m_dymAngleYaw->value())));
- }
+ aznumeric_cast(m_ui->m_dymZ->value())),
+ AZ::DegToRad(aznumeric_cast(m_ui->m_dymAnglePitch->value())),
+ AZ::DegToRad(aznumeric_cast(m_ui->m_dymAngleYaw->value())));
QDialog::accept();
}
diff --git a/Code/Editor/IEditor.h b/Code/Editor/IEditor.h
index f66dca412e..7d0fc653fa 100644
--- a/Code/Editor/IEditor.h
+++ b/Code/Editor/IEditor.h
@@ -68,7 +68,6 @@ class CDisplaySettings;
struct SGizmoParameters;
class CLevelIndependentFileMan;
class CSelectionTreeManager;
-struct IResourceSelectorHost;
struct SEditorSettings;
class CGameExporter;
class IAWSResourceManager;
@@ -714,7 +713,6 @@ struct IEditor
virtual ESystemConfigSpec GetEditorConfigSpec() const = 0;
virtual ESystemConfigPlatform GetEditorConfigPlatform() const = 0;
virtual void ReloadTemplates() = 0;
- virtual IResourceSelectorHost* GetResourceSelectorHost() = 0;
virtual void ShowStatusText(bool bEnable) = 0;
// Provides a way to extend the context menu of an object. The function gets called every time the menu is opened.
diff --git a/Code/Editor/IEditorImpl.cpp b/Code/Editor/IEditorImpl.cpp
index d9c3af64b0..1e268d64ef 100644
--- a/Code/Editor/IEditorImpl.cpp
+++ b/Code/Editor/IEditorImpl.cpp
@@ -26,6 +26,7 @@ AZ_POP_DISABLE_WARNING
#include
#include
#include
+#include
// AzFramework
#include
@@ -66,7 +67,6 @@ AZ_POP_DISABLE_WARNING
#include "EditorFileMonitor.h"
#include "MainStatusBar.h"
-#include "ResourceSelectorHost.h"
#include "Util/FileUtil_impl.h"
#include "Util/ImageUtil_impl.h"
#include "LogFileImpl.h"
@@ -186,7 +186,6 @@ CEditorImpl::CEditorImpl()
m_pAnimationContext = new CAnimationContext;
m_pImageUtil = new CImageUtil_impl();
- m_pResourceSelectorHost.reset(CreateResourceSelectorHost());
m_selectedRegion.min = Vec3(0, 0, 0);
m_selectedRegion.max = Vec3(0, 0, 0);
DetectVersion();
@@ -251,7 +250,7 @@ void CEditorImpl::Uninitialize()
void CEditorImpl::UnloadPlugins()
{
- CryAutoLock lock(m_pluginMutex);
+ AZStd::scoped_lock lock(m_pluginMutex);
// Flush core buses. We're about to unload DLLs and need to ensure we don't have module-owned functions left behind.
AZ::Data::AssetBus::ExecuteQueuedEvents();
@@ -272,7 +271,7 @@ void CEditorImpl::UnloadPlugins()
void CEditorImpl::LoadPlugins()
{
- CryAutoLock lock(m_pluginMutex);
+ AZStd::scoped_lock lock(m_pluginMutex);
static const QString editor_plugins_folder("EditorPlugins");
@@ -1107,16 +1106,18 @@ void CEditorImpl::DetectVersion()
DWORD dwHandle;
UINT len;
- char ver[1024 * 8];
+ wchar_t ver[1024 * 8];
- GetModuleFileName(nullptr, exe, _MAX_PATH);
+ AZ::Utils::GetExecutablePath(exe, _MAX_PATH);
+ AZStd::wstring exeW;
+ AZStd::to_wstring(exeW, exe);
- int verSize = GetFileVersionInfoSize(exe, &dwHandle);
+ int verSize = GetFileVersionInfoSizeW(exeW.c_str(), &dwHandle);
if (verSize > 0)
{
- GetFileVersionInfo(exe, dwHandle, 1024 * 8, ver);
+ GetFileVersionInfoW(exeW.c_str(), dwHandle, 1024 * 8, ver);
VS_FIXEDFILEINFO* vinfo;
- VerQueryValue(ver, "\\", (void**)&vinfo, &len);
+ VerQueryValueW(ver, L"\\", (void**)&vinfo, &len);
m_fileVersion.v[0] = vinfo->dwFileVersionLS & 0xFFFF;
m_fileVersion.v[1] = vinfo->dwFileVersionLS >> 16;
@@ -1457,7 +1458,7 @@ void CEditorImpl::UnregisterNotifyListener(IEditorNotifyListener* listener)
ISourceControl* CEditorImpl::GetSourceControl()
{
- CryAutoLock lock(m_pluginMutex);
+ AZStd::scoped_lock lock(m_pluginMutex);
if (m_pSourceControl)
{
@@ -1557,31 +1558,31 @@ IExportManager* CEditorImpl::GetExportManager()
void CEditorImpl::AddUIEnums()
{
// Spec settings for shadow casting lights
- string SpecString[4];
+ AZStd::string SpecString[4];
QStringList types;
types.push_back("Never=0");
- SpecString[0].Format("VeryHigh Spec=%d", CONFIG_VERYHIGH_SPEC);
+ SpecString[0] = AZStd::string::format("VeryHigh Spec=%d", CONFIG_VERYHIGH_SPEC);
types.push_back(SpecString[0].c_str());
- SpecString[1].Format("High Spec=%d", CONFIG_HIGH_SPEC);
+ SpecString[1] = AZStd::string::format("High Spec=%d", CONFIG_HIGH_SPEC);
types.push_back(SpecString[1].c_str());
- SpecString[2].Format("Medium Spec=%d", CONFIG_MEDIUM_SPEC);
+ SpecString[2] = AZStd::string::format("Medium Spec=%d", CONFIG_MEDIUM_SPEC);
types.push_back(SpecString[2].c_str());
- SpecString[3].Format("Low Spec=%d", CONFIG_LOW_SPEC);
+ SpecString[3] = AZStd::string::format("Low Spec=%d", CONFIG_LOW_SPEC);
types.push_back(SpecString[3].c_str());
m_pUIEnumsDatabase->SetEnumStrings("CastShadows", types);
// Power-of-two percentages
- string percentStringPOT[5];
+ AZStd::string percentStringPOT[5];
types.clear();
- percentStringPOT[0].Format("Default=%d", 0);
+ percentStringPOT[0] = AZStd::string::format("Default=%d", 0);
types.push_back(percentStringPOT[0].c_str());
- percentStringPOT[1].Format("12.5=%d", 1);
+ percentStringPOT[1] = AZStd::string::format("12.5=%d", 1);
types.push_back(percentStringPOT[1].c_str());
- percentStringPOT[2].Format("25=%d", 2);
+ percentStringPOT[2] = AZStd::string::format("25=%d", 2);
types.push_back(percentStringPOT[2].c_str());
- percentStringPOT[3].Format("50=%d", 3);
+ percentStringPOT[3] = AZStd::string::format("50=%d", 3);
types.push_back(percentStringPOT[3].c_str());
- percentStringPOT[4].Format("100=%d", 4);
+ percentStringPOT[4] = AZStd::string::format("100=%d", 4);
types.push_back(percentStringPOT[4].c_str());
m_pUIEnumsDatabase->SetEnumStrings("ShadowMinResPercent", types);
}
diff --git a/Code/Editor/IEditorImpl.h b/Code/Editor/IEditorImpl.h
index db963e83f1..2cf6c7805b 100644
--- a/Code/Editor/IEditorImpl.h
+++ b/Code/Editor/IEditorImpl.h
@@ -290,7 +290,6 @@ public:
ESystemConfigPlatform GetEditorConfigPlatform() const;
void ReloadTemplates();
void AddErrorMessage(const QString& text, const QString& caption);
- IResourceSelectorHost* GetResourceSelectorHost() { return m_pResourceSelectorHost.get(); }
virtual void ShowStatusText(bool bEnable);
void OnObjectContextMenuOpened(QMenu* pMenu, const CBaseObject* pObject);
@@ -374,7 +373,6 @@ protected:
//! Export manager for exporting objects and a terrain from the game to DCC tools
CExportManager* m_pExportManager;
std::unique_ptr m_pEditorFileMonitor;
- std::unique_ptr m_pResourceSelectorHost;
QString m_selectFileBuffer;
QString m_levelNameBuffer;
@@ -401,7 +399,7 @@ protected:
IImageUtil* m_pImageUtil; // Vladimir@conffx
ILogFile* m_pLogFile; // Vladimir@conffx
- CryMutex m_pluginMutex; // protect any pointers that come from plugins, such as the source control cached pointer.
+ AZStd::mutex m_pluginMutex; // protect any pointers that come from plugins, such as the source control cached pointer.
static const char* m_crashLogFileName;
};
diff --git a/Code/Editor/IEditorPanelUtils.h b/Code/Editor/IEditorPanelUtils.h
index 5df15bd86b..4649213ae7 100644
--- a/Code/Editor/IEditorPanelUtils.h
+++ b/Code/Editor/IEditorPanelUtils.h
@@ -65,7 +65,7 @@ struct HotKey
int size = (m_catSize < o_catSize) ? m_catSize : o_catSize;
//sort categories to keep them together
- for (unsigned int i = 0; i < size; i++)
+ for (int i = 0; i < size; i++)
{
if (m_categories[i] < o_categories[i])
{
diff --git a/Code/Editor/Include/Command.h b/Code/Editor/Include/Command.h
index 69853ddb4f..e4fea5a3e7 100644
--- a/Code/Editor/Include/Command.h
+++ b/Code/Editor/Include/Command.h
@@ -18,7 +18,7 @@
#include "Util/EditorUtils.h"
-inline string ToString(const QString& s)
+inline AZStd::string ToString(const QString& s)
{
return s.toUtf8().data();
}
@@ -27,10 +27,10 @@ class CCommand
{
public:
CCommand(
- const string& module,
- const string& name,
- const string& description,
- const string& example)
+ const AZStd::string& module,
+ const AZStd::string& name,
+ const AZStd::string& description,
+ const AZStd::string& example)
: m_module(module)
, m_name(name)
, m_description(description)
@@ -79,20 +79,20 @@ public:
}
int GetArgCount() const
{ return m_args.size(); }
- const string& GetArg(int i) const
+ const AZStd::string& GetArg(int i) const
{
assert(0 <= i && i < GetArgCount());
return m_args[i];
}
private:
- DynArray m_args;
+ DynArray m_args;
unsigned char m_stringFlags; // This is needed to quote string parameters when logging a command.
};
- const string& GetName() const { return m_name; }
- const string& GetModule() const { return m_module; }
- const string& GetDescription() const { return m_description; }
- const string& GetExample() const { return m_example; }
+ const AZStd::string& GetName() const { return m_name; }
+ const AZStd::string& GetModule() const { return m_module; }
+ const AZStd::string& GetDescription() const { return m_description; }
+ const AZStd::string& GetExample() const { return m_example; }
void SetAvailableInScripting() { m_bAlsoAvailableInScripting = true; };
bool IsAvailableInScripting() const { return m_bAlsoAvailableInScripting; }
@@ -104,15 +104,15 @@ public:
protected:
friend class CEditorCommandManager;
- string m_module;
- string m_name;
- string m_description;
- string m_example;
+ AZStd::string m_module;
+ AZStd::string m_name;
+ AZStd::string m_description;
+ AZStd::string m_example;
bool m_bAlsoAvailableInScripting;
template
- static string ToString_(T t) { return ::ToString(t); }
- static inline string ToString_(const char* val)
+ static AZStd::string ToString_(T t) { return ::ToString(t); }
+ static inline AZStd::string ToString_(const char* val)
{ return val; }
template
static bool FromString_(T& t, const char* s) { return ::FromString(t, s); }
@@ -137,8 +137,8 @@ class CCommand0
: public CCommand
{
public:
- CCommand0(const string& module, const string& name,
- const string& description, const string& example,
+ CCommand0(const AZStd::string& module, const AZStd::string& name,
+ const AZStd::string& description, const AZStd::string& example,
const AZStd::function& functor)
: CCommand(module, name, description, example)
, m_functor(functor) {}
@@ -146,10 +146,10 @@ public:
// UI metadata for this command, if any
struct SUIInfo
{
- string caption;
- string tooltip;
- string description;
- string iconFilename;
+ AZStd::string caption;
+ AZStd::string tooltip;
+ AZStd::string description;
+ AZStd::string iconFilename;
int iconIndex;
int commandId; // Windows command id
@@ -179,8 +179,8 @@ class CCommand0wRet
: public CCommand
{
public:
- CCommand0wRet(const string& module, const string& name,
- const string& description, const string& example,
+ CCommand0wRet(const AZStd::string& module, const AZStd::string& name,
+ const AZStd::string& description, const AZStd::string& example,
const AZStd::function