diff --git a/.github/ISSUE_TEMPLATE/ar_bug_report.md b/.github/ISSUE_TEMPLATE/ar_bug_report.md index 0d4aee9397..93b6e70b03 100644 --- a/.github/ISSUE_TEMPLATE/ar_bug_report.md +++ b/.github/ISSUE_TEMPLATE/ar_bug_report.md @@ -1,5 +1,5 @@ --- -name: ar_bug_report.md +name: Automated Review bug report about: Create a bug for a an issue found in the Automated Review title: 'AR Bug Report' labels: 'needs-triage,kind/bug,kind/automation' diff --git a/AutomatedTesting/CMakeLists.txt b/AutomatedTesting/CMakeLists.txt index dee9d73aea..1c5382ba4b 100644 --- a/AutomatedTesting/CMakeLists.txt +++ b/AutomatedTesting/CMakeLists.txt @@ -8,11 +8,12 @@ if(NOT PROJECT_NAME) cmake_minimum_required(VERSION 3.20) + include(cmake/CompilerSettings.cmake) project(AutomatedTesting LANGUAGES C CXX VERSION 1.0.0.0 ) - include(EngineFinder.cmake OPTIONAL) + include(cmake/EngineFinder.cmake OPTIONAL) find_package(o3de REQUIRED) o3de_initialize() else() diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py index 34b2217916..6f3113d771 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py @@ -14,6 +14,7 @@ from datetime import datetime import ly_test_tools.log.log_monitor from AWS.common import constants +from AWS.common.resource_mappings import AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY from .aws_metrics_custom_thread import AWSMetricsThread # fixture imports @@ -200,6 +201,59 @@ class TestAWSMetricsWindows(object): for thread in operational_threads: thread.join() + @pytest.mark.parametrize('level', ['AWS/Metrics']) + def test_realtime_and_batch_analytics_no_global_accountid(self, + level: str, + launcher: pytest.fixture, + asset_processor: pytest.fixture, + workspace: pytest.fixture, + aws_utils: pytest.fixture, + resource_mappings: pytest.fixture, + aws_metrics_utils: pytest.fixture): + """ + Verify that the metrics events are sent to CloudWatch and S3 for analytics. + """ + # Remove top-level account ID from resource mappings + resource_mappings.clear_select_keys([AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY]) + # Start Kinesis analytics application on a separate thread to avoid blocking the test. + kinesis_analytics_application_thread = AWSMetricsThread(target=update_kinesis_analytics_application_status, + args=(aws_metrics_utils, resource_mappings, True)) + kinesis_analytics_application_thread.start() + + log_monitor = setup(launcher, asset_processor) + + # Kinesis analytics application needs to be in the running state before we start the game launcher. + kinesis_analytics_application_thread.join() + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + start_time = datetime.utcnow() + with launcher.start(launch_ap=False): + monitor_metrics_submission(log_monitor) + + # Verify that real-time analytics metrics are delivered to CloudWatch. + aws_metrics_utils.verify_cloud_watch_delivery( + AWS_METRICS_FEATURE_NAME, + 'TotalLogins', + [], + start_time) + logger.info('Real-time metrics are sent to CloudWatch.') + + # Run time-consuming operations on separate threads to avoid blocking the test. + operational_threads = list() + operational_threads.append( + AWSMetricsThread(target=query_metrics_from_s3, + args=(aws_metrics_utils, resource_mappings))) + operational_threads.append( + AWSMetricsThread(target=verify_operational_metrics, + args=(aws_metrics_utils, resource_mappings, start_time))) + operational_threads.append( + AWSMetricsThread(target=update_kinesis_analytics_application_status, + args=(aws_metrics_utils, resource_mappings, False))) + for thread in operational_threads: + thread.start() + for thread in operational_threads: + thread.join() + @pytest.mark.parametrize('level', ['AWS/Metrics']) def test_unauthorized_user_request_rejected(self, level: str, diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/aws_client_auth_automation_test.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/aws_client_auth_automation_test.py index 198fb934d9..077a068a18 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/aws_client_auth_automation_test.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/aws_client_auth_automation_test.py @@ -12,6 +12,7 @@ import pytest import ly_test_tools.log.log_monitor from AWS.common import constants +from AWS.common.resource_mappings import AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY # fixture imports from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor @@ -70,6 +71,41 @@ class TestAWSClientAuthWindows(object): halt_on_unexpected=True, ) assert result, 'Anonymous credentials fetched successfully.' + + @pytest.mark.parametrize('level', ['AWS/ClientAuth']) + def test_anonymous_credentials_no_global_accountid(self, + level: str, + launcher: pytest.fixture, + resource_mappings: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture + ): + """ + Test to verify AWS Cognito Identity pool anonymous authorization. + + Setup: Updates resource mapping file using existing CloudFormation stacks. + Tests: Getting credentials when no credentials are configured + Verification: Log monitor looks for success credentials log. + """ + # Remove top-level account ID from resource mappings + resource_mappings.clear_select_keys([AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY]) + + asset_processor.start() + asset_processor.wait_for_idle() + + file_to_monitor = os.path.join(launcher.workspace.paths.project_log(), constants.GAME_LOG_NAME) + log_monitor = ly_test_tools.log.log_monitor.LogMonitor(launcher=launcher, log_file_path=file_to_monitor) + + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=['(Script) - Success anonymous credentials'], + unexpected_lines=['(Script) - Fail anonymous credentials'], + halt_on_unexpected=True, + ) + assert result, 'Anonymous credentials fetched successfully.' def test_password_signin_credentials(self, launcher: pytest.fixture, diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py index 949186ad50..59c517fd1c 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/core/test_aws_resource_interaction.py @@ -18,6 +18,7 @@ import ly_test_tools.environment.process_utils as process_utils import ly_test_tools.o3de.asset_processor_utils as asset_processor_utils from AWS.common import constants +from AWS.common.resource_mappings import AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY # fixture imports from assetpipeline.ap_fixtures.asset_processor_fixture import asset_processor @@ -141,3 +142,51 @@ class TestAWSCoreAWSResourceInteraction(object): 'The expected file wasn\'t successfully downloaded.' # clean up the file directories. shutil.rmtree(s3_download_dir) + + @pytest.mark.parametrize('expected_lines', [ + ['(Script) - [S3] Head object request is done', + '(Script) - [S3] Head object success: Object example.txt is found.', + '(Script) - [S3] Get object success: Object example.txt is downloaded.', + '(Script) - [Lambda] Completed Invoke', + '(Script) - [Lambda] Invoke success: {"statusCode": 200, "body": {}}', + '(Script) - [DynamoDB] Results finished']]) + @pytest.mark.parametrize('unexpected_lines', [ + ['(Script) - [S3] Head object error: No response body.', + '(Script) - [S3] Get object error: Request validation failed, output file directory doesn\'t exist.', + '(Script) - Request validation failed, output file miss full path.', + '(Script) - ']]) + def test_scripting_behavior_no_global_accountid(self, + level: str, + launcher: pytest.fixture, + workspace: pytest.fixture, + asset_processor: pytest.fixture, + resource_mappings: pytest.fixture, + aws_utils: pytest.fixture, + expected_lines: typing.List[str], + unexpected_lines: typing.List[str]): + """ + Setup: Updates resource mapping file using existing CloudFormation stacks. + Tests: Interact with AWS S3, DynamoDB and Lambda services. + Verification: Script canvas nodes can communicate with AWS services successfully. + """ + + resource_mappings.clear_select_keys([AWS_RESOURCE_MAPPINGS_ACCOUNT_ID_KEY]) + log_monitor, s3_download_dir = setup(launcher, asset_processor) + write_test_data_to_dynamodb_table(resource_mappings, aws_utils) + + launcher.args = ['+LoadLevel', level] + launcher.args.extend(['-rhi=null']) + + with launcher.start(launch_ap=False): + result = log_monitor.monitor_log_for_lines( + expected_lines=expected_lines, + unexpected_lines=unexpected_lines, + halt_on_unexpected=True + ) + + assert result, "Expected lines weren't found." + + assert os.path.exists(os.path.join(s3_download_dir, 'output.txt')), \ + 'The expected file wasn\'t successfully downloaded.' + # clean up the file directories. + shutil.rmtree(s3_download_dir) diff --git a/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py b/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py index 5f01ecdbf8..988d5bf1fc 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/common/resource_mappings.py @@ -102,3 +102,17 @@ class ResourceMappings: def get_resource_name_id(self, resource_key: str): return self._resource_mappings[AWS_RESOURCE_MAPPINGS_KEY][resource_key]['Name/ID'] + + def clear_select_keys(self, resource_keys=None) -> None: + """ + Clears values from select resource mapping keys. + :param resource_keys: list of keys to clear out + """ + with open(self._resource_mapping_file_path) as file_content: + resource_mappings = json.load(file_content) + + for key in resource_keys: + resource_mappings[key] = '' + + with open(self._resource_mapping_file_path, 'w') as file_content: + json.dump(resource_mappings, file_content, indent=4) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py index b4de39ae98..d79e144ae0 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main.py @@ -13,6 +13,8 @@ from ly_test_tools.o3de.editor_test import EditorSharedTest, EditorTestSuite @pytest.mark.parametrize("launcher_platform", ['windows_editor']) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + @pytest.mark.test_case_id("C36525657") class AtomEditorComponents_BloomAdded(EditorSharedTest): from Atom.tests import hydra_AtomEditorComponents_BloomAdded as test_module diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py index 690f8aeea5..a9b49b8107 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU.py @@ -26,6 +26,48 @@ TEST_DIRECTORY = os.path.join(os.path.dirname(__file__), "tests") @pytest.mark.parametrize("level", ["Base"]) class TestAllComponentsIndepthTests(object): + @pytest.mark.parametrize("screenshot_name", ["AtomBasicLevelSetup.ppm"]) + @pytest.mark.test_case_id("C34603773") + def test_BasicLevelSetup_SetsUpLevel( + self, request, editor, workspace, project, launcher_platform, level, screenshot_name): + """ + Please review the hydra script run by this test for more specific test info. + Tests that a basic rendering level setup can be created (lighting, meshes, materials, etc.). + """ + # Clear existing test screenshots before starting test. + screenshot_directory = os.path.join(workspace.paths.project(), DEFAULT_SUBFOLDER_PATH) + test_screenshots = [os.path.join(screenshot_directory, screenshot_name)] + file_system.delete(test_screenshots, True, True) + + golden_images = [os.path.join(golden_images_directory(), screenshot_name)] + + level_creation_expected_lines = [ + "Viewport is set to the expected size: True", + "Exited game mode" + ] + unexpected_lines = ["Traceback (most recent call last):"] + + hydra.launch_and_validate_results( + request, + TEST_DIRECTORY, + editor, + "hydra_GPUTest_BasicLevelSetup.py", + timeout=180, + expected_lines=level_creation_expected_lines, + unexpected_lines=unexpected_lines, + halt_on_unexpected=True, + cfg_args=[level], + null_renderer=False, + enable_prefab_system=False, + ) + + similarity_threshold = 0.99 + for test_screenshot, golden_image in zip(test_screenshots, golden_images): + screenshot_comparison_result = compare_screenshot_similarity( + test_screenshot, golden_image, similarity_threshold, True, screenshot_directory) + if screenshot_comparison_result != "Screenshots match": + raise Exception(f"Screenshot test failed: {screenshot_comparison_result}") + @pytest.mark.test_case_id("C34525095") def test_LightComponent_ScreenshotMatchesGoldenImage( self, request, editor, workspace, project, launcher_platform, level): @@ -71,6 +113,7 @@ class TestAllComponentsIndepthTests(object): halt_on_unexpected=True, cfg_args=[level], null_renderer=False, + enable_prefab_system=False, ) similarity_threshold = 0.99 @@ -118,6 +161,7 @@ class TestPerformanceBenchmarkSuite(object): halt_on_unexpected=True, cfg_args=[level], null_renderer=False, + enable_prefab_system=False, ) aggregator = BenchmarkDataAggregator(workspace, logger, 'periodic') @@ -155,5 +199,6 @@ class TestMaterialEditor(object): halt_on_unexpected=False, null_renderer=False, cfg_args=[cfg_args], - log_file_name="MaterialEditor.log" + log_file_name="MaterialEditor.log", + enable_prefab_system=False, ) diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py index 2cb5828958..afd181b849 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Main_GPU_Optimized.py @@ -23,6 +23,8 @@ class TestAutomation(EditorTestSuite): # Remove -autotest_mode from global_extra_cmdline_args since we need rendering for these tests. global_extra_cmdline_args = ["-BatchMode"] # Default is ["-BatchMode", "-autotest_mode"] + enable_prefab_system = False + @pytest.mark.test_case_id("C34603773") class AtomGPU_BasicLevelSetup_SetsUpLevel(EditorSharedTest): use_null_renderer = False # Default is True diff --git a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py index 9ceb3c951f..292bb9c19c 100644 --- a/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Atom/TestSuite_Sandbox.py @@ -85,6 +85,7 @@ class TestAtomEditorComponentsMain(object): halt_on_unexpected=True, null_renderer=True, cfg_args=cfg_args, + enable_prefab_system=False, ) @@ -155,5 +156,6 @@ class TestMaterialEditorBasicTests(object): halt_on_unexpected=True, null_renderer=True, log_file_name="MaterialEditor.log", + enable_prefab_system=False, ) diff --git a/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py index dbc4a1a456..a047d09d29 100644 --- a/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Blast/TestSuite_Main.py @@ -23,28 +23,28 @@ from base import TestAutomationBase class TestAutomation(TestAutomationBase): def test_ActorSplitsAfterCollision(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterCollision as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterRadialDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterRadialDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterCapsuleDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterCapsuleDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterImpactSpreadDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterImpactSpreadDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterShearDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterShearDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterTriangleDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterTriangleDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ActorSplitsAfterStressDamage(self, request, workspace, editor, launcher_platform): from .tests import Blast_ActorSplitsAfterStressDamage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py b/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py index ed677ea185..a8ca721cca 100755 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonBindings/ComponentUpdateListProperty_test.py @@ -51,5 +51,6 @@ class TestComponentAssetListAutomation(object): editor, "ComponentUpdateListProperty_test_case.py", expected_lines=expected_lines, - cfg_args=[level] + cfg_args=[level], + enable_prefab_system=False, ) diff --git a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt index 90afee39bc..642d7279a4 100644 --- a/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt +++ b/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools/README.txt @@ -28,7 +28,7 @@ Assuming CMake is already setup on your operating system, below are some sample cd /path/to/od3e/ mkdir windows_vs2019 cd windows_vs2019 - cmake .. -G "Visual Studio 16 2019" -A x64 -T host=x64 -DLY_3RDPARTY_PATH="%3RDPARTYPATH%" -DLY_PROJECTS=AutomatedTesting + cmake .. -G "Visual Studio 16 2019" -DLY_PROJECTS=AutomatedTesting To manually install the project in development mode using your own installed Python interpreter: cd /path/to/od3e/AutomatedTesting/Gem/PythonTests/EditorPythonTestTools 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 985e32ede5..19aa6e9d3c 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 @@ -57,6 +57,10 @@ def add_level_component(component_name): level_component_list, entity.EntityType().Level) level_component_outcome = editor.EditorLevelComponentAPIBus(bus.Broadcast, 'AddComponentsOfType', [level_component_type_ids_list[0]]) + if not level_component_outcome.IsSuccess(): + print('Failed to add {} level component'.format(component_name)) + return None + level_component = level_component_outcome.GetValue()[0] return level_component 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 510d1b1149..ee36a640f0 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, log_file_name="Editor.log"): + timeout=300, log_file_name="Editor.log", enable_prefab_system=True): """ Runs the Editor with the specified script, and monitors for expected log lines. :param request: Special fixture providing information of the requesting test function. @@ -45,17 +45,22 @@ def launch_and_validate_results(request, test_directory, editor, editor_script, :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' + :param enable_prefab_system: Flag to determine whether to use new prefab system or use deprecated slice system. Defaults to True. """ test_case = os.path.join(test_directory, editor_script) request.addfinalizer(lambda: teardown_editor(editor)) logger.debug("Running automated test: {}".format(editor_script)) editor.args.extend(["--skipWelcomeScreenDialog", "--regset=/Amazon/Settings/EnableSourceControl=false", - "--regset=/Amazon/Preferences/EnablePrefabSystem=false", run_python, test_case, + run_python, test_case, f"--pythontestcase={request.node.name}", "--runpythonargs", " ".join(cfg_args)]) if auto_test_mode: editor.args.extend(["--autotest_mode"]) if null_renderer: editor.args.extend(["-rhi=Null"]) + if enable_prefab_system: + editor.args.extend(["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]) + else: + editor.args.extend(["--regset=/Amazon/Preferences/EnablePrefabSystem=false"]) with editor.start(): diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py index df1eb62943..450c760786 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Main.py @@ -23,7 +23,6 @@ from base import TestAutomationBase class TestAutomation(TestAutomationBase): def _run_prefab_test(self, request, workspace, editor, test_module, batch_mode=True, autotest_mode=True): self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"], batch_mode=batch_mode, autotest_mode=autotest_mode) diff --git a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py index 52ac19b26e..8f50d4d36d 100644 --- a/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Multiplayer/TestSuite_Sandbox.py @@ -24,7 +24,6 @@ from base import TestAutomationBase class TestAutomation(TestAutomationBase): def _run_prefab_test(self, request, workspace, editor, test_module, batch_mode=True, autotest_mode=True): self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"], batch_mode=batch_mode, autotest_mode=autotest_mode) diff --git a/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Main.py index 49a776a48c..f35f098b0f 100644 --- a/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/NvCloth/TestSuite_Main.py @@ -25,8 +25,8 @@ class TestAutomation(TestAutomationBase): def test_NvCloth_AddClothSimulationToMesh(self, request, workspace, editor, launcher_platform): from .tests import NvCloth_AddClothSimulationToMesh as test_module - self._run_test(request, workspace, editor, test_module, use_null_renderer = self.use_null_renderer) + self._run_test(request, workspace, editor, test_module, use_null_renderer = self.use_null_renderer, enable_prefab_system=False) def test_NvCloth_AddClothSimulationToActor(self, request, workspace, editor, launcher_platform): from .tests import NvCloth_AddClothSimulationToActor as test_module - self._run_test(request, workspace, editor, test_module, use_null_renderer = self.use_null_renderer) + self._run_test(request, workspace, editor, test_module, use_null_renderer = self.use_null_renderer, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py index 9e3a9cb4ff..09d8f5635f 100755 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_InDevelopment.py @@ -26,158 +26,158 @@ class TestAutomation(TestAutomationBase): r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnRagdollBones") def test_Material_LibraryCrudOperationsReflectOnRagdollBones(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnRagdollBones as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Material_RagdollBones(self, request, workspace, editor, launcher_platform): from .tests.material import Material_RagdollBones as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c15308221_material_componentsinsyncwithlibrary.physmaterial", r"AutomatedTesting\Levels\Physics\Material_ComponentsInSyncWithLibrary") def test_Material_ComponentsInSyncWithLibrary(self, request, workspace, editor, launcher_platform): from .tests.material import Material_ComponentsInSyncWithLibrary as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # BUG: LY-107723") def test_ScriptCanvas_SetKinematicTargetTransform(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_SetKinematicTargetTransform as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain @fm.file_revert("c4925579_material_addmodifydeleteonterrain.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnTerrain") def test_Material_LibraryCrudOperationsReflectOnTerrain(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnTerrain as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain def test_Terrain_TerrainTexturePainterWorks(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_TerrainTexturePainterWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain def test_Material_CanBeAssignedToTerrain(self, request, workspace, editor, launcher_platform): from .tests.material import Material_CanBeAssignedToTerrain as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain def test_Material_DefaultLibraryConsistentOnAllFeatures(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultLibraryConsistentOnAllFeatures as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Failing, PhysXTerrain @fm.file_revert("all_ones_1.physmaterial", r"AutomatedTesting\Levels\Physics\Material_DefaultMaterialLibraryChangesWork") @fm.file_override("default.physxconfiguration", "Material_DefaultMaterialLibraryChangesWork.physxconfiguration", "AutomatedTesting") def test_Material_DefaultMaterialLibraryChangesWork(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultMaterialLibraryChangesWork as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_SameCollisionGroupSameLayerCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SameCollisionGroupSameLayerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Ragdoll_OldRagdollSerializationNoErrors(self, request, workspace, editor, launcher_platform): from .tests.ragdoll import Ragdoll_OldRagdollSerializationNoErrors as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_override("default.physxconfiguration", "ScriptCanvas_OverlapNode.physxconfiguration") def test_ScriptCanvas_OverlapNode(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_OverlapNode as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Material_StaticFriction(self, request, workspace, editor, launcher_platform): from .tests.material import Material_StaticFriction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c4888315_material_addmodifydeleteoncollider.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCollider") def test_Material_LibraryCrudOperationsReflectOnCollider(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCollider as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c15563573_material_addmodifydeleteoncharactercontroller.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCharacterController") def test_Material_LibraryCrudOperationsReflectOnCharacterController(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCharacterController as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c4888315_material_addmodifydeleteoncollider.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCollider") def test_Material_LibraryCrudOperationsReflectOnCollider(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCollider as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c15563573_material_addmodifydeleteoncharactercontroller.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryCrudOperationsReflectOnCharacterController") def test_Material_LibraryCrudOperationsReflectOnCharacterController(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryCrudOperationsReflectOnCharacterController as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("c4044455_material_librarychangesinstantly.physmaterial", r"AutomatedTesting\Levels\Physics\C4044455_Material_LibraryChangesInstantly") def test_Material_LibraryChangesReflectInstantly(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryChangesReflectInstantly as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @fm.file_revert("Material_LibraryUpdatedAcrossLevels.physmaterial", r"AutomatedTesting\Levels\Physics\Material_LibraryUpdatedAcrossLevels") def test_Material_LibraryUpdatedAcrossLevels(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryUpdatedAcrossLevels as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RigidBody_LinearDampingAffectsMotion(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_LinearDampingAffectsMotion as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_CollisionAgainstRigidBody(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_CollisionAgainstRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ShapeCollider_CylinderShapeCollides(self, request, workspace, editor, launcher_platform): from .tests.collider import ShapeCollider_CylinderShapeCollides as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Physics_WorldBodyBusWorksOnEditorComponents(self, request, workspace, editor, launcher_platform): from .tests import Physics_WorldBodyBusWorksOnEditorComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_PxMeshErrorIfNoMesh(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshErrorIfNoMesh as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_ImpulsesBoxShapedRigidBody(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ImpulsesBoxShapedRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_SpawnSecondTerrainComponentWarning(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_SpawnSecondTerrainComponentWarning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_AddPhysTerrainComponent(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_AddPhysTerrainComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_CanAddMultipleTerrainComponents(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_CanAddMultipleTerrainComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_MultipleTerrainComponentsWarning(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_MultipleTerrainComponentsWarning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_MultipleTerrainComponentsWarning(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_MultipleTerrainComponentsWarning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_HighValuesDirectionAxesWorkWithNoError(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_HighValuesDirectionAxesWorkWithNoError as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Terrain_MultipleResolutionsValid(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_MultipleResolutionsValid as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_SmallMagnitudeDeviationOnLargeForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SmallMagnitudeDeviationOnLargeForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py index fb2744deda..07ae5f6ca0 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main.py @@ -30,33 +30,33 @@ class TestAutomation(TestAutomationBase): def test_RigidBody_EnablingGravityWorksUsingNotificationsPoC(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_EnablingGravityWorksUsingNotificationsPoC as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_LocalSpaceForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_LocalSpaceForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_DynamicFriction.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_DynamicFriction(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DynamicFriction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_SameCollisionGroupDiffLayersCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SameCollisionGroupDiffLayersCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_CharacterController_SwitchLevels(self, request, workspace, editor, launcher_platform): from .tests.character_controller import CharacterController_SwitchLevels as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Ragdoll_AddPhysxRagdollComponentWorks(self, request, workspace, editor, launcher_platform): from .tests.ragdoll import Ragdoll_AddPhysxRagdollComponentWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_MultipleRaycastNode(self, request, workspace, editor, launcher_platform): @@ -64,43 +64,43 @@ class TestAutomation(TestAutomationBase): # Fixme: This test previously relied on unexpected lines log reading with is now not supported. # Now the log reading must be done inside the test, preferably with the Tracer() utility # unexpected_lines = ["Assert"] + test_module.Lines.unexpected - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_DiffCollisionGroupDiffCollidingLayersNotCollide.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_DiffCollisionGroupDiffCollidingLayersNotCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_DiffCollisionGroupDiffCollidingLayersNotCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_HingeLeadFollowerCollide(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeLeadFollowerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_PxMeshConvexMeshCollides(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshConvexMeshCollides as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_CylinderShapeCollides(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_CylinderShapeCollides as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_C15425929_Undo_Redo(self, request, workspace, editor, launcher_platform): from .tests import Physics_UndoRedoWorksOnEntityWithPhysComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.GROUP_tick @pytest.mark.xfail(reason="Test still under development.") def test_Tick_InterpolatedRigidBodyMotionIsSmooth(self, request, workspace, editor, launcher_platform): from .tests.tick import Tick_InterpolatedRigidBodyMotionIsSmooth as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.GROUP_tick @pytest.mark.xfail(reason="Test still under development.") def test_Tick_CharacterGameplayComponentMotionIsSmooth(self, request, workspace, editor, launcher_platform): from .tests.tick import Tick_CharacterGameplayComponentMotionIsSmooth as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py index 0661c6742b..b25b4340e8 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Main_Optimized.py @@ -59,9 +59,6 @@ class EditorSingleTest_WithFileOverrides(EditorSingleTest): @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomationWithPrefabSystemEnabled(EditorTestSuite): - global_extra_cmdline_args = ['-BatchMode', '-autotest_mode', - '--regset=/Amazon/Preferences/EnablePrefabSystem=true'] - @staticmethod def get_number_parallel_editors(): return 16 @@ -81,6 +78,8 @@ class TestAutomationWithPrefabSystemEnabled(EditorTestSuite): @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + @staticmethod def get_number_parallel_editors(): return 16 diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py index 55e51dd2f8..6daf852708 100755 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Periodic.py @@ -31,223 +31,223 @@ class TestAutomation(TestAutomationBase): @revert_physics_config def test_Terrain_NoPhysTerrainComponentNoCollision(self, request, workspace, editor, launcher_platform): from .tests.terrain import Terrain_NoPhysTerrainComponentNoCollision as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_InitialLinearVelocity(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_InitialLinearVelocity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_StartGravityEnabledWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_StartGravityEnabledWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_KinematicModeWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_KinematicModeWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_LinearDampingForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_LinearDampingForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SimpleDragForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SimpleDragForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_CapsuleShapedForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_CapsuleShapedForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ImpulsesCapsuleShapedRigidBody(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ImpulsesCapsuleShapedRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_MomentOfInertiaManualSetting(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_MomentOfInertiaManualSetting as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_COM_ManualSettingWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_COM_ManualSettingWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_AddRigidBodyComponent(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_AddRigidBodyComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SplineForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SplineForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_RestitutionCombine.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_RestitutionCombine(self, request, workspace, editor, launcher_platform): from .tests.material import Material_RestitutionCombine as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_FrictionCombine.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_FrictionCombine(self, request, workspace, editor, launcher_platform): from .tests.material import Material_FrictionCombine as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_ColliderPositionOffset(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_ColliderPositionOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_AngularDampingAffectsRotation(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_AngularDampingAffectsRotation as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Physics_VerifyColliderRigidBodyMeshAndTerrainWorkTogether(self, request, workspace, editor, launcher_platform): from .tests import Physics_VerifyColliderRigidBodyMeshAndTerrainWorkTogether as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_MultipleForcesInSameComponentCombineForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_MultipleForcesInSameComponentCombineForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ImpulsesPxMeshShapedRigidBody(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ImpulsesPxMeshShapedRigidBody as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_TriggerEvents(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_TriggerEvents as test_module # FIXME: expected_lines = test_module.LogLines.expected_lines - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroPointForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroPointForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroWorldSpaceForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroWorldSpaceForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroLinearDampingDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroLinearDampingDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_MovingForceRegionChangesNetForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_MovingForceRegionChangesNetForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_CollisionEvents(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_CollisionEvents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_DirectionHasNoAffectOnTotalForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_DirectionHasNoAffectOnTotalForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_StartAsleepWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_StartAsleepWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SliceFileInstantiates(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SliceFileInstantiates as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroLocalSpaceForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroLocalSpaceForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroSimpleDragForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroSimpleDragForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_COM_ComputingWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_COM_ComputingWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_MassDifferentValuesWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_MassDifferentValuesWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_RestitutionCombinePriorityOrder.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_RestitutionCombinePriorityOrder(self, request, workspace, editor, launcher_platform): from .tests.material import Material_RestitutionCombinePriorityOrder as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_SplineRegionWithModifiedTransform(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SplineRegionWithModifiedTransform as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_ShapeCast(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_ShapeCast as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_InitialAngularVelocity(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_InitialAngularVelocity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ZeroSplineForceDoesNothing(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ZeroSplineForceDoesNothing as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Physics_DynamicSliceWithPhysNotSpawnsStaticSlice(self, request, workspace, editor, launcher_platform): from .tests import Physics_DynamicSliceWithPhysNotSpawnsStaticSlice as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_PositionOffset(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_PositionOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_FrictionCombinePriorityOrder.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_FrictionCombinePriorityOrder(self, request, workspace, editor, launcher_platform): from .tests.material import Material_FrictionCombinePriorityOrder as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail( reason="Something with the CryRenderer disabling is causing this test to fail now.") @revert_physics_config def test_Ragdoll_LevelSwitchDoesNotCrash(self, request, workspace, editor, launcher_platform): from .tests.ragdoll import Ragdoll_LevelSwitchDoesNotCrash as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_MultipleComponentsCombineForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_MultipleComponentsCombineForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Marking the test as an expected failure due to sporadic failure on Automated Review: LYN-2580 # The test still runs, but a failure of the test doesn't result in the test run failing @@ -258,102 +258,102 @@ class TestAutomation(TestAutomationBase): 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_PerFaceMaterialGetsCorrectMaterial(self, request, workspace, editor, launcher_platform): from .tests.material import Material_PerFaceMaterialGetsCorrectMaterial as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail( reason="This test will sometimes fail as the ball will continue to roll before the timeout is reached.") @revert_physics_config def test_RigidBody_SleepWhenBelowKineticThreshold(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_SleepWhenBelowKineticThreshold as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_COM_NotIncludesTriggerShapes(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_COM_NotIncludesTriggerShapes as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Material_NoEffectIfNoColliderShape(self, request, workspace, editor, launcher_platform): from .tests.material import Material_NoEffectIfNoColliderShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_TriggerPassThrough(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_TriggerPassThrough as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_SetGravityWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_SetGravityWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_CharacterController.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_CharacterController(self, request, workspace, editor, launcher_platform): from .tests.material import Material_CharacterController as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Material_EmptyLibraryUsesDefault(self, request, workspace, editor, launcher_platform): from .tests.material import Material_EmptyLibraryUsesDefault as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_NoQuiverOnHighLinearDampingForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_NoQuiverOnHighLinearDampingForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_RigidBody_ComputeInertiaWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_ComputeInertiaWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ScriptCanvas_PostPhysicsUpdate(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_PostPhysicsUpdate as test_module # Fixme: unexpected_lines = ["Assert"] + test_module.Lines.unexpected - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_NoneCollisionGroupSameLayerNotCollide.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_NoneCollisionGroupSameLayerNotCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_NoneCollisionGroupSameLayerNotCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_SameCollisionGroupSameCustomLayerCollide.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_SameCollisionGroupSameCustomLayerCollide(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SameCollisionGroupSameCustomLayerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxdefaultsceneconfiguration.setreg','ScriptCanvas_PostUpdateEvent.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_ScriptCanvas_PostUpdateEvent(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_PostUpdateEvent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Material_Restitution.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Material_Restitution(self, request, workspace, editor, launcher_platform): from .tests.material import Material_Restitution as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxdefaultsceneconfiguration.setreg', 'ScriptCanvas_PreUpdateEvent.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_ScriptCanvas_PreUpdateEvent(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_PreUpdateEvent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_PxMeshShapedForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_PxMeshShapedForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # Marking the Test as expected to fail using the xfail decorator due to sporadic failure on Automated Review: SPEC-3146 # The test still runs, but a failure of the test doesn't result in the test run failing @@ -361,176 +361,173 @@ class TestAutomation(TestAutomationBase): @revert_physics_config def test_RigidBody_MaxAngularVelocityWorks(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_MaxAngularVelocityWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_HingeSoftLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeSoftLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_BallSoftLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallSoftLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Joints_BallLeadFollowerCollide(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallLeadFollowerCollide as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_AddingNewGroupWorks.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_AddingNewGroupWorks(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_AddingNewGroupWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_InactiveWhenNoShapeComponent(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_InactiveWhenNoShapeComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_CheckDefaultShapeSettingIsPxMesh(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_CheckDefaultShapeSettingIsPxMesh as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_LargeNumberOfShapeCollidersWontCrashEditor as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_SphereShapeEditing(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_SphereShapeEditing as test_module - self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]) + self._run_test(request, workspace, editor, test_module) @revert_physics_config def test_Collider_BoxShapeEditing(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_BoxShapeEditing as test_module - self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]) + self._run_test(request, workspace, editor, test_module) @revert_physics_config def test_Collider_CapsuleShapeEditing(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_CapsuleShapeEditing as test_module - self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"]) + self._run_test(request, workspace, editor, test_module) def test_ForceRegion_WithNonTriggerColliderWarning(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_WithNonTriggerColliderWarning as test_module # Fixme: expected_lines = ["[Warning] (PhysX Force Region) - Please ensure collider component marked as trigger exists in entity"] - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_WorldSpaceForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_WorldSpaceForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_PointForceOnRigidBodies(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_PointForceOnRigidBodies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_SphereShapedForce(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_SphereShapedForce as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ForceRegion_RotationalOffset(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_RotationalOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Material_LibraryClearingAssignsDefault(self, request, workspace, editor, launcher_platform): from .tests.material import Material_LibraryClearingAssignsDefault as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_AddColliderComponent(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_AddColliderComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail( reason="This will fail due to this issue ATOM-15487.") def test_Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshAutoAssignedWhenModifyingRenderMeshComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshAutoAssignedWhenAddingRenderMeshComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_MultipleSurfaceSlots(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_MultipleSurfaceSlots as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_PxMeshNotAutoAssignedWhenNoPhysicsFbx as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RigidBody_EnablingGravityWorksPoC(self, request, workspace, editor, launcher_platform): from .tests.rigid_body import RigidBody_EnablingGravityWorksPoC as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config @fm.file_override('physxsystemconfiguration.setreg','Collider_CollisionGroupsWorkflow.setreg_override', 'AutomatedTesting/Registry', search_subdirs=True) def test_Collider_CollisionGroupsWorkflow(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_CollisionGroupsWorkflow as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Collider_ColliderRotationOffset(self, request, workspace, editor, launcher_platform): from .tests.collider import Collider_ColliderRotationOffset as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ForceRegion_ParentChildForcesCombineForces(self, request, workspace, editor, launcher_platform): from .tests.force_region import ForceRegion_ParentChildForcesCombineForces as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_ShapeCollider_CanBeAddedWitNoWarnings(self, request, workspace, editor, launcher_platform): from .tests.shape_collider import ShapeCollider_CanBeAddedWitNoWarnings as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Physics_UndoRedoWorksOnEntityWithPhysComponents(self, request, workspace, editor, launcher_platform): from .tests import Physics_UndoRedoWorksOnEntityWithPhysComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_Fixed2BodiesConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_Fixed2BodiesConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_Hinge2BodiesConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_Hinge2BodiesConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_Ball2BodiesConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_Ball2BodiesConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_FixedBreakable(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_FixedBreakable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_HingeBreakable(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeBreakable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_BallBreakable(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallBreakable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_HingeNoLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_HingeNoLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_BallNoLimitsConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_BallNoLimitsConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Joints_GlobalFrameConstrained(self, request, workspace, editor, launcher_platform): from .tests.joints import Joints_GlobalFrameConstrained as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @revert_physics_config def test_Material_DefaultLibraryUpdatedAcrossLevels(self, request, workspace, editor, launcher_platform): @@ -540,7 +537,7 @@ class TestAutomation(TestAutomationBase): search_subdirs=True) def levels_before(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultLibraryUpdatedAcrossLevels_before as test_module_0 - self._run_test(request, workspace, editor, test_module_0) + self._run_test(request, workspace, editor, test_module_0, enable_prefab_system=False) # File override replaces the previous physxconfiguration file with another where the only difference is the default material library @fm.file_override("physxsystemconfiguration.setreg", @@ -549,7 +546,7 @@ class TestAutomation(TestAutomationBase): search_subdirs=True) def levels_after(self, request, workspace, editor, launcher_platform): from .tests.material import Material_DefaultLibraryUpdatedAcrossLevels_after as test_module_1 - self._run_test(request, workspace, editor, test_module_1) + self._run_test(request, workspace, editor, test_module_1, enable_prefab_system=False) levels_before(self, request, workspace, editor, launcher_platform) levels_after(self, request, workspace, editor, launcher_platform) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py index 81fdc747d5..9b104ccfcf 100644 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Sandbox.py @@ -32,7 +32,7 @@ class TestAutomation(TestAutomationBase): def test_ScriptCanvas_GetCollisionNameReturnsName(self, request, workspace, editor, launcher_platform): from .tests.script_canvas import ScriptCanvas_GetCollisionNameReturnsName as test_module # Fixme: expected_lines=["Layer Name: Right"] - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) ## Seems to be flaky, need to investigate def test_ScriptCanvas_GetCollisionNameReturnsNothingWhenHasToggledLayer(self, request, workspace, editor, launcher_platform): @@ -42,4 +42,4 @@ class TestAutomation(TestAutomationBase): # Fixme: for group in collision_groups: # Fixme: unexpected_lines.append(f"GroupName: {group}") # Fixme: expected_lines=["GroupName: "] - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py index 61c2816f50..3e00b684c0 100755 --- a/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py +++ b/AutomatedTesting/Gem/PythonTests/Physics/TestSuite_Utils.py @@ -30,11 +30,11 @@ class TestUtils(TestAutomationBase): expected_lines = [] unexpected_lines = ["Assert"] - self._run_test(request, workspace, editor, physmaterial_editor_test_module, expected_lines, unexpected_lines) + self._run_test(request, workspace, editor, physmaterial_editor_test_module, expected_lines, unexpected_lines, enable_prefab_system=False) def test_UtilTest_Tracer_PicksErrorsAndWarnings(self, request, workspace, launcher_platform, editor): from .utils import UtilTest_Tracer_PicksErrorsAndWarnings as testcase_module - self._run_test(request, workspace, editor, testcase_module, [], []) + self._run_test(request, workspace, editor, testcase_module, [], [], enable_prefab_system=False) def test_FileManagement_FindingFiles(self, workspace, launcher_platform): """ @@ -263,4 +263,4 @@ class TestUtils(TestAutomationBase): expected_lines = [] unexpected_lines = ["Assert"] - self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines) + self._run_test(request, workspace, editor, test_module, expected_lines, unexpected_lines, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py index 479915752f..c1d4836342 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/TestSuite_Main.py @@ -12,7 +12,6 @@ import pytest import os import sys -from ly_test_tools import LAUNCHERS sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../automatedtesting_shared') from base import TestAutomationBase @@ -24,42 +23,41 @@ class TestAutomation(TestAutomationBase): def _run_prefab_test(self, request, workspace, editor, test_module, batch_mode=True, autotest_mode=True): self._run_test(request, workspace, editor, test_module, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"], batch_mode=batch_mode, autotest_mode=autotest_mode) - def test_PrefabLevel_OpensLevelWithEntities(self, request, workspace, editor, launcher_platform): - from .tests import PrefabLevel_OpensLevelWithEntities as test_module + def test_OpenLevel_ContainingTwoEntities(self, request, workspace, editor, launcher_platform): + from Prefab.tests.open_level import OpenLevel_ContainingTwoEntities as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_CreatePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreatePrefab as test_module + def test_CreatePrefab_WithSingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.create_prefab import CreatePrefab_WithSingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_InstantiatePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_InstantiatePrefab as test_module + def test_InstantiatePrefab_ContainingASingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.instantiate_prefab import InstantiatePrefab_ContainingASingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_CreateAndDeletePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateAndDeletePrefab as test_module + def test_DeletePrefab_ContainingASingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.delete_prefab import DeletePrefab_ContainingASingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabBasicWorkflow_CreateAndReparentPrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateAndReparentPrefab as test_module + def test_ReparentPrefab_UnderAnotherPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.reparent_prefab import ReparentPrefab_UnderAnotherPrefab as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) - def test_PrefabBasicWorkflow_CreateReparentAndDetachPrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateReparentAndDetachPrefab as test_module + def test_DetachPrefab_UnderAnotherPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.detach_prefab import DetachPrefab_UnderAnotherPrefab as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) - def test_PrefabBasicWorkflow_CreateAndDuplicatePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabBasicWorkflow_CreateAndDuplicatePrefab as test_module + def test_DuplicatePrefab_ContainingASingleEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.duplicate_prefab import DuplicatePrefab_ContainingASingleEntity as test_module self._run_prefab_test(request, workspace, editor, test_module) - def test_PrefabComplexWorflow_CreatePrefabOfChildEntity(self, request, workspace, editor, launcher_platform): - from .tests import PrefabComplexWorflow_CreatePrefabOfChildEntity as test_module + def test_CreatePrefab_UnderAnEntity(self, request, workspace, editor, launcher_platform): + from Prefab.tests.create_prefab import CreatePrefab_UnderAnEntity as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) - def test_PrefabComplexWorflow_CreatePrefabInsidePrefab(self, request, workspace, editor, launcher_platform): - from .tests import PrefabComplexWorflow_CreatePrefabInsidePrefab as test_module + def test_CreatePrefab_UnderAnotherPrefab(self, request, workspace, editor, launcher_platform): + from Prefab.tests.create_prefab import CreatePrefab_UnderAnotherPrefab as test_module self._run_prefab_test(request, workspace, editor, test_module, autotest_mode=False) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabOfChildEntity.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnEntity.py similarity index 94% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabOfChildEntity.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnEntity.py index dec44d52be..5033c1da9c 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabOfChildEntity.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnEntity.py @@ -5,7 +5,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabComplexWorflow_CreatePrefabOfChildEntity(): +def CreatePrefab_UnderAnEntity(): """ Test description: - Creates two entities, parent and child. Child entity has Parent entity as its parent. @@ -18,7 +18,7 @@ def PrefabComplexWorflow_CreatePrefabOfChildEntity(): from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -49,4 +49,4 @@ def PrefabComplexWorflow_CreatePrefabOfChildEntity(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabComplexWorflow_CreatePrefabOfChildEntity) + Report.start_test(CreatePrefab_UnderAnEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabInsidePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnotherPrefab.py similarity index 94% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabInsidePrefab.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnotherPrefab.py index e14fc96449..429da49434 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabComplexWorflow_CreatePrefabInsidePrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_UnderAnotherPrefab.py @@ -5,7 +5,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabComplexWorflow_CreatePrefabInsidePrefab(): +def CreatePrefab_UnderAnotherPrefab(): """ Test description: - Creates an entity with a physx collider @@ -17,7 +17,7 @@ def PrefabComplexWorflow_CreatePrefabInsidePrefab(): from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -54,4 +54,4 @@ def PrefabComplexWorflow_CreatePrefabInsidePrefab(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabComplexWorflow_CreatePrefabInsidePrefab) + Report.start_test(CreatePrefab_UnderAnotherPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreatePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py similarity index 84% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreatePrefab.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py index cae105a9a9..80f4c0e596 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreatePrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/create_prefab/CreatePrefab_WithSingleEntity.py @@ -5,7 +5,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabBasicWorkflow_CreatePrefab(): +def CreatePrefab_WithSingleEntity(): CAR_PREFAB_FILE_NAME = 'car_prefab' @@ -13,7 +13,7 @@ def PrefabBasicWorkflow_CreatePrefab(): from editor_python_test_tools.utils import Report from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -26,4 +26,4 @@ def PrefabBasicWorkflow_CreatePrefab(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreatePrefab) + Report.start_test(CreatePrefab_WithSingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDeletePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_prefab/DeletePrefab_ContainingASingleEntity.py similarity index 83% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDeletePrefab.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_prefab/DeletePrefab_ContainingASingleEntity.py index bbebd70e04..919168019e 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDeletePrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/delete_prefab/DeletePrefab_ContainingASingleEntity.py @@ -5,14 +5,14 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabBasicWorkflow_CreateAndDeletePrefab(): +def DeletePrefab_ContainingASingleEntity(): CAR_PREFAB_FILE_NAME = 'car_prefab' from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -29,4 +29,4 @@ def PrefabBasicWorkflow_CreateAndDeletePrefab(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateAndDeletePrefab) + Report.start_test(DeletePrefab_ContainingASingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateReparentAndDetachPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py similarity index 89% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateReparentAndDetachPrefab.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py index bdf77c4bf3..5c97f0b032 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateReparentAndDetachPrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/detach_prefab/DetachPrefab_UnderAnotherPrefab.py @@ -5,7 +5,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabBasicWorkflow_CreateReparentAndDetachPrefab(): +def DetachPrefab_UnderAnotherPrefab(): CAR_PREFAB_FILE_NAME = 'car_prefab' WHEEL_PREFAB_FILE_NAME = 'wheel_prefab' @@ -18,7 +18,7 @@ def PrefabBasicWorkflow_CreateReparentAndDetachPrefab(): from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -48,4 +48,4 @@ def PrefabBasicWorkflow_CreateReparentAndDetachPrefab(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateReparentAndDetachPrefab) + Report.start_test(DetachPrefab_UnderAnotherPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDuplicatePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/duplicate_prefab/DuplicatePrefab_ContainingASingleEntity.py similarity index 83% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDuplicatePrefab.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/duplicate_prefab/DuplicatePrefab_ContainingASingleEntity.py index 2479ae549e..e611303fbb 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndDuplicatePrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/duplicate_prefab/DuplicatePrefab_ContainingASingleEntity.py @@ -5,14 +5,14 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabBasicWorkflow_CreateAndDuplicatePrefab(): +def DuplicatePrefab_ContainingASingleEntity(): CAR_PREFAB_FILE_NAME = 'car_prefab' from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -29,4 +29,4 @@ def PrefabBasicWorkflow_CreateAndDuplicatePrefab(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateAndDuplicatePrefab) + Report.start_test(DuplicatePrefab_ContainingASingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_InstantiatePrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/instantiate_prefab/InstantiatePrefab_ContainingASingleEntity.py similarity index 85% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_InstantiatePrefab.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/instantiate_prefab/InstantiatePrefab_ContainingASingleEntity.py index a701802cd4..a81608ee8a 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_InstantiatePrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/instantiate_prefab/InstantiatePrefab_ContainingASingleEntity.py @@ -5,7 +5,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabBasicWorkflow_InstantiatePrefab(): +def InstantiatePrefab_ContainingASingleEntity(): from azlmbr.math import Vector3 @@ -15,7 +15,7 @@ def PrefabBasicWorkflow_InstantiatePrefab(): from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -30,4 +30,4 @@ def PrefabBasicWorkflow_InstantiatePrefab(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_InstantiatePrefab) + Report.start_test(InstantiatePrefab_ContainingASingleEntity) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabLevel_OpensLevelWithEntities.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/open_level/OpenLevel_ContainingTwoEntities.py similarity index 96% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabLevel_OpensLevelWithEntities.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/open_level/OpenLevel_ContainingTwoEntities.py index 0eb7e86a9e..787d7000d2 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabLevel_OpensLevelWithEntities.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/open_level/OpenLevel_ContainingTwoEntities.py @@ -14,7 +14,7 @@ class Tests(): # fmt:on -def PrefabLevel_OpensLevelWithEntities(): +def OpenLevel_ContainingTwoEntities(): """ Opens the level that contains 2 entities, "EmptyEntity" and "EntityWithPxCollider". This test makes sure that both entities exist after opening the level and that: @@ -70,4 +70,4 @@ def PrefabLevel_OpensLevelWithEntities(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabLevel_OpensLevelWithEntities) + Report.start_test(OpenLevel_ContainingTwoEntities) diff --git a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndReparentPrefab.py b/AutomatedTesting/Gem/PythonTests/Prefab/tests/reparent_prefab/ReparentPrefab_UnderAnotherPrefab.py similarity index 89% rename from AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndReparentPrefab.py rename to AutomatedTesting/Gem/PythonTests/Prefab/tests/reparent_prefab/ReparentPrefab_UnderAnotherPrefab.py index 1cbc591c29..2c460a3298 100644 --- a/AutomatedTesting/Gem/PythonTests/Prefab/tests/PrefabBasicWorkflow_CreateAndReparentPrefab.py +++ b/AutomatedTesting/Gem/PythonTests/Prefab/tests/reparent_prefab/ReparentPrefab_UnderAnotherPrefab.py @@ -5,7 +5,7 @@ For complete copyright and license terms please see the LICENSE at the root of t SPDX-License-Identifier: Apache-2.0 OR MIT """ -def PrefabBasicWorkflow_CreateAndReparentPrefab(): +def ReparentPrefab_UnderAnotherPrefab(): CAR_PREFAB_FILE_NAME = 'car_prefab' WHEEL_PREFAB_FILE_NAME = 'wheel_prefab' @@ -18,7 +18,7 @@ def PrefabBasicWorkflow_CreateAndReparentPrefab(): from editor_python_test_tools.editor_entity_utils import EditorEntity from editor_python_test_tools.prefab_utils import Prefab - import PrefabTestUtils as prefab_test_utils + import Prefab.tests.PrefabTestUtils as prefab_test_utils prefab_test_utils.open_base_tests_level() @@ -45,4 +45,4 @@ def PrefabBasicWorkflow_CreateAndReparentPrefab(): if __name__ == "__main__": from editor_python_test_tools.utils import Report - Report.start_test(PrefabBasicWorkflow_CreateAndReparentPrefab) + Report.start_test(ReparentPrefab_UnderAnotherPrefab) diff --git a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py index 8d418222ce..112fd013bf 100644 --- a/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py +++ b/AutomatedTesting/Gem/PythonTests/PythonAssetBuilder/AssetBuilder_test_case.py @@ -8,42 +8,54 @@ import azlmbr.bus import azlmbr.asset import azlmbr.editor import azlmbr.math -import azlmbr.legacy.general -def raise_and_stop(msg): - print (msg) - azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') - -# These tests are meant to check that the test_asset.mock source asset turned into -# a test_asset.mock_asset product asset via the Python asset builder system -mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0) -mockAssetPath = 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset' -assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', mockAssetPath, mockAssetType, False) -if (assetId.is_valid() is False): - raise_and_stop(f'Mock AssetId is not valid! Got {assetId.to_string()} instead') - -assetIdString = assetId.to_string() -if (assetIdString.endswith(':528cca58') is False): - raise_and_stop(f'Mock AssetId {assetIdString} has unexpected sub-id for {mockAssetPath}!') - -print ('Mock asset exists') +print('Starting mock asset tests') +handler = azlmbr.editor.EditorEventBusHandler() + +def on_notify_editor_initialized(args): + # These tests are meant to check that the test_asset.mock source asset turned into + # a test_asset.mock_asset product asset via the Python asset builder system + mockAssetType = azlmbr.math.Uuid_CreateString('{9274AD17-3212-4651-9F3B-7DCCB080E467}', 0) + mockAssetPath = 'gem/pythontests/pythonassetbuilder/test_asset.mock_asset' + assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', mockAssetPath, mockAssetType, False) + if (assetId.is_valid() is False): + print(f'Mock AssetId is not valid! Got {assetId.to_string()} instead') + else: + print(f'Mock AssetId is valid!') -# These tests detect if the geom_group.fbx file turns into a number of azmodel product assets -def test_azmodel_product(generatedModelAssetPath): - azModelAssetType = azlmbr.math.Uuid_CreateString('{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}', 0) - assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False) assetIdString = assetId.to_string() - if (assetId.is_valid()): - print(f'AssetId found for asset ({generatedModelAssetPath}) found') + if (assetIdString.endswith(':528cca58') is False): + print(f'Mock AssetId {assetIdString} has unexpected sub-id for {mockAssetPath}!') else: - raise_and_stop(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString})!') - -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel') -test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel') + print(f'Mock AssetId has expected sub-id for {mockAssetPath}!') + + print ('Mock asset exists') + + # These tests detect if the geom_group.fbx file turns into a number of azmodel product assets + def test_azmodel_product(generatedModelAssetPath): + azModelAssetType = azlmbr.math.Uuid_CreateString('{2C7477B6-69C5-45BE-8163-BCD6A275B6D8}', 0) + assetId = azlmbr.asset.AssetCatalogRequestBus(azlmbr.bus.Broadcast, 'GetAssetIdByPath', generatedModelAssetPath, azModelAssetType, False) + assetIdString = assetId.to_string() + if (assetId.is_valid()): + print(f'AssetId found for asset ({generatedModelAssetPath}) found') + else: + print(f'Asset at path {generatedModelAssetPath} has unexpected asset ID ({assetIdString})!') + + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_positive_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_z_negative_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_positive_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_y_negative_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_positive_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_x_negative_1.azmodel') + test_azmodel_product('gem/pythontests/pythonassetbuilder/geom_group_fbx_cube_100cm_center_1.azmodel') + + # clear up notification handler + global handler + handler.disconnect() + handler = None + + print('Finished mock asset tests') + azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') -azlmbr.editor.EditorToolsApplicationRequestBus(azlmbr.bus.Broadcast, 'ExitNoPrompt') +handler.connect() +handler.add_callback('NotifyEditorInitialized', on_notify_editor_initialized) diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges.py index aba506ea20..f4c2a19884 100644 --- a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges.py +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges.py @@ -12,13 +12,12 @@ class Tests(): add_terrain_collider = ("Terrain Physics Heightfield Collider component added", "Failed to add a Terrain Physics Heightfield Collider component") box_dimensions_changed = ("Aabb dimensions changed successfully", "Failed change Aabb dimensions") configuration_changed = ("Terrain size changed successfully", "Failed terrain size change") - no_errors_and_warnings_found = ("No errors and warnings found", "Found errors and warnings") #fmt: on def TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges(): """ Summary: - Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree. + Test aspects of the Terrain Physics Heightfield Collider through the BehaviorContext and the Property Tree. Test Steps: Expected Behavior: diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py new file mode 100644 index 0000000000..e68b0932c2 --- /dev/null +++ b/AutomatedTesting/Gem/PythonTests/Terrain/EditorScripts/Terrain_SupportsPhysics.py @@ -0,0 +1,164 @@ +""" +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_terrain_spawner_entity = ("Terrain_spawner_entity created successfully", "Failed to create terrain_spawner_entity") + create_height_provider_entity = ("Height_provider_entity created successfully", "Failed to create height_provider_entity") + create_test_ball = ("Ball created successfully", "Failed to create Ball") + box_dimensions_changed = ("Aabb dimensions changed successfully", "Failed change Aabb dimensions") + shape_changed = ("Shape changed successfully", "Failed Shape change") + entity_added = ("Entity added successfully", "Failed Entity add") + frequency_changed = ("Frequency changed successfully", "Failed Frequency change") + shape_set = ("Shape set to Sphere successfully", "Failed to set Sphere shape") + test_collision = ("Ball collided with terrain", "Ball failed to collide with terrain") + no_errors_and_warnings_found = ("No errors and warnings found", "Found errors and warnings") +#fmt: on + +def Terrain_SupportsPhysics(): + """ + Summary: + Test aspects of the TerrainHeightGradientList through the BehaviorContext and the Property Tree. + + Test Steps: + Expected Behavior: + The Editor is stable there are no warnings or errors. + + Test Steps: + 1) Load the base level + 2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components + 2a) Create a ball at 600.0, 600.0, 46.0 - This position is not too high over the heightfield so will collide in a reasonable time + 3) Start the Tracer to catch any errors and warnings + 4) Change the Axis Aligned Box Shape dimensions + 5) Set the Vegetation Shape reference to TestEntity1 + 6) Set the FastNoise gradient frequency to 0.01 + 7) Set the Gradient List to TestEntity2 + 8) Set the PhysX Collider to Sphere mode + 9) Disable and Enable the Terrain Gradient List so that it is recognised + 10) Enter game mode and test if the ball hits the heightfield within 3 seconds + 11) Verify there are no errors and warnings in the logs + + + :return: None + """ + + from editor_python_test_tools.editor_entity_utils import EditorEntity + from editor_python_test_tools.utils import TestHelper as helper, Report + from editor_python_test_tools.utils import Report, Tracer + import editor_python_test_tools.hydra_editor_utils as hydra + import azlmbr.math as azmath + import azlmbr.legacy.general as general + import azlmbr.bus as bus + import azlmbr.editor as editor + import math + + SET_BOX_X_SIZE = 1024.0 + SET_BOX_Y_SIZE = 1024.0 + SET_BOX_Z_SIZE = 100.0 + + helper.init_idle() + + # 1) Load the level + helper.open_level("", "Base") + helper.wait_for_condition(lambda: general.get_current_level_name() == "Base", 2.0) + + #1a) Load the level components + hydra.add_level_component("Terrain World") + hydra.add_level_component("Terrain World Renderer") + + # 2) Create 2 test entities, one parent at 512.0, 512.0, 50.0 and one child at the default position and add the required components + entity1_components_to_add = ["Axis Aligned Box Shape", "Terrain Layer Spawner", "Terrain Height Gradient List", "Terrain Physics Heightfield Collider", "PhysX Heightfield Collider"] + entity2_components_to_add = ["Vegetation Reference Shape", "Gradient Transform Modifier", "FastNoise Gradient"] + ball_components_to_add = ["Sphere Shape", "PhysX Collider", "PhysX Rigid Body"] + terrain_spawner_entity = hydra.Entity("TestEntity1") + terrain_spawner_entity.create_entity(azmath.Vector3(512.0, 512.0, 50.0), entity1_components_to_add) + Report.result(Tests.create_terrain_spawner_entity, terrain_spawner_entity.id.IsValid()) + height_provider_entity = hydra.Entity("TestEntity2") + height_provider_entity.create_entity(azmath.Vector3(0.0, 0.0, 0.0), entity2_components_to_add,terrain_spawner_entity.id) + Report.result(Tests.create_height_provider_entity, height_provider_entity.id.IsValid()) + # 2a) Create a ball at 600.0, 600.0, 46.0 - This position is not too high over the heightfield so will collide in a reasonable time + ball = hydra.Entity("Ball") + ball.create_entity(azmath.Vector3(600.0, 600.0, 46.0), ball_components_to_add) + Report.result(Tests.create_test_ball, ball.id.IsValid()) + # Give everything a chance to finish initializing. + general.idle_wait_frames(1) + + # 3) Start the Tracer to catch any errors and warnings + with Tracer() as section_tracer: + # 4) Change the Axis Aligned Box Shape dimensions + box_dimensions = azmath.Vector3(SET_BOX_X_SIZE, SET_BOX_Y_SIZE, SET_BOX_Z_SIZE) + terrain_spawner_entity.get_set_test(0, "Axis Aligned Box Shape|Box Configuration|Dimensions", box_dimensions) + box_shape_dimensions = hydra.get_component_property_value(terrain_spawner_entity.components[0], "Axis Aligned Box Shape|Box Configuration|Dimensions") + Report.result(Tests.box_dimensions_changed, box_dimensions == box_shape_dimensions) + + # 5) Set the Vegetaion Shape reference to TestEntity1 + height_provider_entity.get_set_test(0, "Configuration|Shape Entity Id", terrain_spawner_entity.id) + entityId = hydra.get_component_property_value(height_provider_entity.components[0], "Configuration|Shape Entity Id") + Report.result(Tests.shape_changed, entityId == terrain_spawner_entity.id) + + # 6) Set the FastNoise Gradient frequency to 0.01 + Frequency = 0.01 + height_provider_entity.get_set_test(2, "Configuration|Frequency", Frequency) + FrequencyVal = hydra.get_component_property_value(height_provider_entity.components[2], "Configuration|Frequency") + Report.result(Tests.frequency_changed, math.isclose(Frequency, FrequencyVal, abs_tol = 0.00001)) + + # 7) Set the Gradient List to TestEntity2 + propertyTree = hydra.get_property_tree(terrain_spawner_entity.components[2]) + propertyTree.add_container_item("Configuration|Gradient Entities", 0, height_provider_entity.id) + checkID = propertyTree.get_container_item("Configuration|Gradient Entities", 0) + Report.result(Tests.entity_added, checkID.GetValue() == height_provider_entity.id) + + # 8) Set the PhysX Collider to Sphere mode + shape = 0 + hydra.get_set_test(ball, 1, "Shape Configuration|Shape", shape) + setShape = hydra.get_component_property_value(ball.components[1], "Shape Configuration|Shape") + Report.result(Tests.shape_set, shape == setShape) + + # 9) Disable and Enable the Terrain Gradient List so that it is recognised + editor.EditorComponentAPIBus(bus.Broadcast, 'EnableComponents', [terrain_spawner_entity.components[2]]) + + general.enter_game_mode() + + general.idle_wait_frames(1) + + # 10) Enter game mode and test if the ball hits the heightfield within 3 seconds + TIMEOUT = 3.0 + + class Collider: + id = general.find_game_entity("Ball") + touched_ground = False + + terrain_id = general.find_game_entity("TestEntity1") + + def on_collision_begin(args): + other_id = args[0] + if other_id.Equal(terrain_id): + Report.info("Touched ground") + Collider.touched_ground = True + + handler = azlmbr.physics.CollisionNotificationBusHandler() + handler.connect(Collider.id) + handler.add_callback("OnCollisionBegin", on_collision_begin) + + helper.wait_for_condition(lambda: Collider.touched_ground, TIMEOUT) + Report.result(Tests.test_collision, Collider.touched_ground) + + general.exit_game_mode() + + # 11) Verify there are no errors and warnings in the logs + helper.wait_for_condition(lambda: section_tracer.has_errors or section_tracer.has_asserts, 1.0) + for error_info in section_tracer.errors: + Report.info(f"Error: {error_info.filename} {error_info.function} | {error_info.message}") + for assert_info in section_tracer.asserts: + Report.info(f"Assert: {assert_info.filename} {assert_info.function} | {assert_info.message}") + + +if __name__ == "__main__": + + from editor_python_test_tools.utils import Report + Report.start_test(Terrain_SupportsPhysics) + diff --git a/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py index 620d84d7db..786651713c 100644 --- a/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/Terrain/TestSuite_Main.py @@ -13,13 +13,17 @@ import os import sys from ly_test_tools import LAUNCHERS -from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSingleTest +from ly_test_tools.o3de.editor_test import EditorTestSuite, EditorSharedTest @pytest.mark.SUITE_main @pytest.mark.parametrize("launcher_platform", ['windows_editor']) @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): - #global_extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"] - class test_AxisAlignedBoxShape_ConfigurationWorks(EditorSingleTest): + enable_prefab_system = False + + class test_AxisAlignedBoxShape_ConfigurationWorks(EditorSharedTest): from .EditorScripts import TerrainPhysicsCollider_ChangesSizeWithAxisAlignedBoxShapeChanges as test_module + + class test_Terrain_SupportsPhysics(EditorSharedTest): + from .EditorScripts import Terrain_SupportsPhysics as test_module diff --git a/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py index fa6c81c98a..2fc717e256 100644 --- a/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/WhiteBox/TestSuite_Main.py @@ -24,12 +24,12 @@ from base import TestAutomationBase class TestAutomation(TestAutomationBase): def test_WhiteBox_AddComponentToEntity(self, request, workspace, editor, launcher_platform): from .tests import WhiteBox_AddComponentToEntity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_WhiteBox_SetDefaultShape(self, request, workspace, editor, launcher_platform): from .tests import WhiteBox_SetDefaultShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_WhiteBox_SetInvisible(self, request, workspace, editor, launcher_platform): from .tests import WhiteBox_SetInvisible as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py index 35d7982ded..9281d5947e 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/ap_fixtures/bundler_batch_setup_fixture.py @@ -158,7 +158,7 @@ def bundler_batch_setup_fixture(request, workspace, asset_processor, timeout) -> else: cmd.append(f"--{key}") if append_defaults: - cmd.append(f"--project-path={os.path.join(workspace.paths.engine_root(), workspace.project)}") + cmd.append(f"--project-path={workspace.paths.project()}") return cmd # ****** diff --git a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py index 7f85e5e317..f5e5642573 100755 --- a/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py +++ b/AutomatedTesting/Gem/PythonTests/assetpipeline/asset_processor_tests/asset_bundler_batch_tests.py @@ -88,214 +88,6 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): bundler_batch_helper.call_bundles(help="") bundler_batch_helper.call_bundleSeed(help="") - @pytest.mark.BAT - @pytest.mark.assetpipeline - @pytest.mark.test_case_id("C16877175") - @pytest.mark.skip("'animations/animationeditorfiles/sample1.animgraph' missing, needs investigation") - def test_WindowsAndMac_CreateAssetList_DependenciesCorrect(self, workspace, bundler_batch_helper): - r""" - Tests that an asset list created maps dependencies correctly. - testdependencieslevel\level.pak and lists of known dependencies are used for validation - - Test Steps: - 1. Create an asset list from the level.pak - 2. Create Lists of expected assets in the level.pak - 3. Add lists of expected assets to a single list - 4. Compare list of expected assets to actual assets - """ - helper = bundler_batch_helper - - # Create the asset list file - helper.call_assetLists( - addSeed=r"levels\testdependencieslevel\level.pak", - assetListFile=helper['asset_info_file_request'] - ) - - assert os.path.isfile(helper["asset_info_file_result"]) - - # Lists of known relative locations of assets - default_level_assets = [ - "engineassets/texturemsg/defaultnouvs.dds", - "engineassets/texturemsg/defaultnouvs.dds.1", - "engineassets/texturemsg/defaultnouvs.dds.2", - "engineassets/texturemsg/defaultnouvs.dds.3", - "engineassets/texturemsg/defaultnouvs.dds.4", - "engineassets/texturemsg/defaultnouvs.dds.5", - "engineassets/texturemsg/defaultnouvs.dds.6", - "engineassets/texturemsg/defaultnouvs.dds.7", - "engineassets/texturemsg/defaultnouvs_ddn.dds", - "engineassets/texturemsg/defaultnouvs_ddn.dds.1", - "engineassets/texturemsg/defaultnouvs_ddn.dds.2", - "engineassets/texturemsg/defaultnouvs_ddn.dds.3", - "engineassets/texturemsg/defaultnouvs_ddn.dds.4", - "engineassets/texturemsg/defaultnouvs_ddn.dds.5", - "engineassets/texturemsg/defaultnouvs_spec.dds", - "engineassets/texturemsg/defaultnouvs_spec.dds.1", - "engineassets/texturemsg/defaultnouvs_spec.dds.2", - "engineassets/texturemsg/defaultnouvs_spec.dds.3", - "engineassets/texturemsg/defaultnouvs_spec.dds.4", - "engineassets/texturemsg/defaultnouvs_spec.dds.5", - "engineassets/textures/defaults/16_grey.dds", - "engineassets/textures/cubemap/default_level_cubemap.dds", - "engineassets/textures/cubemap/default_level_cubemap.dds.1", - "engineassets/textures/cubemap/default_level_cubemap.dds.2", - "engineassets/textures/cubemap/default_level_cubemap.dds.3", - "engineassets/textures/cubemap/default_level_cubemap.dds.4", - "engineassets/textures/cubemap/default_level_cubemap_diff.dds", - "engineassets/materials/water/ocean_default.mtl", - "engineassets/textures/defaults/spot_default.dds", - "engineassets/textures/defaults/spot_default.dds.1", - "engineassets/textures/defaults/spot_default.dds.2", - "engineassets/textures/defaults/spot_default.dds.3", - "engineassets/textures/defaults/spot_default.dds.4", - "engineassets/textures/defaults/spot_default.dds.5", - "materials/material_terrain_default.mtl", - "textures/skys/night/half_moon.dds", - "textures/skys/night/half_moon.dds.1", - "textures/skys/night/half_moon.dds.2", - "textures/skys/night/half_moon.dds.3", - "textures/skys/night/half_moon.dds.4", - "textures/skys/night/half_moon.dds.5", - "textures/skys/night/half_moon.dds.6", - "engineassets/materials/sky/sky.mtl", - "levels/testdependencieslevel/level.pak", - "levels/testdependencieslevel/terrain/cover.ctc", - "levels/testdependencieslevel/terraintexture.pak", - ] - - sequence_material_cube_assets = [ - "textures/test_texture_sequence/test_texture_sequence000.dds", - "textures/test_texture_sequence/test_texture_sequence001.dds", - "textures/test_texture_sequence/test_texture_sequence002.dds", - "textures/test_texture_sequence/test_texture_sequence003.dds", - "textures/test_texture_sequence/test_texture_sequence004.dds", - "textures/test_texture_sequence/test_texture_sequence005.dds", - "objects/_primitives/_box_1x1.cgf", - "materials/test_texture_sequence.mtl", - "objects/_primitives/_box_1x1.mtl", - "textures/_primitives/middle_gray_checker.dds", - "textures/_primitives/middle_gray_checker.dds.1", - "textures/_primitives/middle_gray_checker.dds.2", - "textures/_primitives/middle_gray_checker.dds.3", - "textures/_primitives/middle_gray_checker.dds.4", - "textures/_primitives/middle_gray_checker.dds.5", - "textures/_primitives/middle_gray_checker_ddn.dds", - "textures/_primitives/middle_gray_checker_ddn.dds.1", - "textures/_primitives/middle_gray_checker_ddn.dds.2", - "textures/_primitives/middle_gray_checker_ddn.dds.3", - "textures/_primitives/middle_gray_checker_ddn.dds.4", - "textures/_primitives/middle_gray_checker_ddn.dds.5", - "textures/_primitives/middle_gray_checker_spec.dds", - "textures/_primitives/middle_gray_checker_spec.dds.1", - "textures/_primitives/middle_gray_checker_spec.dds.2", - "textures/_primitives/middle_gray_checker_spec.dds.3", - "textures/_primitives/middle_gray_checker_spec.dds.4", - "textures/_primitives/middle_gray_checker_spec.dds.5", - ] - - character_with_simplified_material_assets = [ - "objects/characters/jack/jack.actor", - "objects/characters/jack/jack.mtl", - "objects/characters/jack/textures/jack_diff.dds", - "objects/characters/jack/textures/jack_diff.dds.1", - "objects/characters/jack/textures/jack_diff.dds.2", - "objects/characters/jack/textures/jack_diff.dds.3", - "objects/characters/jack/textures/jack_diff.dds.4", - "objects/characters/jack/textures/jack_diff.dds.5", - "objects/characters/jack/textures/jack_diff.dds.6", - "objects/characters/jack/textures/jack_diff.dds.7", - "objects/characters/jack/textures/jack_spec.dds", - "objects/characters/jack/textures/jack_spec.dds.1", - "objects/characters/jack/textures/jack_spec.dds.2", - "objects/characters/jack/textures/jack_spec.dds.3", - "objects/characters/jack/textures/jack_spec.dds.4", - "objects/characters/jack/textures/jack_spec.dds.5", - "objects/characters/jack/textures/jack_spec.dds.6", - "objects/characters/jack/textures/jack_spec.dds.7", - "objects/default/editorprimitive.mtl", - "engineassets/textures/grey.dds", - "animations/animationeditorfiles/sample0.animgraph", - "animations/motions/jack_death_fall_back_zup.motion", - "animations/animationeditorfiles/sample1.animgraph", - "animations/animationeditorfiles/sample0.motionset", - "animations/motions/rin_jump.motion", - "animations/animationeditorfiles/sample1.motionset", - "animations/motions/rin_idle.motion", - "animations/motions/jack_idle_aim_zup.motion", - ] - - spawner_assets = [ - "slices/sphere.dynamicslice", - "objects/default/primitive_sphere.cgf", - "test1.luac", - "test2.luac", - ] - - ui_canvas_assets = [ - "fonts/vera.ttf", - "fonts/vera.font", - "scriptcanvas/mainmenu.scriptcanvas_compiled", - "fonts/vera.fontfamily", - "ui/canvas/start.uicanvas", - "fonts/vera-italic.font", - "ui/textureatlas/sample.texatlasidx", - "fonts/vera-bold-italic.ttf", - "fonts/vera-bold.font", - "ui/textures/prefab/button_normal.dds", - "ui/textures/prefab/button_normal.sprite", - "fonts/vera-italic.ttf", - "ui/textureatlas/sample.dds", - "fonts/vera-bold-italic.font", - "fonts/vera-bold.ttf", - "ui/textures/prefab/button_disabled.dds", - "ui/textures/prefab/button_disabled.sprite", - ] - - wwise_and_atl_assets = [ - "libs/gameaudio/wwise/levels/testdependencieslevel/test_dependencies_level.xml", - "sounds/wwise/test_bank3.bnk", - "sounds/wwise/test_bank4.bnk", - "sounds/wwise/test_bank5.bnk", - "sounds/wwise/test_bank1.bnk", - "sounds/wwise/init.bnk", - "sounds/wwise/499820003.wem", - "sounds/wwise/196049145.wem", - ] - - particle_library_assets = [ - "libs/particles/milestone2particles.xml", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.1", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.2", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.3", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.4", - "textures/milestone2/particles/fx_launchermuzzlering_01.dds.5", - "textures/milestone2/particles/fx_sparkstreak_01.dds", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.1", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.2", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.3", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.4", - "textures/milestone2/particles/fx_launchermuzzlefront_01.dds.5", - ] - - lens_flares_library_assets = ["libs/flares/flares.xml", "textures/lights/flare01.dds"] - - expected_assets_list = default_level_assets - expected_assets_list.extend(sequence_material_cube_assets) - expected_assets_list.extend(character_with_simplified_material_assets) - expected_assets_list.extend(spawner_assets) - expected_assets_list.extend(ui_canvas_assets) - expected_assets_list.extend(wwise_and_atl_assets) - expected_assets_list.extend(particle_library_assets) - expected_assets_list.extend(lens_flares_library_assets) # All expected assets - - # Get actual calculated dependencies from the asset list created - actual_assets_list = [] - for rel_path in helper.get_asset_relative_paths(helper["asset_info_file_result"]): - actual_assets_list.append(rel_path) - - assert sorted(actual_assets_list) == sorted(expected_assets_list) @pytest.mark.BAT @pytest.mark.assetpipeline @@ -310,9 +102,9 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): 3. Read and store contents of asset list into memory 4. Attempt to create a new asset list in without using --allowOverwrites 5. Verify that Asset Bundler returns false - 6. Verify that file contents of the orignally created asset list did not change from what was stored in memory + 6. Verify that file contents of the originally created asset list did not change from what was stored in memory 7. Attempt to create a new asset list without debug while allowing overwrites - 8. Verify that file contents of the orignally created asset list changed from what was stored in memory + 8. Verify that file contents of the originally created asset list changed from what was stored in memory """ helper = bundler_batch_helper seed_list = os.path.join(workspace.paths.engine_root(), "Assets", "Engine", "SeedAssetList.seed") # Engine seed list @@ -919,7 +711,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): # Extra arguments for pattern comparison cmd.extend([f"--filePatternType={pattern_type}", f"--filePattern={pattern}"]) if workspace.project: - cmd.append(f'--project-path={project_name}') + cmd.append(f'--project-path={workspace.paths.project()}') return cmd # End generate_compare_command() @@ -960,7 +752,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): output_mac_asset_list = helper.platform_file_name(last_output_arg, platform) # Build execution command - cmd = generate_compare_command(platform_arg, workspace.project) + cmd = generate_compare_command(platform_arg, workspace.paths.project()) # Execute command subprocess.check_call(cmd) @@ -995,7 +787,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): f"--comparisonRulesFile={rule_file}", f"--comparisonType={args[1]}", r"--addComparison", - f"--project-path={workspace.project}", + f"--project-path={workspace.paths.project()}", ] if args[1] == "4": # If pattern comparison, append a few extra arguments @@ -1117,7 +909,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): "--addDefaultSeedListFiles", "--platform=pc", "--print", - f"--project-path={workspace.project}" + f"--project-path={workspace.paths.project()}" ], universal_newlines=True, ) @@ -1189,7 +981,7 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): # Make sure file gets deleted on teardown request.addfinalizer(lambda: fs.delete([bundle_result_path], True, False)) - bundles_folder = os.path.join(workspace.paths.engine_root(), workspace.project, "Bundles") + bundles_folder = os.path.join(workspace.paths.project(), "Bundles") level_pak = r"levels\testdependencieslevel\level.pak" bundle_request_path = os.path.join(bundles_folder, "bundle.pak") bundle_result_path = os.path.join(bundles_folder, @@ -1243,23 +1035,64 @@ class TestsAssetBundlerBatch_WindowsAndMac(object): 2. Verify file was created 3. Verify that only the expected assets are present in the created asset list """ - expected_assets = [ + expected_assets = sorted([ "ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas", - "ui/textures/prefab/button_normal.sprite" - ] + "ui/textures/prefab/button_disabled.tif.streamingimage", + "ui/textures/prefab/tooltip_sliced.tif.streamingimage", + "ui/textures/prefab/button_normal.tif.streamingimage" + ]) + # Printing these lists out can save a step in debugging if this test fails on Jenkins. + logger.info(f"expected_assets: {expected_assets}") + + skip_assets = sorted([ + "ui/scripts/lyshineexamples/animation/multiplesequences.luac", + "ui/scripts/lyshineexamples/unloadthiscanvasbutton.luac", + "fonts/vera.fontfamily", + "fonts/vera-italic.font", + "fonts/vera.font", + "fonts/vera-bold.font", + "fonts/vera-bold-italic.font", + "fonts/vera-italic.ttf", + "fonts/vera.ttf", + "fonts/vera-bold.ttf", + "fonts/vera-bold-italic.ttf" + ]) + logger.info(f"skip_assets: {skip_assets}") + + expected_and_skip_assets = sorted(expected_assets + skip_assets) + # Printing both together to make it quick to compare the results in the logs for a test failure on Jenkins + logger.info(f"expected_and_skip_assets: {expected_and_skip_assets}") + + # First, generate an asset info file without skipping, to get a list that can be used as a baseline to verify + # the files were actually skipped, and not just missing. + bundler_batch_helper.call_assetLists( + assetListFile=bundler_batch_helper['asset_info_file_request'], + addSeed="ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas" + ) + assert os.path.isfile(bundler_batch_helper["asset_info_file_result"]) + assets_in_no_skip_list = [] + for rel_path in bundler_batch_helper.get_asset_relative_paths(bundler_batch_helper["asset_info_file_result"]): + assets_in_no_skip_list.append(rel_path) + assets_in_no_skip_list = sorted(assets_in_no_skip_list) + logger.info(f"assets_in_no_skip_list: {assets_in_no_skip_list}") + assert assets_in_no_skip_list == expected_and_skip_assets + + # Now generate an asset info file using the skip command, and verify the skip files are not in the list. bundler_batch_helper.call_assetLists( assetListFile=bundler_batch_helper['asset_info_file_request'], addSeed="ui/canvases/lyshineexamples/animation/multiplesequences.uicanvas", - skip="ui/textures/prefab/button_disabled.sprite,ui/scripts/lyshineexamples/animation/multiplesequences.luac," - "ui/textures/prefab/tooltip_sliced.sprite,ui/scripts/lyshineexamples/unloadthiscanvasbutton.luac,fonts/vera.fontfamily,fonts/vera-italic.font," - "fonts/vera.font,fonts/vera-bold.font,fonts/vera-bold-italic.font,fonts/vera-italic.ttf,fonts/vera.ttf,fonts/vera-bold.ttf,fonts/vera-bold-italic.ttf" + allowOverwrites="", + skip=','.join(skip_assets) ) + assert os.path.isfile(bundler_batch_helper["asset_info_file_result"]) assets_in_list = [] for rel_path in bundler_batch_helper.get_asset_relative_paths(bundler_batch_helper["asset_info_file_result"]): assets_in_list.append(rel_path) + assets_in_list = sorted(assets_in_list) + logger.info(f"assets_in_list: {assets_in_list}") + assert assets_in_list == expected_assets - assert sorted(assets_in_list) == sorted(expected_assets) @pytest.mark.BAT @pytest.mark.assetpipeline diff --git a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py index 41d693cb60..4543888a7c 100755 --- a/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py +++ b/AutomatedTesting/Gem/PythonTests/automatedtesting_shared/base.py @@ -52,7 +52,7 @@ class TestAutomationBase: cls._kill_ly_processes() def _run_test(self, request, workspace, editor, testcase_module, extra_cmdline_args=[], batch_mode=True, - autotest_mode=True, use_null_renderer=True): + autotest_mode=True, use_null_renderer=True, enable_prefab_system=True): test_starttime = time.time() self.logger = logging.getLogger(__name__) errors = [] @@ -97,6 +97,11 @@ class TestAutomationBase: pycmd += ["-BatchMode"] if autotest_mode: pycmd += ["-autotest_mode"] + if enable_prefab_system: + pycmd += ["--regset=/Amazon/Preferences/EnablePrefabSystem=true"] + else: + pycmd += ["--regset=/Amazon/Preferences/EnablePrefabSystem=false"] + pycmd += extra_cmdline_args editor.args.extend(pycmd) # args are added to the WinLauncher start command editor.start(backupFiles = False, launch_ap = False) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py index 33c48c7a77..7366faafdc 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_SearchFiltering.py @@ -62,7 +62,7 @@ def AssetBrowser_SearchFiltering(): from editor_python_test_tools.utils import Report from editor_python_test_tools.utils import TestHelper as helper - def verify_files_appeared(model, allowed_asset_extentions, parent_index=QtCore.QModelIndex()): + def verify_files_appeared(model, allowed_asset_extensions, parent_index=QtCore.QModelIndex()): indexes = [parent_index] while len(indexes) > 0: parent_index = indexes.pop(0) @@ -71,7 +71,7 @@ def AssetBrowser_SearchFiltering(): cur_data = cur_index.data(Qt.DisplayRole) if ( "." in cur_data - and (cur_data.lower().split(".")[-1] not in allowed_asset_extentions) + and (cur_data.lower().split(".")[-1] not in allowed_asset_extensions) and not cur_data[-1] == ")" ): Report.info(f"Incorrect file found: {cur_data}") @@ -94,16 +94,21 @@ def AssetBrowser_SearchFiltering(): Report.info("Asset Browser is already open") editor_window = pyside_utils.get_editor_main_window() app = QtWidgets.QApplication.instance() - - # 3) Type the name of an asset in the search bar and make sure only one asset is filtered in Asset browser + + # 3) Type the name of an asset in the search bar and make sure it is filtered to and selectable asset_browser = editor_window.findChild(QtWidgets.QDockWidget, "Asset Browser") search_bar = asset_browser.findChild(QtWidgets.QLineEdit, "textSearch") search_bar.setText("cedar.fbx") asset_browser_tree = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTreeViewWidget") - model_index = pyside_utils.find_child_by_pattern(asset_browser_tree, "cedar.fbx") - pyside_utils.item_view_index_mouse_click(asset_browser_tree, model_index) + asset_browser_table = asset_browser.findChild(QtWidgets.QTreeView, "m_assetBrowserTableViewWidget") + found = await pyside_utils.wait_for_condition(lambda: pyside_utils.find_child_by_pattern(asset_browser_table, "cedar.fbx"), 5.0) + if found: + model_index = pyside_utils.find_child_by_pattern(asset_browser_table, "cedar.fbx") + else: + Report.result(Tests.asset_filtered, found) + pyside_utils.item_view_index_mouse_click(asset_browser_table, model_index) is_filtered = await pyside_utils.wait_for_condition( - lambda: asset_browser_tree.indexBelow(asset_browser_tree.currentIndex()) == QtCore.QModelIndex(), 5.0) + lambda: asset_browser_table.currentIndex() == model_index, 5.0) Report.result(Tests.asset_filtered, is_filtered) # 4) Click the "X" in the search bar. diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py index b4f0dc7f6c..ecc77778cc 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/AssetBrowser_TreeNavigation.py @@ -84,8 +84,8 @@ def AssetBrowser_TreeNavigation(): # 3) Collapse all files initially main_window = editor_window.findChild(QtWidgets.QMainWindow) - asset_browser = pyside_utils.find_child_by_hierarchy(main_window, ..., "Asset Browser") - tree = pyside_utils.find_child_by_hierarchy(asset_browser, ..., "m_assetBrowserTreeViewWidget") + asset_browser = pyside_utils.find_child_by_pattern(main_window, text="Asset Browser", type=QtWidgets.QDockWidget) + tree = pyside_utils.find_child_by_pattern(asset_browser, "m_assetBrowserTreeViewWidget") scroll_area = tree.findChild(QtWidgets.QWidget, "qt_scrollarea_vcontainer") scroll_bar = scroll_area.findChild(QtWidgets.QScrollBar) tree.collapseAll() diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py index 49069569eb..c9e91687e0 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main.py @@ -33,14 +33,14 @@ class TestAutomation(TestAutomationBase): def test_BasicEditorWorkflows_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform, remove_test_level): from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False, enable_prefab_system=False) @pytest.mark.REQUIRES_gpu def test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(self, request, workspace, editor, launcher_platform, remove_test_level): from .EditorScripts import BasicEditorWorkflows_LevelEntityComponentCRUD as test_module self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False, - use_null_renderer=False) + use_null_renderer=False, enable_prefab_system=False) def test_EntityOutlienr_EntityOrdering(self, request, workspace, editor, launcher_platform): from .EditorScripts import EntityOutliner_EntityOrdering as test_module @@ -51,5 +51,4 @@ class TestAutomation(TestAutomationBase): test_module, batch_mode=False, autotest_mode=True, - extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=true"] ) diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py index afc52f962d..ccc4ee9737 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Main_Optimized.py @@ -21,6 +21,8 @@ class TestAutomationNoAutoTestMode(EditorTestSuite): # Disable -autotest_mode and -BatchMode. Tests cannot run in -BatchMode due to UI interactions, and these tests # interact with modal dialogs global_extra_cmdline_args = [] + + enable_prefab_system = False class test_BasicEditorWorkflows_LevelEntityComponentCRUD(EditorSingleTest): # Custom teardown to remove slice asset created during test @@ -43,7 +45,6 @@ class TestAutomationNoAutoTestMode(EditorTestSuite): class test_InputBindings_Add_Remove_Input_Events(EditorSharedTest): from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") class test_AssetPicker_UI_UX(EditorSharedTest): from .EditorScripts import AssetPicker_UI_UX as test_module @@ -57,10 +58,11 @@ class TestAutomationAutoTestMode(EditorTestSuite): # Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions global_extra_cmdline_args = ["-autotest_mode"] + enable_prefab_system = False + class test_AssetBrowser_TreeNavigation(EditorSharedTest): from .EditorScripts import AssetBrowser_TreeNavigation as test_module - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") class test_AssetBrowser_SearchFiltering(EditorSharedTest): from .EditorScripts import AssetBrowser_SearchFiltering as test_module @@ -74,6 +76,5 @@ class TestAutomationAutoTestMode(EditorTestSuite): class test_Menus_FileMenuOptions_Work(EditorSharedTest): from .EditorScripts import Menus_FileMenuOptions as test_module - class test_BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD(EditorSharedTest): from .EditorScripts import BasicEditorWorkflows_ExistingLevel_EntityComponentCRUD as test_module diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Periodic.py index 398b64bc87..1bd1d7f987 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Periodic.py @@ -32,31 +32,29 @@ class TestAutomation(TestAutomationBase): def test_AssetBrowser_TreeNavigation(self, request, workspace, editor, launcher_platform): from .EditorScripts import AssetBrowser_TreeNavigation as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, enable_prefab_system=False) - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") def test_AssetBrowser_SearchFiltering(self, request, workspace, editor, launcher_platform): from .EditorScripts import AssetBrowser_SearchFiltering as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, enable_prefab_system=False) - @pytest.mark.skip(reason="Crashes Editor: ATOM-15493") def test_AssetPicker_UI_UX(self, request, workspace, editor, launcher_platform): from .EditorScripts import AssetPicker_UI_UX as test_module - self._run_test(request, workspace, editor, test_module, autotest_mode=False, batch_mode=False) + self._run_test(request, workspace, editor, test_module, autotest_mode=False, batch_mode=False, enable_prefab_system=False) def test_ComponentCRUD_Add_Delete_Components(self, request, workspace, editor, launcher_platform): from .EditorScripts import ComponentCRUD_Add_Delete_Components as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, enable_prefab_system=False) def test_InputBindings_Add_Remove_Input_Events(self, request, workspace, editor, launcher_platform): from .EditorScripts import InputBindings_Add_Remove_Input_Events as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, autotest_mode=False, enable_prefab_system=False) def test_Menus_ViewMenuOptions_Work(self, request, workspace, editor, launcher_platform): from .EditorScripts import Menus_ViewMenuOptions as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, enable_prefab_system=False) @pytest.mark.skip(reason="Times out due to dialogs failing to dismiss: LYN-4208") def test_Menus_FileMenuOptions_Work(self, request, workspace, editor, launcher_platform): from .EditorScripts import Menus_FileMenuOptions as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox.py index 98a6620d9c..8a56a2dbfd 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox.py @@ -20,8 +20,8 @@ class TestAutomation(TestAutomationBase): def test_Menus_EditMenuOptions_Work(self, request, workspace, editor, launcher_platform): from .EditorScripts import Menus_EditMenuOptions as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, enable_prefab_system=False) def test_Docking_BasicDockedTools(self, request, workspace, editor, launcher_platform): from .EditorScripts import Docking_BasicDockedTools as test_module - self._run_test(request, workspace, editor, test_module, batch_mode=False) + self._run_test(request, workspace, editor, test_module, batch_mode=False, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox_Optimized.py b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox_Optimized.py index 4a472095ae..ce0d5e43e9 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/editor/TestSuite_Sandbox_Optimized.py @@ -19,6 +19,8 @@ class TestAutomationAutoTestMode(EditorTestSuite): # Enable only -autotest_mode for these tests. Tests cannot run in -BatchMode due to UI interactions global_extra_cmdline_args = ["-autotest_mode"] + enable_prefab_system = False + class test_Docking_BasicDockedTools(EditorSharedTest): from .EditorScripts import Docking_BasicDockedTools as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py index 4c02c887ef..06c9c5f615 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main.py @@ -20,8 +20,8 @@ class TestAutomation(TestAutomationBase): def test_DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks(self, request, workspace, editor, launcher_platform): from .EditorScripts import DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_EmptyInstanceSpawner_EmptySpawnerWorks(self, request, workspace, editor, launcher_platform): from .EditorScripts import EmptyInstanceSpawner_EmptySpawnerWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py index ded2dda4e9..ed23af51ad 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Main_Optimized.py @@ -18,6 +18,8 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + class test_DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks(EditorParallelTest): from .EditorScripts import DynamicSliceInstanceSpawner_DynamicSliceSpawnerWorks as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py index 2780c0f471..d0d570950b 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic.py @@ -52,158 +52,158 @@ class TestAutomation(TestAutomationBase): def test_AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude(self, request, workspace, editor, launcher_platform): from .EditorScripts import AltitudeFilter_ComponentAndOverrides_InstancesPlantAtSpecifiedAltitude as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude(self, request, workspace, editor, launcher_platform): from .EditorScripts import AltitudeFilter_ShapeSample_InstancesPlantAtSpecifiedAltitude as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_AltitudeFilter_FilterStageToggle(self, request, workspace, editor, launcher_platform): from .EditorScripts import AltitudeFilter_FilterStageToggle as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SpawnerSlices_SliceCreationAndVisibilityToggleWorks(self, request, workspace, editor, remove_test_slice, launcher_platform): from .EditorScripts import SpawnerSlices_SliceCreationAndVisibilityToggleWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea(self, request, workspace, editor, launcher_platform): from .EditorScripts import AssetListCombiner_CombinedDescriptorsExpressInConfiguredArea as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_AssetWeightSelector_InstancesExpressBasedOnWeight(self, request, workspace, editor, launcher_platform): from .EditorScripts import AssetWeightSelector_InstancesExpressBasedOnWeight as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/4155") def test_DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius(self, request, workspace, editor, launcher_platform): from .EditorScripts import DistanceBetweenFilter_InstancesPlantAtSpecifiedRadius as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/4155") def test_DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius(self, request, workspace, editor, launcher_platform): from .EditorScripts import DistanceBetweenFilterOverrides_InstancesPlantAtSpecifiedRadius as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceDataRefreshes_RemainsStable(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceDataRefreshes_RemainsStable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_VegetationInstances_DespawnWhenOutOfRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import VegetationInstances_DespawnWhenOutOfRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_InstanceSpawnerPriority_LayerAndSubPriority_HigherValuesPlantOverLower(self, request, workspace, editor, launcher_platform): from .EditorScripts import InstanceSpawnerPriority_LayerAndSubPriority as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerBlocker_InstancesBlockedInConfiguredArea(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerBlocker_InstancesBlockedInConfiguredArea as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerSpawner_InheritBehaviorFlag(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_InheritBehaviorFlag as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerSpawner_InstancesPlantInAllSupportedShapes(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_InstancesPlantInAllSupportedShapes as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LayerSpawner_FilterStageToggle(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_FilterStageToggle as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/2038") def test_LayerSpawner_InstancesRefreshUsingCorrectViewportCamera(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerSpawner_InstancesRefreshUsingCorrectViewportCamera as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshBlocker_InstancesBlockedByMesh(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshBlocker_InstancesBlockedByMesh as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshBlocker_InstancesBlockedByMeshHeightTuning(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshBlocker_InstancesBlockedByMeshHeightTuning as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshSurfaceTagEmitter_DependentOnMeshComponent(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshSurfaceTagEmitter_DependentOnMeshComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_MeshSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import MeshSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_PhysXColliderSurfaceTagEmitter_E2E_Editor(self, request, workspace, editor, launcher_platform): from .EditorScripts import PhysXColliderSurfaceTagEmitter_E2E_Editor as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets(self, request, workspace, editor, launcher_platform): from .EditorScripts import PositionModifier_ComponentAndOverrides_InstancesPlantAtSpecifiedOffsets as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_PositionModifier_AutoSnapToSurfaceWorks(self, request, workspace, editor, launcher_platform): from .EditorScripts import PositionModifier_AutoSnapToSurfaceWorks as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RotationModifier_InstancesRotateWithinRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import RotationModifier_InstancesRotateWithinRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_RotationModifierOverrides_InstancesRotateWithinRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import RotationModifierOverrides_InstancesRotateWithinRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScaleModifier_InstancesProperlyScale(self, request, workspace, editor, launcher_platform): from .EditorScripts import ScaleModifier_InstancesProperlyScale as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScaleModifierOverrides_InstancesProperlyScale(self, request, workspace, editor, launcher_platform): from .EditorScripts import ScaleModifierOverrides_InstancesProperlyScale as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ShapeIntersectionFilter_InstancesPlantInAssignedShape(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeIntersectionFilter_InstancesPlantInAssignedShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ShapeIntersectionFilter_FilterStageToggle(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeIntersectionFilter_FilterStageToggle as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SlopeAlignmentModifier_InstanceSurfaceAlignment(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlopeAlignmentModifier_InstanceSurfaceAlignment as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlopeAlignmentModifierOverrides_InstanceSurfaceAlignment as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilter_BasicSurfaceTagCreation(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilter_BasicSurfaceTagCreation as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilter_ExclusiveSurfaceTags_Function(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilter_ExclusionList as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilter_InclusiveSurfaceTags_Function(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilter_InclusionList as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected(self, request, workspace, editor, launcher_platform): from .EditorScripts import SurfaceMaskFilterOverrides_MultipleDescriptorOverridesPlantAsExpected as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SystemSettings_SectorPointDensity(self, request, workspace, editor, launcher_platform): from .EditorScripts import SystemSettings_SectorPointDensity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SystemSettings_SectorSize(self, request, workspace, editor, launcher_platform): from .EditorScripts import SystemSettings_SectorSize as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlopes(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlopeFilter_ComponentAndOverrides_InstancesPlantOnValidSlope as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.SUITE_periodic @@ -219,7 +219,7 @@ class TestAutomationE2E(TestAutomationBase): file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) from .EditorScripts import DynamicSliceInstanceSpawner_Embedded_E2E as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("launcher_platform", ['windows']) def test_DynamicSliceInstanceSpawner_Embedded_E2E_Launcher(self, workspace, launcher, level, @@ -240,7 +240,7 @@ class TestAutomationE2E(TestAutomationBase): file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) from .EditorScripts import DynamicSliceInstanceSpawner_External_E2E as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("launcher_platform", ['windows']) def test_DynamicSliceInstanceSpawner_External_E2E_Launcher(self, workspace, launcher, level, @@ -261,7 +261,7 @@ class TestAutomationE2E(TestAutomationBase): file_system.delete([os.path.join(workspace.paths.engine_root(), project, "Levels", level)], True, True) from .EditorScripts import LayerBlender_E2E_Editor as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("launcher_platform", ['windows']) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/4170") diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py index 8d298e970b..f87d6567ef 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/dyn_veg/TestSuite_Periodic_Optimized.py @@ -17,7 +17,7 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): - global_extra_cmdline_args = ["-BatchMode", "-autotest_mode", "--regset=/Amazon/Preferences/EnablePrefabSystem=true"] + global_extra_cmdline_args = ["-BatchMode", "-autotest_mode"] class test_DynVegUtils_TempPrefabCreationWorks(EditorSharedTest): from .EditorScripts import DynVegUtils_TempPrefabCreationWorks as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py index 21eecf642c..3ad27eb973 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic.py @@ -20,52 +20,52 @@ class TestAutomation(TestAutomationBase): def test_GradientGenerators_Incompatibilities(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientGenerators_Incompatibilities as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientModifiers_Incompatibilities(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientModifiers_Incompatibilities as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientPreviewSettings_DefaultPinnedEntityIsSelf(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientPreviewSettings_DefaultPinnedEntityIsSelf as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientPreviewSettings_ClearingPinnedEntitySetsPreviewToOrigin as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientSampling_GradientReferencesAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientSampling_GradientReferencesAddRemoveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientSurfaceTagEmitter_ComponentDependencies(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientSurfaceTagEmitter_ComponentDependencies as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientSurfaceTagEmitter_SurfaceTagsAddRemoveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_RequiresShape(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_RequiresShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_FrequencyZoomCanBeSetBeyondSliderRange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_ComponentIncompatibleWithSpawners(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_ComponentIncompatibleWithSpawners as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_GradientTransform_ComponentIncompatibleWithExpectedGradients(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientTransform_ComponentIncompatibleWithExpectedGradients as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ImageGradient_RequiresShape(self, request, workspace, editor, launcher_platform): from .EditorScripts import ImageGradient_RequiresShape as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ImageGradient_ProcessedImageAssignedSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import ImageGradient_ProcessedImageAssignedSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py index 514504d324..6ac0658b4d 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/gradient_signal/TestSuite_Periodic_Optimized.py @@ -15,6 +15,8 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + class test_GradientGenerators_Incompatibilities(EditorSharedTest): from .EditorScripts import GradientGenerators_Incompatibilities as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py index af4855a546..dedc9c70c0 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main.py @@ -22,8 +22,8 @@ class TestAutomation(TestAutomationBase): def test_LandscapeCanvas_SlotConnections_UpdateComponentReferences(self, request, workspace, editor, launcher_platform): from .EditorScripts import SlotConnections_UpdateComponentReferences as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientMixer_NodeConstruction(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientMixer_NodeConstruction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py index 1c3652cae9..402df133cb 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Main_Optimized.py @@ -18,6 +18,8 @@ from ly_test_tools.o3de.editor_test import EditorSingleTest, EditorSharedTest, E @pytest.mark.parametrize("project", ["AutomatedTesting"]) class TestAutomation(EditorTestSuite): + enable_prefab_system = False + class test_LandscapeCanvas_SlotConnections_UpdateComponentReferences(EditorSharedTest): from .EditorScripts import SlotConnections_UpdateComponentReferences as test_module diff --git a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py index ef8b3e492b..a719b1a7c0 100644 --- a/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/largeworlds/landscape_canvas/TestSuite_Periodic.py @@ -33,89 +33,89 @@ class TestAutomation(TestAutomationBase): def test_LandscapeCanvas_AreaNodes_DependentComponentsAdded(self, request, workspace, editor, launcher_platform): from .EditorScripts import AreaNodes_DependentComponentsAdded as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_AreaNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import AreaNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_AreaNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import AreaNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_LayerExtenderNodes_ComponentEntitySync(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerExtenderNodes_ComponentEntitySync as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Edit_DisabledNodeDuplication(self, request, workspace, editor, launcher_platform): from .EditorScripts import Edit_DisabledNodeDuplication as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Edit_UndoNodeDelete_SliceEntity(self, request, workspace, editor, launcher_platform): from .EditorScripts import Edit_UndoNodeDelete_SliceEntity as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_NewGraph_CreatedSuccessfully(self, request, workspace, editor, launcher_platform): from .EditorScripts import NewGraph_CreatedSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Component_AddedRemoved(self, request, workspace, editor, launcher_platform): from .EditorScripts import Component_AddedRemoved as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GraphClosed_OnLevelChange(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphClosed_OnLevelChange as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="https://github.com/o3de/o3de/issues/2201") def test_LandscapeCanvas_GraphClosed_OnEntityDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphClosed_OnEntityDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GraphClosed_TabbedGraphClosesIndependently(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphClosed_TabbedGraph as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_Slice_CreateInstantiate(self, request, workspace, editor, remove_test_slice, launcher_platform): from .EditorScripts import Slice_CreateInstantiate as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientModifierNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientModifierNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientModifierNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientModifierNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientNodes_DependentComponentsAdded(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientNodes_DependentComponentsAdded as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GradientNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import GradientNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_GraphUpdates_UpdateComponents(self, request, workspace, editor, launcher_platform): from .EditorScripts import GraphUpdates_UpdateComponents as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_ComponentUpdates_UpdateGraph(self, request, workspace, editor, launcher_platform): from .EditorScripts import ComponentUpdates_UpdateGraph as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_LayerBlender_NodeConstruction(self, request, workspace, editor, launcher_platform): from .EditorScripts import LayerBlender_NodeConstruction as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_ShapeNodes_EntityCreatedOnNodeAdd(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeNodes_EntityCreatedOnNodeAdd as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_LandscapeCanvas_ShapeNodes_EntityRemovedOnNodeDelete(self, request, workspace, editor, launcher_platform): from .EditorScripts import ShapeNodes_EntityRemovedOnNodeDelete as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py index b2001e6825..27af63ddbc 100755 --- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Periodic.py @@ -27,15 +27,15 @@ TEST_DIRECTORY = os.path.dirname(__file__) class TestAutomation(TestAutomationBase): def test_Pane_HappyPath_OpenCloseSuccessfully(self, request, workspace, editor, launcher_platform): from . import Pane_HappyPath_OpenCloseSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_HappyPath_DocksProperly(self, request, workspace, editor, launcher_platform): from . import Pane_HappyPath_DocksProperly as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_HappyPath_ResizesProperly(self, request, workspace, editor, launcher_platform): from . import Pane_HappyPath_ResizesProperly as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -45,7 +45,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_TwoComponents_InteractSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -55,15 +55,15 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_ChangingAssets_ComponentStable as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Graph_HappyPath_ZoomInZoomOut(self, request, workspace, editor, launcher_platform): from . import Graph_HappyPath_ZoomInZoomOut as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodePalette_HappyPath_CanSelectNode(self, request, workspace, editor, launcher_platform): from . import NodePalette_HappyPath_CanSelectNode as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -73,11 +73,11 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvasComponent_OnEntityActivatedDeactivated_PrintMessage as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodePalette_HappyPath_ClearSelection(self, request, workspace, editor, launcher_platform, project): from . import NodePalette_HappyPath_ClearSelection as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -87,7 +87,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptCanvas_TwoEntities_UseSimultaneously as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScriptEvent_HappyPath_CreatedWithoutError(self, request, workspace, editor, launcher_platform, project): def teardown(): @@ -99,19 +99,19 @@ class TestAutomation(TestAutomationBase): [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True ) from . import ScriptEvent_HappyPath_CreatedWithoutError as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScriptCanvasTools_Toggle_OpenCloseSuccess(self, request, workspace, editor, launcher_platform): from . import ScriptCanvasTools_Toggle_OpenCloseSuccess as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodeInspector_HappyPath_VariableRenames(self, request, workspace, editor, launcher_platform, project): from . import NodeInspector_HappyPath_VariableRenames as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Debugger_HappyPath_TargetMultipleGraphs(self, request, workspace, editor, launcher_platform, project): from . import Debugger_HappyPath_TargetMultipleGraphs as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("level", ["tmp_level"]) def test_Debugger_HappyPath_TargetMultipleEntities(self, request, workspace, editor, launcher_platform, project, level): @@ -120,16 +120,16 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import Debugger_HappyPath_TargetMultipleEntities as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") def test_EditMenu_Default_UndoRedo(self, request, workspace, editor, launcher_platform, project): from . import EditMenu_Default_UndoRedo as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_Undocked_ClosesSuccessfully(self, request, workspace, editor, launcher_platform): from . import Pane_Undocked_ClosesSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.parametrize("level", ["tmp_level"]) def test_Entity_HappyPath_AddScriptCanvasComponent(self, request, workspace, editor, launcher_platform, project, level): @@ -138,11 +138,11 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import Entity_HappyPath_AddScriptCanvasComponent as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Pane_Default_RetainOnSCRestart(self, request, workspace, editor, launcher_platform): from . import Pane_Default_RetainOnSCRestart as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -152,7 +152,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_HappyPath_SendReceiveAcrossMultiple as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -162,7 +162,7 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_Default_SendReceiveSuccessfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @pytest.mark.parametrize("level", ["tmp_level"]) @@ -172,24 +172,24 @@ class TestAutomation(TestAutomationBase): request.addfinalizer(teardown) file_system.delete([os.path.join(workspace.paths.project(), "Levels", level)], True, True) from . import ScriptEvents_ReturnSetType_Successfully as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodeCategory_ExpandOnClick(self, request, workspace, editor, launcher_platform): from . import NodeCategory_ExpandOnClick as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_NodePalette_SearchText_Deletion(self, request, workspace, editor, launcher_platform): from . import NodePalette_SearchText_Deletion as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") def test_VariableManager_UnpinVariableType_Works(self, request, workspace, editor, launcher_platform): from . import VariableManager_UnpinVariableType_Works as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_Node_HappyPath_DuplicateNode(self, request, workspace, editor, launcher_platform): from . import Node_HappyPath_DuplicateNode as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) def test_ScriptEvent_AddRemoveParameter_ActionsSuccessful(self, request, workspace, editor, launcher_platform): def teardown(): @@ -201,7 +201,7 @@ class TestAutomation(TestAutomationBase): [os.path.join(workspace.paths.project(), "ScriptCanvas", "test_file.scriptevent")], True, True ) from . import ScriptEvent_AddRemoveParameter_ActionsSuccessful as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) # NOTE: We had to use hydra_test_utils.py, as TestAutomationBase run_test method # fails because of pyside_utils import @@ -220,7 +220,14 @@ class TestScriptCanvasTests(object): "File->Open action working as expected: True", ] hydra.launch_and_validate_results( - request, TEST_DIRECTORY, editor, "FileMenu_Default_NewAndOpen.py", expected_lines, auto_test_mode=False, timeout=60, + request, + TEST_DIRECTORY, + editor, + "FileMenu_Default_NewAndOpen.py", + expected_lines, + auto_test_mode=False, + timeout=60, + enable_prefab_system=False, ) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @@ -239,6 +246,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) def test_GraphClose_Default_SavePrompt(self, request, editor, launcher_platform): @@ -255,6 +263,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) def test_VariableManager_Default_CreateDeleteVars(self, request, editor, launcher_platform): @@ -269,6 +278,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) @pytest.mark.parametrize( @@ -304,6 +314,7 @@ class TestScriptCanvasTests(object): cfg_args=[config.get('cfg_args')], auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @@ -332,6 +343,7 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) @pytest.mark.xfail(reason="Test fails to find expected lines, it needs to be fixed.") @@ -359,5 +371,6 @@ class TestScriptCanvasTests(object): expected_lines, auto_test_mode=False, timeout=60, + enable_prefab_system=False, ) \ No newline at end of file diff --git a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py index 91b01d8d08..071ae2286c 100644 --- a/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py +++ b/AutomatedTesting/Gem/PythonTests/scripting/TestSuite_Sandbox.py @@ -23,4 +23,4 @@ class TestAutomation(TestAutomationBase): def test_Opening_Closing_Pane(self, request, workspace, editor, launcher_platform): from . import Opening_Closing_Pane as test_module - self._run_test(request, workspace, editor, test_module) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py b/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py index ebaebcfa92..5caf7744c4 100644 --- a/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py +++ b/AutomatedTesting/Gem/PythonTests/smoke/test_Editor_NewExistingLevels_Works.py @@ -31,4 +31,4 @@ class TestAutomation(TestAutomationBase): from . import Editor_NewExistingLevels_Works as test_module - self._run_test(request, workspace, editor, test_module, extra_cmdline_args=["--regset=/Amazon/Preferences/EnablePrefabSystem=false"]) + self._run_test(request, workspace, editor, test_module, enable_prefab_system=False) diff --git a/AutomatedTesting/Levels/Base/Base.prefab b/AutomatedTesting/Levels/Base/Base.prefab index 98495663b7..7765fe488e 100644 --- a/AutomatedTesting/Levels/Base/Base.prefab +++ b/AutomatedTesting/Levels/Base/Base.prefab @@ -1,52 +1,61 @@ { "ContainerEntity": { - "Id": "ContainerEntity", - "Name": "Base", + "Id": "Entity_[1146574390643]", + "Name": "Level", "Components": { - "Component_[10182366347512475253]": { - "$type": "EditorPrefabComponent", - "Id": 10182366347512475253 - }, - "Component_[12917798267488243668]": { - "$type": "EditorPendingCompositionComponent", - "Id": 12917798267488243668 + "Component_[10641544592923449938]": { + "$type": "EditorInspectorComponent", + "Id": 10641544592923449938 }, - "Component_[3261249813163778338]": { + "Component_[12039882709170782873]": { "$type": "EditorOnlyEntityComponent", - "Id": 3261249813163778338 + "Id": 12039882709170782873 }, - "Component_[3837204912784440039]": { - "$type": "EditorDisabledCompositionComponent", - "Id": 3837204912784440039 + "Component_[12265484671603697631]": { + "$type": "EditorPendingCompositionComponent", + "Id": 12265484671603697631 }, - "Component_[4272963378099646759]": { + "Component_[14126657869720434043]": { + "$type": "EditorEntitySortComponent", + "Id": 14126657869720434043, + "ChildEntityOrderEntryArray": [ + { + "EntityId": "" + }, + { + "EntityId": "", + "SortIndex": 1 + } + ] + }, + "Component_[15230859088967841193]": { "$type": "{27F1E1A1-8D9D-4C3B-BD3A-AFB9762449C0} TransformComponent", - "Id": 4272963378099646759, + "Id": 15230859088967841193, "Parent Entity": "" }, - "Component_[4848458548047175816]": { - "$type": "EditorVisibilityComponent", - "Id": 4848458548047175816 + "Component_[16239496886950819870]": { + "$type": "EditorDisabledCompositionComponent", + "Id": 16239496886950819870 }, - "Component_[5787060997243919943]": { - "$type": "EditorInspectorComponent", - "Id": 5787060997243919943 + "Component_[5688118765544765547]": { + "$type": "EditorEntityIconComponent", + "Id": 5688118765544765547 }, - "Component_[7804170251266531779]": { - "$type": "EditorLockComponent", - "Id": 7804170251266531779 + "Component_[6545738857812235305]": { + "$type": "SelectionComponent", + "Id": 6545738857812235305 }, - "Component_[7874177159288365422]": { - "$type": "EditorEntitySortComponent", - "Id": 7874177159288365422 + "Component_[7247035804068349658]": { + "$type": "EditorPrefabComponent", + "Id": 7247035804068349658 }, - "Component_[8018146290632383969]": { - "$type": "EditorEntityIconComponent", - "Id": 8018146290632383969 + "Component_[9307224322037797205]": { + "$type": "EditorLockComponent", + "Id": 9307224322037797205 }, - "Component_[8452360690590857075]": { - "$type": "SelectionComponent", - "Id": 8452360690590857075 + "Component_[9562516168917670048]": { + "$type": "EditorVisibilityComponent", + "Id": 9562516168917670048 } } } diff --git a/AutomatedTesting/Registry/editorpreferences.setreg b/AutomatedTesting/Registry/editorpreferences.setreg index b338d6acad..e76e04f9ba 100644 --- a/AutomatedTesting/Registry/editorpreferences.setreg +++ b/AutomatedTesting/Registry/editorpreferences.setreg @@ -1,7 +1,7 @@ { "Amazon": { "Preferences": { - "EnablePrefabSystem": false + "EnablePrefabSystem": true } } } \ No newline at end of file diff --git a/AutomatedTesting/cmake/CompilerSettings.cmake b/AutomatedTesting/cmake/CompilerSettings.cmake new file mode 100644 index 0000000000..60bda1d45b --- /dev/null +++ b/AutomatedTesting/cmake/CompilerSettings.cmake @@ -0,0 +1,13 @@ +# +# 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 +# +# + +# File to tweak compiler settings before compiler detection happens (before project() is called) +# We dont have PAL enabled at this point, so we can only use pure-CMake variables +if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) +endif() diff --git a/AutomatedTesting/EngineFinder.cmake b/AutomatedTesting/cmake/EngineFinder.cmake similarity index 63% rename from AutomatedTesting/EngineFinder.cmake rename to AutomatedTesting/cmake/EngineFinder.cmake index 0a34a43b77..15b96eb8a9 100644 --- a/AutomatedTesting/EngineFinder.cmake +++ b/AutomatedTesting/cmake/EngineFinder.cmake @@ -1,3 +1,4 @@ +# {BEGIN_LICENSE} # # 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. @@ -5,18 +6,34 @@ # SPDX-License-Identifier: Apache-2.0 OR MIT # # +# {END_LICENSE} # This file is copied during engine registration. Edits to this file will be lost next # time a registration happens. include_guard() # Read the engine name from the project_json file -file(READ ${CMAKE_CURRENT_LIST_DIR}/project.json project_json) -set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_LIST_DIR}/project.json) +file(READ ${CMAKE_CURRENT_SOURCE_DIR}/project.json project_json) +set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/project.json) string(JSON LY_ENGINE_NAME_TO_USE ERROR_VARIABLE json_error GET ${project_json} engine) if(json_error) - message(FATAL_ERROR "Unable to read key 'engine' from 'project.json', error: ${json_error}") + message(FATAL_ERROR "Unable to read key 'engine' from 'project.json'\nError: ${json_error}") +endif() + +if(CMAKE_MODULE_PATH) + foreach(module_path ${CMAKE_MODULE_PATH}) + if(EXISTS ${module_path}/Findo3de.cmake) + file(READ ${module_path}/../engine.json engine_json) + string(JSON engine_name ERROR_VARIABLE json_error GET ${engine_json} engine_name) + if(json_error) + message(FATAL_ERROR "Unable to read key 'engine_name' from 'engine.json'\nError: ${json_error}") + endif() + if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) + return() # Engine being forced through CMAKE_MODULE_PATH + endif() + endif() + endforeach() endif() if(DEFINED ENV{USERPROFILE} AND EXISTS $ENV{USERPROFILE}) @@ -25,6 +42,11 @@ else() set(manifest_path $ENV{HOME}/.o3de/o3de_manifest.json) # Unix endif() +set(registration_error [=[ +Engine registration is required before configuring a project. +Run 'scripts/o3de register --this-engine' from the engine root. +]=]) + # Read the ~/.o3de/o3de_manifest.json file and look through the 'engines_path' object. # Find a key that matches LY_ENGINE_NAME_TO_USE and use that as the engine path. if(EXISTS ${manifest_path}) @@ -33,36 +55,38 @@ if(EXISTS ${manifest_path}) string(JSON engines_path_count ERROR_VARIABLE json_error LENGTH ${manifest_json} engines_path) if(json_error) - message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}', error: ${json_error}") + message(FATAL_ERROR "Unable to read key 'engines_path' from '${manifest_path}'\nError: ${json_error}\n${registration_error}") endif() string(JSON engines_path_type ERROR_VARIABLE json_error TYPE ${manifest_json} engines_path) if(json_error OR NOT ${engines_path_type} STREQUAL "OBJECT") - message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object, error: ${json_error}") + message(FATAL_ERROR "Type of 'engines_path' in '${manifest_path}' is not a JSON Object\nError: ${json_error}") endif() math(EXPR engines_path_count "${engines_path_count}-1") foreach(engine_path_index RANGE ${engines_path_count}) string(JSON engine_name ERROR_VARIABLE json_error MEMBER ${manifest_json} engines_path ${engine_path_index}) if(json_error) - message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}', error: ${json_error}") + message(FATAL_ERROR "Unable to read 'engines_path/${engine_path_index}' from '${manifest_path}'\nError: ${json_error}") endif() if(LY_ENGINE_NAME_TO_USE STREQUAL engine_name) string(JSON engine_path ERROR_VARIABLE json_error GET ${manifest_json} engines_path ${engine_name}) if(json_error) - message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}', error: ${json_error}") + message(FATAL_ERROR "Unable to read value from 'engines_path/${engine_name}'\nError: ${json_error}") endif() if(engine_path) list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake") - break() + return() endif() endif() endforeach() + + message(FATAL_ERROR "The project.json uses engine name '${LY_ENGINE_NAME_TO_USE}' but no engine with that name has been registered.\n${registration_error}") else() # If the user is passing CMAKE_MODULE_PATH we assume thats where we will find the engine if(NOT CMAKE_MODULE_PATH) - message(FATAL_ERROR "Engine registration is required before configuring a project. Please register an engine by running 'scripts/o3de register --this-engine'") + message(FATAL_ERROR "O3DE Manifest file not found.\n${registration_error}") endif() endif() diff --git a/Templates/DefaultProject/Template/cmake/Platform/Linux/CompilerSettings.cmake b/AutomatedTesting/cmake/Platform/Linux/CompilerSettings_linux.cmake similarity index 100% rename from Templates/DefaultProject/Template/cmake/Platform/Linux/CompilerSettings.cmake rename to AutomatedTesting/cmake/Platform/Linux/CompilerSettings_linux.cmake diff --git a/Code/Editor/2DViewport.cpp b/Code/Editor/2DViewport.cpp index ed810aea29..4d0609907f 100644 --- a/Code/Editor/2DViewport.cpp +++ b/Code/Editor/2DViewport.cpp @@ -234,7 +234,7 @@ void Q2DViewport::UpdateContent(int flags) } ////////////////////////////////////////////////////////////////////////// -void Q2DViewport::OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) +void Q2DViewport::OnRButtonDown([[maybe_unused]] Qt::KeyboardModifiers modifiers, const QPoint& point) { if (GetIEditor()->IsInGameMode()) { @@ -246,9 +246,6 @@ void Q2DViewport::OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& p setFocus(); } - // Check Edit Tool. - MouseCallback(eMouseRDown, point, modifiers); - SetCurrentCursor(STD_CURSOR_MOVE, QString()); // Save the mouse down position @@ -273,17 +270,8 @@ void Q2DViewport::OnRButtonUp([[maybe_unused]] Qt::KeyboardModifiers modifiers, } ////////////////////////////////////////////////////////////////////////// -void Q2DViewport::OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) +void Q2DViewport::OnMButtonDown([[maybe_unused]] Qt::KeyboardModifiers modifiers, const QPoint& point) { - //////////////////////////////////////////////////////////////////////// - // User pressed the middle mouse button - //////////////////////////////////////////////////////////////////////// - // Check Edit Tool. - if (MouseCallback(eMouseMDown, point, modifiers)) - { - return; - } - // Save the mouse down position m_RMouseDownPos = point; @@ -300,14 +288,8 @@ void Q2DViewport::OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& p } ////////////////////////////////////////////////////////////////////////// -void Q2DViewport::OnMButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) +void Q2DViewport::OnMButtonUp([[maybe_unused]] Qt::KeyboardModifiers modifiers, [[maybe_unused]] const QPoint& point) { - // Check Edit Tool. - if (MouseCallback(eMouseMUp, point, modifiers)) - { - return; - } - SetViewMode(NothingMode); ReleaseMouse(); @@ -547,13 +529,6 @@ QPoint Q2DViewport::WorldToView(const Vec3& wp) const QPoint p = QPoint(static_cast(sp.x), static_cast(sp.y)); return p; } -////////////////////////////////////////////////////////////////////////// -QPoint Q2DViewport::WorldToViewParticleEditor(const Vec3& wp, [[maybe_unused]] int width, [[maybe_unused]] int height) const //Eric@conffx implement for the children class of IDisplayViewport -{ - Vec3 sp = m_screenTM.TransformPoint(wp); - QPoint p = QPoint(static_cast(sp.x), static_cast(sp.y)); - return p; -} ////////////////////////////////////////////////////////////////////////// Vec3 Q2DViewport::ViewToWorld(const QPoint& vp, [[maybe_unused]] bool* collideWithTerrain, [[maybe_unused]] bool onlyTerrain, [[maybe_unused]] bool bSkipVegetation, [[maybe_unused]] bool bTestRenderMesh, [[maybe_unused]] bool* collideWithObject) const diff --git a/Code/Editor/2DViewport.h b/Code/Editor/2DViewport.h index cee07ca6cd..e89f4aed34 100644 --- a/Code/Editor/2DViewport.h +++ b/Code/Editor/2DViewport.h @@ -50,8 +50,6 @@ public: //! Map world space position to viewport position. QPoint WorldToView(const Vec3& wp) const override; - QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const override; //Eric@conffx - //! Map viewport position to world space position. Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; //! Map viewport position to world space ray from camera. diff --git a/Code/Editor/ActionManager.cpp b/Code/Editor/ActionManager.cpp index ff74a2c208..4cc64a532e 100644 --- a/Code/Editor/ActionManager.cpp +++ b/Code/Editor/ActionManager.cpp @@ -152,15 +152,6 @@ ActionManager::ActionWrapper& ActionManager::ActionWrapper::SetMenu(DynamicMenu* return *this; } -ActionManager::ActionWrapper& ActionManager::ActionWrapper::SetApplyHoverEffect() -{ - // Our standard toolbar icons, when hovered on, get a white color effect. - // But for this to work we need .pngs that look good with this effect, so this only works with the standard toolbars - // and looks very ugly for other toolbars, including toolbars loaded from XML (which just show a white rectangle) - m_action->setProperty("IconHasHoverEffect", true); - return *this; -} - ActionManager::ActionWrapper& ActionManager::ActionWrapper::SetReserved() { m_action->setProperty("Reserved", true); diff --git a/Code/Editor/ActionManager.h b/Code/Editor/ActionManager.h index 8879bdc1fb..58504f860c 100644 --- a/Code/Editor/ActionManager.h +++ b/Code/Editor/ActionManager.h @@ -151,7 +151,6 @@ public: } ActionWrapper& SetMenu(DynamicMenu* menu); - ActionWrapper& SetApplyHoverEffect(); operator QAction*() const { return m_action; diff --git a/Code/Editor/Animation/AnimationBipedBoneNames.cpp b/Code/Editor/Animation/AnimationBipedBoneNames.cpp index d9f1b845ca..72502fe61d 100644 --- a/Code/Editor/Animation/AnimationBipedBoneNames.cpp +++ b/Code/Editor/Animation/AnimationBipedBoneNames.cpp @@ -10,24 +10,21 @@ #include "AnimationBipedBoneNames.h" -namespace EditorAnimationBones +namespace EditorAnimationBones::Biped { - namespace Biped - { - const char* Pelvis = "Bip01 Pelvis"; - const char* Head = "Bip01 Head"; - const char* Weapon = "weapon_bone"; + const char* Pelvis = "Bip01 Pelvis"; + const char* Head = "Bip01 Head"; + const char* Weapon = "weapon_bone"; - const char* LeftEye = "eye_bone_left"; - const char* RightEye = "eye_bone_right"; + const char* LeftEye = "eye_bone_left"; + const char* RightEye = "eye_bone_right"; - const char* Spine[5] = { "Bip01 Spine", "Bip01 Spine1", "Bip01 Spine2", "Bip01 Spine3", "Bip01 Spine4" }; - const char* Neck[2] = { "Bip01 Neck", "Bip01 Neck1" }; + const char* Spine[5] = { "Bip01 Spine", "Bip01 Spine1", "Bip01 Spine2", "Bip01 Spine3", "Bip01 Spine4" }; + const char* Neck[2] = { "Bip01 Neck", "Bip01 Neck1" }; - const char* LeftHeel = "Bip01 L Heel"; - const char* LeftToe[2] = { "Bip01 L Toe0", "Bip01 L Toe1" }; + const char* LeftHeel = "Bip01 L Heel"; + const char* LeftToe[2] = { "Bip01 L Toe0", "Bip01 L Toe1" }; - const char* RightHeel = "Bip01 R Heel"; - const char* RightToe[2] = { "Bip01 R Toe0", "Bip01 R Toe1" }; - } -} + const char* RightHeel = "Bip01 R Heel"; + const char* RightToe[2] = { "Bip01 R Toe0", "Bip01 R Toe1" }; +} // namespace EditorAnimationBones::Biped diff --git a/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp b/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp index b721b8759e..baa287e47f 100644 --- a/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp +++ b/Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp @@ -140,7 +140,7 @@ bool AssetImporterManager::OnBrowseFiles() bool encounteredCrate = false; QStringList invalidFiles; - for (QString path : fileDialog.selectedFiles()) + for (const QString& path : fileDialog.selectedFiles()) { QString fileName = GetFileName(path); QFileInfo info(path); diff --git a/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp b/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp index 1c2be16a3d..6fc10e379a 100644 --- a/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp +++ b/Code/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp @@ -199,41 +199,6 @@ namespace AzAssetBrowserRequestHandlerPrivate } } } - - // Helper utility - determines if the thing being dragged is a FBX from the scene import pipeline - // This is important to differentiate. - // when someone drags a MTL file directly into the viewport, even from a FBX, we want to spawn it as a decal - // but when someone drags a FBX that contains MTL files, we want only to spawn the meshes. - // so we have to specifically differentiate here between the mimeData type that contains the source as the root - // (dragging the fbx file itself) - // and one which contains the actual product at its root. - - bool IsDragOfFBX(const QMimeData* mimeData) - { - AZStd::vector entries; - if (!AssetBrowserEntry::FromMimeData(mimeData, entries)) - { - // if mimedata does not even contain entries, no point in proceeding. - return false; - } - - for (auto entry : entries) - { - if (entry->GetEntryType() != AssetBrowserEntry::AssetEntryType::Source) - { - continue; - } - // this is a source file. Is it the filetype we're looking for? - if (SourceAssetBrowserEntry* source = azrtti_cast(entry)) - { - if (AzFramework::StringFunc::Equal(source->GetExtension().c_str(), ".fbx", false)) - { - return true; - } - } - } - return false; - } } AzAssetBrowserRequestHandler::AzAssetBrowserRequestHandler() diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp index 1151137bfc..c5bf6a4d81 100644 --- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp +++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyCtrl.cpp @@ -671,7 +671,7 @@ AzToolsFramework::PropertyRowWidget* ReflectedPropertyControl::FindPropertyRowWi return nullptr; } const AzToolsFramework::ReflectedPropertyEditor::WidgetList& widgets = m_editor->GetWidgets(); - for (auto instance : widgets) + for (const auto& instance : widgets) { if (instance.second->label() == item->GetPropertyName()) { diff --git a/Code/Editor/CryEdit.cpp b/Code/Editor/CryEdit.cpp index fd38d4f52f..ad04e355f5 100644 --- a/Code/Editor/CryEdit.cpp +++ b/Code/Editor/CryEdit.cpp @@ -370,10 +370,8 @@ void CCryEditApp::RegisterActionHandlers() ON_COMMAND(ID_EDIT_FETCH, OnEditFetch) ON_COMMAND(ID_FILE_EXPORTTOGAMENOSURFACETEXTURE, OnFileExportToGameNoSurfaceTexture) ON_COMMAND(ID_VIEW_SWITCHTOGAME, OnViewSwitchToGame) - MainWindow::instance()->GetActionManager()->RegisterActionHandler(ID_VIEW_SWITCHTOGAME_FULLSCREEN, [this]() { - ed_previewGameInFullscreen_once = true; - OnViewSwitchToGame(); - }); + ON_COMMAND(ID_VIEW_SWITCHTOGAME_VIEWPORT, OnViewSwitchToGame) + ON_COMMAND(ID_VIEW_SWITCHTOGAME_FULLSCREEN, OnViewSwitchToGameFullScreen) ON_COMMAND(ID_MOVE_OBJECT, OnMoveObject) ON_COMMAND(ID_RENAME_OBJ, OnRenameObj) ON_COMMAND(ID_UNDO, OnUndo) @@ -2573,6 +2571,12 @@ void CCryEditApp::OnViewSwitchToGame() GetIEditor()->SetInGameMode(inGame); } +void CCryEditApp::OnViewSwitchToGameFullScreen() +{ + ed_previewGameInFullscreen_once = true; + OnViewSwitchToGame(); +} + ////////////////////////////////////////////////////////////////////////// void CCryEditApp::OnExportSelectedObjects() { @@ -4184,6 +4188,8 @@ extern "C" int AZ_DLL_EXPORT CryEditMain(int argc, char* argv[]) "\nThis could be because of incorrectly configured components, or missing required gems." "\nSee other errors for more details."); + AzToolsFramework::EditorEventsBus::Broadcast(&AzToolsFramework::EditorEvents::NotifyEditorInitialized); + if (didCryEditStart) { app->EnableOnIdle(); diff --git a/Code/Editor/CryEdit.h b/Code/Editor/CryEdit.h index 53ee8f1905..8c514170ae 100644 --- a/Code/Editor/CryEdit.h +++ b/Code/Editor/CryEdit.h @@ -212,6 +212,7 @@ public: void OnEditFetch(); void OnFileExportToGameNoSurfaceTexture(); void OnViewSwitchToGame(); + void OnViewSwitchToGameFullScreen(); void OnViewDeploy(); void DeleteSelectedEntities(bool includeDescendants); void OnMoveObject(); diff --git a/Code/Editor/CryEditDoc.cpp b/Code/Editor/CryEditDoc.cpp index 9acaaad842..9c6c257ac0 100644 --- a/Code/Editor/CryEditDoc.cpp +++ b/Code/Editor/CryEditDoc.cpp @@ -1128,7 +1128,7 @@ bool CCryEditDoc::SaveLevel(const QString& filename) const QString oldLevelPattern = QDir(oldLevelFolder).absoluteFilePath("*.*"); const QString oldLevelName = Path::GetFile(GetLevelPathName()); const QString oldLevelXml = Path::ReplaceExtension(oldLevelName, "xml"); - AZ::IO::ArchiveFileIterator findHandle = pIPak->FindFirst(oldLevelPattern.toUtf8().data(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskAndInZips); + AZ::IO::ArchiveFileIterator findHandle = pIPak->FindFirst(oldLevelPattern.toUtf8().data(), AZ::IO::FileSearchLocation::Any); if (findHandle) { do diff --git a/Code/Editor/Dialogs/PythonScriptsDialog.cpp b/Code/Editor/Dialogs/PythonScriptsDialog.cpp index 35047947ac..06b1acdbc8 100644 --- a/Code/Editor/Dialogs/PythonScriptsDialog.cpp +++ b/Code/Editor/Dialogs/PythonScriptsDialog.cpp @@ -40,10 +40,10 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING namespace { // File name extension for python files - const QString s_kPythonFileNameSpec = "*.py"; + const QString s_kPythonFileNameSpec("*.py"); // Tree root element name - const QString s_kRootElementName = "Python Scripts"; + const QString s_kRootElementName("Python Scripts"); } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/EditorModularViewportCameraComposer.cpp b/Code/Editor/EditorModularViewportCameraComposer.cpp index 72fd37605a..f145adf72f 100644 --- a/Code/Editor/EditorModularViewportCameraComposer.cpp +++ b/Code/Editor/EditorModularViewportCameraComposer.cpp @@ -145,6 +145,15 @@ namespace SandboxEditor } }; + const auto trackingTransform = [viewportId = m_viewportId] + { + bool tracking = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + tracking, viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsTrackingTransform); + + return tracking; + }; + m_firstPersonRotateCamera = AZStd::make_shared(SandboxEditor::CameraFreeLookChannelId()); m_firstPersonRotateCamera->m_rotateSpeedFn = [] @@ -152,6 +161,11 @@ namespace SandboxEditor return SandboxEditor::CameraRotateSpeed(); }; + m_firstPersonRotateCamera->m_constrainPitch = [trackingTransform] + { + return !trackingTransform(); + }; + // default behavior is to hide the cursor but this can be disabled (useful for remote desktop) // note: See CaptureCursorLook in the Settings Registry m_firstPersonRotateCamera->SetActivationBeganFn(hideCursor); @@ -255,6 +269,11 @@ namespace SandboxEditor return SandboxEditor::CameraOrbitYawRotationInverted(); }; + m_orbitRotateCamera->m_constrainPitch = [trackingTransform] + { + return !trackingTransform(); + }; + m_orbitTranslateCamera = AZStd::make_shared( translateCameraInputChannelIds, AzFramework::LookTranslation, AzFramework::TranslateOffsetOrbit); @@ -337,12 +356,12 @@ namespace SandboxEditor AZ::TransformBus::EventResult(worldFromLocal, viewEntityId, &AZ::TransformBus::Events::GetWorldTM); AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, worldFromLocal); + m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, worldFromLocal); } else { AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::ClearReferenceFrame); + m_viewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StopTrackingTransform); } } diff --git a/Code/Editor/EditorViewportWidget.cpp b/Code/Editor/EditorViewportWidget.cpp index 3a2053f328..132729466c 100644 --- a/Code/Editor/EditorViewportWidget.cpp +++ b/Code/Editor/EditorViewportWidget.cpp @@ -298,13 +298,9 @@ AzToolsFramework::ViewportInteraction::MousePick EditorViewportWidget::BuildMous { AzToolsFramework::ViewportInteraction::MousePick mousePick; mousePick.m_screenCoordinates = AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(point); - if (const auto& ray = m_renderViewport->ViewportScreenToWorldRay(mousePick.m_screenCoordinates); - ray.has_value()) - { - mousePick.m_rayOrigin = ray.value().origin; - mousePick.m_rayDirection = ray.value().direction; - } - + const auto[origin, direction] = m_renderViewport->ViewportScreenToWorldRay(mousePick.m_screenCoordinates); + mousePick.m_rayOrigin = origin; + mousePick.m_rayDirection = direction; return mousePick; } @@ -895,23 +891,6 @@ AZ::Vector3 EditorViewportWidget::PickTerrain(const AzFramework::ScreenPoint& po return LYVec3ToAZVec3(ViewToWorld(AzToolsFramework::ViewportInteraction::QPointFromScreenPoint(point), nullptr, true)); } -AZ::EntityId EditorViewportWidget::PickEntity(const AzFramework::ScreenPoint& point) -{ - AZ::EntityId entityId; - HitContext hitInfo; - hitInfo.view = this; - if (HitTest(AzToolsFramework::ViewportInteraction::QPointFromScreenPoint(point), hitInfo)) - { - if (hitInfo.object && (hitInfo.object->GetType() == OBJTYPE_AZENTITY)) - { - auto entityObject = static_cast(hitInfo.object); - entityId = entityObject->GetAssociatedEntityId(); - } - } - - return entityId; -} - float EditorViewportWidget::TerrainHeight(const AZ::Vector2& position) { return GetIEditor()->GetTerrainElevation(position.GetX(), position.GetY()); @@ -1636,16 +1615,15 @@ void EditorViewportWidget::RenderSelectedRegion() Vec3 EditorViewportWidget::WorldToView3D(const Vec3& wp, [[maybe_unused]] int nFlags) const { Vec3 out(0, 0, 0); - float x, y, z; + float x, y; - ProjectToScreen(wp.x, wp.y, wp.z, &x, &y, &z); - if (_finite(x) && _finite(y) && _finite(z)) + ProjectToScreen(wp.x, wp.y, wp.z, &x, &y); + if (_finite(x) && _finite(y)) { out.x = (x / 100) * m_rcClient.width(); out.y = (y / 100) * m_rcClient.height(); out.x /= static_cast(QHighDpiScaling::factor(windowHandle()->screen())); out.y /= static_cast(QHighDpiScaling::factor(windowHandle()->screen())); - out.z = z; } return out; } @@ -1655,24 +1633,6 @@ QPoint EditorViewportWidget::WorldToView(const Vec3& wp) const { return AzToolsFramework::ViewportInteraction::QPointFromScreenPoint(m_renderViewport->ViewportWorldToScreen(LYVec3ToAZVec3(wp))); } -////////////////////////////////////////////////////////////////////////// -QPoint EditorViewportWidget::WorldToViewParticleEditor(const Vec3& wp, int width, int height) const -{ - QPoint p; - float x, y, z; - - ProjectToScreen(wp.x, wp.y, wp.z, &x, &y, &z); - if (_finite(x) || _finite(y)) - { - p.rx() = static_cast((x / 100) * width); - p.ry() = static_cast((y / 100) * height); - } - else - { - QPoint(0, 0); - } - return p; -} ////////////////////////////////////////////////////////////////////////// Vec3 EditorViewportWidget::ViewToWorld( @@ -1688,20 +1648,16 @@ Vec3 EditorViewportWidget::ViewToWorld( AZ_UNUSED(collideWithObject); auto ray = m_renderViewport->ViewportScreenToWorldRay(AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(vp)); - if (!ray.has_value()) - { - return Vec3(0, 0, 0); - } const float maxDistance = 10000.f; - Vec3 v = AZVec3ToLYVec3(ray.value().direction) * maxDistance; + Vec3 v = AZVec3ToLYVec3(ray.direction) * maxDistance; if (!_finite(v.x) || !_finite(v.y) || !_finite(v.z)) { return Vec3(0, 0, 0); } - Vec3 colp = AZVec3ToLYVec3(ray.value().origin) + 0.002f * v; + Vec3 colp = AZVec3ToLYVec3(ray.origin) + 0.002f * v; return colp; } @@ -1740,21 +1696,19 @@ bool EditorViewportWidget::RayRenderMeshIntersection(IRenderMesh* pRenderMesh, c return bRes;*/ } -void EditorViewportWidget::UnProjectFromScreen(float sx, float sy, float sz, float* px, float* py, float* pz) const +void EditorViewportWidget::UnProjectFromScreen(float sx, float sy, float* px, float* py, float* pz) const { - AZ::Vector3 wp; - wp = m_renderViewport->ViewportScreenToWorld(AzFramework::ScreenPoint{(int)sx, m_rcClient.bottom() - ((int)sy)}, sz).value_or(wp); + const AZ::Vector3 wp = m_renderViewport->ViewportScreenToWorld(AzFramework::ScreenPoint{(int)sx, m_rcClient.bottom() - ((int)sy)}); *px = wp.GetX(); *py = wp.GetY(); *pz = wp.GetZ(); } -void EditorViewportWidget::ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy, float* sz) const +void EditorViewportWidget::ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy) const { AzFramework::ScreenPoint screenPosition = m_renderViewport->ViewportWorldToScreen(AZ::Vector3{ptx, pty, ptz}); *sx = static_cast(screenPosition.m_x); *sy = static_cast(screenPosition.m_y); - *sz = 0.f; } ////////////////////////////////////////////////////////////////////////// @@ -1764,32 +1718,22 @@ void EditorViewportWidget::ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& Vec3 pos0, pos1; float wx, wy, wz; - UnProjectFromScreen(static_cast(vp.x()), static_cast(rc.bottom() - vp.y()), 0.0f, &wx, &wy, &wz); - if (!_finite(wx) || !_finite(wy) || !_finite(wz)) - { - return; - } - if (fabs(wx) > 1000000 || fabs(wy) > 1000000 || fabs(wz) > 1000000) - { - return; - } - pos0(wx, wy, wz); - UnProjectFromScreen(static_cast(vp.x()), static_cast(rc.bottom() - vp.y()), 1.0f, &wx, &wy, &wz); + UnProjectFromScreen(static_cast(vp.x()), static_cast(rc.bottom() - vp.y()), &wx, &wy, &wz); + if (!_finite(wx) || !_finite(wy) || !_finite(wz)) { return; } + if (fabs(wx) > 1000000 || fabs(wy) > 1000000 || fabs(wz) > 1000000) { return; } - pos1(wx, wy, wz); - Vec3 v = (pos1 - pos0); - v = v.GetNormalized(); + pos0(wx, wy, wz); raySrc = pos0; - rayDir = v; + rayDir = (pos0 - AZVec3ToLYVec3(m_renderViewport->GetCameraState().m_position)).GetNormalized(); } ////////////////////////////////////////////////////////////////////////// @@ -2338,10 +2282,10 @@ void* EditorViewportWidget::GetSystemCursorConstraintWindow() const return systemCursorConstrained ? renderOverlayHWND() : nullptr; } -void EditorViewportWidget::BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) +void EditorViewportWidget::BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, const AzFramework::ViewportId viewportId, const QPoint& point) { - const auto scaledPoint = WidgetToViewport(pt); - QtViewport::BuildDragDropContext(context, scaledPoint); + QtViewport::BuildDragDropContext(context, viewportId, point); } void EditorViewportWidget::RestoreViewportAfterGameMode() diff --git a/Code/Editor/EditorViewportWidget.h b/Code/Editor/EditorViewportWidget.h index b63eb66de2..0101f2ffef 100644 --- a/Code/Editor/EditorViewportWidget.h +++ b/Code/Editor/EditorViewportWidget.h @@ -165,7 +165,6 @@ private: Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, const QPoint& point) override; void SetViewportId(int id) override; QPoint WorldToView(const Vec3& wp) const override; - QPoint WorldToViewParticleEditor(const Vec3& wp, int width, int height) const override; Vec3 WorldToView3D(const Vec3& wp, int nFlags = 0) const override; Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const override; void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const override; @@ -206,7 +205,6 @@ private: void* GetSystemCursorConstraintWindow() const override; // AzToolsFramework::MainEditorViewportInteractionRequestBus overrides ... - AZ::EntityId PickEntity(const AzFramework::ScreenPoint& point) override; AZ::Vector3 PickTerrain(const AzFramework::ScreenPoint& point) override; float TerrainHeight(const AZ::Vector2& position) override; bool ShowingWorldSpace() override; @@ -273,7 +271,8 @@ private: bool CheckRespondToInput() const; - void BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) override; + void BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, AzFramework::ViewportId viewportId, const QPoint& point) override; void SetAsActiveViewport(); void PushDisableRendering(); @@ -304,8 +303,8 @@ private: const DisplayContext& GetDisplayContext() const { return m_displayContext; } CBaseObject* GetCameraObject() const; - void UnProjectFromScreen(float sx, float sy, float sz, float* px, float* py, float* pz) const; - void ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy, float* sz) const; + void UnProjectFromScreen(float sx, float sy, float* px, float* py, float* pz) const; + void ProjectToScreen(float ptx, float pty, float ptz, float* sx, float* sy) const; AZ::RPI::ViewPtr GetCurrentAtomView() const; diff --git a/Code/Editor/Include/IDisplayViewport.h b/Code/Editor/Include/IDisplayViewport.h index df17c9cb13..132c62804c 100644 --- a/Code/Editor/Include/IDisplayViewport.h +++ b/Code/Editor/Include/IDisplayViewport.h @@ -45,7 +45,6 @@ struct IDisplayViewport virtual const Matrix34& GetViewTM() const = 0; virtual const Matrix34& GetScreenTM() const = 0; virtual QPoint WorldToView(const Vec3& worldPoint) const = 0; - virtual QPoint WorldToViewParticleEditor(const Vec3& worldPoint, int width, int height) const = 0; virtual Vec3 WorldToView3D(const Vec3& worldPoint, int flags = 0) const = 0; virtual Vec3 ViewToWorld(const QPoint& vp, bool* collideWithTerrain = nullptr, bool onlyTerrain = false, bool bSkipVegetation = false, bool bTestRenderMesh = false, bool* collideWithObject = nullptr) const = 0; virtual void ViewToWorldRay(const QPoint& vp, Vec3& raySrc, Vec3& rayDir) const = 0; diff --git a/Code/Editor/Include/IEditorMaterialManager.h b/Code/Editor/Include/IEditorMaterialManager.h index d76ec32829..6f71c5ddd1 100644 --- a/Code/Editor/Include/IEditorMaterialManager.h +++ b/Code/Editor/Include/IEditorMaterialManager.h @@ -9,10 +9,6 @@ #define CRYINCLUDE_EDITOR_MATERIAL_IEDITORMATERIALMANAGER_H #pragma once -#define MATERIAL_FILE_EXT ".mtl" -#define DCC_MATERIAL_FILE_EXT ".dccmtl" -#define MATERIALS_PATH "materials/" - #include #include diff --git a/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp b/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp index 637b9c44c5..dd7698a82e 100644 --- a/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp +++ b/Code/Editor/Lib/Tests/Camera/test_EditorCamera.cpp @@ -27,7 +27,9 @@ namespace UnitTest AZ::Entity* m_entity = nullptr; AZ::ComponentDescriptor* m_transformComponent = nullptr; - static const AzFramework::ViewportId TestViewportId; + static inline constexpr AzFramework::ViewportId TestViewportId = 2345; + static inline constexpr float HalfInterpolateToTransformDuration = + AtomToolsFramework::ModularViewportCameraControllerRequests::InterpolateToTransformDuration * 0.5f; void SetUp() override { @@ -76,8 +78,6 @@ namespace UnitTest } }; - const AzFramework::ViewportId EditorCameraFixture::TestViewportId = AzFramework::ViewportId(1337); - TEST_F(EditorCameraFixture, ModularViewportCameraControllerReferenceFrameUpdatedWhenViewportEntityisChanged) { // Given @@ -91,8 +91,8 @@ namespace UnitTest &Camera::EditorCameraNotificationBus::Events::OnViewportViewEntityChanged, m_entity->GetId()); // ensure the viewport updates after the viewport view entity change - const float deltaTime = 1.0f / 60.0f; - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(deltaTime), AZ::ScriptTimePoint() }); + // note: do a large step to ensure smoothing finishes (e.g. not 1.0f/60.0f) + m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(2.0f), AZ::ScriptTimePoint() }); // retrieve updated camera transform const AZ::Transform cameraTransform = m_cameraViewportContextView->GetCameraTransform(); @@ -102,61 +102,40 @@ namespace UnitTest EXPECT_THAT(cameraTransform, IsClose(entityTransform)); } - TEST_F(EditorCameraFixture, ReferenceFrameRemainsIdentityAfterExternalCameraTransformChangeWhenNotSet) - { - // Given - m_cameraViewportContextView->SetCameraTransform(AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 20.0f, 30.0f))); - - // When - AZ::Transform referenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); - AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - referenceFrame, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); - - // Then - // reference frame is still the identity - EXPECT_THAT(referenceFrame, IsClose(AZ::Transform::CreateIdentity())); - } - - TEST_F(EditorCameraFixture, ExternalCameraTransformChangeWhenReferenceFrameIsSetUpdatesReferenceFrame) + TEST_F(EditorCameraFixture, TrackingTransformIsTrueAfterTransformIsTracked) { - // Given + // Given/When const AZ::Transform referenceFrame = AZ::Transform::CreateFromQuaternionAndTranslation( AZ::Quaternion::CreateRotationX(AZ::DegToRad(90.0f)), AZ::Vector3(1.0f, 2.0f, 3.0f)); AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, referenceFrame); - - const AZ::Transform nextTransform = AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 20.0f, 30.0f)); - m_cameraViewportContextView->SetCameraTransform(nextTransform); + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, referenceFrame); - // When - AZ::Transform currentReferenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); + bool trackingTransform = false; AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - currentReferenceFrame, TestViewportId, - &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); + trackingTransform, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsTrackingTransform); // Then - EXPECT_THAT(currentReferenceFrame, IsClose(nextTransform)); + EXPECT_THAT(trackingTransform, ::testing::IsTrue()); } - TEST_F(EditorCameraFixture, ReferenceFrameReturnedToIdentityAfterClear) + TEST_F(EditorCameraFixture, TrackingTransformIsFalseAfterTransformIsStoppedBeingTracked) { // Given const AZ::Transform referenceFrame = AZ::Transform::CreateFromQuaternionAndTranslation( AZ::Quaternion::CreateRotationX(AZ::DegToRad(90.0f)), AZ::Vector3(1.0f, 2.0f, 3.0f)); AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, referenceFrame); + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, referenceFrame); // When AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::ClearReferenceFrame); + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StopTrackingTransform); - AZ::Transform currentReferenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); + // Then + bool trackingTransform = false; AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - currentReferenceFrame, TestViewportId, - &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); + trackingTransform, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsTrackingTransform); - // Then - EXPECT_THAT(currentReferenceFrame, IsClose(AZ::Transform::CreateIdentity())); + EXPECT_THAT(trackingTransform, ::testing::IsFalse()); } TEST_F(EditorCameraFixture, InterpolateToTransform) @@ -169,8 +148,10 @@ namespace UnitTest transformToInterpolateTo); // simulate interpolation - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); const auto finalTransform = m_cameraViewportContextView->GetCameraTransform(); @@ -184,7 +165,7 @@ namespace UnitTest const AZ::Transform referenceFrame = AZ::Transform::CreateFromQuaternionAndTranslation( AZ::Quaternion::CreateRotationX(AZ::DegToRad(90.0f)), AZ::Vector3(1.0f, 2.0f, 3.0f)); AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event( - TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::SetReferenceFrame, referenceFrame); + TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::StartTrackingTransform, referenceFrame); AZ::Transform transformToInterpolateTo = AZ::Transform::CreateFromQuaternionAndTranslation( AZ::Quaternion::CreateRotationZ(AZ::DegToRad(90.0f)), AZ::Vector3(20.0f, 40.0f, 60.0f)); @@ -195,18 +176,85 @@ namespace UnitTest transformToInterpolateTo); // simulate interpolation - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); - m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(0.5f), AZ::ScriptTimePoint() }); - - AZ::Transform currentReferenceFrame = AZ::Transform::CreateTranslation(AZ::Vector3(1.0f, 2.0f, 3.0f)); - AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( - currentReferenceFrame, TestViewportId, - &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::GetReferenceFrame); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); const auto finalTransform = m_cameraViewportContextView->GetCameraTransform(); // Then EXPECT_THAT(finalTransform, IsClose(transformToInterpolateTo)); - EXPECT_THAT(currentReferenceFrame, IsClose(AZ::Transform::CreateIdentity())); + } + + TEST_F(EditorCameraFixture, BeginningCameraInterpolationReturnsTrue) + { + // Given/When + bool interpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + interpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + // Then + EXPECT_THAT(interpolationBegan, ::testing::IsTrue()); + } + + TEST_F(EditorCameraFixture, CameraInterpolationDoesNotBeginDuringAnExistingInterpolation) + { + // Given/When + bool initialInterpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + initialInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + m_controllerList->UpdateViewport( + { TestViewportId, AzFramework::FloatSeconds(HalfInterpolateToTransformDuration), AZ::ScriptTimePoint() }); + + bool nextInterpolationBegan = true; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + nextInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + bool interpolating = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + interpolating, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsInterpolating); + + // Then + EXPECT_THAT(initialInterpolationBegan, ::testing::IsTrue()); + EXPECT_THAT(nextInterpolationBegan, ::testing::IsFalse()); + EXPECT_THAT(interpolating, ::testing::IsTrue()); + } + + TEST_F(EditorCameraFixture, CameraInterpolationCanBeginAfterAnInterpolationCompletes) + { + // Given/When + bool initialInterpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + initialInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + m_controllerList->UpdateViewport( + { TestViewportId, + AzFramework::FloatSeconds(AtomToolsFramework::ModularViewportCameraControllerRequests::InterpolateToTransformDuration + 0.5f), + AZ::ScriptTimePoint() }); + + bool interpolating = true; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + interpolating, TestViewportId, &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::IsInterpolating); + + bool nextInterpolationBegan = false; + AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult( + nextInterpolationBegan, TestViewportId, + &AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, + AZ::Transform::CreateTranslation(AZ::Vector3(10.0f, 10.0f, 10.0f))); + + // Then + EXPECT_THAT(initialInterpolationBegan, ::testing::IsTrue()); + EXPECT_THAT(interpolating, ::testing::IsFalse()); + EXPECT_THAT(nextInterpolationBegan, ::testing::IsTrue()); } } // namespace UnitTest diff --git a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp index 275df11784..656440f16e 100644 --- a/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp +++ b/Code/Editor/Lib/Tests/test_ModularViewportCameraController.cpp @@ -74,7 +74,7 @@ namespace UnitTest class ModularViewportCameraControllerFixture : public AllocatorsTestFixture { public: - static const AzFramework::ViewportId TestViewportId; + static inline constexpr AzFramework::ViewportId TestViewportId = 1234; void SetUp() override { @@ -146,6 +146,17 @@ namespace UnitTest controller->SetCameraPropsBuilderCallback( [](AzFramework::CameraProps& cameraProps) { + // note: rotateSmoothness is also used for roll (not related to camera input directly) + cameraProps.m_rotateSmoothnessFn = [] + { + return 5.0f; + }; + + cameraProps.m_translateSmoothnessFn = [] + { + return 5.0f; + }; + cameraProps.m_rotateSmoothingEnabledFn = [] { return false; @@ -209,8 +220,6 @@ namespace UnitTest AZStd::unique_ptr m_editorModularViewportCameraComposer; }; - const AzFramework::ViewportId ModularViewportCameraControllerFixture::TestViewportId = AzFramework::ViewportId(0); - TEST_F(ModularViewportCameraControllerFixture, MouseMovementDoesNotAccumulateExcessiveDriftInModularViewportCameraWithVaryingDeltaTime) { SandboxEditor::SetCameraCaptureCursorForLook(false); @@ -380,6 +389,7 @@ namespace UnitTest m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(deltaTime), AZ::ScriptTimePoint() }); QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::RightButton, Qt::NoModifier, start + mouseDelta); + m_controllerList->UpdateViewport({ TestViewportId, AzFramework::FloatSeconds(deltaTime), AZ::ScriptTimePoint() }); // update the position of the widget const auto offset = QPoint(500, 500); diff --git a/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp b/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp index 63e59ea940..81dcae9129 100644 --- a/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp +++ b/Code/Editor/Lib/Tests/test_ViewportManipulatorController.cpp @@ -12,6 +12,7 @@ #include #include #include +#include namespace UnitTest { @@ -77,14 +78,15 @@ namespace UnitTest class ViewportManipulatorControllerFixture : public AllocatorsTestFixture { public: - static const AzFramework::ViewportId TestViewportId; + static inline constexpr AzFramework::ViewportId TestViewportId = 1234; + static inline const QSize WidgetSize = QSize(1920, 1080); void SetUp() override { AllocatorsTestFixture::SetUp(); m_rootWidget = AZStd::make_unique(); - m_rootWidget->setFixedSize(QSize(100, 100)); + m_rootWidget->setFixedSize(WidgetSize); QApplication::setActiveWindow(m_rootWidget.get()); m_controllerList = AZStd::make_shared(); @@ -111,8 +113,6 @@ namespace UnitTest AZStd::unique_ptr m_inputChannelMapper; }; - const AzFramework::ViewportId ViewportManipulatorControllerFixture::TestViewportId = AzFramework::ViewportId(0); - TEST_F(ViewportManipulatorControllerFixture, AnEventIsNotPropagatedToTheViewportWhenAManipulatorHandlesItFirst) { // forward input events to our controller list @@ -227,4 +227,74 @@ namespace UnitTest // the key was released (cleared) EXPECT_TRUE(endedEvent); } + + TEST_F(ViewportManipulatorControllerFixture, DoubleClickIsNotRegisteredIfMouseDeltaHasMovedMoreThanDeadzoneInClickInterval) + { + AzFramework::NativeWindowHandle nativeWindowHandle = nullptr; + + // forward input events to our controller list + QObject::connect( + m_inputChannelMapper.get(), &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, m_rootWidget.get(), + [this, nativeWindowHandle](const AzFramework::InputChannel* inputChannel, [[maybe_unused]] QEvent* event) + { + m_controllerList->HandleInputChannelEvent( + AzFramework::ViewportControllerInputEvent{ TestViewportId, nativeWindowHandle, *inputChannel }); + }); + + ::testing::NiceMock mockWindowRequests; + mockWindowRequests.Connect(nativeWindowHandle); + + using ::testing::Return; + // note: WindowRequests is used internally by ViewportManipulatorController + ON_CALL(mockWindowRequests, GetClientAreaSize()) + .WillByDefault(Return(AzFramework::WindowSize(WidgetSize.width(), WidgetSize.height()))); + + EditorInteractionViewportSelectionFake editorInteractionViewportFake; + editorInteractionViewportFake.m_internalHandleMouseManipulatorInteraction = [](const MouseInteractionEvent&) + { + // report the event was not handled (manipulator was not interacted with) + return false; + }; + + bool doubleClickDetected = false; + editorInteractionViewportFake.m_internalHandleMouseViewportInteraction = + [&doubleClickDetected](const MouseInteractionEvent& mouseInteractionEvent) + { + // ensure no double click event is detected with the given inputs below + if (mouseInteractionEvent.m_mouseEvent == AzToolsFramework::ViewportInteraction::MouseEvent::DoubleClick) + { + doubleClickDetected = true; + } + + return true; + }; + + editorInteractionViewportFake.Connect(); + + m_controllerList->Add(AZStd::make_shared()); + + // simulate a click, move, click + MouseMove(m_rootWidget.get(), QPoint(0, 0), QPoint(10, 10)); + MousePressAndMove(m_rootWidget.get(), QPoint(10, 10), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(10, 10)); + MouseMove(m_rootWidget.get(), QPoint(10, 10), QPoint(20, 20)); + MousePressAndMove(m_rootWidget.get(), QPoint(20, 20), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(20, 20)); + + // ensure no double click was detected + EXPECT_FALSE(doubleClickDetected); + + // simulate double click (sanity check it still is detected correctly with no movement) + MouseMove(m_rootWidget.get(), QPoint(0, 0), QPoint(10, 10)); + MousePressAndMove(m_rootWidget.get(), QPoint(10, 10), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(10, 10)); + MousePressAndMove(m_rootWidget.get(), QPoint(10, 10), QPoint(0, 0), Qt::MouseButton::LeftButton); + QTest::mouseRelease(m_rootWidget.get(), Qt::MouseButton::LeftButton, Qt::KeyboardModifier::NoModifier, QPoint(10, 10)); + + // ensure a double click was detected + EXPECT_TRUE(doubleClickDetected); + + mockWindowRequests.Disconnect(); + editorInteractionViewportFake.Disconnect(); + } } // namespace UnitTest diff --git a/Code/Editor/MainWindow.cpp b/Code/Editor/MainWindow.cpp index 528b4eba6b..f6744ec2d2 100644 --- a/Code/Editor/MainWindow.cpp +++ b/Code/Editor/MainWindow.cpp @@ -519,7 +519,7 @@ MainWindow* MainWindow::instance() void MainWindow::closeEvent(QCloseEvent* event) { - gSettings.Save(); + gSettings.Save(true); AzFramework::SystemCursorState currentCursorState; bool isInGameMode = false; @@ -708,14 +708,10 @@ void MainWindow::InitActions() .SetShortcut(QKeySequence::Undo) .SetReserved() .SetStatusTip(tr("Undo last operation")) - //.SetMenu(new QMenu("FIXME")) - .SetApplyHoverEffect() .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateUndo); am->AddAction(ID_REDO, tr("&Redo")) .SetShortcut(AzQtComponents::RedoKeySequence) .SetReserved() - //.SetMenu(new QMenu("FIXME")) - .SetApplyHoverEffect() .SetStatusTip(tr("Redo last undo operation")) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdateRedo); @@ -731,7 +727,6 @@ void MainWindow::InitActions() // Modify actions am->AddAction(AzToolsFramework::EditModeMove, tr("Move")) .SetIcon(Style::icon("Move")) - .SetApplyHoverEffect() .SetShortcut(tr("1")) .SetToolTip(tr("Move (1)")) .SetCheckable(true) @@ -757,7 +752,6 @@ void MainWindow::InitActions() }); am->AddAction(AzToolsFramework::EditModeRotate, tr("Rotate")) .SetIcon(Style::icon("Translate")) - .SetApplyHoverEffect() .SetShortcut(tr("2")) .SetToolTip(tr("Rotate (2)")) .SetCheckable(true) @@ -783,7 +777,6 @@ void MainWindow::InitActions() }); am->AddAction(AzToolsFramework::EditModeScale, tr("Scale")) .SetIcon(Style::icon("Scale")) - .SetApplyHoverEffect() .SetShortcut(tr("3")) .SetToolTip(tr("Scale (3)")) .SetCheckable(true) @@ -808,7 +801,6 @@ void MainWindow::InitActions() am->AddAction(AzToolsFramework::SnapToGrid, tr("Snap to grid")) .SetIcon(Style::icon("Grid")) - .SetApplyHoverEffect() .SetShortcut(tr("G")) .SetToolTip(tr("Snap to grid (G)")) .SetStatusTip(tr("Toggles snap to grid")) @@ -821,7 +813,6 @@ void MainWindow::InitActions() am->AddAction(AzToolsFramework::SnapAngle, tr("Snap angle")) .SetIcon(Style::icon("Angle")) - .SetApplyHoverEffect() .SetStatusTip(tr("Snap angle")) .SetCheckable(true) .RegisterUpdateCallback([](QAction* action) { @@ -939,29 +930,28 @@ void MainWindow::InitActions() .Connect(&QAction::triggered, this, &MainWindow::OnRefreshAudioSystem); // Game actions - am->AddAction(ID_VIEW_SWITCHTOGAME, tr("Play &Game")) + am->AddAction(ID_VIEW_SWITCHTOGAME, tr("Play Game")) .SetIcon(QIcon(":/stylesheet/img/UI20/toolbar/Play.svg")) + .SetToolTip(tr("Play Game")) + .SetStatusTip(tr("Activate the game input mode")) + .SetCheckable(true) + .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame); + am->AddAction(ID_VIEW_SWITCHTOGAME_VIEWPORT, tr("Play Game")) .SetShortcut(tr("Ctrl+G")) .SetToolTip(tr("Play Game (Ctrl+G)")) .SetStatusTip(tr("Activate the game input mode")) - .SetApplyHoverEffect() - .SetCheckable(true) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame); - am->AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, tr("Play &Game (Maximized)")) + am->AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, tr("Play Game (Maximized)")) .SetShortcut(tr("Ctrl+Shift+G")) .SetStatusTip(tr("Activate the game input mode (maximized)")) - .SetIcon(Style::icon("Play")) - .SetApplyHoverEffect() - .SetCheckable(true); + .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnUpdatePlayGame); am->AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, tr("Play Controls")) .SetText(tr("Play Controls")); am->AddAction(ID_SWITCH_PHYSICS, tr("Simulate")) .SetIcon(QIcon(":/stylesheet/img/UI20/toolbar/Simulate_Physics.svg")) .SetShortcut(tr("Ctrl+P")) .SetToolTip(tr("Simulate (Ctrl+P)")) - .SetCheckable(true) .SetStatusTip(tr("Enable processing of Physics and AI.")) - .SetApplyHoverEffect() .SetCheckable(true) .RegisterUpdateCallback(cryEdit, &CCryEditApp::OnSwitchPhysicsUpdate); am->AddAction(ID_GAME_SYNCPLAYER, tr("Move Player and Camera Separately")).SetCheckable(true) @@ -1051,8 +1041,7 @@ void MainWindow::InitActions() // Editors Toolbar actions am->AddAction(ID_OPEN_ASSET_BROWSER, tr("Asset browser")) - .SetToolTip(tr("Open Asset Browser")) - .SetApplyHoverEffect(); + .SetToolTip(tr("Open Asset Browser")); AZ::EBusReduceResult> emfxEnabled(false); using AnimationRequestBus = AzToolsFramework::EditorAnimationSystemRequestsBus; @@ -1062,8 +1051,7 @@ void MainWindow::InitActions() { QAction* action = am->AddAction(ID_OPEN_EMOTIONFX_EDITOR, tr("Animation Editor")) .SetToolTip(tr("Open Animation Editor")) - .SetIcon(QIcon(":/EMotionFX/EMFX_icon_32x32.png")) - .SetApplyHoverEffect(); + .SetIcon(QIcon(":/EMotionFX/EMFX_icon_32x32.png")); QObject::connect(action, &QAction::triggered, this, []() { QtViewPaneManager::instance()->OpenPane(LyViewPane::AnimationEditor); }); @@ -1071,12 +1059,10 @@ void MainWindow::InitActions() am->AddAction(ID_OPEN_AUDIO_CONTROLS_BROWSER, tr("Audio Controls Editor")) .SetToolTip(tr("Open Audio Controls Editor")) - .SetIcon(Style::icon("Audio")) - .SetApplyHoverEffect(); + .SetIcon(Style::icon("Audio")); am->AddAction(ID_OPEN_UICANVASEDITOR, tr(LyViewPane::UiEditor)) - .SetToolTip(tr("Open UI Editor")) - .SetApplyHoverEffect(); + .SetToolTip(tr("Open UI Editor")); // Edit Mode Toolbar Actions am->AddAction(IDC_SELECTION_MASK, tr("Selected Object Types")); @@ -1089,12 +1075,10 @@ void MainWindow::InitActions() // Object Toolbar Actions am->AddAction(ID_GOTO_SELECTED, tr("Go to selected object")) .SetIcon(Style::icon("select_object")) - .SetApplyHoverEffect() .Connect(&QAction::triggered, this, &MainWindow::OnGotoSelected); // Misc Toolbar Actions - am->AddAction(ID_OPEN_SUBSTANCE_EDITOR, tr("Open Substance Editor")) - .SetApplyHoverEffect(); + am->AddAction(ID_OPEN_SUBSTANCE_EDITOR, tr("Open Substance Editor")); } void MainWindow::InitToolActionHandlers() @@ -1266,7 +1250,9 @@ void MainWindow::OnGameModeChanged(bool inGameMode) // block signals on the switch to game actions before setting the checked state, as // setting the checked state triggers the action, which will re-enter this function // and result in an infinite loop - AZStd::vector actions = { m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME), m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN) }; + AZStd::vector actions = { m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_VIEWPORT), + m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN), + m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME)}; for (auto action : actions) { action->blockSignals(true); diff --git a/Code/Editor/Objects/BaseObject.cpp b/Code/Editor/Objects/BaseObject.cpp index e5f121694a..b721dba56b 100644 --- a/Code/Editor/Objects/BaseObject.cpp +++ b/Code/Editor/Objects/BaseObject.cpp @@ -1649,7 +1649,7 @@ QString CBaseObject::GetTypeName() const } QString name; - name.append(className.mid(0, className.length() - subClassName.length())); + name.append(className.midRef(0, className.length() - subClassName.length())); return name; } diff --git a/Code/Editor/Objects/EntityObject.cpp b/Code/Editor/Objects/EntityObject.cpp index b2dfc04102..ae847da160 100644 --- a/Code/Editor/Objects/EntityObject.cpp +++ b/Code/Editor/Objects/EntityObject.cpp @@ -592,11 +592,11 @@ void CEntityObject::AdjustLightProperties(CVarBlockPtr& properties, const char* if (IVariable* pCastShadowVarLegacy = FindVariableInSubBlock(properties, pSubBlockVar, "bCastShadow")) { pCastShadowVarLegacy->SetFlags(pCastShadowVarLegacy->GetFlags() | IVariable::UI_INVISIBLE); - - if (pCastShadowVarLegacy->GetDisplayValue()[0] != '0') + const QString zeroPrefix("0"); + if (!pCastShadowVarLegacy->GetDisplayValue().startsWith(zeroPrefix)) { bCastShadowLegacy = true; - pCastShadowVarLegacy->SetDisplayValue("0"); + pCastShadowVarLegacy->SetDisplayValue(zeroPrefix); } } diff --git a/Code/Editor/Objects/ObjectManager.cpp b/Code/Editor/Objects/ObjectManager.cpp index ae627f4b9d..df3371a31c 100644 --- a/Code/Editor/Objects/ObjectManager.cpp +++ b/Code/Editor/Objects/ObjectManager.cpp @@ -828,7 +828,7 @@ void CObjectManager::ShowLastHiddenObject() { uint64 mostRecentID = CBaseObject::s_invalidHiddenID; CBaseObject* mostRecentObject = nullptr; - for (auto it : m_objects) + for (const auto& it : m_objects) { CBaseObject* obj = it.second; diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp index 82d9f9ede2..64bd943d63 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include @@ -57,6 +56,7 @@ #include #include #include +#include #include #include @@ -1394,13 +1394,13 @@ void SandboxIntegrationManager::ContextMenu_NewEntity() { AZ::Vector3 worldPosition = AZ::Vector3::CreateZero(); - CViewport* view = GetIEditor()->GetViewManager()->GetGameViewport(); // If we don't have a viewport active to aid in placement, the object // will be created at the origin. - if (view) + if (CViewport* view = GetIEditor()->GetViewManager()->GetGameViewport()) { - const QPoint viewPoint(static_cast(m_contextMenuViewPoint.GetX()), static_cast(m_contextMenuViewPoint.GetY())); - worldPosition = view->GetHitLocation(viewPoint); + worldPosition = AzToolsFramework::FindClosestPickIntersection( + view->GetViewportId(), AzFramework::ScreenPointFromVector2(m_contextMenuViewPoint), AzToolsFramework::EditorPickRayLength, + GetDefaultEntityPlacementDistance()); } CreateNewEntityAtPosition(worldPosition); @@ -1675,6 +1675,12 @@ void SandboxIntegrationManager::GoToEntitiesInViewports(const AzToolsFramework:: if (auto viewportContext = viewportContextManager->GetViewportContextById(viewIndex)) { const AZ::Transform cameraTransform = viewportContext->GetCameraTransform(); + // do not attempt to interpolate to where we currently are + if (cameraTransform.GetTranslation().IsClose(center)) + { + continue; + } + const AZ::Vector3 forward = (center - cameraTransform.GetTranslation()).GetNormalized(); // move camera 25% further back than required diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp index df8d6db4a8..60fda239dc 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/AssetCatalogModel.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include @@ -136,14 +135,6 @@ AssetCatalogModel::AssetCatalogModel(QObject* parent) } } - // Special cases for SimpleAssets. If these get full-fledged AssetData types, these cases can be removed. - QString textureExtensions = LmbrCentral::TextureAsset::GetFileFilter(); - m_extensionToAssetType.insert(AZStd::make_pair(textureExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector { AZ::AzTypeInfo::Uuid() })); - QString materialExtensions = LmbrCentral::MaterialAsset::GetFileFilter(); - m_extensionToAssetType.insert(AZStd::make_pair(materialExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector { AZ::AzTypeInfo::Uuid() })); - QString dccMaterialExtensions = LmbrCentral::DccMaterialAsset::GetFileFilter(); - m_extensionToAssetType.insert(AZStd::make_pair(dccMaterialExtensions.replace("*", "").replace(" ", "").toStdString().c_str(), AZStd::vector { AZ::AzTypeInfo::Uuid() })); - AZ::SerializeContext* serializeContext = nullptr; EBUS_EVENT_RESULT(serializeContext, AZ::ComponentApplicationBus, GetSerializeContext); AZ_Assert(serializeContext, "Failed to acquire application serialize context."); diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp index c25248d4f6..08d79adcf5 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerListModel.cpp @@ -2640,7 +2640,7 @@ QSize OutlinerItemDelegate::sizeHint(const QStyleOptionViewItem& option, const Q m_cachedBoundingRectOfTallCharacter = QRect(); }; - QTimer::singleShot(0, resetFunction); + QTimer::singleShot(0, this, resetFunction); } // And add 8 to it gives the outliner roughly the visible spacing we're looking for. diff --git a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp index 803deb3509..af58ac4b6b 100644 --- a/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp +++ b/Code/Editor/Plugins/ComponentEntityEditorPlugin/UI/Outliner/OutlinerWidget.cpp @@ -121,6 +121,18 @@ namespace SortEntityChildrenRecursively(childId, comparer); } } + + QModelIndex nextIndexForTree(bool direction, OutlinerTreeView *tree, QModelIndex current) + { + if (direction) + { + return tree->indexAbove(current); + } + else + { + return tree->indexBelow(current); + } + } } OutlinerWidget::OutlinerWidget(QWidget* pParent, Qt::WindowFlags flags) @@ -891,9 +903,7 @@ void OutlinerWidget::DoSelectSliceRootNextToSelection(bool isTraversalUpwards) return; } - AZStd::function getNextIdxFunction = - AZStd::bind(isTraversalUpwards ? &QTreeView::indexAbove : &QTreeView::indexBelow, treeView, AZStd::placeholders::_1); - QModelIndex nextIdx = getNextIdxFunction(currentIdx); + QModelIndex nextIdx = nextIndexForTree(isTraversalUpwards,treeView,currentIdx); bool foundSliceRoot = false; while (nextIdx.isValid() && !foundSliceRoot) @@ -904,7 +914,7 @@ void OutlinerWidget::DoSelectSliceRootNextToSelection(bool isTraversalUpwards) AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( foundSliceRoot, &AzToolsFramework::ToolsApplicationRequests::IsSliceRootEntity, currentEntityId); - nextIdx = getNextIdxFunction(currentIdx); + nextIdx = nextIndexForTree(isTraversalUpwards, treeView, currentIdx); } if (foundSliceRoot) @@ -934,13 +944,10 @@ void OutlinerWidget::DoSelectEdgeSliceRoot(bool shouldSelectTopMostSlice) } QModelIndex currentIdx; - AZStd::function getNextIdxFunction; + if (shouldSelectTopMostSlice) { currentIdx = itemModel->index(0, OutlinerListModel::ColumnName); - - getNextIdxFunction = - AZStd::bind(&QTreeView::indexBelow, treeView, AZStd::placeholders::_1); } else { @@ -949,9 +956,6 @@ void OutlinerWidget::DoSelectEdgeSliceRoot(bool shouldSelectTopMostSlice) { currentIdx = itemModel->index(itemModel->rowCount(currentIdx) - 1, OutlinerListModel::ColumnName, currentIdx); } - - getNextIdxFunction = - AZStd::bind(&QTreeView::indexAbove, treeView, AZStd::placeholders::_1); } QModelIndex nextIdx = currentIdx; @@ -964,7 +968,7 @@ void OutlinerWidget::DoSelectEdgeSliceRoot(bool shouldSelectTopMostSlice) AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( foundSliceRoot, &AzToolsFramework::ToolsApplicationRequests::IsSliceRootEntity, currentEntityId); - nextIdx = getNextIdxFunction(currentIdx); + nextIdx = nextIndexForTree(shouldSelectTopMostSlice,treeView,currentIdx); } while (nextIdx.isValid() && !foundSliceRoot); if (foundSliceRoot) @@ -1416,7 +1420,10 @@ void OutlinerWidget::SortContent() } m_entitiesToSort.clear(); - auto comparer = AZStd::bind(&CompareEntitiesForSorting, AZStd::placeholders::_1, AZStd::placeholders::_2, m_sortMode); + auto comparer = [sortMode = m_sortMode](AZ::EntityId left, AZ::EntityId right) -> bool + { + return CompareEntitiesForSorting(left, right, sortMode); + }; for (const AZ::EntityId& entityId : parentsToSort) { SortEntityChildren(entityId, comparer); @@ -1433,7 +1440,10 @@ void OutlinerWidget::OnSortModeChanged(EntityOutliner::DisplaySortMode sortMode) if (sortMode != EntityOutliner::DisplaySortMode::Manually) { AZ_PROFILE_FUNCTION(AzToolsFramework); - auto comparer = AZStd::bind(&CompareEntitiesForSorting, AZStd::placeholders::_1, AZStd::placeholders::_2, sortMode); + auto comparer = [sortMode = m_sortMode](AZ::EntityId left, AZ::EntityId right) -> bool + { + return CompareEntitiesForSorting(left, right, sortMode); + }; SortEntityChildrenRecursively(AZ::EntityId(), comparer); } diff --git a/Code/Editor/Resource.h b/Code/Editor/Resource.h index b3640fac70..ba3cd39fe7 100644 --- a/Code/Editor/Resource.h +++ b/Code/Editor/Resource.h @@ -104,6 +104,7 @@ #define ID_FILE_EXPORTTOGAMENOSURFACETEXTURE 33473 #define ID_VIEW_SWITCHTOGAME 33477 #define ID_VIEW_SWITCHTOGAME_FULLSCREEN 33478 +#define ID_VIEW_SWITCHTOGAME_VIEWPORT 33479 #define ID_MOVE_OBJECT 33481 #define ID_RENAME_OBJ 33483 #define ID_FETCH 33496 diff --git a/Code/Editor/Settings.cpp b/Code/Editor/Settings.cpp index 147ed0c0b8..acb48c3545 100644 --- a/Code/Editor/Settings.cpp +++ b/Code/Editor/Settings.cpp @@ -471,7 +471,7 @@ void SEditorSettings::LoadValue(const char* sSection, const char* sKey, ESystemC } ////////////////////////////////////////////////////////////////////////// -void SEditorSettings::Save() +void SEditorSettings::Save(bool isEditorClosing) { QString strStringPlaceholder; @@ -638,14 +638,16 @@ void SEditorSettings::Save() // --- Settings Registry values // Prefab System UI - AzFramework::ApplicationRequests::Bus::Broadcast( - &AzFramework::ApplicationRequests::SetPrefabSystemEnabled, prefabSystem); + AzFramework::ApplicationRequests::Bus::Broadcast(&AzFramework::ApplicationRequests::SetPrefabSystemEnabled, prefabSystem); AzToolsFramework::Prefab::PrefabLoaderInterface* prefabLoaderInterface = AZ::Interface::Get(); prefabLoaderInterface->SetSaveAllPrefabsPreference(levelSaveSettings.saveAllPrefabsPreference); - SaveSettingsRegistryFile(); + if (!isEditorClosing) + { + SaveSettingsRegistryFile(); + } } ////////////////////////////////////////////////////////////////////////// diff --git a/Code/Editor/Settings.h b/Code/Editor/Settings.h index f4a6dabde8..9276d9b715 100644 --- a/Code/Editor/Settings.h +++ b/Code/Editor/Settings.h @@ -267,7 +267,7 @@ struct SANDBOX_API SEditorSettings AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING SEditorSettings(); ~SEditorSettings() = default; - void Save(); + void Save(bool isEditorClosing = false); void Load(); void LoadCloudSettings(); diff --git a/Code/Editor/ToolbarManager.cpp b/Code/Editor/ToolbarManager.cpp index 00b7992ef0..6b610d23ce 100644 --- a/Code/Editor/ToolbarManager.cpp +++ b/Code/Editor/ToolbarManager.cpp @@ -590,6 +590,16 @@ AmazonToolbar ToolbarManager::GetObjectToolbar() const return t; } +QMenu* ToolbarManager::CreatePlayButtonMenu() const +{ + QMenu* playButtonMenu = new QMenu("Play Game"); + + playButtonMenu->addAction(m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_VIEWPORT)); + playButtonMenu->addAction(m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN)); + + return playButtonMenu; +} + AmazonToolbar ToolbarManager::GetPlayConsoleToolbar() const { AmazonToolbar t = AmazonToolbar("PlayConsole", QObject::tr("Play Controls")); @@ -598,8 +608,17 @@ AmazonToolbar ToolbarManager::GetPlayConsoleToolbar() const t.AddAction(ID_TOOLBAR_WIDGET_SPACER_RIGHT, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL, ORIGINAL_TOOLBAR_VERSION); - t.AddAction(ID_VIEW_SWITCHTOGAME, TOOLBARS_WITH_PLAY_GAME); - t.AddAction(ID_VIEW_SWITCHTOGAME_FULLSCREEN, TOOLBARS_WITH_PLAY_GAME); + + QAction* playAction = m_actionManager->GetAction(ID_VIEW_SWITCHTOGAME); + QToolButton* playButton = new QToolButton(t.Toolbar()); + + QMenu* menu = CreatePlayButtonMenu(); + menu->setParent(t.Toolbar()); + playAction->setMenu(menu); + + playButton->setDefaultAction(playAction); + t.AddWidget(playButton, ID_VIEW_SWITCHTOGAME, ORIGINAL_TOOLBAR_VERSION); + t.AddAction(ID_TOOLBAR_SEPARATOR, ORIGINAL_TOOLBAR_VERSION); t.AddAction(ID_SWITCH_PHYSICS, TOOLBARS_WITH_PLAY_GAME); return t; @@ -728,7 +747,14 @@ void AmazonToolbar::SetActionsOnInternalToolbar(ActionManager* actionManager) { if (actionManager->HasAction(actionId)) { - m_toolbar->addAction(actionManager->GetAction(actionId)); + if (actionData.widget != nullptr) + { + m_toolbar->addWidget(actionData.widget); + } + else + { + m_toolbar->addAction(actionManager->GetAction(actionId)); + } } } } @@ -1367,7 +1393,12 @@ void AmazonToolbar::InstantiateToolbar(QMainWindow* mainWindow, ToolbarManager* void AmazonToolbar::AddAction(int actionId, int toolbarVersionAdded) { - m_actions.push_back({ actionId, toolbarVersionAdded }); + AddWidget(nullptr, actionId, toolbarVersionAdded); +} + +void AmazonToolbar::AddWidget(QWidget* widget, int actionId, int toolbarVersionAdded) +{ + m_actions.push_back({ actionId, toolbarVersionAdded, widget }); } void AmazonToolbar::Clear() diff --git a/Code/Editor/ToolbarManager.h b/Code/Editor/ToolbarManager.h index be537533b6..ae6b0c7296 100644 --- a/Code/Editor/ToolbarManager.h +++ b/Code/Editor/ToolbarManager.h @@ -87,6 +87,7 @@ public: const QString& GetTranslatedName() const { return m_translatedName; } void AddAction(int actionId, int toolbarVersionAdded = 0); + void AddWidget(QWidget* widget, int actionId, int toolbarVersionAdded = 0); QToolBar* Toolbar() const { return m_toolbar; } @@ -117,6 +118,7 @@ private: { int actionId; int toolbarVersionAdded; + QWidget* widget; bool operator ==(const AmazonToolbar::ActionData& other) const { @@ -133,7 +135,9 @@ private: class AmazonToolBarExpanderWatcher; class ToolbarManager + : public QObject { + Q_OBJECT public: explicit ToolbarManager(ActionManager* actionManager, MainWindow* mainWindow); ~ToolbarManager(); @@ -178,6 +182,8 @@ private: void UpdateAllowedAreas(QToolBar* toolbar); bool IsDirty(const AmazonToolbar& toolbar) const; + QMenu* CreatePlayButtonMenu() const; + const AmazonToolbar* FindDefaultToolbar(const QString& toolbarName) const; AmazonToolbar* FindToolbar(const QString& toolbarName); diff --git a/Code/Editor/Viewport.cpp b/Code/Editor/Viewport.cpp index 37c46f07dd..5a64982350 100644 --- a/Code/Editor/Viewport.cpp +++ b/Code/Editor/Viewport.cpp @@ -14,14 +14,19 @@ // Qt #include +// AzCore +#include + // AzQtComponents #include #include #include #include +#include // Editor +#include "Editor/Plugins/ComponentEntityEditorPlugin/SandboxIntegration.h" #include "ViewManager.h" #include "Include/ITransformManipulator.h" #include "Include/HitContext.h" @@ -32,22 +37,35 @@ #include "GameEngine.h" #include "Settings.h" - #ifdef LoadCursor #undef LoadCursor #endif +AZ_CVAR( + float, + ed_defaultEntityPlacementDistance, + 10.0f, + nullptr, + AZ::ConsoleFunctorFlags::Null, + "The default distance to place an entity from the camera if no intersection is found"); + +float GetDefaultEntityPlacementDistance() +{ + return ed_defaultEntityPlacementDistance; +} + ////////////////////////////////////////////////////////////////////// // Viewport drag and drop support ////////////////////////////////////////////////////////////////////// -void QtViewport::BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt) +void QtViewport::BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, const AzFramework::ViewportId viewportId, const QPoint& point) { - context.m_hitLocation = AZ::Vector3::CreateZero(); - context.m_hitLocation = GetHitLocation(pt); + context.m_hitLocation = AzToolsFramework::FindClosestPickIntersection( + viewportId, AzToolsFramework::ViewportInteraction::ScreenPointFromQPoint(point), AzToolsFramework::EditorPickRayLength, + GetDefaultEntityPlacementDistance()); } - void QtViewport::dragEnterEvent(QDragEnterEvent* event) { if (!GetIEditor()->GetGameEngine()->IsLevelLoaded()) @@ -66,7 +84,7 @@ void QtViewport::dragEnterEvent(QDragEnterEvent* event) // new bus-based way of doing it (install a listener!) using namespace AzQtComponents; ViewportDragContext context; - BuildDragDropContext(context, event->pos()); + BuildDragDropContext(context, GetViewportId(), event->pos()); DragAndDropEventsBus::Event(DragAndDropContexts::EditorViewport, &DragAndDropEvents::DragEnter, event, context); } } @@ -89,7 +107,7 @@ void QtViewport::dragMoveEvent(QDragMoveEvent* event) // new bus-based way of doing it (install a listener!) using namespace AzQtComponents; ViewportDragContext context; - BuildDragDropContext(context, event->pos()); + BuildDragDropContext(context, GetViewportId(), event->pos()); DragAndDropEventsBus::Event(DragAndDropContexts::EditorViewport, &DragAndDropEvents::DragMove, event, context); } } @@ -112,7 +130,7 @@ void QtViewport::dropEvent(QDropEvent* event) { // new bus-based way of doing it (install a listener!) ViewportDragContext context; - BuildDragDropContext(context, event->pos()); + BuildDragDropContext(context, GetViewportId(), event->pos()); DragAndDropEventsBus::Event(DragAndDropContexts::EditorViewport, &DragAndDropEvents::Drop, event, context); } } @@ -340,13 +358,6 @@ void QtViewport::resizeEvent(QResizeEvent* event) Update(); } -////////////////////////////////////////////////////////////////////////// -void QtViewport::leaveEvent(QEvent* event) -{ - QWidget::leaveEvent(event); - MouseCallback(eMouseLeave, QPoint(), Qt::KeyboardModifiers(), Qt::MouseButtons()); -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::paintEvent([[maybe_unused]] QPaintEvent* event) { @@ -581,63 +592,7 @@ void QtViewport::keyReleaseEvent(QKeyEvent* event) OnKeyUp(nativeKey, 1, event->nativeModifiers()); } -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnLButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Save the mouse down position - m_cMouseDownPos = point; - - if (MouseCallback(eMouseLDown, point, modifiers)) - { - return; - } -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnLButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Check Edit Tool. - MouseCallback(eMouseLUp, point, modifiers); -} -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseRDown, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseRUp, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Check Edit Tool. - MouseCallback(eMouseMDown, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - // Move the viewer to the mouse location. - // Check Edit Tool. - MouseCallback(eMouseMUp, point, modifiers); -} -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseMDblClick, point, modifiers); -} - - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnMouseMove(Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint& point) -{ - MouseCallback(eMouseMove, point, modifiers, buttons); -} ////////////////////////////////////////////////////////////////////////// void QtViewport::OnSetCursor() @@ -696,44 +651,6 @@ void QtViewport::OnDragSelectRectangle(const QRect& rect, bool bNormalizeRect) GetIEditor()->SetStatusText(szNewStatusText); } -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnLButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - if (GetIEditor()->IsInGameMode()) - { - // Ignore double clicks while in game. - return; - } - - MouseCallback(eMouseLDblClick, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnRButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point) -{ - MouseCallback(eMouseRDblClick, point, modifiers); -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnKeyDown([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) -{ - if (GetIEditor()->IsInGameMode()) - { - // Ignore key downs while in game. - return; - } -} - -////////////////////////////////////////////////////////////////////////// -void QtViewport::OnKeyUp([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) -{ - if (GetIEditor()->IsInGameMode()) - { - // Ignore key downs while in game. - return; - } -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::SetCurrentCursor(const QCursor& hCursor, const QString& cursorString) { @@ -1119,29 +1036,6 @@ bool QtViewport::HitTest(const QPoint& point, HitContext& hitInfo) return false; } -AZ::Vector3 QtViewport::GetHitLocation(const QPoint& point) -{ - Vec3 pos = Vec3(ZERO); - HitContext hit; - if (HitTest(point, hit)) - { - pos = hit.raySrc + hit.rayDir * hit.dist; - pos = SnapToGrid(pos); - } - else - { - bool hitTerrain; - pos = ViewToWorld(point, &hitTerrain); - if (hitTerrain) - { - pos.z = GetIEditor()->GetTerrainElevation(pos.x, pos.y); - } - pos = SnapToGrid(pos); - } - - return AZ::Vector3(pos.x, pos.y, pos.z); -} - ////////////////////////////////////////////////////////////////////////// void QtViewport::SetZoomFactor(float fZoomFactor) { @@ -1315,84 +1209,6 @@ bool QtViewport::GetAdvancedSelectModeFlag() return m_bAdvancedSelectMode; } -////////////////////////////////////////////////////////////////////////// -bool QtViewport::MouseCallback(EMouseEvent event, const QPoint& point, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons) -{ - AZ_PROFILE_FUNCTION(Editor); - - // Ignore any mouse events in game mode. - if (GetIEditor()->IsInGameMode()) - { - return true; - } - - // We must ignore mouse events when we are in the middle of an assert. - // Reason: If we have an assert called from an engine module under the editor, if we call this function, - // it may call the engine again and cause a deadlock. - // Concrete example: CryPhysics called from Trackview causing an assert, and moving the cursor over the viewport - // would cause the editor to freeze as it calls CryPhysics again for a raycast while it didn't release the lock. - if (gEnv->pSystem->IsAssertDialogVisible()) - { - return true; - } - - ////////////////////////////////////////////////////////////////////////// - // Hit test gizmo objects. - ////////////////////////////////////////////////////////////////////////// - bool bAltClick = (modifiers & Qt::AltModifier); - bool bCtrlClick = (modifiers & Qt::ControlModifier); - bool bShiftClick = (modifiers & Qt::ShiftModifier); - - int flags = (bCtrlClick ? MK_CONTROL : 0) | - (bShiftClick ? MK_SHIFT : 0) | - ((buttons& Qt::LeftButton) ? MK_LBUTTON : 0) | - ((buttons& Qt::MiddleButton) ? MK_MBUTTON : 0) | - ((buttons& Qt::RightButton) ? MK_RBUTTON : 0); - - switch (event) - { - case eMouseMove: - - if (m_nLastUpdateFrame == m_nLastMouseMoveFrame) - { - // If mouse move event generated in the same frame, ignore it. - return false; - } - m_nLastMouseMoveFrame = m_nLastUpdateFrame; - - // Skip the marker position update if anything is selected, since it is only used - // by the info bar which doesn't show the marker when there is an active selection. - // This helps a performance issue when calling ViewToWorld (which calls RayWorldIntersection) - // on every mouse movement becomes very expensive in scenes with large amounts of entities. - CSelectionGroup* selection = GetIEditor()->GetSelection(); - if (!(buttons & Qt::RightButton) /* && m_nLastUpdateFrame != m_nLastMouseMoveFrame*/ && (selection && selection->IsEmpty())) - { - //m_nLastMouseMoveFrame = m_nLastUpdateFrame; - Vec3 pos = ViewToWorld(point); - GetIEditor()->SetMarkerPosition(pos); - } - break; - } - - QPoint tempPoint(point.x(), point.y()); - - ////////////////////////////////////////////////////////////////////////// - // Handle viewport manipulators. - ////////////////////////////////////////////////////////////////////////// - if (!bAltClick) - { - ITransformManipulator* pManipulator = GetIEditor()->GetTransformManipulator(); - if (pManipulator) - { - if (pManipulator->MouseCallback(this, event, tempPoint, flags)) - { - return true; - } - } - } - - return false; -} ////////////////////////////////////////////////////////////////////////// void QtViewport::ProcessRenderLisneters(DisplayContext& rstDisplayContext) { diff --git a/Code/Editor/Viewport.h b/Code/Editor/Viewport.h index 7f8ccc4c4f..bf44b914aa 100644 --- a/Code/Editor/Viewport.h +++ b/Code/Editor/Viewport.h @@ -6,13 +6,12 @@ * */ - // Description : interface for the CViewport class. - #pragma once #if !defined(Q_MOC_RUN) +#include #include #include #include @@ -88,6 +87,9 @@ enum EStdCursor STD_CURSOR_LAST, }; +//! The default distance an entity is placed from the camera if there is no intersection +SANDBOX_API float GetDefaultEntityPlacementDistance(); + AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING class SANDBOX_API CViewport : public IDisplayViewport @@ -201,7 +203,6 @@ public: //! Performs hit testing of 2d point in view to find which object hit. virtual bool HitTest(const QPoint& point, HitContext& hitInfo) = 0; - virtual AZ::Vector3 GetHitLocation(const QPoint& point) = 0; virtual void MakeConstructionPlane(int axis) = 0; @@ -432,7 +433,6 @@ public: //! Performs hit testing of 2d point in view to find which object hit. bool HitTest(const QPoint& point, HitContext& hitInfo) override; - AZ::Vector3 GetHitLocation(const QPoint& point) override; //! Do 2D hit testing of line in world space. // pToCameraDistance is an optional output parameter in which distance from the camera to the line is returned. @@ -522,9 +522,6 @@ protected: void setRenderOverlayVisible(bool); bool isRenderOverlayVisible() const; - // called to process mouse callback inside the viewport. - virtual bool MouseCallback(EMouseEvent event, const QPoint& point, Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons = Qt::NoButton); - void ProcessRenderLisneters(DisplayContext& rstDisplayContext); void mousePressEvent(QMouseEvent* event) override; @@ -535,29 +532,29 @@ protected: void keyPressEvent(QKeyEvent* event) override; void keyReleaseEvent(QKeyEvent* event) override; void resizeEvent(QResizeEvent* event) override; - void leaveEvent(QEvent* event) override; - void paintEvent(QPaintEvent* event) override; - virtual void OnMouseMove(Qt::KeyboardModifiers modifiers, Qt::MouseButtons buttons, const QPoint& point); - virtual void OnMouseWheel(Qt::KeyboardModifiers modifiers, short zDelta, const QPoint& pt); - virtual void OnLButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnLButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnRButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnRButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnMButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnMButtonDown(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnMButtonUp(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnLButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnRButtonDblClk(Qt::KeyboardModifiers modifiers, const QPoint& point); - virtual void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); - virtual void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags); + virtual void OnMouseMove(Qt::KeyboardModifiers, Qt::MouseButtons, const QPoint&) {} + virtual void OnMouseWheel(Qt::KeyboardModifiers, short zDelta, const QPoint&); + virtual void OnLButtonDown(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnLButtonUp(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnRButtonDown(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnRButtonUp(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnMButtonDblClk(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnMButtonDown(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnMButtonUp(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnLButtonDblClk(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnRButtonDblClk(Qt::KeyboardModifiers, const QPoint&) {} + virtual void OnKeyDown([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) {} + virtual void OnKeyUp([[maybe_unused]] UINT nChar, [[maybe_unused]] UINT nRepCnt, [[maybe_unused]] UINT nFlags) {} #if defined(AZ_PLATFORM_WINDOWS) void OnRawInput(UINT wParam, HRAWINPUT lParam); #endif void OnSetCursor(); - virtual void BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt); + virtual void BuildDragDropContext( + AzQtComponents::ViewportDragContext& context, AzFramework::ViewportId viewportId, const QPoint& point); + void dragEnterEvent(QDragEnterEvent* event) override; void dragMoveEvent(QDragMoveEvent* event) override; void dragLeaveEvent(QDragLeaveEvent* event) override; diff --git a/Code/Editor/ViewportManipulatorController.cpp b/Code/Editor/ViewportManipulatorController.cpp index 1766945541..e46328eb65 100644 --- a/Code/Editor/ViewportManipulatorController.cpp +++ b/Code/Editor/ViewportManipulatorController.cpp @@ -8,13 +8,15 @@ #include "ViewportManipulatorController.h" -#include -#include -#include -#include +#include #include +#include +#include #include -#include +#include +#include +#include +#include #include @@ -87,8 +89,14 @@ namespace SandboxEditor } using InteractionBus = AzToolsFramework::EditorInteractionSystemViewportSelectionRequestBus; - using namespace AzToolsFramework::ViewportInteraction; using AzFramework::InputChannel; + using AzToolsFramework::ViewportInteraction::KeyboardModifier; + using AzToolsFramework::ViewportInteraction::MouseButton; + using AzToolsFramework::ViewportInteraction::MouseEvent; + using AzToolsFramework::ViewportInteraction::MouseInteraction; + using AzToolsFramework::ViewportInteraction::MouseInteractionEvent; + using AzToolsFramework::ViewportInteraction::ProjectedViewportRay; + using AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus; bool interactionHandled = false; float wheelDelta = 0.0f; @@ -117,16 +125,13 @@ namespace SandboxEditor aznumeric_cast(position->m_normalizedPosition.GetX() * windowSize.m_width), aznumeric_cast(position->m_normalizedPosition.GetY() * windowSize.m_height)); - m_mouseInteraction.m_mousePick.m_screenCoordinates = screenPoint; - AZStd::optional ray; + ProjectedViewportRay ray{}; ViewportInteractionRequestBus::EventResult( ray, GetViewportId(), &ViewportInteractionRequestBus::Events::ViewportScreenToWorldRay, screenPoint); - if (ray.has_value()) - { - m_mouseInteraction.m_mousePick.m_rayOrigin = ray.value().origin; - m_mouseInteraction.m_mousePick.m_rayDirection = ray.value().direction; - } + m_mouseInteraction.m_mousePick.m_rayOrigin = ray.origin; + m_mouseInteraction.m_mousePick.m_rayDirection = ray.direction; + m_mouseInteraction.m_mousePick.m_screenCoordinates = screenPoint; } eventType = MouseEvent::Move; @@ -152,7 +157,7 @@ namespace SandboxEditor // Only insert the double click timing once we're done processing events, to avoid a false IsDoubleClick positive if (finishedProcessingEvents) { - m_pendingDoubleClicks[mouseButton] = m_curTime; + m_pendingDoubleClicks[mouseButton] = { m_currentTime, m_mouseInteraction.m_mousePick.m_screenCoordinates }; } eventType = MouseEvent::Down; } @@ -160,8 +165,8 @@ namespace SandboxEditor else if (state == InputChannel::State::Ended) { // If we've actually logged a mouse down event, forward a mouse up event. - // This prevents corner cases like the context menu thinking it should be opened even though no one clicked in this viewport, - // due to RenderViewportWidget ensuring all controllers get InputChannel::State::Ended events. + // This prevents corner cases like the context menu thinking it should be opened even though no one clicked in this + // viewport, due to RenderViewportWidget ensuring all controllers get InputChannel::State::Ended events. if (m_mouseInteraction.m_mouseButtons.m_mouseButtons & mouseButtonValue) { // Erase the button from our state if we're done processing events. @@ -246,17 +251,22 @@ namespace SandboxEditor void ViewportManipulatorControllerInstance::UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) { - m_curTime = event.m_time; + m_currentTime = event.m_time; } bool ViewportManipulatorControllerInstance::IsDoubleClick(AzToolsFramework::ViewportInteraction::MouseButton button) const { - auto clickIt = m_pendingDoubleClicks.find(button); - if (clickIt == m_pendingDoubleClicks.end()) + if (auto clickIt = m_pendingDoubleClicks.find(button); clickIt != m_pendingDoubleClicks.end()) { - return false; + const double doubleClickThresholdMilliseconds = qApp->doubleClickInterval(); + const bool insideTimeThreshold = + (m_currentTime.GetMilliseconds() - clickIt->second.m_time.GetMilliseconds()) < doubleClickThresholdMilliseconds; + const bool insideDistanceThreshold = + AzFramework::ScreenVectorLength(clickIt->second.m_position - m_mouseInteraction.m_mousePick.m_screenCoordinates) < + AzFramework::DefaultMouseMoveDeadZone; + return insideTimeThreshold && insideDistanceThreshold; } - const double doubleClickThresholdMilliseconds = qApp->doubleClickInterval(); - return (m_curTime.GetMilliseconds() - clickIt->second.GetMilliseconds()) < doubleClickThresholdMilliseconds; + + return false; } -} //namespace SandboxEditor +} // namespace SandboxEditor diff --git a/Code/Editor/ViewportManipulatorController.h b/Code/Editor/ViewportManipulatorController.h index d551eb3647..b9c359a544 100644 --- a/Code/Editor/ViewportManipulatorController.h +++ b/Code/Editor/ViewportManipulatorController.h @@ -39,8 +39,16 @@ namespace SandboxEditor static bool IsMouseMove(const AzFramework::InputChannel& inputChannel); static AzToolsFramework::ViewportInteraction::KeyboardModifier GetKeyboardModifier(const AzFramework::InputChannel& inputChannel); + //! Represents the time and location of a click. + struct ClickEvent + { + AZ::ScriptTimePoint m_time; + AzFramework::ScreenPoint m_position; + }; + AzToolsFramework::ViewportInteraction::MouseInteraction m_mouseInteraction; - AZStd::unordered_map m_pendingDoubleClicks; - AZ::ScriptTimePoint m_curTime; + AZStd::unordered_map m_pendingDoubleClicks; + + AZ::ScriptTimePoint m_currentTime; }; } // namespace SandboxEditor diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp index fdc3053b5c..bf3ad20768 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetCommon.cpp @@ -14,453 +14,450 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data + AssetFilterInfo::AssetFilterInfo(const AssetId& id, const AssetType& assetType, AssetLoadBehavior loadBehavior) + : m_assetId(id) + , m_assetType(assetType) + , m_loadBehavior(loadBehavior) { - AssetFilterInfo::AssetFilterInfo(const AssetId& id, const AssetType& assetType, AssetLoadBehavior loadBehavior) - : m_assetId(id) - , m_assetType(assetType) - , m_loadBehavior(loadBehavior) - { - } + } + + AssetFilterInfo::AssetFilterInfo(const Asset& asset) + : m_assetId(asset.GetId()) + , m_assetType(asset.GetType()) + , m_loadBehavior(asset.GetAutoLoadBehavior()) + { + } + - AssetFilterInfo::AssetFilterInfo(const Asset& asset) - : m_assetId(asset.GetId()) - , m_assetType(asset.GetType()) - , m_loadBehavior(asset.GetAutoLoadBehavior()) + AssetId AssetId::CreateString(AZStd::string_view input) + { + size_t separatorIdx = input.find(':'); + if (separatorIdx == AZStd::string_view::npos) { + return AssetId(); } - - AssetId AssetId::CreateString(AZStd::string_view input) + AssetId assetId; + assetId.m_guid = Uuid::CreateString(input.data(), separatorIdx); + if (assetId.m_guid.IsNull()) { - size_t separatorIdx = input.find(':'); - if (separatorIdx == AZStd::string_view::npos) - { - return AssetId(); - } + return AssetId(); + } - AssetId assetId; - assetId.m_guid = Uuid::CreateString(input.data(), separatorIdx); - if (assetId.m_guid.IsNull()) - { - return AssetId(); - } + assetId.m_subId = strtoul(&input[separatorIdx + 1], nullptr, 16); - assetId.m_subId = strtoul(&input[separatorIdx + 1], nullptr, 16); + return assetId; + } - return assetId; + void AssetId::Reflect(AZ::ReflectContext* context) + { + if (SerializeContext* serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(1) + ->Field("guid", &Data::AssetId::m_guid) + ->Field("subId", &Data::AssetId::m_subId) + ; + } + + if (BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Asset") + ->Attribute(AZ::Script::Attributes::Module, "asset") + ->Constructor() + ->Constructor() + ->Method("CreateString", &Data::AssetId::CreateString) + ->Method("IsValid", &Data::AssetId::IsValid) + ->Attribute(AZ::Script::Attributes::Alias, "is_valid") + ->Method("ToString", [](const Data::AssetId* self) { return self->ToString(); }) + ->Attribute(AZ::Script::Attributes::Alias, "to_string") + ->Method("IsEqual", [](const Data::AssetId& self, const Data::AssetId& other) { return self == other; }) + ->Attribute(AZ::Script::Attributes::Alias, "is_equal") + ->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::Equal) + ; + + behaviorContext->Class() + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Asset") + ->Attribute(AZ::Script::Attributes::Module, "asset") + ->Property("assetId", BehaviorValueGetter(&Data::AssetInfo::m_assetId), nullptr) + ->Property("assetType", BehaviorValueGetter(&Data::AssetInfo::m_assetType), nullptr) + ->Property("sizeBytes", BehaviorValueGetter(&Data::AssetInfo::m_sizeBytes), nullptr) + ->Property("relativePath", BehaviorValueGetter(&Data::AssetInfo::m_relativePath), nullptr) + ; + } + } + + namespace AssetInternal + { + Asset FindOrCreateAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior) + { + return AssetManager::Instance().FindOrCreateAsset(id, type, assetReferenceLoadBehavior); } - void AssetId::Reflect(AZ::ReflectContext* context) + Asset GetAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior, + const AssetLoadParameters& loadParams) { - if (SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Field("guid", &Data::AssetId::m_guid) - ->Field("subId", &Data::AssetId::m_subId) - ; - } - - if (BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->Class() - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) - ->Attribute(AZ::Script::Attributes::Category, "Asset") - ->Attribute(AZ::Script::Attributes::Module, "asset") - ->Constructor() - ->Constructor() - ->Method("CreateString", &Data::AssetId::CreateString) - ->Method("IsValid", &Data::AssetId::IsValid) - ->Attribute(AZ::Script::Attributes::Alias, "is_valid") - ->Method("ToString", [](const Data::AssetId* self) { return self->ToString(); }) - ->Attribute(AZ::Script::Attributes::Alias, "to_string") - ->Method("IsEqual", [](const Data::AssetId& self, const Data::AssetId& other) { return self == other; }) - ->Attribute(AZ::Script::Attributes::Alias, "is_equal") - ->Attribute(AZ::Script::Attributes::Operator, AZ::Script::Attributes::OperatorType::Equal) - ; - - behaviorContext->Class() - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) - ->Attribute(AZ::Script::Attributes::Category, "Asset") - ->Attribute(AZ::Script::Attributes::Module, "asset") - ->Property("assetId", BehaviorValueGetter(&Data::AssetInfo::m_assetId), nullptr) - ->Property("assetType", BehaviorValueGetter(&Data::AssetInfo::m_assetType), nullptr) - ->Property("sizeBytes", BehaviorValueGetter(&Data::AssetInfo::m_sizeBytes), nullptr) - ->Property("relativePath", BehaviorValueGetter(&Data::AssetInfo::m_relativePath), nullptr) - ; - } + return AssetManager::Instance().GetAsset(id, type, assetReferenceLoadBehavior, loadParams); } - namespace AssetInternal + AssetData::AssetStatus BlockUntilLoadComplete(const Asset& asset) { - Asset FindOrCreateAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior) - { - return AssetManager::Instance().FindOrCreateAsset(id, type, assetReferenceLoadBehavior); - } + return AssetManager::Instance().BlockUntilLoadComplete(asset); + } - Asset GetAsset(const AssetId& id, const AssetType& type, AssetLoadBehavior assetReferenceLoadBehavior, - const AssetLoadParameters& loadParams) - { - return AssetManager::Instance().GetAsset(id, type, assetReferenceLoadBehavior, loadParams); - } + void UpdateAssetInfo(AssetId& id, AZStd::string& assetHint) + { + // it is possible that the assetID given is legacy / old and we have a new assetId we can use instead for it. + // in that case, upgrade the AssetID to the new one, so that future saves are in the new format. + // this function should only be invoked if the feature is turned on in the asset manager as it can be (slightly) expensive - AssetData::AssetStatus BlockUntilLoadComplete(const Asset& asset) + if ((!AssetManager::IsReady()) || (!AssetManager::Instance().GetAssetInfoUpgradingEnabled())) { - return AssetManager::Instance().BlockUntilLoadComplete(asset); + return; } - void UpdateAssetInfo(AssetId& id, AZStd::string& assetHint) + AZ::Data::AssetInfo assetInfo; + AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); + if (assetInfo.m_assetId.IsValid()) { - // it is possible that the assetID given is legacy / old and we have a new assetId we can use instead for it. - // in that case, upgrade the AssetID to the new one, so that future saves are in the new format. - // this function should only be invoked if the feature is turned on in the asset manager as it can be (slightly) expensive - - if ((!AssetManager::IsReady()) || (!AssetManager::Instance().GetAssetInfoUpgradingEnabled())) + id = assetInfo.m_assetId; + if (!assetInfo.m_relativePath.empty()) { - return; - } - - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); - if (assetInfo.m_assetId.IsValid()) - { - id = assetInfo.m_assetId; - if (!assetInfo.m_relativePath.empty()) - { - assetHint = assetInfo.m_relativePath; - } + assetHint = assetInfo.m_relativePath; } } + } - bool ReloadAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) - { - AssetManager::Instance().ReloadAsset(assetData->GetId(), assetReferenceLoadBehavior); - return true; - } - - bool SaveAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) - { - AssetManager::Instance().SaveAsset({ assetData, assetReferenceLoadBehavior }); - return true; - } + bool ReloadAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) + { + AssetManager::Instance().ReloadAsset(assetData->GetId(), assetReferenceLoadBehavior); + return true; + } - Asset GetAssetData(const AssetId& id, AssetLoadBehavior assetReferenceLoadBehavior) - { - if (AssetManager::IsReady()) - { - AZStd::lock_guard assetLock(AssetManager::Instance().m_assetMutex); - auto it = AssetManager::Instance().m_assets.find(id); - if (it != AssetManager::Instance().m_assets.end()) - { - return { it->second, assetReferenceLoadBehavior }; - } - } - return {}; - } + bool SaveAsset(AssetData* assetData, AssetLoadBehavior assetReferenceLoadBehavior) + { + AssetManager::Instance().SaveAsset({ assetData, assetReferenceLoadBehavior }); + return true; + } - AssetId ResolveAssetId(const AssetId& id) + Asset GetAssetData(const AssetId& id, AssetLoadBehavior assetReferenceLoadBehavior) + { + if (AssetManager::IsReady()) { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); - if (assetInfo.m_assetId.IsValid()) + AZStd::lock_guard assetLock(AssetManager::Instance().m_assetMutex); + auto it = AssetManager::Instance().m_assets.find(id); + if (it != AssetManager::Instance().m_assets.end()) { - return assetInfo.m_assetId; + return { it->second, assetReferenceLoadBehavior }; } - else - { - return id; - } - } + return {}; } - AssetData::~AssetData() + AssetId ResolveAssetId(const AssetId& id) { - UnregisterWithHandler(); - } - - void AssetData::Reflect(AZ::ReflectContext* context) - { - if (SerializeContext* serializeContext = azrtti_cast(context)) + AZ::Data::AssetInfo assetInfo; + AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequests::GetAssetInfoById, id); + if (assetInfo.m_assetId.IsValid()) { - serializeContext->Class() - ->Version(1) - ; + return assetInfo.m_assetId; } - - if (BehaviorContext* behaviorContext = azrtti_cast(context)) + else { - behaviorContext->Class("AssetData") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) - ->Attribute(AZ::Script::Attributes::Category, "Asset") - ->Attribute(AZ::Script::Attributes::Module, "asset") - ->Method("IsReady", &AssetData::IsReady) - ->Attribute(AZ::Script::Attributes::Alias, "is_ready") - ->Method("IsError", &AssetData::IsError) - ->Attribute(AZ::Script::Attributes::Alias, "is_error") - ->Method("IsLoading", &AssetData::IsLoading) - ->Attribute(AZ::Script::Attributes::Alias, "is_loading") - ->Method("GetId", &AssetData::GetId) - ->Attribute(AZ::Script::Attributes::Alias, "get_id") - ->Method("GetUseCount", &AssetData::GetUseCount) - ->Attribute(AZ::Script::Attributes::Alias, "get_use_count") - ; + return id; } - } - void AssetData::Acquire() - { - AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); - - AcquireWeak(); - ++m_useCount; } + } - void AssetData::Release() - { - AZ_Assert(m_useCount > 0, "Usecount is already 0!"); + AssetData::~AssetData() + { + UnregisterWithHandler(); + } - if (m_useCount.fetch_sub(1) == 1) - { - if (AssetManager::IsReady()) - { - AssetManager::Instance().OnAssetUnused(this); - } - else - { - AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); - } - } + void AssetData::Reflect(AZ::ReflectContext* context) + { + if (SerializeContext* serializeContext = azrtti_cast(context)) + { + serializeContext->Class() + ->Version(1) + ; + } + + if (BehaviorContext* behaviorContext = azrtti_cast(context)) + { + behaviorContext->Class("AssetData") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common) + ->Attribute(AZ::Script::Attributes::Category, "Asset") + ->Attribute(AZ::Script::Attributes::Module, "asset") + ->Method("IsReady", &AssetData::IsReady) + ->Attribute(AZ::Script::Attributes::Alias, "is_ready") + ->Method("IsError", &AssetData::IsError) + ->Attribute(AZ::Script::Attributes::Alias, "is_error") + ->Method("IsLoading", &AssetData::IsLoading) + ->Attribute(AZ::Script::Attributes::Alias, "is_loading") + ->Method("GetId", &AssetData::GetId) + ->Attribute(AZ::Script::Attributes::Alias, "get_id") + ->Method("GetUseCount", &AssetData::GetUseCount) + ->Attribute(AZ::Script::Attributes::Alias, "get_use_count") + ; + } + } + + void AssetData::Acquire() + { + AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); - ReleaseWeak(); - } + AcquireWeak(); + ++m_useCount; + } - void AssetData::AcquireWeak() - { - AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); - ++m_weakUseCount; - } + void AssetData::Release() + { + AZ_Assert(m_useCount > 0, "Usecount is already 0!"); - void AssetData::ReleaseWeak() + if (m_useCount.fetch_sub(1) == 1) { - AZ_Assert(m_weakUseCount > 0, "WeakUseCount is already 0"); - - AssetId assetId = m_assetId; - int creationToken = m_creationToken; - AssetType assetType = GetType(); - bool removeFromHash = IsRegisterReadonlyAndShareable(); - // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. - removeFromHash = creationToken == s_defaultCreationToken ? false : removeFromHash; - - if (m_weakUseCount.fetch_sub(1) == 1) + if (AssetManager::IsReady()) { - if (AssetManager::IsReady()) - { - AssetManager::Instance().ReleaseAsset(this, assetId, assetType, removeFromHash, creationToken); - } - else - { - AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); - } + AssetManager::Instance().OnAssetUnused(this); + } + else + { + AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); } } - bool AssetData::IsLoading(bool includeQueued) const - { - auto curStatus = GetStatus(); - return(curStatus == AssetStatus::Loading || curStatus == AssetStatus::LoadedPreReady || curStatus==AssetStatus::StreamReady || - (includeQueued && curStatus == AssetStatus::Queued)); - } + ReleaseWeak(); + } + + void AssetData::AcquireWeak() + { + AZ_Assert(m_useCount >= 0, "AssetData has been deleted"); + ++m_weakUseCount; + } + + void AssetData::ReleaseWeak() + { + AZ_Assert(m_weakUseCount > 0, "WeakUseCount is already 0"); + + AssetId assetId = m_assetId; + int creationToken = m_creationToken; + AssetType assetType = GetType(); + bool removeFromHash = IsRegisterReadonlyAndShareable(); + // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. + removeFromHash = creationToken == s_defaultCreationToken ? false : removeFromHash; - void AssetData::RegisterWithHandler(AssetHandler* handler) + if (m_weakUseCount.fetch_sub(1) == 1) { - if (!handler) + if (AssetManager::IsReady()) { - AZ_Error("AssetData", false, "No handler to register with"); - return; + AssetManager::Instance().ReleaseAsset(this, assetId, assetType, removeFromHash, creationToken); } - m_registeredHandler = handler; - } - - void AssetData::UnregisterWithHandler() - { - if (m_registeredHandler) + else { - m_registeredHandler = nullptr; + AZ_Assert(false, "Attempting to release asset after AssetManager has been destroyed!"); } } + } - bool AssetData::GetFlag(const AssetDataFlags& checkFlag) const - { - return m_flags[aznumeric_cast(checkFlag)]; - } + bool AssetData::IsLoading(bool includeQueued) const + { + auto curStatus = GetStatus(); + return(curStatus == AssetStatus::Loading || curStatus == AssetStatus::LoadedPreReady || curStatus==AssetStatus::StreamReady || + (includeQueued && curStatus == AssetStatus::Queued)); + } - void AssetData::SetFlag(const AssetDataFlags& checkFlag, bool setValue) + void AssetData::RegisterWithHandler(AssetHandler* handler) + { + if (!handler) { - m_flags.set(aznumeric_cast(checkFlag), setValue); + AZ_Error("AssetData", false, "No handler to register with"); + return; } + m_registeredHandler = handler; + } - bool AssetData::GetRequeue() const - { - return GetFlag(AssetDataFlags::Requeue); - } - void AssetData::SetRequeue(bool requeue) + void AssetData::UnregisterWithHandler() + { + if (m_registeredHandler) { - SetFlag(AssetDataFlags::Requeue, requeue); + m_registeredHandler = nullptr; } + } - void AssetBusCallbacks::SetCallbacks(const AssetReadyCB& readyCB, const AssetMovedCB& movedCB, const AssetReloadedCB& reloadedCB, - const AssetSavedCB& savedCB, const AssetUnloadedCB& unloadedCB, const AssetErrorCB& errorCB, const AssetCanceledCB& cancelCB) - { - m_onAssetReadyCB = readyCB; - m_onAssetMovedCB = movedCB; - m_onAssetReloadedCB = reloadedCB; - m_onAssetSavedCB = savedCB; - m_onAssetUnloadedCB = unloadedCB; - m_onAssetErrorCB = errorCB; - m_onAssetCanceledCB = cancelCB; - } + bool AssetData::GetFlag(const AssetDataFlags& checkFlag) const + { + return m_flags[aznumeric_cast(checkFlag)]; + } - void AssetBusCallbacks::ClearCallbacks() - { - SetCallbacks(AssetBusCallbacks::AssetReadyCB(), - AssetBusCallbacks::AssetMovedCB(), - AssetBusCallbacks::AssetReloadedCB(), - AssetBusCallbacks::AssetSavedCB(), - AssetBusCallbacks::AssetUnloadedCB(), - AssetBusCallbacks::AssetErrorCB(), - AssetBusCallbacks::AssetCanceledCB()); - } + void AssetData::SetFlag(const AssetDataFlags& checkFlag, bool setValue) + { + m_flags.set(aznumeric_cast(checkFlag), setValue); + } + bool AssetData::GetRequeue() const + { + return GetFlag(AssetDataFlags::Requeue); + } + void AssetData::SetRequeue(bool requeue) + { + SetFlag(AssetDataFlags::Requeue, requeue); + } - void AssetBusCallbacks::SetOnAssetReadyCallback(const AssetReadyCB& readyCB) - { - m_onAssetReadyCB = readyCB; - } + void AssetBusCallbacks::SetCallbacks(const AssetReadyCB& readyCB, const AssetMovedCB& movedCB, const AssetReloadedCB& reloadedCB, + const AssetSavedCB& savedCB, const AssetUnloadedCB& unloadedCB, const AssetErrorCB& errorCB, const AssetCanceledCB& cancelCB) + { + m_onAssetReadyCB = readyCB; + m_onAssetMovedCB = movedCB; + m_onAssetReloadedCB = reloadedCB; + m_onAssetSavedCB = savedCB; + m_onAssetUnloadedCB = unloadedCB; + m_onAssetErrorCB = errorCB; + m_onAssetCanceledCB = cancelCB; + } + + void AssetBusCallbacks::ClearCallbacks() + { + SetCallbacks(AssetBusCallbacks::AssetReadyCB(), + AssetBusCallbacks::AssetMovedCB(), + AssetBusCallbacks::AssetReloadedCB(), + AssetBusCallbacks::AssetSavedCB(), + AssetBusCallbacks::AssetUnloadedCB(), + AssetBusCallbacks::AssetErrorCB(), + AssetBusCallbacks::AssetCanceledCB()); + } - void AssetBusCallbacks::SetOnAssetMovedCallback(const AssetMovedCB& movedCB) - { - m_onAssetMovedCB = movedCB; - } - void AssetBusCallbacks::SetOnAssetReloadedCallback(const AssetReloadedCB& reloadedCB) - { - m_onAssetReloadedCB = reloadedCB; - } + void AssetBusCallbacks::SetOnAssetReadyCallback(const AssetReadyCB& readyCB) + { + m_onAssetReadyCB = readyCB; + } - void AssetBusCallbacks::SetOnAssetSavedCallback(const AssetSavedCB& savedCB) - { - m_onAssetSavedCB = savedCB; - } + void AssetBusCallbacks::SetOnAssetMovedCallback(const AssetMovedCB& movedCB) + { + m_onAssetMovedCB = movedCB; + } - void AssetBusCallbacks::SetOnAssetUnloadedCallback(const AssetUnloadedCB& unloadedCB) - { - m_onAssetUnloadedCB = unloadedCB; - } + void AssetBusCallbacks::SetOnAssetReloadedCallback(const AssetReloadedCB& reloadedCB) + { + m_onAssetReloadedCB = reloadedCB; + } - void AssetBusCallbacks::SetOnAssetErrorCallback(const AssetErrorCB& errorCB) - { - m_onAssetErrorCB = errorCB; - } + void AssetBusCallbacks::SetOnAssetSavedCallback(const AssetSavedCB& savedCB) + { + m_onAssetSavedCB = savedCB; + } - void AssetBusCallbacks::SetOnAssetCanceledCallback(const AssetCanceledCB& cancelCB) - { - m_onAssetCanceledCB = cancelCB; - } + void AssetBusCallbacks::SetOnAssetUnloadedCallback(const AssetUnloadedCB& unloadedCB) + { + m_onAssetUnloadedCB = unloadedCB; + } - void AssetBusCallbacks::OnAssetReady(Asset asset) - { - if (m_onAssetReadyCB) - { - m_onAssetReadyCB(asset, *this); - } - } + void AssetBusCallbacks::SetOnAssetErrorCallback(const AssetErrorCB& errorCB) + { + m_onAssetErrorCB = errorCB; + } + + void AssetBusCallbacks::SetOnAssetCanceledCallback(const AssetCanceledCB& cancelCB) + { + m_onAssetCanceledCB = cancelCB; + } - void AssetBusCallbacks::OnAssetMoved(Asset asset, void* oldDataPointer) + void AssetBusCallbacks::OnAssetReady(Asset asset) + { + if (m_onAssetReadyCB) { - if (m_onAssetMovedCB) - { - m_onAssetMovedCB(asset, oldDataPointer, *this); - } + m_onAssetReadyCB(asset, *this); } + } - void AssetBusCallbacks::OnAssetReloaded(Asset asset) + void AssetBusCallbacks::OnAssetMoved(Asset asset, void* oldDataPointer) + { + if (m_onAssetMovedCB) { - if (m_onAssetReloadedCB) - { - m_onAssetReloadedCB(asset, *this); - } + m_onAssetMovedCB(asset, oldDataPointer, *this); } + } - void AssetBusCallbacks::OnAssetSaved(Asset asset, bool isSuccessful) + void AssetBusCallbacks::OnAssetReloaded(Asset asset) + { + if (m_onAssetReloadedCB) { - if (m_onAssetSavedCB) - { - m_onAssetSavedCB(asset, isSuccessful, *this); - } + m_onAssetReloadedCB(asset, *this); } + } - void AssetBusCallbacks::OnAssetUnloaded(const AssetId assetId, const AssetType assetType) + void AssetBusCallbacks::OnAssetSaved(Asset asset, bool isSuccessful) + { + if (m_onAssetSavedCB) { - if (m_onAssetUnloadedCB) - { - m_onAssetUnloadedCB(assetId, assetType, *this); - } + m_onAssetSavedCB(asset, isSuccessful, *this); } + } - void AssetBusCallbacks::OnAssetError(Asset asset) + void AssetBusCallbacks::OnAssetUnloaded(const AssetId assetId, const AssetType assetType) + { + if (m_onAssetUnloadedCB) { - if (m_onAssetErrorCB) - { - m_onAssetErrorCB(asset, *this); - } + m_onAssetUnloadedCB(assetId, assetType, *this); } + } - void AssetBusCallbacks::OnAssetCanceled(const AssetId assetId) + void AssetBusCallbacks::OnAssetError(Asset asset) + { + if (m_onAssetErrorCB) { - if (m_onAssetCanceledCB) - { - m_onAssetCanceledCB(assetId, *this); - } + m_onAssetErrorCB(asset, *this); } + } - /*static*/ bool AssetFilterNoAssetLoading([[maybe_unused]] const AssetFilterInfo& filterInfo) + void AssetBusCallbacks::OnAssetCanceled(const AssetId assetId) + { + if (m_onAssetCanceledCB) { - return false; + m_onAssetCanceledCB(assetId, *this); } - namespace ProductDependencyInfo + } + + /*static*/ bool AssetFilterNoAssetLoading([[maybe_unused]] const AssetFilterInfo& filterInfo) + { + return false; + } + namespace ProductDependencyInfo + { + AZ::Data::AssetLoadBehavior LoadBehaviorFromFlags(const ProductDependencyFlags& dependencyFlags) { - AZ::Data::AssetLoadBehavior LoadBehaviorFromFlags(const ProductDependencyFlags& dependencyFlags) + AZ::u8 loadBehaviorValue = 0; + for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); + thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) { - AZ::u8 loadBehaviorValue = 0; - for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); - thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) + if (dependencyFlags[thisFlag]) { - if (dependencyFlags[thisFlag]) - { - loadBehaviorValue |= (1 << thisFlag); - } + loadBehaviorValue |= (1 << thisFlag); } - return static_cast(loadBehaviorValue); } + return static_cast(loadBehaviorValue); + } - ProductDependencyFlags CreateFlags(AZ::Data::AssetLoadBehavior autoLoadBehavior) + ProductDependencyFlags CreateFlags(AZ::Data::AssetLoadBehavior autoLoadBehavior) + { + AZ::Data::ProductDependencyInfo::ProductDependencyFlags returnFlags; + AZ::u8 loadBehavior = aznumeric_caster(autoLoadBehavior); + for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); + thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) { - AZ::Data::ProductDependencyInfo::ProductDependencyFlags returnFlags; - AZ::u8 loadBehavior = aznumeric_caster(autoLoadBehavior); - for (AZ::u8 thisFlag = aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorLow); - thisFlag <= aznumeric_cast(ProductDependencyFlagBits::LoadBehaviorHigh); ++thisFlag) + if (loadBehavior & (1 << thisFlag)) { - if (loadBehavior & (1 << thisFlag)) - { - returnFlags[thisFlag] = true; - } + returnFlags[thisFlag] = true; } - return returnFlags; } + return returnFlags; } - } // namespace Data -} // namespace AZ + } +} // namespace AZ::Data diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp index ce15c7bc4e..bab161fc0a 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.cpp @@ -11,466 +11,469 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data + AssetContainer::AssetContainer(Asset rootAsset, const AssetLoadParameters& loadParams) { - AssetContainer::AssetContainer(Asset rootAsset, const AssetLoadParameters& loadParams) - { - m_rootAsset = AssetInternal::WeakAsset(rootAsset); - m_containerAssetId = m_rootAsset.GetId(); + m_rootAsset = AssetInternal::WeakAsset(rootAsset); + m_containerAssetId = m_rootAsset.GetId(); + + AddDependentAssets(rootAsset, loadParams); + } - AddDependentAssets(rootAsset, loadParams); + AssetContainer::~AssetContainer() + { + // Validate that if the AssetManager is performing normal processing duties, the AssetContainer is only destroyed once all + // dependent asset loads have completed. + if (AssetManager::IsReady() && !AssetManager::Instance().ShouldCancelAllActiveJobs()) + { + AZ_Assert(m_waitingCount == 0, "Container destroyed while dependent assets are still loading. The dependent assets may " + "end up in a perpetual loading state if there is no top-level container signalling the completion of the full load."); } - AssetContainer::~AssetContainer() + AssetBus::MultiHandler::BusDisconnect(); + AssetLoadBus::MultiHandler::BusDisconnect(); + } + + AZStd::vector>> AssetContainer::CreateAndQueueDependentAssets( + const AZStd::vector& dependencyInfoList, const AssetLoadParameters& loadParamsCopyWithNoLoadingFilter) + { + AZStd::vector>> dependencyAssets; + + for (auto& thisInfo : dependencyInfoList) { - // Validate that if the AssetManager is performing normal processing duties, the AssetContainer is only destroyed once all - // dependent asset loads have completed. - if (AssetManager::IsReady() && !AssetManager::Instance().ShouldCancelAllActiveJobs()) + auto dependentAsset = AssetManager::Instance().FindOrCreateAsset( + thisInfo.m_assetId, thisInfo.m_assetType, AZ::Data::AssetLoadBehavior::Default); + + if (!dependentAsset || !dependentAsset.GetId().IsValid()) { - AZ_Assert(m_waitingCount == 0, "Container destroyed while dependent assets are still loading. The dependent assets may " - "end up in a perpetual loading state if there is no top-level container signalling the completion of the full load."); + AZ_Warning("AssetContainer", false, "Dependency Asset %s (%s) was not found\n", + thisInfo.m_assetId.ToString().c_str(), thisInfo.m_relativePath.c_str()); + RemoveWaitingAsset(thisInfo.m_assetId); + continue; } - - AssetBus::MultiHandler::BusDisconnect(); - AssetLoadBus::MultiHandler::BusDisconnect(); + dependencyAssets.emplace_back(thisInfo, AZStd::move(dependentAsset)); } - void AssetContainer::AddDependentAssets(Asset rootAsset, const AssetLoadParameters& loadParams) + // Queue the loading of all of the dependent assets before loading the root asset. + for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) { - AssetId rootAssetId = rootAsset.GetId(); - AssetType rootAssetType = rootAsset.GetType(); - - // Every asset we're going to be waiting on a load for - the root and all valid dependencies - AZStd::vector waitingList; - waitingList.push_back(rootAssetId); - - // Every asset dependency that we're aware of, whether or not it gets filtered out by the asset filter callback. - // This will be used at the point that asset references get serialized in to see whether or not we've received any - // unexpected assets that didn't appear in our asset catalog dependency list that need to be loaded anyways. - AZStd::vector handledAssetDependencyList; - - // Cached AssetInfo to save another lookup inside Assetmanager - AZStd::vector dependencyInfoList; - Outcome, AZStd::string> getDependenciesResult = Failure(AZStd::string()); - - // Track preloads in an additional list - they're in our waiting/dependencyInfo lists as well, but preloads require us to - // suppress emitting "AssetReady" until everything we care about in this context is ready - PreloadAssetListType preloadDependencies; - if (loadParams.m_dependencyRules == AssetDependencyLoadRules::UseLoadBehavior) - { - AZStd::unordered_set noloadDependencies; - AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetLoadBehaviorProductDependencies, - rootAssetId, noloadDependencies, preloadDependencies); - if (!noloadDependencies.empty()) - { - AZStd::lock_guard dependencyLock(m_dependencyMutex); - m_unloadedDependencies.insert(noloadDependencies.begin(), noloadDependencies.end()); - } - } - else if (loadParams.m_dependencyRules == AssetDependencyLoadRules::LoadAll) - { - AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetAllProductDependencies, rootAssetId); - } - // Do as much validation of dependencies as we can before the AddWaitingAssets and GetAsset calls for dependencies below - if (getDependenciesResult.IsSuccess()) - { - for (const auto& thisAsset : getDependenciesResult.GetValue()) - { - AssetInfo assetInfo; - AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, thisAsset.m_assetId); + // Queue each asset to load. + auto queuedDependentAsset = AssetManager::Instance().GetAssetInternal( + dependentAsset.GetId(), dependentAsset.GetType(), + AZ::Data::AssetLoadBehavior::Default, loadParamsCopyWithNoLoadingFilter, + dependentAssetInfo, HasPreloads(dependentAsset.GetId())); - // No matter whether or not the asset dependency is valid, loaded, or filtered out, mark it as successfully handled. - // When we encounter the asset reference during serialization, we will know that it should intentionally be skipped. - // Otherwise, it would be treated as a missing dependency and assert. - handledAssetDependencyList.emplace_back(thisAsset.m_assetId); + // Verify that the returned asset reference matches the one that we found or created and queued to load. + AZ_Assert(dependentAsset == queuedDependentAsset, "GetAssetInternal returned an unexpected asset reference for Asset %s", + dependentAsset.GetId().ToString().c_str()); + } - if (!assetInfo.m_assetId.IsValid()) - { - // Handlers may just not currently be around for a given asset type so we only warn here - AZ_Warning("AssetContainer", false, "Asset %s (%s) references/depends on asset %s which does not exist in the catalog and cannot be loaded.", - rootAsset.GetHint().c_str(), - rootAssetId.ToString().c_str(), - thisAsset.m_assetId.ToString().c_str()); - m_invalidDependencies++; - continue; - } - if (assetInfo.m_assetId == rootAssetId) - { - // Circular dependencies in our graph need to be raised as errors as they could cause problems elsewhere - AZ_Error("AssetContainer", false, "Circular dependency found under asset %s", rootAssetId.ToString().c_str()); - m_invalidDependencies++; - continue; - } - if (!AssetManager::Instance().GetHandler(assetInfo.m_assetType)) - { - // Handlers may just not currently be around for a given asset type so we only warn here - m_invalidDependencies++; - continue; - } - if (loadParams.m_assetLoadFilterCB) - { - if (!loadParams.m_assetLoadFilterCB({thisAsset.m_assetId, assetInfo.m_assetType, - AZ::Data::ProductDependencyInfo::LoadBehaviorFromFlags(thisAsset.m_flags) })) - { - continue; - } - } - dependencyInfoList.push_back(assetInfo); - } - } - for (auto& thisInfo : dependencyInfoList) + return dependencyAssets; + } + + void AssetContainer::AddDependentAssets(Asset rootAsset, const AssetLoadParameters& loadParams) + { + AssetId rootAssetId = rootAsset.GetId(); + AssetType rootAssetType = rootAsset.GetType(); + + // Every asset we're going to be waiting on a load for - the root and all valid dependencies + AZStd::vector waitingList; + waitingList.push_back(rootAssetId); + + // Every asset dependency that we're aware of, whether or not it gets filtered out by the asset filter callback. + // This will be used at the point that asset references get serialized in to see whether or not we've received any + // unexpected assets that didn't appear in our asset catalog dependency list that need to be loaded anyways. + AZStd::vector handledAssetDependencyList; + + // Cached AssetInfo to save another lookup inside Assetmanager + AZStd::vector dependencyInfoList; + Outcome, AZStd::string> getDependenciesResult = Failure(AZStd::string()); + + // Track preloads in an additional list - they're in our waiting/dependencyInfo lists as well, but preloads require us to + // suppress emitting "AssetReady" until everything we care about in this context is ready + PreloadAssetListType preloadDependencies; + if (loadParams.m_dependencyRules == AssetDependencyLoadRules::UseLoadBehavior) + { + AZStd::unordered_set noloadDependencies; + AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetLoadBehaviorProductDependencies, + rootAssetId, noloadDependencies, preloadDependencies); + if (!noloadDependencies.empty()) { - waitingList.push_back(thisInfo.m_assetId); + AZStd::lock_guard dependencyLock(m_dependencyMutex); + m_unloadedDependencies.insert(noloadDependencies.begin(), noloadDependencies.end()); } + } + else if (loadParams.m_dependencyRules == AssetDependencyLoadRules::LoadAll) + { + AssetCatalogRequestBus::BroadcastResult(getDependenciesResult, &AssetCatalogRequestBus::Events::GetAllProductDependencies, rootAssetId); + } + // Do as much validation of dependencies as we can before the AddWaitingAssets and GetAsset calls for dependencies below + if (getDependenciesResult.IsSuccess()) + { + for (const auto& thisAsset : getDependenciesResult.GetValue()) + { + AssetInfo assetInfo; + AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, thisAsset.m_assetId); - // Add waiting assets ahead of time to hear signals for any which may already be loading - AddWaitingAssets(waitingList); - SetupPreloadLists(move(preloadDependencies), rootAssetId); - - auto loadParamsCopyWithNoLoadingFilter = loadParams; + // No matter whether or not the asset dependency is valid, loaded, or filtered out, mark it as successfully handled. + // When we encounter the asset reference during serialization, we will know that it should intentionally be skipped. + // Otherwise, it would be treated as a missing dependency and assert. + handledAssetDependencyList.emplace_back(thisAsset.m_assetId); - // All asset dependencies below the root asset should be provided by the asset catalog, and therefore should *not* - // get triggered to load when the asset reference is serialized in. However, it's useful to detect, warn, and handle - // the case where the asset dependencies are NOT set up correctly. - loadParamsCopyWithNoLoadingFilter.m_assetLoadFilterCB = [handledAssetDependencyList](const AssetFilterInfo& filterInfo) - { - // NoLoad dependencies should always get filtered out and not loaded. - if (filterInfo.m_loadBehavior == AZ::Data::AssetLoadBehavior::NoLoad) + if (!assetInfo.m_assetId.IsValid()) { - return false; + // Handlers may just not currently be around for a given asset type so we only warn here + AZ_Warning("AssetContainer", false, "Asset %s (%s) references/depends on asset %s which does not exist in the catalog and cannot be loaded.", + rootAsset.GetHint().c_str(), + rootAssetId.ToString().c_str(), + thisAsset.m_assetId.ToString().c_str()); + m_invalidDependencies++; + continue; } - - // In the normal case, the dependent asset appears in the handled asset list, and we should return false so that - // the asset isn't attempted to be loaded, since the asset will already be triggered to get loaded or was possibly - // already filtered out by the load filter callback. - // In the error case, the asset dependencies haven't been produced by the builder correctly, so assets - // have shown up that the asset container hasn't triggered to load and isn't listening for. Assert that this case - // has happened so that the builder for this asset type can be fixed. - // Ideally we would proceed forward and load them by returning "true", but the triggered load would use this lambda - // function as the asset load filter for that load as well, which isn't correct. If we ever want to support that - // behavior, we would need to rework the way filters work as well as the code in AssetSerializer.cpp to pass down - // the loadParams.m_assetLoadFilterCB that was passed into the AddDependentAssets() methods to use as the dependent - // asset filter instead of this lambda function. - AZ_UNUSED(handledAssetDependencyList); // Prevent unused warning in release builds - AZ_Assert(AZStd::find(handledAssetDependencyList.begin(), handledAssetDependencyList.end(), filterInfo.m_assetId) != - handledAssetDependencyList.end(), - "Dependent Asset ID (%s) is expected to load, but the Asset Catalog has no dependency recorded. " - "Examine the asset builder for the asset relying on this to ensure it is generating the correct dependencies.", - filterInfo.m_assetId.ToString().c_str()); - - // The dependent asset should have already been created and at least queued to load prior to reaching this point. - // The asset serializer needs to get a successful result from FindAsset(), or else our asset reference will fail - // to point to the asset data once it is loaded. - if (!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default)) + if (assetInfo.m_assetId == rootAssetId) { - AZ_Assert(!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default), - "Dependent Asset ID (%s) can't be found in the AssetManager, which means the asset referencing it has probably " - "started loading before the dependent asset has been queued to load. Verify that the asset dependencies have " - "been created correctly for the parent asset.", - filterInfo.m_assetId.ToString().c_str()); + // Circular dependencies in our graph need to be raised as errors as they could cause problems elsewhere + AZ_Error("AssetContainer", false, "Circular dependency found under asset %s", rootAssetId.ToString().c_str()); + m_invalidDependencies++; + continue; } - - return false; - }; - - // This will contain the list of dependent assets that have been created (or found) and queued to load. - // We also keep a copy of the AssetInfo structure as a small optimization to avoid a redundant lookup in GetAssetInternal. - AZStd::vector>> dependencyAssets; - - // Make sure all the dependencies are created first before we try to load them. - // Since we've set the load filter to not load dependencies, we need to ensure all the assets are created beforehand - // so the dependencies can be hooked up as soon as each asset gets serialized in, even if they start getting serialized - // while we're still in the middle of triggering all of the asset loads below. - for (auto& thisInfo : dependencyInfoList) - { - auto dependentAsset = AssetManager::Instance().FindOrCreateAsset( - thisInfo.m_assetId, thisInfo.m_assetType, AZ::Data::AssetLoadBehavior::Default); - - if (!dependentAsset || !dependentAsset.GetId().IsValid()) + if (!AssetManager::Instance().GetHandler(assetInfo.m_assetType)) { - AZ_Warning("AssetContainer", false, "Dependency Asset %s (%s) was not found\n", - thisInfo.m_assetId.ToString().c_str(), thisInfo.m_relativePath.c_str()); - RemoveWaitingAsset(thisInfo.m_assetId); + // Handlers may just not currently be around for a given asset type so we only warn here + m_invalidDependencies++; continue; } - dependencyAssets.emplace_back(thisInfo, AZStd::move(dependentAsset)); + if (loadParams.m_assetLoadFilterCB) + { + if (!loadParams.m_assetLoadFilterCB({thisAsset.m_assetId, assetInfo.m_assetType, + AZ::Data::ProductDependencyInfo::LoadBehaviorFromFlags(thisAsset.m_flags) })) + { + continue; + } + } + dependencyInfoList.push_back(assetInfo); } + } + for (auto& thisInfo : dependencyInfoList) + { + waitingList.push_back(thisInfo.m_assetId); + } - // Queue the loading of all of the dependent assets before loading the root asset. - for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) - { - // Queue each asset to load. - auto queuedDependentAsset = AssetManager::Instance().GetAssetInternal( - dependentAsset.GetId(), dependentAsset.GetType(), - AZ::Data::AssetLoadBehavior::Default, loadParamsCopyWithNoLoadingFilter, - dependentAssetInfo, HasPreloads(dependentAsset.GetId())); - - // Verify that the returned asset reference matches the one that we found or created and queued to load. - AZ_Assert(dependentAsset == queuedDependentAsset, "GetAssetInternal returned an unexpected asset reference for Asset %s", - dependentAsset.GetId().ToString().c_str()); - } + // Add waiting assets ahead of time to hear signals for any which may already be loading + AddWaitingAssets(waitingList); + SetupPreloadLists(move(preloadDependencies), rootAssetId); - // Add all of the queued dependent assets as dependencies + auto loadParamsCopyWithNoLoadingFilter = loadParams; + + // All asset dependencies below the root asset should be provided by the asset catalog, and therefore should *not* + // get triggered to load when the asset reference is serialized in. However, it's useful to detect, warn, and handle + // the case where the asset dependencies are NOT set up correctly. + loadParamsCopyWithNoLoadingFilter.m_assetLoadFilterCB = [handledAssetDependencyList](const AssetFilterInfo& filterInfo) + { + // NoLoad dependencies should always get filtered out and not loaded. + if (filterInfo.m_loadBehavior == AZ::Data::AssetLoadBehavior::NoLoad) { - AZStd::lock_guard dependencyLock(m_dependencyMutex); - for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) - { - AddDependency(AZStd::move(dependentAsset)); - } + return false; } - // Finally, after creating and queueing the dependent assets, queue the root asset. This is saved until last to ensure that - // it doesn't have any chance of serializing in until after all the dependent assets have been queued for loading and have - // been added to the list of dependencies. - auto thisAsset = AssetManager::Instance().GetAssetInternal(rootAssetId, rootAssetType, rootAsset.GetAutoLoadBehavior(), - loadParamsCopyWithNoLoadingFilter, AssetInfo(), HasPreloads(rootAssetId)); - - if (!thisAsset) + // In the normal case, the dependent asset appears in the handled asset list, and we should return false so that + // the asset isn't attempted to be loaded, since the asset will already be triggered to get loaded or was possibly + // already filtered out by the load filter callback. + // In the error case, the asset dependencies haven't been produced by the builder correctly, so assets + // have shown up that the asset container hasn't triggered to load and isn't listening for. Assert that this case + // has happened so that the builder for this asset type can be fixed. + // Ideally we would proceed forward and load them by returning "true", but the triggered load would use this lambda + // function as the asset load filter for that load as well, which isn't correct. If we ever want to support that + // behavior, we would need to rework the way filters work as well as the code in AssetSerializer.cpp to pass down + // the loadParams.m_assetLoadFilterCB that was passed into the AddDependentAssets() methods to use as the dependent + // asset filter instead of this lambda function. + AZ_UNUSED(handledAssetDependencyList); // Prevent unused warning in release builds + AZ_Assert(AZStd::find(handledAssetDependencyList.begin(), handledAssetDependencyList.end(), filterInfo.m_assetId) != + handledAssetDependencyList.end(), + "Dependent Asset ID (%s) is expected to load, but the Asset Catalog has no dependency recorded. " + "Examine the asset builder for the asset relying on this to ensure it is generating the correct dependencies.", + filterInfo.m_assetId.ToString().c_str()); + + // The dependent asset should have already been created and at least queued to load prior to reaching this point. + // The asset serializer needs to get a successful result from FindAsset(), or else our asset reference will fail + // to point to the asset data once it is loaded. + if (!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default)) { - AZ_Assert(false, "Root asset with id %s failed to load, asset container is invalid.", - rootAssetId.ToString().c_str()); - ClearWaitingAssets(); - // initComplete remains false, because we have failed to initialize successfully. - return; + AZ_Assert(!Data::AssetManager::Instance().FindAsset(filterInfo.m_assetId, AZ::Data::AssetLoadBehavior::Default), + "Dependent Asset ID (%s) can't be found in the AssetManager, which means the asset referencing it has probably " + "started loading before the dependent asset has been queued to load. Verify that the asset dependencies have " + "been created correctly for the parent asset.", + filterInfo.m_assetId.ToString().c_str()); } - m_initComplete = true; + return false; + }; - // *After* setting initComplete to true, check to see if the assets are already ready. - // This check needs to wait until after setting initComplete because if they *are* ready, we want the final call to - // RemoveWaitingAsset to trigger the OnAssetContainerReady/Canceled event. If we call CheckReady() *before* setting - // initComplete, if all the assets are ready, the event will never get triggered. - CheckReady(); - } + // This will contain the list of dependent assets that have been created (or found) and queued to load. + // We also keep a copy of the AssetInfo structure as a small optimization to avoid a redundant lookup in GetAssetInternal. + AZStd::vector>> dependencyAssets; - bool AssetContainer::IsReady() const - { - return (m_rootAsset && m_waitingCount == 0); - } + // Make sure all the dependencies are created first before we try to load them. + // Since we've set the load filter to not load dependencies, we need to ensure all the assets are created beforehand + // so the dependencies can be hooked up as soon as each asset gets serialized in, even if they start getting serialized + // while we're still in the middle of triggering all of the asset loads below. + dependencyAssets = CreateAndQueueDependentAssets(dependencyInfoList, loadParamsCopyWithNoLoadingFilter); - bool AssetContainer::IsLoading() const + // Add all of the queued dependent assets as dependencies { - return (m_rootAsset || m_waitingCount); + AZStd::lock_guard dependencyLock(m_dependencyMutex); + for (auto& [dependentAssetInfo, dependentAsset] : dependencyAssets) + { + AddDependency(AZStd::move(dependentAsset)); + } } - bool AssetContainer::IsValid() const + // Finally, after creating and queueing the dependent assets, queue the root asset. This is saved until last to ensure that + // it doesn't have any chance of serializing in until after all the dependent assets have been queued for loading and have + // been added to the list of dependencies. + auto thisAsset = AssetManager::Instance().GetAssetInternal(rootAssetId, rootAssetType, rootAsset.GetAutoLoadBehavior(), + loadParamsCopyWithNoLoadingFilter, AssetInfo(), HasPreloads(rootAssetId)); + + if (!thisAsset) { - return (m_containerAssetId.IsValid() && m_initComplete && m_rootAsset); + AZ_Assert(false, "Root asset with id %s failed to load, asset container is invalid.", + rootAssetId.ToString().c_str()); + ClearWaitingAssets(); + // initComplete remains false, because we have failed to initialize successfully. + return; } - void AssetContainer::CheckReady() + m_initComplete = true; + + // *After* setting initComplete to true, check to see if the assets are already ready. + // This check needs to wait until after setting initComplete because if they *are* ready, we want the final call to + // RemoveWaitingAsset to trigger the OnAssetContainerReady/Canceled event. If we call CheckReady() *before* setting + // initComplete, if all the assets are ready, the event will never get triggered. + CheckReady(); + } + + bool AssetContainer::IsReady() const + { + return (m_rootAsset && m_waitingCount == 0); + } + + bool AssetContainer::IsLoading() const + { + return (m_rootAsset || m_waitingCount); + } + + bool AssetContainer::IsValid() const + { + return (m_containerAssetId.IsValid() && m_initComplete && m_rootAsset); + } + + void AssetContainer::CheckReady() + { + if (!m_dependencies.empty()) { - if (!m_dependencies.empty()) + for (auto& [assetId, dependentAsset] : m_dependencies) { - for (auto& [assetId, dependentAsset] : m_dependencies) + if (dependentAsset->IsReady() || dependentAsset->IsError()) { - if (dependentAsset->IsReady() || dependentAsset->IsError()) - { - HandleReadyAsset(dependentAsset); - } + HandleReadyAsset(dependentAsset); } } - if (auto asset = m_rootAsset.GetStrongReference(); asset.IsReady() || asset.IsError()) - { - HandleReadyAsset(asset); - } } - - Asset AssetContainer::GetRootAsset() + if (auto asset = m_rootAsset.GetStrongReference(); asset.IsReady() || asset.IsError()) { - return m_rootAsset.GetStrongReference(); + HandleReadyAsset(asset); } + } - AssetId AssetContainer::GetContainerAssetId() - { - return m_containerAssetId; - } + Asset AssetContainer::GetRootAsset() + { + return m_rootAsset.GetStrongReference(); + } - void AssetContainer::ClearRootAsset() - { - AssetId rootId = m_rootAsset.GetId(); + AssetId AssetContainer::GetContainerAssetId() + { + return m_containerAssetId; + } - { - AZStd::lock_guard preloadGuard(m_preloadMutex); + void AssetContainer::ClearRootAsset() + { + AssetId rootId = m_rootAsset.GetId(); - // Erase the entry in the preloadWaitList for the root asset if one exists. - m_preloadWaitList.erase(rootId); + { + AZStd::lock_guard preloadGuard(m_preloadMutex); - // It's possible that the root asset has preload dependencies, so make sure to check the preload list and remove - // the entry for the root asset if it has one. - auto rootAssetPreloadIter = m_preloadList.find(rootId); - if (rootAssetPreloadIter != m_preloadList.end()) + // Erase the entry in the preloadWaitList for the root asset if one exists. + m_preloadWaitList.erase(rootId); + + // It's possible that the root asset has preload dependencies, so make sure to check the preload list and remove + // the entry for the root asset if it has one. + auto rootAssetPreloadIter = m_preloadList.find(rootId); + if (rootAssetPreloadIter != m_preloadList.end()) + { + // Since the root asset has a preload list, that means the preload wait list will also have references to the + // root asset. (The preload wait list is a list of assets waiting on a preload asset to finish) Clear those + // out as well. + auto waitAssetSet = rootAssetPreloadIter->second; + for (auto& waitId : waitAssetSet) { - // Since the root asset has a preload list, that means the preload wait list will also have references to the - // root asset. (The preload wait list is a list of assets waiting on a preload asset to finish) Clear those - // out as well. - auto waitAssetSet = rootAssetPreloadIter->second; - for (auto& waitId : waitAssetSet) + auto waitAssetIter = m_preloadWaitList.find(waitId); + if (waitAssetIter != m_preloadWaitList.end()) { - auto waitAssetIter = m_preloadWaitList.find(waitId); - if (waitAssetIter != m_preloadWaitList.end()) - { - waitAssetIter->second.erase(rootId); - } + waitAssetIter->second.erase(rootId); } - - m_preloadList.erase(rootAssetPreloadIter); } + + m_preloadList.erase(rootAssetPreloadIter); } + } - // Clear out the root asset before removing it from the waiting list to ensure that we trigger an "OnAssetContainerCanceled" - // event instead of "OnAssetContainerReady". - m_rootAsset = {}; - RemoveWaitingAsset(rootId); + // Clear out the root asset before removing it from the waiting list to ensure that we trigger an "OnAssetContainerCanceled" + // event instead of "OnAssetContainerReady". + m_rootAsset = {}; + RemoveWaitingAsset(rootId); - } + } - void AssetContainer::AddDependency(const Asset& newDependency) - { - m_dependencies[newDependency->GetId()] = newDependency; - } - void AssetContainer::AddDependency(Asset&& newDependency) - { - m_dependencies[newDependency->GetId()] = AZStd::move(newDependency); - } + void AssetContainer::AddDependency(const Asset& newDependency) + { + m_dependencies[newDependency->GetId()] = newDependency; + } + void AssetContainer::AddDependency(Asset&& newDependency) + { + m_dependencies[newDependency->GetId()] = AZStd::move(newDependency); + } - void AssetContainer::OnAssetReady(Asset asset) - { - HandleReadyAsset(asset); - } + void AssetContainer::OnAssetReady(Asset asset) + { + HandleReadyAsset(asset); + } - void AssetContainer::OnAssetError(Asset asset) - { - AZ_Warning("AssetContainer", false, "Error loading asset %s", asset->GetId().ToString().c_str()); - HandleReadyAsset(asset); - } + void AssetContainer::OnAssetError(Asset asset) + { + AZ_Warning("AssetContainer", false, "Error loading asset %s", asset->GetId().ToString().c_str()); + HandleReadyAsset(asset); + } - void AssetContainer::HandleReadyAsset(Asset asset) - { - RemoveFromAllWaitingPreloads(asset->GetId()); - RemoveWaitingAsset(asset->GetId()); - } + void AssetContainer::HandleReadyAsset(Asset asset) + { + // Wait until we've finished initialization before allowing this + // If a ready event happens before we've gotten all the maps/structures set up, there may be some missing data + // which can lead to a crash + // We'll go through and check the ready status of every dependency immediately after finishing initialization anyway + if (m_initComplete) + { + RemoveFromAllWaitingPreloads(asset->GetId()); + RemoveWaitingAsset(asset->GetId()); + } + } + + void AssetContainer::OnAssetDataLoaded(Asset asset) + { + // Remove only from this asset's waiting list. Anything else should + // listen for OnAssetReady as the true signal. This is essentially removing the + // "marker" we placed in SetupPreloads that we need to wait for our own data + RemoveFromWaitingPreloads(asset->GetId(), asset->GetId()); + } - void AssetContainer::OnAssetDataLoaded(Asset asset) + void AssetContainer::RemoveFromWaitingPreloads(const AssetId& waiterId, const AssetId& preloadID) + { { - // Remove only from this asset's waiting list. Anything else should - // listen for OnAssetReady as the true signal. This is essentially removing the - // "marker" we placed in SetupPreloads that we need to wait for our own data - RemoveFromWaitingPreloads(asset->GetId(), asset->GetId()); - } + AZStd::lock_guard preloadGuard(m_preloadMutex); - void AssetContainer::RemoveFromWaitingPreloads(const AssetId& waiterId, const AssetId& preloadID) - { + auto remainingPreloadIter = m_preloadList.find(waiterId); + if (remainingPreloadIter == m_preloadList.end()) { - AZStd::lock_guard preloadGuard(m_preloadMutex); - - auto remainingPreloadIter = m_preloadList.find(waiterId); - if (remainingPreloadIter == m_preloadList.end()) - { - // If we got here without an entry on the preload list, it probably means this asset was triggered to load multiple - // times, some with dependencies and some without. To ensure that we don't disturb the loads that expect the - // dependencies, just silently return and don't treat the asset as finished loading. We'll rely on the other load - // to send an OnAssetReady() whenever its expected dependencies are met. - return; - } - if (!remainingPreloadIter->second.erase(preloadID)) - { - AZ_Warning("AssetContainer", !m_initComplete, "Couldn't remove %s from waiting list of %s", preloadID.ToString().c_str(), waiterId.ToString().c_str()); - return; - } - if (!remainingPreloadIter->second.empty()) - { - return; - } + // If we got here without an entry on the preload list, it probably means this asset was triggered to load multiple + // times, some with dependencies and some without. To ensure that we don't disturb the loads that expect the + // dependencies, just silently return and don't treat the asset as finished loading. We'll rely on the other load + // to send an OnAssetReady() whenever its expected dependencies are met. + return; } - auto thisAsset = GetAssetData(waiterId); - AssetManager::Instance().ValidateAndPostLoad(thisAsset, true, false, nullptr); - } - - void AssetContainer::RemoveFromAllWaitingPreloads(const AssetId& thisId) - { - AZStd::unordered_set checkList; + if (!remainingPreloadIter->second.erase(preloadID)) { - AZStd::lock_guard preloadGuard(m_preloadMutex); - - auto waitingList = m_preloadWaitList.find(thisId); - if (waitingList != m_preloadWaitList.end()) - { - checkList = move(waitingList->second); - m_preloadWaitList.erase(waitingList); - } + AZ_Warning("AssetContainer", !m_initComplete, "Couldn't remove %s from waiting list of %s", preloadID.ToString().c_str(), waiterId.ToString().c_str()); + return; } - for (auto& thisDepId : checkList) + if (!remainingPreloadIter->second.empty()) { - if (thisDepId != thisId) - { - RemoveFromWaitingPreloads(thisDepId, thisId); - } + return; } } + auto thisAsset = GetAssetData(waiterId); + AssetManager::Instance().ValidateAndPostLoad(thisAsset, true, false, nullptr); + } - void AssetContainer::ClearWaitingAssets() + void AssetContainer::RemoveFromAllWaitingPreloads(const AssetId& thisId) + { + AZStd::unordered_set checkList; { - AZStd::lock_guard lock(m_readyMutex); - m_waitingCount = 0; - for (auto& thisAsset : m_waitingAssets) + AZStd::lock_guard preloadGuard(m_preloadMutex); + + auto waitingList = m_preloadWaitList.find(thisId); + if (waitingList != m_preloadWaitList.end()) { - AssetBus::MultiHandler::BusDisconnect(thisAsset); + checkList = move(waitingList->second); + m_preloadWaitList.erase(waitingList); } - m_waitingAssets.clear(); } - - void AssetContainer::ListWaitingAssets() const + for (auto& thisDepId : checkList) { -#if defined(AZ_ENABLE_TRACING) - AZStd::lock_guard lock(m_readyMutex); - AZ_TracePrintf("AssetContainer", "Waiting on assets:\n"); - for (auto& thisAsset : m_waitingAssets) + if (thisDepId != thisId) { - AZ_TracePrintf("AssetContainer", " %s\n",thisAsset.ToString().c_str()); + RemoveFromWaitingPreloads(thisDepId, thisId); } -#endif } + } - void AssetContainer::ListWaitingPreloads([[maybe_unused]] const AssetId& assetId) const + void AssetContainer::ClearWaitingAssets() + { + AZStd::lock_guard lock(m_readyMutex); + m_waitingCount = 0; + for (auto& thisAsset : m_waitingAssets) { + AssetBus::MultiHandler::BusDisconnect(thisAsset); + } + m_waitingAssets.clear(); + } + + void AssetContainer::ListWaitingAssets() const + { #if defined(AZ_ENABLE_TRACING) - AZStd::lock_guard preloadGuard(m_preloadMutex); - auto preloadEntry = m_preloadList.find(assetId); - if (preloadEntry != m_preloadList.end()) - { - AZ_TracePrintf("AssetContainer", "%s waiting on preloads : \n",assetId.ToString().c_str()); - for (auto& thisId : preloadEntry->second) - { - AZ_TracePrintf("AssetContainer", " %s\n",thisId.ToString().c_str()); - } - } - else - { - AZ_TracePrintf("AssetContainer", "%s isn't waiting on any preloads:\n", assetId.ToString().c_str()); - } -#endif + AZStd::lock_guard lock(m_readyMutex); + AZ_TracePrintf("AssetContainer", "Waiting on assets:\n"); + for (auto& thisAsset : m_waitingAssets) + { + AZ_TracePrintf("AssetContainer", " %s\n",thisAsset.ToString().c_str()); } +#endif + } - void AssetContainer::AddWaitingAssets(const AZStd::vector& assetList) + void AssetContainer::ListWaitingPreloads([[maybe_unused]] const AssetId& assetId) const + { +#if defined(AZ_ENABLE_TRACING) + AZStd::lock_guard preloadGuard(m_preloadMutex); + auto preloadEntry = m_preloadList.find(assetId); + if (preloadEntry != m_preloadList.end()) { - AZStd::lock_guard lock(m_readyMutex); - for (auto& thisAsset : assetList) + AZ_TracePrintf("AssetContainer", "%s waiting on preloads : \n",assetId.ToString().c_str()); + for (auto& thisId : preloadEntry->second) { - if (m_waitingAssets.insert(thisAsset).second) - { - ++m_waitingCount; - AssetBus::MultiHandler::BusConnect(thisAsset); - AssetLoadBus::MultiHandler::BusConnect(thisAsset); - } + AZ_TracePrintf("AssetContainer", " %s\n",thisId.ToString().c_str()); } } + else + { + AZ_TracePrintf("AssetContainer", "%s isn't waiting on any preloads:\n", assetId.ToString().c_str()); + } +#endif + } - void AssetContainer::AddWaitingAsset(const AssetId& thisAsset) + void AssetContainer::AddWaitingAssets(const AZStd::vector& assetList) + { + AZStd::lock_guard lock(m_readyMutex); + for (auto& thisAsset : assetList) { - AZStd::lock_guard lock(m_readyMutex); if (m_waitingAssets.insert(thisAsset).second) { ++m_waitingCount; @@ -478,196 +481,207 @@ namespace AZ AssetLoadBus::MultiHandler::BusConnect(thisAsset); } } + } - void AssetContainer::RemoveWaitingAsset(const AssetId& thisAsset) + void AssetContainer::AddWaitingAsset(const AssetId& thisAsset) + { + AZStd::lock_guard lock(m_readyMutex); + if (m_waitingAssets.insert(thisAsset).second) { - bool allReady{ false }; - { - bool disconnectEbus = false; + ++m_waitingCount; + AssetBus::MultiHandler::BusConnect(thisAsset); + AssetLoadBus::MultiHandler::BusConnect(thisAsset); + } + } - { // Intentionally limiting lock scope - AZStd::lock_guard lock(m_readyMutex); - // If we're trying to remove something already removed, just ignore it - if (m_waitingAssets.erase(thisAsset)) - { - m_waitingCount -= 1; - disconnectEbus = true; + void AssetContainer::RemoveWaitingAsset(const AssetId& thisAsset) + { + bool allReady{ false }; + { + bool disconnectEbus = false; - } - if (m_waitingAssets.empty()) - { - allReady = true; - } - } + { // Intentionally limiting lock scope + AZStd::lock_guard lock(m_readyMutex); + // If we're trying to remove something already removed, just ignore it + if (m_waitingAssets.erase(thisAsset)) + { + m_waitingCount -= 1; + disconnectEbus = true; - if(disconnectEbus) + } + if (m_waitingAssets.empty()) { - AssetBus::MultiHandler::BusDisconnect(thisAsset); - AssetLoadBus::MultiHandler::BusDisconnect(thisAsset); + allReady = true; } } - // If there are no assets left to be loaded, trigger the final AssetContainer notification (ready or canceled). - // We guard against prematurely sending it (m_initComplete) because it's possible for assets to get removed from our waiting - // list *while* we're still building up the list, so the list would appear to be empty too soon. - // We also guard against sending it multiple times (m_finalNotificationSent), because in some error conditions, it may be - // possible to try to remove the same asset multiple times, which if it's the last asset, it could trigger multiple - // notifications. - if (allReady && m_initComplete && !m_finalNotificationSent) + if(disconnectEbus) { - m_finalNotificationSent = true; - if (m_rootAsset) - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerReady, this); - } - else - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerCanceled, this); - } + AssetBus::MultiHandler::BusDisconnect(thisAsset); + AssetLoadBus::MultiHandler::BusDisconnect(thisAsset); } } - AssetContainer::operator bool() const + // If there are no assets left to be loaded, trigger the final AssetContainer notification (ready or canceled). + // We guard against prematurely sending it (m_initComplete) because it's possible for assets to get removed from our waiting + // list *while* we're still building up the list, so the list would appear to be empty too soon. + // We also guard against sending it multiple times (m_finalNotificationSent), because in some error conditions, it may be + // possible to try to remove the same asset multiple times, which if it's the last asset, it could trigger multiple + // notifications. + if (allReady && m_initComplete && !m_finalNotificationSent) { - return m_rootAsset ? true : false; + m_finalNotificationSent = true; + if (m_rootAsset) + { + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerReady, this); + } + else + { + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetContainerCanceled, this); + } } + } - const AssetContainer::DependencyList& AssetContainer::GetDependencies() const - { - return m_dependencies; - } + AssetContainer::operator bool() const + { + return m_rootAsset ? true : false; + } - const AZStd::unordered_set& AssetContainer::GetUnloadedDependencies() const - { - return m_unloadedDependencies; - } + const AssetContainer::DependencyList& AssetContainer::GetDependencies() const + { + return m_dependencies; + } - void AssetContainer::SetupPreloadLists(PreloadAssetListType&& preloadList, const AssetId& rootAssetId) + const AZStd::unordered_set& AssetContainer::GetUnloadedDependencies() const + { + return m_unloadedDependencies; + } + + void AssetContainer::SetupPreloadLists(PreloadAssetListType&& preloadList, const AssetId& rootAssetId) + { + if (!preloadList.empty()) { - if (!preloadList.empty()) - { - // This method can be entered as additional NoLoad dependency groups are loaded - the container could - // be in the middle of loading so we need to grab both mutexes. - AZStd::scoped_lock lock(m_readyMutex, m_preloadMutex); + // This method can be entered as additional NoLoad dependency groups are loaded - the container could + // be in the middle of loading so we need to grab both mutexes. + AZStd::scoped_lock lock(m_readyMutex, m_preloadMutex); - for (auto thisListPair = preloadList.begin(); thisListPair != preloadList.end();) + for (auto thisListPair = preloadList.begin(); thisListPair != preloadList.end();) + { + // We only should add ourselves if we have another valid preload we're waiting on + bool foundAsset{ false }; + // It's possible this set of preload dependencies was culled out by lack of asset handler + // Or filtering rules. This is not an error, we should just remove it from the list of + // Preloads we're waiting on + if (!m_waitingAssets.count(thisListPair->first)) { - // We only should add ourselves if we have another valid preload we're waiting on - bool foundAsset{ false }; - // It's possible this set of preload dependencies was culled out by lack of asset handler - // Or filtering rules. This is not an error, we should just remove it from the list of - // Preloads we're waiting on - if (!m_waitingAssets.count(thisListPair->first)) + thisListPair = preloadList.erase(thisListPair); + continue; + } + for (auto thisAsset = thisListPair->second.begin(); thisAsset != thisListPair->second.end();) + { + // These are data errors. We'll emit the error but carry on. The container + // will load the assets but won't/can't create a circular preload dependency chain + if (*thisAsset == rootAssetId) { - thisListPair = preloadList.erase(thisListPair); + AZ_Error("AssetContainer", false, "Circular preload dependency found - %s has a preload" + "dependency back to root %s\n", + thisListPair->first.ToString().c_str(), + rootAssetId.ToString().c_str()); + thisAsset = thisListPair->second.erase(thisAsset); continue; } - for (auto thisAsset = thisListPair->second.begin(); thisAsset != thisListPair->second.end();) + else if (*thisAsset == thisListPair->first) { - // These are data errors. We'll emit the error but carry on. The container - // will load the assets but won't/can't create a circular preload dependency chain - if (*thisAsset == rootAssetId) - { - AZ_Error("AssetContainer", false, "Circular preload dependency found - %s has a preload" - "dependency back to root %s\n", - thisListPair->first.ToString().c_str(), - rootAssetId.ToString().c_str()); - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } - else if (*thisAsset == thisListPair->first) - { - AZ_Error("AssetContainer", false, "Circular preload dependency found - Root asset %s has a preload" - "dependency on %s which depends back back to itself\n", - rootAssetId.ToString().c_str(), - thisListPair->first.ToString().c_str()); - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } - else if (m_preloadWaitList.count(thisListPair->first) && m_preloadWaitList[thisListPair->first].count(*thisAsset)) - { - AZ_Error("AssetContainer", false, "Circular dependency found - Root asset %s has a preload" - "dependency on %s which has a circular dependency with %s\n", - rootAssetId.ToString().c_str(), - thisListPair->first.ToString().c_str(), - thisAsset->ToString().c_str()); - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } - else if (m_waitingAssets.count(*thisAsset)) - { - foundAsset = true; - m_preloadWaitList[*thisAsset].insert(thisListPair->first); - ++thisAsset; - } - else - { - // This particular preload dependency of this asset was culled - // similar to the case above this can be due to no established asset handler - // or filtering rules. We'll just erase the entry because we're not loading this - thisAsset = thisListPair->second.erase(thisAsset); - continue; - } + AZ_Error("AssetContainer", false, "Circular preload dependency found - Root asset %s has a preload" + "dependency on %s which depends back back to itself\n", + rootAssetId.ToString().c_str(), + thisListPair->first.ToString().c_str()); + thisAsset = thisListPair->second.erase(thisAsset); + continue; } - if (foundAsset) + else if (m_preloadWaitList.count(thisListPair->first) && m_preloadWaitList[thisListPair->first].count(*thisAsset)) { - // We've established that this asset has at least one preload dependency it needs to wait on - // so we additionally add the waiting asset as its own preload so all of our "waiting assets" - // are managed in the same list. We can't consider this asset to be "ready" until all - // of its preloads are ready and it has been loaded. It will request an OnAssetDataLoaded - // notification from AssetManager rather than an OnAssetReady because of these additional dependencies. - thisListPair->second.insert(thisListPair->first); - m_preloadWaitList[thisListPair->first].insert(thisListPair->first); + AZ_Error("AssetContainer", false, "Circular dependency found - Root asset %s has a preload" + "dependency on %s which has a circular dependency with %s\n", + rootAssetId.ToString().c_str(), + thisListPair->first.ToString().c_str(), + thisAsset->ToString().c_str()); + thisAsset = thisListPair->second.erase(thisAsset); + continue; } - ++thisListPair; - } - for(auto& thisList : preloadList) - { - // Only save the entry to the final preload list if it has at least one dependent asset still remaining after - // the checks above. - if (!thisList.second.empty()) + else if (m_waitingAssets.count(*thisAsset)) { - m_preloadList[thisList.first].insert(thisList.second.begin(), thisList.second.end()); + foundAsset = true; + m_preloadWaitList[*thisAsset].insert(thisListPair->first); + ++thisAsset; } + else + { + // This particular preload dependency of this asset was culled + // similar to the case above this can be due to no established asset handler + // or filtering rules. We'll just erase the entry because we're not loading this + thisAsset = thisListPair->second.erase(thisAsset); + continue; + } + } + if (foundAsset) + { + // We've established that this asset has at least one preload dependency it needs to wait on + // so we additionally add the waiting asset as its own preload so all of our "waiting assets" + // are managed in the same list. We can't consider this asset to be "ready" until all + // of its preloads are ready and it has been loaded. It will request an OnAssetDataLoaded + // notification from AssetManager rather than an OnAssetReady because of these additional dependencies. + thisListPair->second.insert(thisListPair->first); + m_preloadWaitList[thisListPair->first].insert(thisListPair->first); } + ++thisListPair; } - } - - bool AssetContainer::HasPreloads(const AssetId& assetId) const - { - AZStd::lock_guard preloadGuard(m_preloadMutex); - auto preloadEntry = m_preloadList.find(assetId); - if (preloadEntry != m_preloadList.end()) + for(auto& thisList : preloadList) { - return !preloadEntry->second.empty(); + // Only save the entry to the final preload list if it has at least one dependent asset still remaining after + // the checks above. + if (!thisList.second.empty()) + { + m_preloadList[thisList.first].insert(thisList.second.begin(), thisList.second.end()); + } } - return false; } + } - Asset AssetContainer::GetAssetData(const AssetId& assetId) const + bool AssetContainer::HasPreloads(const AssetId& assetId) const + { + AZStd::lock_guard preloadGuard(m_preloadMutex); + auto preloadEntry = m_preloadList.find(assetId); + if (preloadEntry != m_preloadList.end()) { - AZStd::lock_guard dependenciesGuard(m_dependencyMutex); - if (auto rootAsset = m_rootAsset.GetStrongReference(); rootAsset.GetId() == assetId) - { - return rootAsset; - } - auto dependencyIter = m_dependencies.find(assetId); - if (dependencyIter != m_dependencies.end()) - { - return dependencyIter->second; - } - AZ_Warning("AssetContainer", false, "Asset %s not found in container", assetId.ToString().c_str()); - return {}; + return !preloadEntry->second.empty(); } + return false; + } - int AssetContainer::GetNumWaitingDependencies() const + Asset AssetContainer::GetAssetData(const AssetId& assetId) const + { + AZStd::lock_guard dependenciesGuard(m_dependencyMutex); + if (auto rootAsset = m_rootAsset.GetStrongReference(); rootAsset.GetId() == assetId) { - return m_waitingCount.load(); + return rootAsset; } - - int AssetContainer::GetInvalidDependencies() const + auto dependencyIter = m_dependencies.find(assetId); + if (dependencyIter != m_dependencies.end()) { - return m_invalidDependencies.load(); + return dependencyIter->second; } - } // namespace Data -} // namespace AZ + AZ_Warning("AssetContainer", false, "Asset %s not found in container", assetId.ToString().c_str()); + return {}; + } + + int AssetContainer::GetNumWaitingDependencies() const + { + return m_waitingCount.load(); + } + + int AssetContainer::GetInvalidDependencies() const + { + return m_invalidDependencies.load(); + } +} // namespace AZ::Data diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h index e0091d678f..a05343ed0b 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetContainer.h @@ -24,8 +24,8 @@ namespace AZ // AssetContainer loads an asset and all of its dependencies as a collection which is parallellized as much as possible. // With the container, the data will all load in parallel. Dependent asset loads will still obey the expected rules - // where PreLoad assets will emit OnAssetReady before the parent does, and QueueLoad assets will emit OnAssetReady in - // no guaranteed order. However, the OnAssetContainerReady signals will not emit until all PreLoad and QueueLoad assets + // where PreLoad assets will emit OnAssetReady before the parent does, and QueueLoad assets will emit OnAssetReady in + // no guaranteed order. However, the OnAssetContainerReady signals will not emit until all PreLoad and QueueLoad assets // are ready. NoLoad dependencies are not loaded by default but can be loaded along with their dependencies using the // same rules as above by using the LoadAll dependency rule. class AssetContainer : @@ -36,7 +36,7 @@ namespace AZ AZ_CLASS_ALLOCATOR(AssetContainer, SystemAllocator, 0); AssetContainer() = default; - + AssetContainer(Asset asset, const AssetLoadParameters& loadParams); ~AssetContainer(); @@ -81,6 +81,10 @@ namespace AZ // AssetLoadBus void OnAssetDataLoaded(AZ::Data::Asset asset) override; protected: + + virtual AZStd::vector>> CreateAndQueueDependentAssets( + const AZStd::vector& dependencyInfoList, const AssetLoadParameters& loadParamsCopyWithNoLoadingFilter); + // Waiting assets are those which have not yet signalled ready. In the case of PreLoad dependencies the data may have completed the load cycle but // the Assets aren't considered "Ready" yet if there are PreLoad dependencies still loading and will still be in the list until the point that asset and // All of its preload dependencies have been loaded, when it signals OnAssetReady @@ -97,7 +101,7 @@ namespace AZ void AddDependency(Asset&& addDependency); // Add a "graph section" to our list of dependencies. This checks the catalog for all Pre and Queue load assets which are dependents of the requested asset and kicks off loads - // NoLoads which are encounted are placed in another list and can be loaded on demand with the LoadDependency call. + // NoLoads which are encounted are placed in another list and can be loaded on demand with the LoadDependency call. void AddDependentAssets(Asset rootAsset, const AssetLoadParameters& loadParams); // If "PreLoad" assets are found in the graph these are cached and tracked with both OnAssetReady and OnAssetDataLoaded messages. @@ -117,7 +121,7 @@ namespace AZ // duringInit if we're coming from the checkReady method - containers that start ready don't need to signal void HandleReadyAsset(AZ::Data::Asset asset); - // Optimization to save the lookup in the dependencies map + // Optimization to save the lookup in the dependencies map AssetInternal::WeakAsset m_rootAsset; // The root asset id is stored here semi-redundantly on initialization so that we can still refer to it even if the @@ -136,7 +140,7 @@ namespace AZ AZStd::atomic_bool m_finalNotificationSent{false}; mutable AZStd::recursive_mutex m_preloadMutex; - // AssetId -> List of assets it is still waiting on + // AssetId -> List of assets it is still waiting on PreloadAssetListType m_preloadList; // AssetId -> List of assets waiting on it diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp index 3fa3b39ca5..0d28036646 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetJsonSerializer.cpp @@ -12,207 +12,204 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data + AZ_CLASS_ALLOCATOR_IMPL(AssetJsonSerializer, SystemAllocator, 0); + + JsonSerializationResult::Result AssetJsonSerializer::Load(void* outputValue, const Uuid& /*outputValueTypeId*/, + const rapidjson::Value& inputValue, JsonDeserializerContext& context) { - AZ_CLASS_ALLOCATOR_IMPL(AssetJsonSerializer, SystemAllocator, 0); + namespace JSR = JsonSerializationResult; - JsonSerializationResult::Result AssetJsonSerializer::Load(void* outputValue, const Uuid& /*outputValueTypeId*/, - const rapidjson::Value& inputValue, JsonDeserializerContext& context) + switch (inputValue.GetType()) { - namespace JSR = JsonSerializationResult; - - switch (inputValue.GetType()) - { - case rapidjson::kObjectType: - return LoadAsset(outputValue, inputValue, context); - case rapidjson::kArrayType: // fall through - case rapidjson::kNullType: // fall through - case rapidjson::kStringType: // fall through - case rapidjson::kFalseType: // fall through - case rapidjson::kTrueType: // fall through - case rapidjson::kNumberType: - return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, - "Unsupported type. Asset can only be read from an object."); - - default: - return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unknown, "Unknown json type encountered for Asset."); - } + case rapidjson::kObjectType: + return LoadAsset(outputValue, inputValue, context); + case rapidjson::kArrayType: // fall through + case rapidjson::kNullType: // fall through + case rapidjson::kStringType: // fall through + case rapidjson::kFalseType: // fall through + case rapidjson::kTrueType: // fall through + case rapidjson::kNumberType: + return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unsupported, + "Unsupported type. Asset can only be read from an object."); + + default: + return context.Report(JSR::Tasks::ReadField, JSR::Outcomes::Unknown, "Unknown json type encountered for Asset."); } + } - JsonSerializationResult::Result AssetJsonSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, - const void* defaultValue, const Uuid& /*valueTypeId*/, JsonSerializerContext& context) - { - namespace JSR = JsonSerializationResult; + JsonSerializationResult::Result AssetJsonSerializer::Store(rapidjson::Value& outputValue, const void* inputValue, + const void* defaultValue, const Uuid& /*valueTypeId*/, JsonSerializerContext& context) + { + namespace JSR = JsonSerializationResult; - const Asset* instance = reinterpret_cast*>(inputValue); - const Asset* defaultInstance = reinterpret_cast*>(defaultValue); + const Asset* instance = reinterpret_cast*>(inputValue); + const Asset* defaultInstance = reinterpret_cast*>(defaultValue); - JSR::ResultCode result(JSR::Tasks::WriteValue); + JSR::ResultCode result(JSR::Tasks::WriteValue); + { + ScopedContextPath subPathId(context, "m_assetId"); + const auto* id = &instance->GetId(); + const auto* defaultId = defaultInstance ? &defaultInstance->GetId() : nullptr; + rapidjson::Value assetIdValue; + result = ContinueStoring(assetIdValue, id, defaultId, azrtti_typeid(), context); + if (result.GetOutcome() == JSR::Outcomes::Success || result.GetOutcome() == JSR::Outcomes::PartialDefaults) { - ScopedContextPath subPathId(context, "m_assetId"); - const auto* id = &instance->GetId(); - const auto* defaultId = defaultInstance ? &defaultInstance->GetId() : nullptr; - rapidjson::Value assetIdValue; - result = ContinueStoring(assetIdValue, id, defaultId, azrtti_typeid(), context); - if (result.GetOutcome() == JSR::Outcomes::Success || result.GetOutcome() == JSR::Outcomes::PartialDefaults) + if (!outputValue.IsObject()) { - if (!outputValue.IsObject()) - { - outputValue.SetObject(); - } - outputValue.AddMember(rapidjson::StringRef("assetId"), AZStd::move(assetIdValue), context.GetJsonAllocator()); + outputValue.SetObject(); } + outputValue.AddMember(rapidjson::StringRef("assetId"), AZStd::move(assetIdValue), context.GetJsonAllocator()); } + } - { - const AZ::Data::AssetLoadBehavior autoLoadBehavior = instance->GetAutoLoadBehavior(); - const AZ::Data::AssetLoadBehavior defaultAutoLoadBehavior = defaultInstance ? - defaultInstance->GetAutoLoadBehavior() : AZ::Data::AssetLoadBehavior::Default; - - result.Combine( - ContinueStoringToJsonObjectField(outputValue, "loadBehavior", - &autoLoadBehavior, &defaultAutoLoadBehavior, - azrtti_typeid(), context)); - } + { + const AZ::Data::AssetLoadBehavior autoLoadBehavior = instance->GetAutoLoadBehavior(); + const AZ::Data::AssetLoadBehavior defaultAutoLoadBehavior = defaultInstance ? + defaultInstance->GetAutoLoadBehavior() : AZ::Data::AssetLoadBehavior::Default; + + result.Combine( + ContinueStoringToJsonObjectField(outputValue, "loadBehavior", + &autoLoadBehavior, &defaultAutoLoadBehavior, + azrtti_typeid(), context)); + } + { + ScopedContextPath subPathHint(context, "m_assetHint"); + const AZStd::string* hint = &instance->GetHint(); + const AZStd::string defaultHint; + rapidjson::Value assetHintValue; + JSR::ResultCode resultHint = ContinueStoring(assetHintValue, hint, &defaultHint, azrtti_typeid(), context); + if (resultHint.GetOutcome() == JSR::Outcomes::Success || resultHint.GetOutcome() == JSR::Outcomes::PartialDefaults) { - ScopedContextPath subPathHint(context, "m_assetHint"); - const AZStd::string* hint = &instance->GetHint(); - const AZStd::string defaultHint; - rapidjson::Value assetHintValue; - JSR::ResultCode resultHint = ContinueStoring(assetHintValue, hint, &defaultHint, azrtti_typeid(), context); - if (resultHint.GetOutcome() == JSR::Outcomes::Success || resultHint.GetOutcome() == JSR::Outcomes::PartialDefaults) + if (!outputValue.IsObject()) { - if (!outputValue.IsObject()) - { - outputValue.SetObject(); - } - outputValue.AddMember(rapidjson::StringRef("assetHint"), AZStd::move(assetHintValue), context.GetJsonAllocator()); + outputValue.SetObject(); } - result.Combine(resultHint); + outputValue.AddMember(rapidjson::StringRef("assetHint"), AZStd::move(assetHintValue), context.GetJsonAllocator()); } - - return context.Report(result, - result.GetProcessing() == JSR::Processing::Completed ? "Successfully stored Asset." : "Failed to store Asset."); + result.Combine(resultHint); } - JsonSerializationResult::Result AssetJsonSerializer::LoadAsset(void* outputValue, const rapidjson::Value& inputValue, - JsonDeserializerContext& context) - { - namespace JSR = JsonSerializationResult; + return context.Report(result, + result.GetProcessing() == JSR::Processing::Completed ? "Successfully stored Asset." : "Failed to store Asset."); + } - Asset* instance = reinterpret_cast*>(outputValue); - AssetId id; - JSR::ResultCode result(JSR::Tasks::ReadField); + JsonSerializationResult::Result AssetJsonSerializer::LoadAsset(void* outputValue, const rapidjson::Value& inputValue, + JsonDeserializerContext& context) + { + namespace JSR = JsonSerializationResult; - SerializedAssetTracker* assetTracker = - context.GetMetadata().Find(); + Asset* instance = reinterpret_cast*>(outputValue); + AssetId id; + JSR::ResultCode result(JSR::Tasks::ReadField); - { - Data::AssetLoadBehavior loadBehavior = instance->GetAutoLoadBehavior(); + SerializedAssetTracker* assetTracker = + context.GetMetadata().Find(); - result = - ContinueLoadingFromJsonObjectField(&loadBehavior, - azrtti_typeid(), - inputValue, "loadBehavior", context); + { + Data::AssetLoadBehavior loadBehavior = instance->GetAutoLoadBehavior(); - instance->SetAutoLoadBehavior(loadBehavior); - } + result = + ContinueLoadingFromJsonObjectField(&loadBehavior, + azrtti_typeid(), + inputValue, "loadBehavior", context); - auto it = inputValue.FindMember("assetId"); - if (it != inputValue.MemberEnd()) + instance->SetAutoLoadBehavior(loadBehavior); + } + + auto it = inputValue.FindMember("assetId"); + if (it != inputValue.MemberEnd()) + { + ScopedContextPath subPath(context, "assetId"); + result.Combine(ContinueLoading(&id, azrtti_typeid(), it->value, context)); + if (!id.m_guid.IsNull()) { - ScopedContextPath subPath(context, "assetId"); - result.Combine(ContinueLoading(&id, azrtti_typeid(), it->value, context)); - if (!id.m_guid.IsNull()) - { - *instance = AssetManager::Instance().FindOrCreateAsset(id, instance->GetType(), instance->GetAutoLoadBehavior()); - if (!instance->GetId().IsValid()) - { - // If the asset failed to be created, FindOrCreateAsset returns an asset instance with a null - // id. To preserve the asset id in the source json, reset the asset to an empty one, but with - // the right id. - const auto loadBehavior = instance->GetAutoLoadBehavior(); - *instance = Asset(id, instance->GetType()); - instance->SetAutoLoadBehavior(loadBehavior); - } - - result.Combine(context.Report(result, "Successfully created Asset with id.")); - } - else if (result.GetProcessing() == JSR::Processing::Completed) - { - result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, - "Null Asset created.")); - } - else + *instance = AssetManager::Instance().FindOrCreateAsset(id, instance->GetType(), instance->GetAutoLoadBehavior()); + if (!instance->GetId().IsValid()) { - result.Combine(context.Report(result, "Failed to retrieve asset id for Asset.")); + // If the asset failed to be created, FindOrCreateAsset returns an asset instance with a null + // id. To preserve the asset id in the source json, reset the asset to an empty one, but with + // the right id. + const auto loadBehavior = instance->GetAutoLoadBehavior(); + *instance = Asset(id, instance->GetType()); + instance->SetAutoLoadBehavior(loadBehavior); } - } - else - { - result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, - "The asset id is missing, so there's not enough information to create an Asset.")); - } - it = inputValue.FindMember("assetHint"); - if (it != inputValue.MemberEnd()) - { - ScopedContextPath subPath(context, "assetHint"); - AZStd::string hint; - result.Combine(ContinueLoading(&hint, azrtti_typeid(), it->value, context)); - instance->SetHint(AZStd::move(hint)); + result.Combine(context.Report(result, "Successfully created Asset with id.")); } - else + else if (result.GetProcessing() == JSR::Processing::Completed) { result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, - "The asset hint is missing for Asset, so it will be left empty.")); + "Null Asset created.")); } - - if (assetTracker) + else { - assetTracker->FixUpAsset(*instance); - assetTracker->AddAsset(*instance); + result.Combine(context.Report(result, "Failed to retrieve asset id for Asset.")); } - - bool success = result.GetOutcome() <= JSR::Outcomes::PartialSkip; - bool defaulted = result.GetOutcome() == JSR::Outcomes::DefaultsUsed || result.GetOutcome() == JSR::Outcomes::PartialDefaults; - AZStd::string_view message = - success ? "Successfully loaded information and created instance of Asset." : - defaulted ? "A default id was provided for Asset, so no instance could be created." : - "Not enough information was available to create an instance of Asset or data was corrupted."; - return context.Report(result, message); } - - void SerializedAssetTracker::SetAssetFixUp(AssetFixUp assetFixUpCallback) + else { - m_assetFixUpCallback = AZStd::move(assetFixUpCallback); + result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, + "The asset id is missing, so there's not enough information to create an Asset.")); } - void SerializedAssetTracker::FixUpAsset(Asset& asset) + it = inputValue.FindMember("assetHint"); + if (it != inputValue.MemberEnd()) { - if (m_assetFixUpCallback) - { - m_assetFixUpCallback(asset); - } + ScopedContextPath subPath(context, "assetHint"); + AZStd::string hint; + result.Combine(ContinueLoading(&hint, azrtti_typeid(), it->value, context)); + instance->SetHint(AZStd::move(hint)); } - - void SerializedAssetTracker::AddAsset(Asset asset) + else { - m_serializedAssets.emplace_back(asset); + result.Combine(context.Report(JSR::Tasks::ReadField, JSR::Outcomes::DefaultsUsed, + "The asset hint is missing for Asset, so it will be left empty.")); } - const AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() const + if (assetTracker) { - return m_serializedAssets; + assetTracker->FixUpAsset(*instance); + assetTracker->AddAsset(*instance); } - AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() + bool success = result.GetOutcome() <= JSR::Outcomes::PartialSkip; + bool defaulted = result.GetOutcome() == JSR::Outcomes::DefaultsUsed || result.GetOutcome() == JSR::Outcomes::PartialDefaults; + AZStd::string_view message = + success ? "Successfully loaded information and created instance of Asset." : + defaulted ? "A default id was provided for Asset, so no instance could be created." : + "Not enough information was available to create an instance of Asset or data was corrupted."; + return context.Report(result, message); + } + + void SerializedAssetTracker::SetAssetFixUp(AssetFixUp assetFixUpCallback) + { + m_assetFixUpCallback = AZStd::move(assetFixUpCallback); + } + + void SerializedAssetTracker::FixUpAsset(Asset& asset) + { + if (m_assetFixUpCallback) { - return m_serializedAssets; + m_assetFixUpCallback(asset); } + } + + void SerializedAssetTracker::AddAsset(Asset asset) + { + m_serializedAssets.emplace_back(asset); + } + + const AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() const + { + return m_serializedAssets; + } + + AZStd::vector>& SerializedAssetTracker::GetTrackedAssets() + { + return m_serializedAssets; + } - } // namespace Data -} // namespace AZ +} // namespace AZ::Data diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp index b03e1affdc..e419666a32 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManager.cpp @@ -27,2169 +27,2166 @@ #include #include -namespace AZ +namespace AZ::Data { - namespace Data - { - AZ_CVAR(bool, cl_assetLoadWarningEnable, false, nullptr, AZ::ConsoleFunctorFlags::Null, - "Enable warnings that show when AssetHandler::LoadAssetData has exceeded the time set in cl_assetLoadWarningMsThreshold."); - AZ_CVAR(uint32_t, cl_assetLoadWarningMsThreshold, 100, nullptr, AZ::ConsoleFunctorFlags::Null, - "Number of milliseconds that AssetHandler::LoadAssetData can execute for before printing a warning."); - AZ_CVAR(int, cl_assetLoadDelay, 0, nullptr, AZ::ConsoleFunctorFlags::Null, - "Number of milliseconds to artifically delay an asset load."); - AZ_CVAR(bool, cl_assetLoadError, false, nullptr, AZ::ConsoleFunctorFlags::Null, - "Enable failure of all asset loads."); - - static constexpr char kAssetDBInstanceVarName[] = "AssetDatabaseInstance"; - - /* - * This is the base class for Async AssetDatabase jobs - */ - class AssetDatabaseAsyncJob - : public AssetDatabaseJob - , public Job - { - public: - AssetDatabaseAsyncJob(JobContext* jobContext, bool deleteWhenDone, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) - : AssetDatabaseJob(owner, asset, assetHandler) - , Job(deleteWhenDone, jobContext) - { - } + AZ_CVAR(bool, cl_assetLoadWarningEnable, false, nullptr, AZ::ConsoleFunctorFlags::Null, + "Enable warnings that show when AssetHandler::LoadAssetData has exceeded the time set in cl_assetLoadWarningMsThreshold."); + AZ_CVAR(uint32_t, cl_assetLoadWarningMsThreshold, 100, nullptr, AZ::ConsoleFunctorFlags::Null, + "Number of milliseconds that AssetHandler::LoadAssetData can execute for before printing a warning."); + AZ_CVAR(int, cl_assetLoadDelay, 0, nullptr, AZ::ConsoleFunctorFlags::Null, + "Number of milliseconds to artifically delay an asset load."); + AZ_CVAR(bool, cl_assetLoadError, false, nullptr, AZ::ConsoleFunctorFlags::Null, + "Enable failure of all asset loads."); + + static constexpr char kAssetDBInstanceVarName[] = "AssetDatabaseInstance"; + + /* + * This is the base class for Async AssetDatabase jobs + */ + class AssetDatabaseAsyncJob + : public AssetDatabaseJob + , public Job + { + public: + AssetDatabaseAsyncJob(JobContext* jobContext, bool deleteWhenDone, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + : AssetDatabaseJob(owner, asset, assetHandler) + , Job(deleteWhenDone, jobContext) + { + } - ~AssetDatabaseAsyncJob() override - { - } - }; + ~AssetDatabaseAsyncJob() override + { + } + }; - /** - * Internally allows threads blocking on asset loads to be notified on load completion. - */ - class BlockingAssetLoadEvents - : public EBusTraits - { - public: - ////////////////////////////////////////////////////////////////////////// - // EBusTraits overrides - static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; - using BusIdType = AssetId; - using MutexType = AZStd::recursive_mutex; - - template - struct AssetJobConnectionPolicy - : public EBusConnectionPolicy - { - static void Connect(typename Bus::BusPtr& busPtr, typename Bus::Context& context, typename Bus::HandlerNode& handler, typename Bus::Context::ConnectLockGuard& connectLock, const typename Bus::BusIdType& id = 0) + /** + * Internally allows threads blocking on asset loads to be notified on load completion. + */ + class BlockingAssetLoadEvents + : public EBusTraits + { + public: + ////////////////////////////////////////////////////////////////////////// + // EBusTraits overrides + static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; + using BusIdType = AssetId; + using MutexType = AZStd::recursive_mutex; + + template + struct AssetJobConnectionPolicy + : public EBusConnectionPolicy + { + static void Connect(typename Bus::BusPtr& busPtr, typename Bus::Context& context, typename Bus::HandlerNode& handler, typename Bus::Context::ConnectLockGuard& connectLock, const typename Bus::BusIdType& id = 0) + { + typename Bus::BusIdType actualId = AssetInternal::ResolveAssetId(id); + EBusConnectionPolicy::Connect(busPtr, context, handler, connectLock, actualId); + + // If the asset is loaded or failed already, deliver the status update immediately + // Note that we check IsReady here, ReadyPreNotify must be tested because there is + // a small gap between ReadyPreNotify and Ready where the callback could be missed. + // Also note because the Asset<> reference isn't passed around anywhere, it doesn't matter + // what the AssetLoadBehavior is set to, as it will never make it back to any callers. + Asset assetData(AssetInternal::GetAssetData(actualId, AssetLoadBehavior::Default)); + if (assetData) { - typename Bus::BusIdType actualId = AssetInternal::ResolveAssetId(id); - EBusConnectionPolicy::Connect(busPtr, context, handler, connectLock, actualId); - - // If the asset is loaded or failed already, deliver the status update immediately - // Note that we check IsReady here, ReadyPreNotify must be tested because there is - // a small gap between ReadyPreNotify and Ready where the callback could be missed. - // Also note because the Asset<> reference isn't passed around anywhere, it doesn't matter - // what the AssetLoadBehavior is set to, as it will never make it back to any callers. - Asset assetData(AssetInternal::GetAssetData(actualId, AssetLoadBehavior::Default)); - if (assetData) + if (assetData->IsReady() || assetData->IsError()) { - if (assetData->IsReady() || assetData->IsError()) - { - connectLock.unlock(); - handler->OnLoadComplete(); - } + connectLock.unlock(); + handler->OnLoadComplete(); } } - }; - - template - using ConnectionPolicy = AssetJobConnectionPolicy; - - virtual void OnLoadComplete() = 0; - virtual void OnLoadCanceled(AssetId assetId) = 0; + } }; - using BlockingAssetLoadBus = EBus; - - /* - * This class processes async AssetDatabase load jobs - */ - class LoadAssetJob - : public AssetDatabaseAsyncJob - { - public: - AZ_CLASS_ALLOCATOR(LoadAssetJob, ThreadPoolAllocator, 0); - - LoadAssetJob(AssetManager* owner, const Asset& asset, - AZStd::shared_ptr dataStream, bool isReload, AZ::IO::IStreamerTypes::RequestStatus requestState, - AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) - : AssetDatabaseAsyncJob(JobContext::GetGlobalContext(), true, owner, asset, handler) - , m_dataStream(dataStream) - , m_isReload(isReload) - , m_requestState(requestState) - , m_loadParams(loadParams) - , m_signalLoaded(signalLoaded) - { - AZ_Assert(m_dataStream, "Data stream pointer received through the callback from AZ::IO::Streamer is invalid."); + template + using ConnectionPolicy = AssetJobConnectionPolicy; - AZ_Assert((m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) - || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled) - || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Failed), - "AssetManager::LoadAssetJob was called with an unexpected streamer state: %i", m_requestState); - } + virtual void OnLoadComplete() = 0; + virtual void OnLoadCanceled(AssetId assetId) = 0; + }; - ~LoadAssetJob() override - { - } + using BlockingAssetLoadBus = EBus; - void Process() override - { - Asset asset = m_asset.GetStrongReference(); - - // Verify that we didn't somehow get here after the Asset Manager has finished shutting down. - AZ_Assert(AssetManager::IsReady(), "Asset Manager shutdown didn't clean up pending asset loads properly."); - if (!AssetManager::IsReady()) - { - return; - } - - bool shouldCancel = m_owner->ShouldCancelAllActiveJobs() - || !asset // No outstanding references, so cancel the load - || m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled; + /* + * This class processes async AssetDatabase load jobs + */ + class LoadAssetJob + : public AssetDatabaseAsyncJob + { + public: + AZ_CLASS_ALLOCATOR(LoadAssetJob, ThreadPoolAllocator, 0); - if (shouldCancel) - { - BlockingAssetLoadBus::Event(m_asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadCanceled, m_asset.GetId()); - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, m_asset.GetId()); - } - else - { + LoadAssetJob(AssetManager* owner, const Asset& asset, + AZStd::shared_ptr dataStream, bool isReload, AZ::IO::IStreamerTypes::RequestStatus requestState, + AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) + : AssetDatabaseAsyncJob(JobContext::GetGlobalContext(), true, owner, asset, handler) + , m_dataStream(dataStream) + , m_isReload(isReload) + , m_requestState(requestState) + , m_loadParams(loadParams) + , m_signalLoaded(signalLoaded) + { + AZ_Assert(m_dataStream, "Data stream pointer received through the callback from AZ::IO::Streamer is invalid."); - AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetJob::Process: %s", - asset.GetHint().c_str()); + AZ_Assert((m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) + || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled) + || (m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Failed), + "AssetManager::LoadAssetJob was called with an unexpected streamer state: %i", m_requestState); + } - AZ_ASSET_ATTACH_TO_SCOPE(this); + ~LoadAssetJob() override + { + } - if (m_owner->ValidateAndRegisterAssetLoading(asset)) - { - LoadAndSignal(asset); - } - } - } + void Process() override + { + Asset asset = m_asset.GetStrongReference(); - void LoadAndSignal(Asset& asset) + // Verify that we didn't somehow get here after the Asset Manager has finished shutting down. + AZ_Assert(AssetManager::IsReady(), "Asset Manager shutdown didn't clean up pending asset loads properly."); + if (!AssetManager::IsReady()) { - const bool loadSucceeded = LoadData(); - - if (m_signalLoaded && loadSucceeded) - { - AZ_Assert(!m_isReload, "OnAssetDataLoaded signal isn't supported for asset reloads."); - // This asset has preload dependencies, we need to evaluate whether they're all ready before calling PostLoad - AssetLoadBus::Event(asset.GetId(), &AssetLoadBus::Events::OnAssetDataLoaded, asset); - } - else - { - // As long as we don't need to signal preload dependencies, just finish the load whether or not it was successful. - m_owner->PostLoad(asset, loadSucceeded, m_isReload, m_assetHandler); - } + return; } - bool LoadData() + bool shouldCancel = m_owner->ShouldCancelAllActiveJobs() + || !asset // No outstanding references, so cancel the load + || m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Canceled; + + if (shouldCancel) + { + BlockingAssetLoadBus::Event(m_asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadCanceled, m_asset.GetId()); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, m_asset.GetId()); + } + else { - Asset asset = m_asset.GetStrongReference(); - if(cl_assetLoadDelay > 0) - { - AZ_PROFILE_SCOPE(AzCore, "LoadData suspended"); - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(cl_assetLoadDelay)); - } + AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetJob::Process: %s", + asset.GetHint().c_str()); - AZ_ASSET_NAMED_SCOPE(asset.GetHint().c_str()); - bool loadedSuccessfully = false; + AZ_ASSET_ATTACH_TO_SCOPE(this); - if (!cl_assetLoadError && m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) + if (m_owner->ValidateAndRegisterAssetLoading(asset)) { - if (m_dataStream->IsFullyLoaded()) - { - AssetHandler::LoadResult result = - m_assetHandler->LoadAssetDataFromStream(asset, m_dataStream, m_loadParams.m_assetLoadFilterCB); - loadedSuccessfully = (result == AssetHandler::LoadResult::LoadComplete); - } + LoadAndSignal(asset); } - - return loadedSuccessfully; } + } - private: - AZStd::shared_ptr m_dataStream; - AssetLoadParameters m_loadParams{}; - AZ::IO::IStreamerTypes::RequestStatus m_requestState{ AZ::IO::IStreamerTypes::RequestStatus::Pending}; - bool m_isReload{ false }; - bool m_signalLoaded{ false }; - }; - + void LoadAndSignal(Asset& asset) + { + const bool loadSucceeded = LoadData(); - /** - * Utility class to wait when a blocking load is requested for an asset that's already loading asynchronously. - * Uses the BlockingAssetLoadBus to detect completion, and a semaphore to signal it. - */ + if (m_signalLoaded && loadSucceeded) + { + AZ_Assert(!m_isReload, "OnAssetDataLoaded signal isn't supported for asset reloads."); + // This asset has preload dependencies, we need to evaluate whether they're all ready before calling PostLoad + AssetLoadBus::Event(asset.GetId(), &AssetLoadBus::Events::OnAssetDataLoaded, asset); + } + else + { + // As long as we don't need to signal preload dependencies, just finish the load whether or not it was successful. + m_owner->PostLoad(asset, loadSucceeded, m_isReload, m_assetHandler); + } + } - class WaitForAsset - : public BlockingAssetLoadBus::Handler + bool LoadData() { - public: - AZ_CLASS_ALLOCATOR(WaitForAsset, ThreadPoolAllocator, 0); - + Asset asset = m_asset.GetStrongReference(); - WaitForAsset(const Asset& assetToWaitFor, bool shouldDispatchEvents) - : m_assetData(assetToWaitFor) - , m_shouldDispatchEvents(shouldDispatchEvents) + if(cl_assetLoadDelay > 0) { - // Track all blocking requests with the AssetManager. This enables load jobs to potentially get routed - // to the thread that's currently blocking waiting on the load job to complete. - AssetManager::Instance().AddBlockingRequest(m_assetData.GetId(), this); + AZ_PROFILE_SCOPE(AzCore, "LoadData suspended"); + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(cl_assetLoadDelay)); } - ~WaitForAsset() override - { - // Stop tracking the blocking request, which will ensure that load jobs won't be provided to this instance - // for processing. - AssetManager::Instance().RemoveBlockingRequest(m_assetData.GetId(), this); + AZ_ASSET_NAMED_SCOPE(asset.GetHint().c_str()); + bool loadedSuccessfully = false; - // It shouldn't be possible to destroy a blocking load request before the load job that it's blocked on - // has been processed, so assert if it ever happens, but make sure to process it just in case. - if (m_loadJob) + if (!cl_assetLoadError && m_requestState == AZ::IO::IStreamerTypes::RequestStatus::Completed) + { + if (m_dataStream->IsFullyLoaded()) { - // (If a valid case is ever found where this can occur, it should be safe to remove the assert) - AZ_Assert(false, "Blocking load request is being deleted before it could process the blocking load."); - ProcessLoadJob(); + AssetHandler::LoadResult result = + m_assetHandler->LoadAssetDataFromStream(asset, m_dataStream, m_loadParams.m_assetLoadFilterCB); + loadedSuccessfully = (result == AssetHandler::LoadResult::LoadComplete); } } - // Provides a blocked load with a LoadJob to process while it's blocking. - // Returns true if it can be queued, false if it can't. - bool QueueAssetLoadJob(LoadAssetJob* loadJob) - { - if(m_shouldDispatchEvents) - { - // Any load job that is going to be dispatching events should not accept additional work since dispatching events - // can lead to more code that's blocking on an asset load which prevents us from finishing the dispatch - // and doing the assigned work. - // Specifically, if dispatching leads to a second block call, the load job will be assigned to the first block call, - // which will never be completed until the second block call is finished. If both blocks are on the same asset, - // we end up deadlocked. - return false; - } + return loadedSuccessfully; + } - AZStd::scoped_lock mutexLock(m_loadJobMutex); + private: + AZStd::shared_ptr m_dataStream; + AssetLoadParameters m_loadParams{}; + AZ::IO::IStreamerTypes::RequestStatus m_requestState{ AZ::IO::IStreamerTypes::RequestStatus::Pending}; + bool m_isReload{ false }; + bool m_signalLoaded{ false }; + }; - AZ_Assert(!m_loadJob, "Trying to process multiple load jobs for the same asset with the same blocking handler."); - if (!m_loadJob) - { - m_loadJob = loadJob; - m_waitEvent.release(); - return true; - } - return false; - } + /** + * Utility class to wait when a blocking load is requested for an asset that's already loading asynchronously. + * Uses the BlockingAssetLoadBus to detect completion, and a semaphore to signal it. + */ + + class WaitForAsset + : public BlockingAssetLoadBus::Handler + { + public: + AZ_CLASS_ALLOCATOR(WaitForAsset, ThreadPoolAllocator, 0); + + + WaitForAsset(const Asset& assetToWaitFor, bool shouldDispatchEvents) + : m_assetData(assetToWaitFor) + , m_shouldDispatchEvents(shouldDispatchEvents) + { + // Track all blocking requests with the AssetManager. This enables load jobs to potentially get routed + // to the thread that's currently blocking waiting on the load job to complete. + AssetManager::Instance().AddBlockingRequest(m_assetData.GetId(), this); + } + + ~WaitForAsset() override + { + // Stop tracking the blocking request, which will ensure that load jobs won't be provided to this instance + // for processing. + AssetManager::Instance().RemoveBlockingRequest(m_assetData.GetId(), this); - void OnLoadComplete() override + // It shouldn't be possible to destroy a blocking load request before the load job that it's blocked on + // has been processed, so assert if it ever happens, but make sure to process it just in case. + if (m_loadJob) { - Finish(); + // (If a valid case is ever found where this can occur, it should be safe to remove the assert) + AZ_Assert(false, "Blocking load request is being deleted before it could process the blocking load."); + ProcessLoadJob(); } + } - void OnLoadCanceled([[maybe_unused]] const AssetId assetId) override + // Provides a blocked load with a LoadJob to process while it's blocking. + // Returns true if it can be queued, false if it can't. + bool QueueAssetLoadJob(LoadAssetJob* loadJob) + { + if(m_shouldDispatchEvents) { - Finish(); + // Any load job that is going to be dispatching events should not accept additional work since dispatching events + // can lead to more code that's blocking on an asset load which prevents us from finishing the dispatch + // and doing the assigned work. + // Specifically, if dispatching leads to a second block call, the load job will be assigned to the first block call, + // which will never be completed until the second block call is finished. If both blocks are on the same asset, + // we end up deadlocked. + return false; } - void WaitUntilReady() + AZStd::scoped_lock mutexLock(m_loadJobMutex); + + AZ_Assert(!m_loadJob, "Trying to process multiple load jobs for the same asset with the same blocking handler."); + if (!m_loadJob) { - BusConnect(m_assetData.GetId()); + m_loadJob = loadJob; + m_waitEvent.release(); + return true; + } - Wait(); + return false; + } - BusDisconnect(m_assetData.GetId()); - } + void OnLoadComplete() override + { + Finish(); + } - protected: - void Wait() - { - AZ_PROFILE_SCOPE(AzCore, "WaitForAsset - %s", m_assetData.GetHint().c_str()); + void OnLoadCanceled([[maybe_unused]] const AssetId assetId) override + { + Finish(); + } - // Continue to loop until the load completes. (Most of the time in the loop will be spent in a thread-blocking state) - while (!m_loadCompleted) - { - if (m_shouldDispatchEvents) - { - // The event will wake up either when the load finishes, a load job is queued for processing, or every - // N milliseconds to see if it should dispatch events. - constexpr int MaxWaitBetweenDispatchMs = 1; - while (!m_waitEvent.try_acquire_for(AZStd::chrono::milliseconds(MaxWaitBetweenDispatchMs))) - { - AssetManager::Instance().DispatchEvents(); - } - } - else - { - - // Don't wake up until a load job is queued for processing or the load is entirely finished. - m_waitEvent.acquire(); - } + void WaitUntilReady() + { + BusConnect(m_assetData.GetId()); - // Check to see if any load jobs have been provided for this thread to process. - // (Load jobs will attempt to reuse blocked threads before spinning off new job threads) - ProcessLoadJob(); - } + Wait(); - // Pump the AssetBus function queue once more after the load has completed in case additional - // functions have been queued between the last call to DispatchEvents and the completion - // of the current load job - if (m_shouldDispatchEvents) - { - AssetManager::Instance().DispatchEvents(); - } - } + BusDisconnect(m_assetData.GetId()); + } - void Finish() - { - AZ_PROFILE_FUNCTION(AzCore); - m_loadCompleted = true; - m_waitEvent.release(); - } + protected: + void Wait() + { + AZ_PROFILE_SCOPE(AzCore, "WaitForAsset - %s", m_assetData.GetHint().c_str()); - bool ProcessLoadJob() + // Continue to loop until the load completes. (Most of the time in the loop will be spent in a thread-blocking state) + while (!m_loadCompleted) { - AZStd::scoped_lock mutexLock(m_loadJobMutex); - bool jobProcessed = false; - - if (m_loadJob) + if (m_shouldDispatchEvents) { - m_loadJob->Process(); - if (m_loadJob->IsAutoDelete()) + // The event will wake up either when the load finishes, a load job is queued for processing, or every + // N milliseconds to see if it should dispatch events. + constexpr int MaxWaitBetweenDispatchMs = 1; + while (!m_waitEvent.try_acquire_for(AZStd::chrono::milliseconds(MaxWaitBetweenDispatchMs))) { - delete m_loadJob; + AssetManager::Instance().DispatchEvents(); } - m_loadJob = nullptr; - jobProcessed = true; } + else + { - return jobProcessed; - } - - Asset m_assetData; - AZStd::binary_semaphore m_waitEvent; - const bool m_shouldDispatchEvents{ false }; - LoadAssetJob* m_loadJob{ nullptr }; - AZStd::mutex m_loadJobMutex; - AZStd::atomic_bool m_loadCompleted{ false }; - }; - - - /* - * This class processes async AssetDatabase save jobs - */ - class SaveAssetJob - : public AssetDatabaseAsyncJob - { - public: - AZ_CLASS_ALLOCATOR(SaveAssetJob, ThreadPoolAllocator, 0); + // Don't wake up until a load job is queued for processing or the load is entirely finished. + m_waitEvent.acquire(); + } - SaveAssetJob(JobContext* jobContext, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) - : AssetDatabaseAsyncJob(jobContext, true, owner, asset, assetHandler) - { + // Check to see if any load jobs have been provided for this thread to process. + // (Load jobs will attempt to reuse blocked threads before spinning off new job threads) + ProcessLoadJob(); } - ~SaveAssetJob() override + // Pump the AssetBus function queue once more after the load has completed in case additional + // functions have been queued between the last call to DispatchEvents and the completion + // of the current load job + if (m_shouldDispatchEvents) { + AssetManager::Instance().DispatchEvents(); } + } - void Process() override - { - SaveAsset(); - } + void Finish() + { + AZ_PROFILE_FUNCTION(AzCore); + m_loadCompleted = true; + m_waitEvent.release(); + } + + bool ProcessLoadJob() + { + AZStd::scoped_lock mutexLock(m_loadJobMutex); + bool jobProcessed = false; - void SaveAsset() + if (m_loadJob) { - auto asset = m_asset.GetStrongReference(); - AZ_PROFILE_FUNCTION(AzCore); - bool isSaved = false; - AssetStreamInfo saveInfo = m_owner->GetSaveStreamInfoForAsset(asset.GetId(), asset.GetType()); - if (saveInfo.IsValid()) + m_loadJob->Process(); + if (m_loadJob->IsAutoDelete()) { - IO::FileIOStream stream(saveInfo.m_streamName.c_str(), saveInfo.m_streamFlags); - stream.Seek(saveInfo.m_dataOffset, IO::GenericStream::SeekMode::ST_SEEK_BEGIN); - isSaved = m_assetHandler->SaveAssetData(asset, &stream); + delete m_loadJob; } - // queue broadcast message for delivery on game thread - AssetBus::QueueEvent(asset.GetId(), &AssetBus::Events::OnAssetSaved, asset, isSaved); + m_loadJob = nullptr; + jobProcessed = true; } - }; - ////////////////////////////////////////////////////////////////////////// - // Globals - EnvironmentVariable AssetManager::s_assetDB = nullptr; - ////////////////////////////////////////////////////////////////////////// + return jobProcessed; + } + + Asset m_assetData; + AZStd::binary_semaphore m_waitEvent; + const bool m_shouldDispatchEvents{ false }; + LoadAssetJob* m_loadJob{ nullptr }; + AZStd::mutex m_loadJobMutex; + AZStd::atomic_bool m_loadCompleted{ false }; + }; - //========================================================================= - // AssetDatabaseJob - // [4/3/2014] - //========================================================================= - AssetDatabaseJob::AssetDatabaseJob(AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + + /* + * This class processes async AssetDatabase save jobs + */ + class SaveAssetJob + : public AssetDatabaseAsyncJob + { + public: + AZ_CLASS_ALLOCATOR(SaveAssetJob, ThreadPoolAllocator, 0); + + SaveAssetJob(JobContext* jobContext, AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + : AssetDatabaseAsyncJob(jobContext, true, owner, asset, assetHandler) { - m_owner = owner; - m_asset = AssetInternal::WeakAsset(asset); - m_assetHandler = assetHandler; - owner->AddJob(this); } - //========================================================================= - // ~AssetDatabaseJob - // [4/3/2014] - //========================================================================= - AssetDatabaseJob::~AssetDatabaseJob() + ~SaveAssetJob() override { - // Make sure that the asset reference is cleared out prior to removing the job registration. - // It's possible that clearing this reference will trigger the cleanup code for the asset, so if we wait for the - // destructor to clear it *after* the RemoveJob call, then HasActiveJobsOrStreamerRequests() will be able to return - // false even though the job is still executing asset-related code. - m_asset = {}; - m_owner->RemoveJob(this); } - //========================================================================= - // Create - // [6/12/2012] - //========================================================================= - bool AssetManager::Create(const Descriptor& desc) + void Process() override { - AZ_Assert(!s_assetDB || !s_assetDB.Get(), "AssetManager already created!"); + SaveAsset(); + } - if (!s_assetDB) - { - s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); - } - if (!s_assetDB.Get()) + void SaveAsset() + { + auto asset = m_asset.GetStrongReference(); + AZ_PROFILE_FUNCTION(AzCore); + bool isSaved = false; + AssetStreamInfo saveInfo = m_owner->GetSaveStreamInfoForAsset(asset.GetId(), asset.GetType()); + if (saveInfo.IsValid()) { - s_assetDB.Set(aznew AssetManager(desc)); + IO::FileIOStream stream(saveInfo.m_streamName.c_str(), saveInfo.m_streamFlags); + stream.Seek(saveInfo.m_dataOffset, IO::GenericStream::SeekMode::ST_SEEK_BEGIN); + isSaved = m_assetHandler->SaveAssetData(asset, &stream); } - - return true; + // queue broadcast message for delivery on game thread + AssetBus::QueueEvent(asset.GetId(), &AssetBus::Events::OnAssetSaved, asset, isSaved); } + }; + + ////////////////////////////////////////////////////////////////////////// + // Globals + EnvironmentVariable AssetManager::s_assetDB = nullptr; + ////////////////////////////////////////////////////////////////////////// + + //========================================================================= + // AssetDatabaseJob + // [4/3/2014] + //========================================================================= + AssetDatabaseJob::AssetDatabaseJob(AssetManager* owner, const Asset& asset, AssetHandler* assetHandler) + { + m_owner = owner; + m_asset = AssetInternal::WeakAsset(asset); + m_assetHandler = assetHandler; + owner->AddJob(this); + } + + //========================================================================= + // ~AssetDatabaseJob + // [4/3/2014] + //========================================================================= + AssetDatabaseJob::~AssetDatabaseJob() + { + // Make sure that the asset reference is cleared out prior to removing the job registration. + // It's possible that clearing this reference will trigger the cleanup code for the asset, so if we wait for the + // destructor to clear it *after* the RemoveJob call, then HasActiveJobsOrStreamerRequests() will be able to return + // false even though the job is still executing asset-related code. + m_asset = {}; + m_owner->RemoveJob(this); + } + + //========================================================================= + // Create + // [6/12/2012] + //========================================================================= + bool AssetManager::Create(const Descriptor& desc) + { + AZ_Assert(!s_assetDB || !s_assetDB.Get(), "AssetManager already created!"); - //========================================================================= - // Destroy - // [6/12/2012] - //========================================================================= - void AssetManager::Destroy() + if (!s_assetDB) { - AZ_Assert(s_assetDB, "AssetManager not created!"); - delete (*s_assetDB); - *s_assetDB = nullptr; + s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); } - - //========================================================================= - // IsReady - //========================================================================= - bool AssetManager::IsReady() + if (!s_assetDB.Get()) { - if (!s_assetDB) - { - s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); - } - - return s_assetDB && *s_assetDB; + s_assetDB.Set(aznew AssetManager(desc)); } - //========================================================================= - // Instance - //========================================================================= - AssetManager& AssetManager::Instance() - { - if (!s_assetDB) - { - s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); - } + return true; + } - AZ_Assert(s_assetDB && *s_assetDB, "AssetManager not created!"); - return *(*s_assetDB); + //========================================================================= + // Destroy + // [6/12/2012] + //========================================================================= + void AssetManager::Destroy() + { + AZ_Assert(s_assetDB, "AssetManager not created!"); + delete (*s_assetDB); + *s_assetDB = nullptr; + } + + //========================================================================= + // IsReady + //========================================================================= + bool AssetManager::IsReady() + { + if (!s_assetDB) + { + s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); } - bool AssetManager::SetInstance(AssetManager* assetManager) + return s_assetDB && *s_assetDB; + } + + //========================================================================= + // Instance + //========================================================================= + AssetManager& AssetManager::Instance() + { + if (!s_assetDB) { - if (!s_assetDB) - { - s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); - } + s_assetDB = Environment::FindVariable(kAssetDBInstanceVarName); + } - // The old instance needs to be null or else it will leak on the assignment. - AZ_Assert(!(*s_assetDB), - "AssetManager::SetInstance was called without first destroying the old instance and setting it to nullptr. " - "This will cause the previous AssetManager instance to leak." ); + AZ_Assert(s_assetDB && *s_assetDB, "AssetManager not created!"); + return *(*s_assetDB); + } - (*s_assetDB) = assetManager; - return true; + bool AssetManager::SetInstance(AssetManager* assetManager) + { + if (!s_assetDB) + { + s_assetDB = Environment::CreateVariable(kAssetDBInstanceVarName); } - //========================================================================= - // AssetDatabase - // [6/12/2012] - //========================================================================= - AssetManager::AssetManager(const AssetManager::Descriptor& desc) - : m_mainThreadId(AZStd::this_thread::get_id()) - , m_debugAssetEvents(AZ::Interface::Get()) - { - (void)desc; + // The old instance needs to be null or else it will leak on the assignment. + AZ_Assert(!(*s_assetDB), + "AssetManager::SetInstance was called without first destroying the old instance and setting it to nullptr. " + "This will cause the previous AssetManager instance to leak." ); - AssetManagerBus::Handler::BusConnect(); - } + (*s_assetDB) = assetManager; + return true; + } - //========================================================================= - // ~AssetManager - // [6/12/2012] - //========================================================================= - AssetManager::~AssetManager() - { - PrepareShutDown(); + //========================================================================= + // AssetDatabase + // [6/12/2012] + //========================================================================= + AssetManager::AssetManager(const AssetManager::Descriptor& desc) + : m_mainThreadId(AZStd::this_thread::get_id()) + , m_debugAssetEvents(AZ::Interface::Get()) + { + (void)desc; - // Acquire the asset lock to make sure nobody else is trying to do anything fancy with assets - AZStd::scoped_lock assetLock(m_assetMutex); + AssetManagerBus::Handler::BusConnect(); + } - while (!m_handlers.empty()) - { - AssetHandlerMap::iterator it = m_handlers.begin(); - AssetHandler* handler = it->second; - UnregisterHandler(handler); - delete handler; - } + //========================================================================= + // ~AssetManager + // [6/12/2012] + //========================================================================= + AssetManager::~AssetManager() + { + PrepareShutDown(); - AssetManagerBus::Handler::BusDisconnect(); - } + // Acquire the asset lock to make sure nobody else is trying to do anything fancy with assets + AZStd::scoped_lock assetLock(m_assetMutex); - //========================================================================= - // DispatchEvents - // [04/02/2014] - //========================================================================= - void AssetManager::DispatchEvents() + while (!m_handlers.empty()) { - AZ_PROFILE_FUNCTION(AzCore); - AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchBegin); - while (AssetBus::QueuedEventCount()) - { - AssetBus::ExecuteQueuedEvents(); - } - AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchEnd); + AssetHandlerMap::iterator it = m_handlers.begin(); + AssetHandler* handler = it->second; + UnregisterHandler(handler); + delete handler; } - //========================================================================= - void AssetManager::SetAssetInfoUpgradingEnabled(bool enable) + AssetManagerBus::Handler::BusDisconnect(); + } + + //========================================================================= + // DispatchEvents + // [04/02/2014] + //========================================================================= + void AssetManager::DispatchEvents() + { + AZ_PROFILE_FUNCTION(AzCore); + AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchBegin); + while (AssetBus::QueuedEventCount()) { - m_assetInfoUpgradingEnabled = enable; + AssetBus::ExecuteQueuedEvents(); } + AssetManagerNotificationBus::Broadcast(&AssetManagerNotificationBus::Events::OnAssetEventsDispatchEnd); + } - bool AssetManager::GetAssetInfoUpgradingEnabled() const - { + //========================================================================= + void AssetManager::SetAssetInfoUpgradingEnabled(bool enable) + { + m_assetInfoUpgradingEnabled = enable; + } + + bool AssetManager::GetAssetInfoUpgradingEnabled() const + { #if defined(_RELEASE) - // in release ("FINAL") builds, we never do this. - return false; + // in release ("FINAL") builds, we never do this. + return false; #else - return m_assetInfoUpgradingEnabled; + return m_assetInfoUpgradingEnabled; #endif - } + } - bool AssetManager::ShouldCancelAllActiveJobs() const - { - return m_cancelAllActiveJobs; - } + bool AssetManager::ShouldCancelAllActiveJobs() const + { + return m_cancelAllActiveJobs; + } - void AssetManager::SetParallelDependentLoadingEnabled(bool enable) - { - m_enableParallelDependentLoading = enable; - } + void AssetManager::SetParallelDependentLoadingEnabled(bool enable) + { + m_enableParallelDependentLoading = enable; + } - bool AssetManager::GetParallelDependentLoadingEnabled() const - { - return m_enableParallelDependentLoading; - } + bool AssetManager::GetParallelDependentLoadingEnabled() const + { + return m_enableParallelDependentLoading; + } - void AssetManager::PrepareShutDown() - { - m_cancelAllActiveJobs = true; + void AssetManager::PrepareShutDown() + { + m_cancelAllActiveJobs = true; - // We want to ensure that no active load jobs are in flight and - // therefore we need to wait till all jobs have completed. Please note that jobs get deleted automatically once they complete. - WaitForActiveJobsAndStreamerRequestsToFinish(); + // We want to ensure that no active load jobs are in flight and + // therefore we need to wait till all jobs have completed. Please note that jobs get deleted automatically once they complete. + WaitForActiveJobsAndStreamerRequestsToFinish(); - m_ownedAssetContainerLookup.clear(); - m_ownedAssetContainers.clear(); - m_assetContainers.clear(); + m_ownedAssetContainerLookup.clear(); + m_ownedAssetContainers.clear(); + m_assetContainers.clear(); - // Ensure that there are no queued events on the AssetBus + // Ensure that there are no queued events on the AssetBus + DispatchEvents(); + } + + void AssetManager::WaitForActiveJobsAndStreamerRequestsToFinish() + { + while (HasActiveJobsOrStreamerRequests()) + { DispatchEvents(); + AZStd::this_thread::yield(); } + } - void AssetManager::WaitForActiveJobsAndStreamerRequestsToFinish() + //========================================================================= + // RegisterHandler + // [7/9/2014] + //========================================================================= + void AssetManager::RegisterHandler(AssetHandler* handler, const AssetType& assetType) + { + AZ_Error("AssetDatabase", handler != nullptr, "Attempting to register a null asset handler!"); + if (handler) { - while (HasActiveJobsOrStreamerRequests()) + if (m_handlers.insert(AZStd::make_pair(assetType, handler)).second) { - DispatchEvents(); - AZStd::this_thread::yield(); + handler->m_nHandledTypes++; } - } - - //========================================================================= - // RegisterHandler - // [7/9/2014] - //========================================================================= - void AssetManager::RegisterHandler(AssetHandler* handler, const AssetType& assetType) - { - AZ_Error("AssetDatabase", handler != nullptr, "Attempting to register a null asset handler!"); - if (handler) + else { - if (m_handlers.insert(AZStd::make_pair(assetType, handler)).second) - { - handler->m_nHandledTypes++; - } - else - { - AZ_Error("AssetDatabase", false, "Asset type %s already has a handler registered! New registration ignored!", assetType.ToString().c_str()); - } + AZ_Error("AssetDatabase", false, "Asset type %s already has a handler registered! New registration ignored!", assetType.ToString().c_str()); } } + } - //========================================================================= - // UnregisterHandler - // [7/9/2014] - //========================================================================= - void AssetManager::UnregisterHandler(AssetHandler* handler) + //========================================================================= + // UnregisterHandler + // [7/9/2014] + //========================================================================= + void AssetManager::UnregisterHandler(AssetHandler* handler) + { + AZ_Error("AssetDatabase", handler != nullptr, "Attempting to unregister a null asset handler!"); + if (handler) { - AZ_Error("AssetDatabase", handler != nullptr, "Attempting to unregister a null asset handler!"); - if (handler) + for (AssetHandlerMap::iterator it = m_handlers.begin(); it != m_handlers.end(); /*++it*/) { - for (AssetHandlerMap::iterator it = m_handlers.begin(); it != m_handlers.end(); /*++it*/) + if (it->second == handler) { - if (it->second == handler) - { - // When unregistering asset handlers, it's possible that there are still some load jobs that have "finished" but - // haven't destroyed themselves yet by the time the asset handler gets unregistered. LoadAssetJob contains a weak - // asset reference that doesn't clear until the job is destroyed, which happens *after* the OnAssetReady - // notification is triggered. If the thread gets swapped out between the OnAssetReady and the job destruction, - // the job will still be holding onto an asset reference for this asset handler, and it will trigger the - // error below. To ensure that this case doesn't happen, we will instead call - // WaitForActiveJobsAndStreamerRequestsToFinish() to make sure that any in-process jobs have completely cleaned - // themselves up before proceeding forward. - // One example of this pattern occurs in unit tests, where the test loads an asset, validates it, destroys the - // asset, and unregisters the handler, all in rapid succession. This would extremely infrequently - // (~1 per 5000 runs) trigger the error case if we didn't wait for the jobs to finish here. - WaitForActiveJobsAndStreamerRequestsToFinish(); + // When unregistering asset handlers, it's possible that there are still some load jobs that have "finished" but + // haven't destroyed themselves yet by the time the asset handler gets unregistered. LoadAssetJob contains a weak + // asset reference that doesn't clear until the job is destroyed, which happens *after* the OnAssetReady + // notification is triggered. If the thread gets swapped out between the OnAssetReady and the job destruction, + // the job will still be holding onto an asset reference for this asset handler, and it will trigger the + // error below. To ensure that this case doesn't happen, we will instead call + // WaitForActiveJobsAndStreamerRequestsToFinish() to make sure that any in-process jobs have completely cleaned + // themselves up before proceeding forward. + // One example of this pattern occurs in unit tests, where the test loads an asset, validates it, destroys the + // asset, and unregisters the handler, all in rapid succession. This would extremely infrequently + // (~1 per 5000 runs) trigger the error case if we didn't wait for the jobs to finish here. + WaitForActiveJobsAndStreamerRequestsToFinish(); + { + // this scope is used to control the scope of the lock. + AZStd::lock_guard assetLock(m_assetMutex); + for (const auto &assetEntry : m_assets) { - // this scope is used to control the scope of the lock. - AZStd::lock_guard assetLock(m_assetMutex); - for (const auto &assetEntry : m_assets) + // is the handler that handles this type, this handler we're removing? + if (assetEntry.second->m_registeredHandler == handler) { - // is the handler that handles this type, this handler we're removing? - if (assetEntry.second->m_registeredHandler == handler) - { - AZ_Error("AssetManager", false, "Asset handler for %s is being removed, when assetid %s is still loaded!\n", - assetEntry.second->GetType().ToString().c_str(), - assetEntry.second->GetId().ToString().c_str()); // this will write the name IF AVAILABLE - assetEntry.second->UnregisterWithHandler(); - } + AZ_Error("AssetManager", false, "Asset handler for %s is being removed, when assetid %s is still loaded!\n", + assetEntry.second->GetType().ToString().c_str(), + assetEntry.second->GetId().ToString().c_str()); // this will write the name IF AVAILABLE + assetEntry.second->UnregisterWithHandler(); } } - it = m_handlers.erase(it); - handler->m_nHandledTypes--; - } - else - { - ++it; } + it = m_handlers.erase(it); + handler->m_nHandledTypes--; + } + else + { + ++it; } } } + } - //========================================================================= - // RegisterCatalog - // [8/27/2012] - //========================================================================= - void AssetManager::RegisterCatalog(AssetCatalog* catalog, const AssetType& assetType) + //========================================================================= + // RegisterCatalog + // [8/27/2012] + //========================================================================= + void AssetManager::RegisterCatalog(AssetCatalog* catalog, const AssetType& assetType) + { + AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to register a null catalog!"); + if (catalog) { - AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to register a null catalog!"); - if (catalog) + AZStd::scoped_lock l(m_catalogMutex); + if (m_catalogs.insert(AZStd::make_pair(assetType, catalog)).second == false) { - AZStd::scoped_lock l(m_catalogMutex); - if (m_catalogs.insert(AZStd::make_pair(assetType, catalog)).second == false) - { - AZ_Error("AssetDatabase", false, "Asset type %s already has a catalog registered! New registration ignored!", assetType.ToString().c_str()); - } + AZ_Error("AssetDatabase", false, "Asset type %s already has a catalog registered! New registration ignored!", assetType.ToString().c_str()); } } + } - //========================================================================= - // UnregisterCatalog - // [8/27/2012] - //========================================================================= - void AssetManager::UnregisterCatalog(AssetCatalog* catalog) + //========================================================================= + // UnregisterCatalog + // [8/27/2012] + //========================================================================= + void AssetManager::UnregisterCatalog(AssetCatalog* catalog) + { + AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to unregister a null catalog!"); + if (catalog) { - AZ_Error("AssetDatabase", catalog != nullptr, "Attempting to unregister a null catalog!"); - if (catalog) + AZStd::scoped_lock l(m_catalogMutex); + for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); ) { - AZStd::scoped_lock l(m_catalogMutex); - for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); ) + if (iter->second == catalog) { - if (iter->second == catalog) - { - iter = m_catalogs.erase(iter); - } - else - { - ++iter; - } - + iter = m_catalogs.erase(iter); + } + else + { + ++iter; } + } } + } - //========================================================================= - // GetHandledAssetTypes - // [6/27/2016] - //========================================================================= - void AssetManager::GetHandledAssetTypes(AssetCatalog* catalog, AZStd::vector& assetTypes) + //========================================================================= + // GetHandledAssetTypes + // [6/27/2016] + //========================================================================= + void AssetManager::GetHandledAssetTypes(AssetCatalog* catalog, AZStd::vector& assetTypes) + { + for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); iter++) { - for (AssetCatalogMap::iterator iter = m_catalogs.begin(); iter != m_catalogs.end(); iter++) + if (iter->second == catalog) { - if (iter->second == catalog) - { - assetTypes.push_back(iter->first); - } + assetTypes.push_back(iter->first); } } + } + + void AssetManager::SuspendAssetRelease() + { + ++m_suspendAssetRelease; + } - void AssetManager::SuspendAssetRelease() + void AssetManager::ResumeAssetRelease() + { + if(--m_suspendAssetRelease != 0) { - ++m_suspendAssetRelease; + return; } - void AssetManager::ResumeAssetRelease() + AZStd::scoped_lock assetLock(m_assetMutex); + // First, release any containers that were loading this asset + for (auto asset = m_assets.begin();asset != m_assets.end();) { - if(--m_suspendAssetRelease != 0) + if (asset->second->m_useCount == 0) { - return; + auto releaseAsset = asset->second; + ++asset; + ReleaseAssetContainersForAsset(releaseAsset); } - - AZStd::scoped_lock assetLock(m_assetMutex); - // First, release any containers that were loading this asset - for (auto asset = m_assets.begin();asset != m_assets.end();) + else { - if (asset->second->m_useCount == 0) - { - auto releaseAsset = asset->second; - ++asset; - ReleaseAssetContainersForAsset(releaseAsset); - } - else - { - ++asset; - } + ++asset; } + } - // Second, release the assets themselves + // Second, release the assets themselves - AZStd::vector assetsToRelease; + AZStd::vector assetsToRelease; - for(auto&& asset : m_assets) + for(auto&& asset : m_assets) + { + if(asset.second->m_weakUseCount == 0) { - if(asset.second->m_weakUseCount == 0) - { - // Keep a separate list of assets to release, because releasing them will modify the m_assets list that we're - // currently looping on. - assetsToRelease.push_back(asset.second); - } + // Keep a separate list of assets to release, because releasing them will modify the m_assets list that we're + // currently looping on. + assetsToRelease.push_back(asset.second); } + } - for(auto&& asset : assetsToRelease) - { - bool removeFromHash = asset->IsRegisterReadonlyAndShareable(); - // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. - removeFromHash = asset->m_creationToken == s_defaultCreationToken ? false : removeFromHash; + for(auto&& asset : assetsToRelease) + { + bool removeFromHash = asset->IsRegisterReadonlyAndShareable(); + // default creation token implies that the asset was not created by the asset manager and therefore it cannot be in the asset map. + removeFromHash = asset->m_creationToken == s_defaultCreationToken ? false : removeFromHash; - ReleaseAsset(asset, asset->GetId(), asset->GetType(), removeFromHash, asset->m_creationToken); - } + ReleaseAsset(asset, asset->GetId(), asset->GetType(), removeFromHash, asset->m_creationToken); } + } - AssetData::AssetStatus AssetManager::BlockUntilLoadComplete(const Asset& asset) + AssetData::AssetStatus AssetManager::BlockUntilLoadComplete(const Asset& asset) + { + if(asset.GetStatus() == AssetData::AssetStatus::NotLoaded) { - if(asset.GetStatus() == AssetData::AssetStatus::NotLoaded) - { - AZ_Error("AssetManager", false, "BlockUntilLoadComplete must be called after an asset has been queued for load. Asset %s (%s) is not queued for load", - asset.GetHint().c_str(), asset.GetId().ToString().c_str()); - } - else if(!asset.IsReady()) - { - // If this is the main thread we'll need to call DispatchEvents to make sure the events we're waiting on actually fire - // since the main thread is typically responsible for calling DispatchEvents elsewhere - const bool shouldDispatch = AZStd::this_thread::get_id() == m_mainThreadId; + AZ_Error("AssetManager", false, "BlockUntilLoadComplete must be called after an asset has been queued for load. Asset %s (%s) is not queued for load", + asset.GetHint().c_str(), asset.GetId().ToString().c_str()); + } + else if(!asset.IsReady()) + { + // If this is the main thread we'll need to call DispatchEvents to make sure the events we're waiting on actually fire + // since the main thread is typically responsible for calling DispatchEvents elsewhere + const bool shouldDispatch = AZStd::this_thread::get_id() == m_mainThreadId; - // Wait for the asset and all queued dependencies to finish loading. - WaitForAsset blockingWait(asset, shouldDispatch); + // Wait for the asset and all queued dependencies to finish loading. + WaitForAsset blockingWait(asset, shouldDispatch); - blockingWait.WaitUntilReady(); - } + blockingWait.WaitUntilReady(); + } - return asset.GetStatus(); + return asset.GetStatus(); + } + + //========================================================================= + // FindAsset + //========================================================================= + Asset AssetManager::FindAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior) + { + // Look up the asset id in the catalog, and use the result of that instead. + // If assetId is a legacy id, assetInfo.m_assetId will be the canonical id. Otherwise, assetInfo.m_assetID == assetId. + // This is because only canonical ids are stored in m_assets (see below). + // Only do the look up if upgrading is enabled + AZ::Data::AssetInfo assetInfo; + if (GetAssetInfoUpgradingEnabled()) + { + AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); } - //========================================================================= - // FindAsset - //========================================================================= - Asset AssetManager::FindAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior) + // If the catalog is not available, use the original assetId + const AssetId& assetToFind(assetInfo.m_assetId.IsValid() ? assetInfo.m_assetId : assetId); + + AZStd::scoped_lock assetLock(m_assetMutex); + AssetMap::iterator it = m_assets.find(assetToFind); + if (it != m_assets.end()) { - // Look up the asset id in the catalog, and use the result of that instead. - // If assetId is a legacy id, assetInfo.m_assetId will be the canonical id. Otherwise, assetInfo.m_assetID == assetId. - // This is because only canonical ids are stored in m_assets (see below). - // Only do the look up if upgrading is enabled - AZ::Data::AssetInfo assetInfo; - if (GetAssetInfoUpgradingEnabled()) - { - AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - } + Asset asset(assetReferenceLoadBehavior); + asset.SetData(it->second); - // If the catalog is not available, use the original assetId - const AssetId& assetToFind(assetInfo.m_assetId.IsValid() ? assetInfo.m_assetId : assetId); + return asset; + } + return Asset(assetReferenceLoadBehavior); + } - AZStd::scoped_lock assetLock(m_assetMutex); - AssetMap::iterator it = m_assets.find(assetToFind); - if (it != m_assets.end()) - { - Asset asset(assetReferenceLoadBehavior); - asset.SetData(it->second); + AZStd::pair GetEffectiveDeadlineAndPriority( + const AssetHandler& handler, AssetType assetType, const AssetLoadParameters& loadParams) + { + AZStd::chrono::milliseconds deadline; + AZ::IO::IStreamerTypes::Priority priority; - return asset; - } - return Asset(assetReferenceLoadBehavior); + handler.GetDefaultAssetLoadPriority(assetType, deadline, priority); + + if (loadParams.m_deadline) + { + deadline = loadParams.m_deadline.value(); } - AZStd::pair GetEffectiveDeadlineAndPriority( - const AssetHandler& handler, AssetType assetType, const AssetLoadParameters& loadParams) + if (loadParams.m_priority) { - AZStd::chrono::milliseconds deadline; - AZ::IO::IStreamerTypes::Priority priority; + priority = loadParams.m_priority.value(); + } - handler.GetDefaultAssetLoadPriority(assetType, deadline, priority); + return make_pair(deadline, priority); + } - if (loadParams.m_deadline) - { - deadline = loadParams.m_deadline.value(); - } + //========================================================================= + // GetAsset + // [6/19/2012] + //========================================================================= + Asset AssetManager::GetAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams) + { + // If parallel dependent loads are disabled, just try to load the requested asset directly, and let it trigger + // dependent loads as they're encountered. + // Parallel dependent loads are disabled during asset building because there is no guarantee that dependency information + // will be available and complete until after all assets are finished building. + if(!GetParallelDependentLoadingEnabled()) + { + return GetAssetInternal(assetId, assetType, assetReferenceLoadBehavior, loadParams); + } - if (loadParams.m_priority) - { - priority = loadParams.m_priority.value(); - } + // Otherwise, use Asset Containers to load all dependent assets in parallel. + + Asset asset = FindOrCreateAsset(assetId, assetType, assetReferenceLoadBehavior); - return make_pair(deadline, priority); + if(!asset || (!loadParams.m_reloadMissingDependencies && asset.IsReady())) + { + // If the asset is already ready, just return it and skip the container + return AZStd::move(asset); } - //========================================================================= - // GetAsset - // [6/19/2012] - //========================================================================= - Asset AssetManager::GetAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams) + auto container = GetAssetContainer(asset, loadParams); + + AZStd::scoped_lock lock(m_assetContainerMutex); + + m_ownedAssetContainers.insert({ container.get(), container }); + + // Only insert a new entry into m_ownedAssetContainerLookup if one doesn't already exist for this container. + // Because it's a multimap, it is possible to add duplicate entries by mistake. + bool entryExists = false; + auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); + for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) { - // If parallel dependent loads are disabled, just try to load the requested asset directly, and let it trigger - // dependent loads as they're encountered. - // Parallel dependent loads are disabled during asset building because there is no guarantee that dependency information - // will be available and complete until after all assets are finished building. - if(!GetParallelDependentLoadingEnabled()) + if (itr->second == container.get()) { - return GetAssetInternal(assetId, assetType, assetReferenceLoadBehavior, loadParams); + entryExists = true; + break; } + } - // Otherwise, use Asset Containers to load all dependent assets in parallel. + // Entry for this container doesn't exist yet, so add it. + if (!entryExists) + { + m_ownedAssetContainerLookup.insert({ assetId, container.get() }); + } - Asset asset = FindOrCreateAsset(assetId, assetType, assetReferenceLoadBehavior); + return asset; + } - if(!asset || (!loadParams.m_reloadMissingDependencies && asset.IsReady())) - { - // If the asset is already ready, just return it and skip the container - return AZStd::move(asset); - } + Asset AssetManager::GetAssetInternal(const AssetId& assetId, [[maybe_unused]] const AssetType& assetType, + AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams, AssetInfo assetInfo /*= () */, bool signalLoaded /*= false */) + { + AZ_PROFILE_FUNCTION(AzCore); - auto container = GetAssetContainer(asset, loadParams); - - AZStd::scoped_lock lock(m_assetContainerMutex); + AZ_Error("AssetDatabase", assetId.IsValid(), "GetAsset called with invalid asset Id."); + AZ_Error("AssetDatabase", !assetType.IsNull(), "GetAsset called with invalid asset type."); + bool assetMissing = false; - m_ownedAssetContainers.insert({ container.get(), container }); + { + AZ_PROFILE_SCOPE(AzCore, "GetAsset: GetAssetInfo"); - // Only insert a new entry into m_ownedAssetContainerLookup if one doesn't already exist for this container. - // Because it's a multimap, it is possible to add duplicate entries by mistake. - bool entryExists = false; - auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); - for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) + // Attempt to look up asset info from catalog + // This is so that when assetId is a legacy id, we're operating on the canonical id anyway + if (!assetInfo.m_assetId.IsValid()) { - if (itr->second == container.get()) - { - entryExists = true; - break; - } + AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); } - // Entry for this container doesn't exist yet, so add it. - if (!entryExists) + // If the asset was found in the catalog, ensure the type infos match + if (assetInfo.m_assetId.IsValid()) { - m_ownedAssetContainerLookup.insert({ assetId, container.get() }); + AZ_Warning("AssetManager", assetInfo.m_assetType == assetType, + "Requested asset id %s with type %s, but type is actually %s.", + assetId.ToString().c_str(), assetType.ToString().c_str(), + assetInfo.m_assetType.ToString().c_str()); } + else + { + AZ_Warning("AssetManager", false, "GetAsset called for asset which does not exist in asset catalog and cannot be loaded. Asset may be missing, not processed or moved. AssetId: %s", + assetId.ToString().c_str()); - return asset; + // If asset not found, use the id and type given. We will create a valid asset, but it will likely get an error + // status below if the asset handler doesn't reroute it to a default asset. + assetInfo.m_assetId = assetId; + assetInfo.m_assetType = assetType; + assetMissing = true; + } } - Asset AssetManager::GetAssetInternal(const AssetId& assetId, [[maybe_unused]] const AssetType& assetType, - AssetLoadBehavior assetReferenceLoadBehavior, const AssetLoadParameters& loadParams, AssetInfo assetInfo /*= () */, bool signalLoaded /*= false */) - { - AZ_PROFILE_FUNCTION(AzCore); + AZ_PROFILE_SCOPE(AzCore, "GetAsset: %s", assetInfo.m_relativePath.c_str()); + AZ_ASSET_NAMED_SCOPE("GetAsset: %s", assetInfo.m_relativePath.c_str()); - AZ_Error("AssetDatabase", assetId.IsValid(), "GetAsset called with invalid asset Id."); - AZ_Error("AssetDatabase", !assetType.IsNull(), "GetAsset called with invalid asset type."); - bool assetMissing = false; + AZStd::shared_ptr dataStream; + AssetStreamInfo loadInfo; + bool triggerAssetErrorNotification = false; + bool wasUnloaded = false; + AssetHandler* handler = nullptr; + AssetData* assetData = nullptr; + Asset asset; // Used to hold a reference while job is dispatched and while outside of the assetMutex lock. - { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: GetAssetInfo"); + // Control the scope of the assetMutex lock + { + AZStd::scoped_lock assetLock(m_assetMutex); + bool isNewEntry = false; - // Attempt to look up asset info from catalog - // This is so that when assetId is a legacy id, we're operating on the canonical id anyway - if (!assetInfo.m_assetId.IsValid()) - { - AssetCatalogRequestBus::BroadcastResult(assetInfo, &AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - } + // check if asset already exists + { + AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAsset"); - // If the asset was found in the catalog, ensure the type infos match - if (assetInfo.m_assetId.IsValid()) + AssetMap::iterator it = m_assets.find(assetInfo.m_assetId); + if (it != m_assets.end()) { - AZ_Warning("AssetManager", assetInfo.m_assetType == assetType, - "Requested asset id %s with type %s, but type is actually %s.", - assetId.ToString().c_str(), assetType.ToString().c_str(), - assetInfo.m_assetType.ToString().c_str()); + assetData = it->second; + asset.SetData(assetData); } else { - AZ_Warning("AssetManager", false, "GetAsset called for asset which does not exist in asset catalog and cannot be loaded. Asset may be missing, not processed or moved. AssetId: %s", - assetId.ToString().c_str()); - - // If asset not found, use the id and type given. We will create a valid asset, but it will likely get an error - // status below if the asset handler doesn't reroute it to a default asset. - assetInfo.m_assetId = assetId; - assetInfo.m_assetType = assetType; - assetMissing = true; + isNewEntry = true; } } - AZ_PROFILE_SCOPE(AzCore, "GetAsset: %s", assetInfo.m_relativePath.c_str()); - AZ_ASSET_NAMED_SCOPE("GetAsset: %s", assetInfo.m_relativePath.c_str()); - - AZStd::shared_ptr dataStream; - AssetStreamInfo loadInfo; - bool triggerAssetErrorNotification = false; - bool wasUnloaded = false; - AssetHandler* handler = nullptr; - AssetData* assetData = nullptr; - Asset asset; // Used to hold a reference while job is dispatched and while outside of the assetMutex lock. - - // Control the scope of the assetMutex lock { - AZStd::scoped_lock assetLock(m_assetMutex); - bool isNewEntry = false; + AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAssetHandler"); - // check if asset already exists + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(assetInfo.m_assetType); + AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", + assetInfo.m_assetType.ToString().c_str(), assetInfo.m_assetId.ToString().c_str()); + if (handlerIt != m_handlers.end()) { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAsset"); - - AssetMap::iterator it = m_assets.find(assetInfo.m_assetId); - if (it != m_assets.end()) - { - assetData = it->second; - asset.SetData(assetData); - } - else + // Create the asset ptr and insert it into our asset map. + handler = handlerIt->second; + if (isNewEntry) { - isNewEntry = true; - } - } - - { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: FindAssetHandler"); + AZ_PROFILE_SCOPE(AzCore, "GetAsset: CreateAsset"); - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(assetInfo.m_assetType); - AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", - assetInfo.m_assetType.ToString().c_str(), assetInfo.m_assetId.ToString().c_str()); - if (handlerIt != m_handlers.end()) - { - // Create the asset ptr and insert it into our asset map. - handler = handlerIt->second; - if (isNewEntry) + assetData = handler->CreateAsset(assetInfo.m_assetId, assetInfo.m_assetType); + if (assetData) { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: CreateAsset"); - - assetData = handler->CreateAsset(assetInfo.m_assetId, assetInfo.m_assetType); - if (assetData) - { - assetData->m_assetId = assetInfo.m_assetId; - assetData->m_creationToken = ++m_creationTokenGenerator; - assetData->RegisterWithHandler(handler); - asset.SetData(assetData); - } - else - { - AZ_Error("AssetDatabase", false, "Failed to create asset with (id=%s, type=%s)", - assetInfo.m_assetId.ToString().c_str(), - assetInfo.m_assetType.ToString().c_str()); - } - } - } - } - - if (assetData) - { - if (isNewEntry && assetData->IsRegisterReadonlyAndShareable()) - { - AZ_PROFILE_SCOPE(AzCore, "GetAsset: RegisterAsset"); - m_assets.insert(AZStd::make_pair(assetInfo.m_assetId, assetData)); - } - if (assetData->GetStatus() == AssetData::AssetStatus::NotLoaded) - { - assetData->m_status = AssetData::AssetStatus::Queued; - UpdateDebugStatus(asset); - loadInfo = GetModifiedLoadStreamInfoForAsset(asset, handler); - wasUnloaded = true; - - if (loadInfo.IsValid()) - { - // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total - // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled - // before it is started, which creates state consistency issues. - - dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); + assetData->m_assetId = assetInfo.m_assetId; + assetData->m_creationToken = ++m_creationTokenGenerator; + assetData->RegisterWithHandler(handler); + asset.SetData(assetData); } else { - // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification - triggerAssetErrorNotification = true; + AZ_Error("AssetDatabase", false, "Failed to create asset with (id=%s, type=%s)", + assetInfo.m_assetId.ToString().c_str(), + assetInfo.m_assetType.ToString().c_str()); } } } } - if (!assetInfo.m_relativePath.empty()) - { - asset.m_assetHint = assetInfo.m_relativePath; - } - - asset.SetAutoLoadBehavior(assetReferenceLoadBehavior); - - // We delay queueing the async file I/O until we release m_assetMutex - if (dataStream) - { - AZ_Assert(loadInfo.IsValid(), "Expected valid stream info when dataStream is valid."); - constexpr bool isReload = false; - QueueAsyncStreamLoad(asset, dataStream, loadInfo, isReload, - handler, loadParams, signalLoaded); - } - else + if (assetData) { - AZ_Assert(!loadInfo.IsValid(), "Expected invalid stream info when dataStream is invalid."); - - if(!wasUnloaded && assetData && assetData->GetStatus() == AssetData::AssetStatus::Queued) + if (isNewEntry && assetData->IsRegisterReadonlyAndShareable()) { - auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, assetData->GetType(), loadParams); - - RescheduleStreamerRequest(assetData->GetId(), deadline, priority); + AZ_PROFILE_SCOPE(AzCore, "GetAsset: RegisterAsset"); + m_assets.insert(AZStd::make_pair(assetInfo.m_assetId, assetData)); } - - if (triggerAssetErrorNotification) + if (assetData->GetStatus() == AssetData::AssetStatus::NotLoaded) { - // If the asset was missing from the catalog, we already printed an error, so we can skip printing this one. - if (!assetMissing) + assetData->m_status = AssetData::AssetStatus::Queued; + UpdateDebugStatus(asset); + loadInfo = GetModifiedLoadStreamInfoForAsset(asset, handler); + wasUnloaded = true; + + if (loadInfo.IsValid()) { - AZ_Error("AssetDatabase", false, "Failed to retrieve required information for asset %s (%s)", - assetInfo.m_assetId.ToString().c_str(), - assetInfo.m_relativePath.empty() ? "" : assetInfo.m_relativePath.c_str()); - } + // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total + // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled + // before it is started, which creates state consistency issues. - PostLoad(asset, false, false, handler); + dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); + } + else + { + // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification + triggerAssetErrorNotification = true; + } } } + } - return asset; + if (!assetInfo.m_relativePath.empty()) + { + asset.m_assetHint = assetInfo.m_relativePath; } - void AssetManager::UpdateDebugStatus(const AZ::Data::Asset& asset) + asset.SetAutoLoadBehavior(assetReferenceLoadBehavior); + + // We delay queueing the async file I/O until we release m_assetMutex + if (dataStream) + { + AZ_Assert(loadInfo.IsValid(), "Expected valid stream info when dataStream is valid."); + constexpr bool isReload = false; + QueueAsyncStreamLoad(asset, dataStream, loadInfo, isReload, + handler, loadParams, signalLoaded); + } + else { - if(!m_debugAssetEvents) + AZ_Assert(!loadInfo.IsValid(), "Expected invalid stream info when dataStream is invalid."); + + if(!wasUnloaded && assetData && assetData->GetStatus() == AssetData::AssetStatus::Queued) { - m_debugAssetEvents = AZ::Interface::Get(); + auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, assetData->GetType(), loadParams); + + RescheduleStreamerRequest(assetData->GetId(), deadline, priority); } - if(m_debugAssetEvents) + if (triggerAssetErrorNotification) { - m_debugAssetEvents->AssetStatusUpdate(asset.GetId(), asset.GetStatus()); + // If the asset was missing from the catalog, we already printed an error, so we can skip printing this one. + if (!assetMissing) + { + AZ_Error("AssetDatabase", false, "Failed to retrieve required information for asset %s (%s)", + assetInfo.m_assetId.ToString().c_str(), + assetInfo.m_relativePath.empty() ? "" : assetInfo.m_relativePath.c_str()); + } + + PostLoad(asset, false, false, handler); } } - Asset AssetManager::FindOrCreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) + return asset; + } + + void AssetManager::UpdateDebugStatus(const AZ::Data::Asset& asset) + { + if(!m_debugAssetEvents) + { + m_debugAssetEvents = AZ::Interface::Get(); + } + + if(m_debugAssetEvents) { - AZStd::scoped_lock asset_lock(m_assetMutex); + m_debugAssetEvents->AssetStatusUpdate(asset.GetId(), asset.GetStatus()); + } + } - Asset asset = FindAsset(assetId, assetReferenceLoadBehavior); + Asset AssetManager::FindOrCreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) + { + AZStd::scoped_lock asset_lock(m_assetMutex); - if (!asset) - { - asset = CreateAsset(assetId, assetType, assetReferenceLoadBehavior); - } + Asset asset = FindAsset(assetId, assetReferenceLoadBehavior); - return asset; + if (!asset) + { + asset = CreateAsset(assetId, assetType, assetReferenceLoadBehavior); } - //========================================================================= - // CreateAsset - // [8/31/2012] - //========================================================================= - Asset AssetManager::CreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) - { - AZStd::scoped_lock asset_lock(m_assetMutex); + return asset; + } - // check if asset already exist - AssetMap::iterator it = m_assets.find(assetId); - if (it == m_assets.end()) + //========================================================================= + // CreateAsset + // [8/31/2012] + //========================================================================= + Asset AssetManager::CreateAsset(const AssetId& assetId, const AssetType& assetType, AssetLoadBehavior assetReferenceLoadBehavior) + { + AZStd::scoped_lock asset_lock(m_assetMutex); + + // check if asset already exist + AssetMap::iterator it = m_assets.find(assetId); + if (it == m_assets.end()) + { + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); + AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset (id=%s, type=%s)!", assetId.ToString().c_str(), assetType.ToString().c_str()); + if (handlerIt != m_handlers.end()) { - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); - AZ_Error("AssetDatabase", handlerIt != m_handlers.end(), "No handler was registered for this asset (id=%s, type=%s)!", assetId.ToString().c_str(), assetType.ToString().c_str()); - if (handlerIt != m_handlers.end()) + // Create the asset ptr + AssetHandler* handler = handlerIt->second; + auto assetData = handler->CreateAsset(assetId, assetType); + AZ_Error("AssetDatabase", assetData, "Failed to create asset with (id=%s, type=%s)", assetId.ToString().c_str(), assetType.ToString().c_str()); + if (assetData) { - // Create the asset ptr - AssetHandler* handler = handlerIt->second; - auto assetData = handler->CreateAsset(assetId, assetType); - AZ_Error("AssetDatabase", assetData, "Failed to create asset with (id=%s, type=%s)", assetId.ToString().c_str(), assetType.ToString().c_str()); - if (assetData) + assetData->m_assetId = assetId; + assetData->m_creationToken = ++m_creationTokenGenerator; + assetData->RegisterWithHandler(handler); + if (assetData->IsRegisterReadonlyAndShareable()) { - assetData->m_assetId = assetId; - assetData->m_creationToken = ++m_creationTokenGenerator; - assetData->RegisterWithHandler(handler); - if (assetData->IsRegisterReadonlyAndShareable()) - { - m_assets.insert(AZStd::make_pair(assetId, assetData)); - } + m_assets.insert(AZStd::make_pair(assetId, assetData)); + } - Asset asset(assetReferenceLoadBehavior); - asset.SetData(assetData); + Asset asset(assetReferenceLoadBehavior); + asset.SetData(assetData); - return asset; - } + return asset; } } - else - { - AZ_Error("AssetDatabase", false, "Asset (id=%s, type=%s) already exists in the database! Asset not created!", assetId.ToString().c_str(), assetType.ToString().c_str()); - } - return Asset(assetReferenceLoadBehavior); } - - //========================================================================= - // ReleaseAsset - //========================================================================= - void AssetManager::ReleaseAsset(AssetData* asset, AssetId assetId, AssetType assetType, bool removeAssetFromHash, int creationToken) + else { - AZ_Assert(asset, "Cannot release NULL AssetPtr!"); + AZ_Error("AssetDatabase", false, "Asset (id=%s, type=%s) already exists in the database! Asset not created!", assetId.ToString().c_str(), assetType.ToString().c_str()); + } + return Asset(assetReferenceLoadBehavior); + } - if(m_suspendAssetRelease) - { - return; - } + //========================================================================= + // ReleaseAsset + //========================================================================= + void AssetManager::ReleaseAsset(AssetData* asset, AssetId assetId, AssetType assetType, bool removeAssetFromHash, int creationToken) + { + AZ_Assert(asset, "Cannot release NULL AssetPtr!"); - bool wasInAssetsHash = false; // We do support assets that are not registered in the asset manager (with the same ID too). - bool destroyAsset = false; + if(m_suspendAssetRelease) + { + return; + } - if (removeAssetFromHash) - { - AZStd::scoped_lock asset_lock(m_assetMutex); - AssetMap::iterator it = m_assets.find(assetId); - // need to check the count again in here in case - // someone was trying to get the asset on another thread - // Set it to -1 so only this thread will attempt to clean up the cache and delete the asset - int expectedRefCount = 0; - // if the assetId is not in the map or if the identifierId - // do not match it implies that the asset has been already destroyed. - // if the usecount is non zero it implies that we cannot destroy this asset. - if (it != m_assets.end() && it->second->m_creationToken == creationToken && it->second->m_weakUseCount.compare_exchange_strong(expectedRefCount, -1)) - { - wasInAssetsHash = true; - m_assets.erase(it); - destroyAsset = true; - } + bool wasInAssetsHash = false; // We do support assets that are not registered in the asset manager (with the same ID too). + bool destroyAsset = false; + + if (removeAssetFromHash) + { + AZStd::scoped_lock asset_lock(m_assetMutex); + AssetMap::iterator it = m_assets.find(assetId); + // need to check the count again in here in case + // someone was trying to get the asset on another thread + // Set it to -1 so only this thread will attempt to clean up the cache and delete the asset + int expectedRefCount = 0; + // if the assetId is not in the map or if the identifierId + // do not match it implies that the asset has been already destroyed. + // if the usecount is non zero it implies that we cannot destroy this asset. + if (it != m_assets.end() && it->second->m_creationToken == creationToken && it->second->m_weakUseCount.compare_exchange_strong(expectedRefCount, -1)) + { + wasInAssetsHash = true; + m_assets.erase(it); + destroyAsset = true; } - else + } + else + { + // if an asset is not shareable, it implies that that asset is not in the map + // and therefore once its ref count goes to zero it cannot go back up again and therefore we can safely destroy it + destroyAsset = true; + } + + // We have to separate the code which was removing the asset from the m_asset map while being locked, but then actually destroy the asset + // while the lock is not held since destroying the asset while holding the lock can cause a deadlock. + if (destroyAsset) + { + if(m_debugAssetEvents) { - // if an asset is not shareable, it implies that that asset is not in the map - // and therefore once its ref count goes to zero it cannot go back up again and therefore we can safely destroy it - destroyAsset = true; + m_debugAssetEvents->ReleaseAsset(assetId); } - // We have to separate the code which was removing the asset from the m_asset map while being locked, but then actually destroy the asset - // while the lock is not held since destroying the asset while holding the lock can cause a deadlock. - if (destroyAsset) + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); + if (handlerIt != m_handlers.end()) { - if(m_debugAssetEvents) + AssetHandler* handler = handlerIt->second; + if (asset) { - m_debugAssetEvents->ReleaseAsset(assetId); - } + handler->DestroyAsset(asset); - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(assetType); - if (handlerIt != m_handlers.end()) - { - AssetHandler* handler = handlerIt->second; - if (asset) + if (wasInAssetsHash) { - handler->DestroyAsset(asset); - - if (wasInAssetsHash) - { - AssetBus::QueueEvent(assetId, &AssetBus::Events::OnAssetUnloaded, assetId, assetType); - } + AssetBus::QueueEvent(assetId, &AssetBus::Events::OnAssetUnloaded, assetId, assetType); } } - else - { - AZ_Assert(false, "No handler was registered for asset of type %s but it was still in the AssetManager as %s", assetType.ToString().c_str(), asset->GetId().ToString().c_str()); - } } - } - - void AssetManager::OnAssetUnused(AssetData* asset) - { - // If we're currently suspending asset releases, don't get rid of the asset containers either. - if (m_suspendAssetRelease) + else { - return; + AZ_Assert(false, "No handler was registered for asset of type %s but it was still in the AssetManager as %s", assetType.ToString().c_str(), asset->GetId().ToString().c_str()); } - - ReleaseAssetContainersForAsset(asset); } + } - void AssetManager::ReleaseAssetContainersForAsset(AssetData* asset) + void AssetManager::OnAssetUnused(AssetData* asset) + { + // If we're currently suspending asset releases, don't get rid of the asset containers either. + if (m_suspendAssetRelease) { - // Release any containers that were loading this asset - AZStd::scoped_lock lock(m_assetContainerMutex); + return; + } - AssetId assetId = asset->GetId(); + ReleaseAssetContainersForAsset(asset); + } - auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); + void AssetManager::ReleaseAssetContainersForAsset(AssetData* asset) + { + // Release any containers that were loading this asset + AZStd::scoped_lock lock(m_assetContainerMutex); - for (auto itr = rangeItr.first; itr != rangeItr.second;) - { - AZ_Assert(itr->second->GetContainerAssetId() == assetId, - "Asset container is incorrectly associated with the asset being destroyed."); - itr->second->ClearRootAsset(); - - // Only remove owned asset containers if they aren't currently loading. - // If they *are* currently loading, removing them could cause dependent asset loads that were triggered to - // remain in a perpetual loading state. Instead, leave the containers for now, they will get removed during - // the OnAssetContainerReady callback. - if (!itr->second->IsLoading()) - { - m_ownedAssetContainers.erase(itr->second); - itr = m_ownedAssetContainerLookup.erase(itr); - } - else - { - ++itr; - } - } - } + AssetId assetId = asset->GetId(); - //========================================================================= - // SaveAsset - // [9/13/2012] - //========================================================================= - void AssetManager::SaveAsset(const Asset& asset) - { - AssetHandler* handler; - { - // find the asset type handler - AssetHandlerMap::iterator handlerIt = m_handlers.find(asset.GetType()); - AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", asset.GetType().ToString().c_str(), asset.GetId().ToString().c_str()); - handler = handlerIt->second; - } + auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetId); - // start the data saving - SaveAssetJob* saveJob = aznew SaveAssetJob(JobContext::GetGlobalContext(), this, asset, handler); - saveJob->Start(); - } - - //========================================================================= - // ReloadAsset - //========================================================================= - void AssetManager::ReloadAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior, bool isAutoReload) + for (auto itr = rangeItr.first; itr != rangeItr.second;) { - AZStd::scoped_lock assetLock(m_assetMutex); - auto assetIter = m_assets.find(assetId); + AZ_Assert(itr->second->GetContainerAssetId() == assetId, + "Asset container is incorrectly associated with the asset being destroyed."); + itr->second->ClearRootAsset(); - if (assetIter == m_assets.end() || assetIter->second->IsLoading()) + // Only remove owned asset containers if they aren't currently loading. + // If they *are* currently loading, removing them could cause dependent asset loads that were triggered to + // remain in a perpetual loading state. Instead, leave the containers for now, they will get removed during + // the OnAssetContainerReady callback. + if (!itr->second->IsLoading()) { - // Only existing assets can be reloaded. - return; + m_ownedAssetContainers.erase(itr->second); + itr = m_ownedAssetContainerLookup.erase(itr); } - - auto reloadIter = m_reloads.find(assetId); - if (reloadIter != m_reloads.end()) + else { - auto curStatus = reloadIter->second.GetData()->GetStatus(); - // We don't need another reload if we're in "Queued" state because that reload has not actually begun yet. - // If it is in Loading state we want to pass by and allow the new assetData to be created and start the new reload - // As the current load could already be stale - if (curStatus == AssetData::AssetStatus::Queued) - { - return; - } - else if (curStatus == AssetData::AssetStatus::Loading || curStatus == AssetData::AssetStatus::StreamReady) - { - // Don't flood the tick bus - this value will be checked when the asset load completes - reloadIter->second->SetRequeue(true); - return; - } + ++itr; } + } + } - AssetData* newAssetData = nullptr; - AssetHandler* handler = nullptr; + //========================================================================= + // SaveAsset + // [9/13/2012] + //========================================================================= + void AssetManager::SaveAsset(const Asset& asset) + { + AssetHandler* handler; + { + // find the asset type handler + AssetHandlerMap::iterator handlerIt = m_handlers.find(asset.GetType()); + AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", asset.GetType().ToString().c_str(), asset.GetId().ToString().c_str()); + handler = handlerIt->second; + } - bool preventAutoReload = isAutoReload && assetIter->second && !assetIter->second->HandleAutoReload(); + // start the data saving + SaveAssetJob* saveJob = aznew SaveAssetJob(JobContext::GetGlobalContext(), this, asset, handler); + saveJob->Start(); + } - // when Asset's constructor is called (the one that takes an AssetData), it updates the AssetID - // of the Asset to be the real latest canonical assetId of the asset, so we cache that here instead of have it happen - // implicitly and repeatedly for anything we call. - Asset currentAsset(assetIter->second, AZ::Data::AssetLoadBehavior::Default); + //========================================================================= + // ReloadAsset + //========================================================================= + void AssetManager::ReloadAsset(const AssetId& assetId, AssetLoadBehavior assetReferenceLoadBehavior, bool isAutoReload) + { + AZStd::scoped_lock assetLock(m_assetMutex); + auto assetIter = m_assets.find(assetId); - if (!assetIter->second->IsRegisterReadonlyAndShareable() && !preventAutoReload) + if (assetIter == m_assets.end() || assetIter->second->IsLoading()) + { + // Only existing assets can be reloaded. + return; + } + + auto reloadIter = m_reloads.find(assetId); + if (reloadIter != m_reloads.end()) + { + auto curStatus = reloadIter->second.GetData()->GetStatus(); + // We don't need another reload if we're in "Queued" state because that reload has not actually begun yet. + // If it is in Loading state we want to pass by and allow the new assetData to be created and start the new reload + // As the current load could already be stale + if (curStatus == AssetData::AssetStatus::Queued) { - // Reloading an "instance asset" is basically a no-op. - // We'll simply notify users to reload the asset. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, currentAsset); return; } - else - { - AssetBus::QueueFunction(&AssetManager::NotifyAssetPreReload, this, currentAsset); - } - - // Current AssetData has requested not to be auto reloaded - if (preventAutoReload) + else if (curStatus == AssetData::AssetStatus::Loading || curStatus == AssetData::AssetStatus::StreamReady) { + // Don't flood the tick bus - this value will be checked when the asset load completes + reloadIter->second->SetRequeue(true); return; } + } - // Resolve the asset handler and allocate new data for the reload. - { - AssetHandlerMap::iterator handlerIt = m_handlers.find(currentAsset.GetType()); - AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", - currentAsset.GetType().ToString().c_str(), currentAsset.GetId().ToString().c_str()); - handler = handlerIt->second; + AssetData* newAssetData = nullptr; + AssetHandler* handler = nullptr; - newAssetData = handler->CreateAsset(currentAsset.GetId(), currentAsset.GetType()); - if (newAssetData) - { - newAssetData->m_assetId = currentAsset.GetId(); - newAssetData->RegisterWithHandler(handler); - } - } + bool preventAutoReload = isAutoReload && assetIter->second && !assetIter->second->HandleAutoReload(); + + // when Asset's constructor is called (the one that takes an AssetData), it updates the AssetID + // of the Asset to be the real latest canonical assetId of the asset, so we cache that here instead of have it happen + // implicitly and repeatedly for anything we call. + Asset currentAsset(assetIter->second, AZ::Data::AssetLoadBehavior::Default); + + if (!assetIter->second->IsRegisterReadonlyAndShareable() && !preventAutoReload) + { + // Reloading an "instance asset" is basically a no-op. + // We'll simply notify users to reload the asset. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, currentAsset); + return; + } + else + { + AssetBus::QueueFunction(&AssetManager::NotifyAssetPreReload, this, currentAsset); + } + + // Current AssetData has requested not to be auto reloaded + if (preventAutoReload) + { + return; + } + + // Resolve the asset handler and allocate new data for the reload. + { + AssetHandlerMap::iterator handlerIt = m_handlers.find(currentAsset.GetType()); + AZ_Assert(handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", + currentAsset.GetType().ToString().c_str(), currentAsset.GetId().ToString().c_str()); + handler = handlerIt->second; + newAssetData = handler->CreateAsset(currentAsset.GetId(), currentAsset.GetType()); if (newAssetData) { - // For reloaded assets, we need to hold an internal reference to ensure the data - // isn't immediately destroyed. Since reloads are not a shipping feature, we'll - // hold this reference indefinitely, but we'll only hold the most recent one for - // a given asset Id. + newAssetData->m_assetId = currentAsset.GetId(); + newAssetData->RegisterWithHandler(handler); + } + } - newAssetData->m_status = AssetData::AssetStatus::Queued; - Asset newAsset(newAssetData, assetReferenceLoadBehavior); + if (newAssetData) + { + // For reloaded assets, we need to hold an internal reference to ensure the data + // isn't immediately destroyed. Since reloads are not a shipping feature, we'll + // hold this reference indefinitely, but we'll only hold the most recent one for + // a given asset Id. - m_reloads[newAsset.GetId()] = newAsset; + newAssetData->m_status = AssetData::AssetStatus::Queued; + Asset newAsset(newAssetData, assetReferenceLoadBehavior); - UpdateDebugStatus(newAsset); + m_reloads[newAsset.GetId()] = newAsset; - AZStd::shared_ptr dataStream; - AssetStreamInfo loadInfo = GetModifiedLoadStreamInfoForAsset(newAsset, handler); - constexpr bool isReload = true; - if (loadInfo.IsValid()) - { - // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total - // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled - // before it is started, which creates state consistency issues. + UpdateDebugStatus(newAsset); - dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); - if (dataStream) - { - // Currently there isn't a clear use case for needing to adjust priority for reloads so the default load priority is used - constexpr bool signalLoaded = false; // this is a reload, so don't signal dependent-asset loads - QueueAsyncStreamLoad(newAsset, dataStream, loadInfo, isReload, - handler, {}, signalLoaded); - } - else - { - AZ_Assert(false, "Failed to create dataStream to reload asset %s (%s)", - newAsset.GetId().ToString().c_str(), - newAsset.GetHint().c_str()); - } + AZStd::shared_ptr dataStream; + AssetStreamInfo loadInfo = GetModifiedLoadStreamInfoForAsset(newAsset, handler); + constexpr bool isReload = true; + if (loadInfo.IsValid()) + { + // Create the AssetDataStream instance here so it can claim an asset reference inside the lock (for a total + // count of 2 before starting the load), otherwise the refcount will be 1, and the load could be canceled + // before it is started, which creates state consistency issues. + + dataStream = AZStd::make_shared(handler->GetAssetBufferAllocator()); + if (dataStream) + { + // Currently there isn't a clear use case for needing to adjust priority for reloads so the default load priority is used + constexpr bool signalLoaded = false; // this is a reload, so don't signal dependent-asset loads + QueueAsyncStreamLoad(newAsset, dataStream, loadInfo, isReload, + handler, {}, signalLoaded); } else { - // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification - AZ_Error("AssetDatabase", false, "Failed to retrieve required information for asset %s (%s)", + AZ_Assert(false, "Failed to create dataStream to reload asset %s (%s)", newAsset.GetId().ToString().c_str(), newAsset.GetHint().c_str()); - - constexpr bool loadSucceeded = false; - AssetManager::Instance().PostLoad(newAsset, loadSucceeded, isReload, handler); } + } + else + { + // Asset creation was successful, but asset loading isn't, so trigger the OnAssetError notification + AZ_Error("AssetDatabase", false, "Failed to retrieve required information for asset %s (%s)", + newAsset.GetId().ToString().c_str(), + newAsset.GetHint().c_str()); + constexpr bool loadSucceeded = false; + AssetManager::Instance().PostLoad(newAsset, loadSucceeded, isReload, handler); } + } + } + + //========================================================================= + // ReloadAssetFromData + //========================================================================= + void AssetManager::ReloadAssetFromData(const Asset& asset) + { + bool shouldAssignAssetData = false; - //========================================================================= - // ReloadAssetFromData - //========================================================================= - void AssetManager::ReloadAssetFromData(const Asset& asset) { - bool shouldAssignAssetData = false; + AZ_Assert(asset.Get(), "Asset data for reload is missing."); + AZStd::scoped_lock assetLock(m_assetMutex); + AZ_Assert( + m_assets.find(asset.GetId()) != m_assets.end(), + "Unable to reload asset %s because it's not in the AssetManager's asset list.", asset.ToString().c_str()); + AZ_Assert( + m_assets.find(asset.GetId()) == m_assets.end() || + asset->RTTI_GetType() == m_assets.find(asset.GetId())->second->RTTI_GetType(), + "New and old data types are mismatched!"); + auto found = m_assets.find(asset.GetId()); + if ((found == m_assets.end()) || (asset->RTTI_GetType() != found->second->RTTI_GetType())) { - AZ_Assert(asset.Get(), "Asset data for reload is missing."); - AZStd::scoped_lock assetLock(m_assetMutex); - AZ_Assert( - m_assets.find(asset.GetId()) != m_assets.end(), - "Unable to reload asset %s because it's not in the AssetManager's asset list.", asset.ToString().c_str()); - AZ_Assert( - m_assets.find(asset.GetId()) == m_assets.end() || - asset->RTTI_GetType() == m_assets.find(asset.GetId())->second->RTTI_GetType(), - "New and old data types are mismatched!"); + return; // this will just lead to crashes down the line and the above asserts cover this. + } - auto found = m_assets.find(asset.GetId()); - if ((found == m_assets.end()) || (asset->RTTI_GetType() != found->second->RTTI_GetType())) - { - return; // this will just lead to crashes down the line and the above asserts cover this. - } + AssetData* newData = asset.Get(); - AssetData* newData = asset.Get(); + if (found->second != newData) + { + // Notify users that we are about to change asset + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); - if (found->second != newData) + // Resolve the asset handler and account for the new asset instance. { - // Notify users that we are about to change asset - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); - - // Resolve the asset handler and account for the new asset instance. - { - [[maybe_unused]] AssetHandlerMap::iterator handlerIt = m_handlers.find(newData->GetType()); - AZ_Assert( - handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", - newData->GetType().ToString().c_str(), newData->GetId().ToString().c_str()); - } - - shouldAssignAssetData = true; + [[maybe_unused]] AssetHandlerMap::iterator handlerIt = m_handlers.find(newData->GetType()); + AZ_Assert( + handlerIt != m_handlers.end(), "No handler was registered for this asset [type:%s id:%s]!", + newData->GetType().ToString().c_str(), newData->GetId().ToString().c_str()); } - } - // We specifically perform this outside of the m_assetMutex lock so that the lock isn't held at the point that - // OnAssetReload is triggered inside of AssignAssetData. Otherwise, we open up a high potential for deadlocks. - if (shouldAssignAssetData) - { - AssignAssetData(asset); + shouldAssignAssetData = true; } } - //========================================================================= - // GetHandler - //========================================================================= - AssetHandler* AssetManager::GetHandler(const AssetType& assetType) + // We specifically perform this outside of the m_assetMutex lock so that the lock isn't held at the point that + // OnAssetReload is triggered inside of AssignAssetData. Otherwise, we open up a high potential for deadlocks. + if (shouldAssignAssetData) { - auto handlerEntry = m_handlers.find(assetType); - if (handlerEntry != m_handlers.end()) - { - return handlerEntry->second; - } - return nullptr; + AssignAssetData(asset); } + } - //========================================================================= - // AssignAssetData - //========================================================================= - void AssetManager::AssignAssetData(const Asset& asset) + //========================================================================= + // GetHandler + //========================================================================= + AssetHandler* AssetManager::GetHandler(const AssetType& assetType) + { + auto handlerEntry = m_handlers.find(assetType); + if (handlerEntry != m_handlers.end()) { - AZ_Assert(asset.Get(), "Reloaded data is missing!"); + return handlerEntry->second; + } + return nullptr; + } - const AssetId& assetId = asset.GetId(); + //========================================================================= + // AssignAssetData + //========================================================================= + void AssetManager::AssignAssetData(const Asset& asset) + { + AZ_Assert(asset.Get(), "Reloaded data is missing!"); - asset->m_status = AssetData::AssetStatus::Ready; - UpdateDebugStatus(asset); + const AssetId& assetId = asset.GetId(); - if (asset->IsRegisterReadonlyAndShareable()) + asset->m_status = AssetData::AssetStatus::Ready; + UpdateDebugStatus(asset); + + if (asset->IsRegisterReadonlyAndShareable()) + { + bool requeue{ false }; { - bool requeue{ false }; + AZStd::scoped_lock assetLock(m_assetMutex); + auto found = m_assets.find(assetId); + AZ_Assert(found == m_assets.end() || asset.Get()->RTTI_GetType() == found->second->RTTI_GetType(), + "New and old data types are mismatched!"); + + // if we are here it implies that we have two assets with the same asset id, and we are + // trying to replace the old asset with the new asset which was not created using the asset manager system. + // In this scenario if any other system have cached the old asset then the asset wont be destroyed + // because of creation token mismatch when it's ref count finally goes to zero. Since the old asset is not shareable anymore + // manually setting the creationToken to default creation token will ensure that the asset is destroyed correctly. + asset.m_assetData->m_creationToken = ++m_creationTokenGenerator; + if (found != m_assets.end()) { - AZStd::scoped_lock assetLock(m_assetMutex); - auto found = m_assets.find(assetId); - AZ_Assert(found == m_assets.end() || asset.Get()->RTTI_GetType() == found->second->RTTI_GetType(), - "New and old data types are mismatched!"); - - // if we are here it implies that we have two assets with the same asset id, and we are - // trying to replace the old asset with the new asset which was not created using the asset manager system. - // In this scenario if any other system have cached the old asset then the asset wont be destroyed - // because of creation token mismatch when it's ref count finally goes to zero. Since the old asset is not shareable anymore - // manually setting the creationToken to default creation token will ensure that the asset is destroyed correctly. - asset.m_assetData->m_creationToken = ++m_creationTokenGenerator; - if (found != m_assets.end()) - { - found->second->m_creationToken = AZ::Data::s_defaultCreationToken; - } + found->second->m_creationToken = AZ::Data::s_defaultCreationToken; + } - // Held references to old data are retained, but replace the entry in the DB for future requests. - // Fire an OnAssetReloaded message so listeners can react to the new data. - m_assets[assetId] = asset.Get(); + // Held references to old data are retained, but replace the entry in the DB for future requests. + // Fire an OnAssetReloaded message so listeners can react to the new data. + m_assets[assetId] = asset.Get(); - // Release the reload reference. - auto reloadInfo = m_reloads.find(assetId); - if (reloadInfo != m_reloads.end()) - { - requeue = reloadInfo->second->GetRequeue(); - m_reloads.erase(reloadInfo); - } - } - // Call reloaded before we can call ReloadAsset below to preserve order - AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); - // Release the lock before we call reload - if (requeue) + // Release the reload reference. + auto reloadInfo = m_reloads.find(assetId); + if (reloadInfo != m_reloads.end()) { - ReloadAsset(assetId, asset.GetAutoLoadBehavior()); + requeue = reloadInfo->second->GetRequeue(); + m_reloads.erase(reloadInfo); } } - else + // Call reloaded before we can call ReloadAsset below to preserve order + AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); + // Release the lock before we call reload + if (requeue) { - AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); + ReloadAsset(assetId, asset.GetAutoLoadBehavior()); } } + else + { + AssetBus::Event(assetId, &AssetBus::Events::OnAssetReloaded, asset); + } + } - //========================================================================= - // GetModifiedLoadStreamInfoForAsset - //========================================================================= - AssetStreamInfo AssetManager::GetModifiedLoadStreamInfoForAsset(const Asset& asset, AssetHandler* handler) + //========================================================================= + // GetModifiedLoadStreamInfoForAsset + //========================================================================= + AssetStreamInfo AssetManager::GetModifiedLoadStreamInfoForAsset(const Asset& asset, AssetHandler* handler) + { + AssetStreamInfo loadInfo = GetLoadStreamInfoForAsset(asset.GetId(), asset.GetType()); + if (!loadInfo.IsValid()) { - AssetStreamInfo loadInfo = GetLoadStreamInfoForAsset(asset.GetId(), asset.GetType()); - if (!loadInfo.IsValid()) + // opportunity for handler to do default substitution: + AZ::Data::AssetId fallbackId = handler->AssetMissingInCatalog(asset); + if (fallbackId.IsValid()) { - // opportunity for handler to do default substitution: - AZ::Data::AssetId fallbackId = handler->AssetMissingInCatalog(asset); - if (fallbackId.IsValid()) - { - loadInfo = GetLoadStreamInfoForAsset(fallbackId, asset.GetType()); - } + loadInfo = GetLoadStreamInfoForAsset(fallbackId, asset.GetType()); } + } - // Give the handler an opportunity to modify any of the load info before creating the dataStream. - handler->GetCustomAssetStreamInfoForLoad(loadInfo); + // Give the handler an opportunity to modify any of the load info before creating the dataStream. + handler->GetCustomAssetStreamInfoForLoad(loadInfo); - return loadInfo; - } + return loadInfo; + } - //========================================================================= - // QueueAsyncStreamLoad - //========================================================================= - void AssetManager::QueueAsyncStreamLoad(Asset asset, AZStd::shared_ptr dataStream, - const AZ::Data::AssetStreamInfo& streamInfo, bool isReload, - AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) - { - AZ_PROFILE_FUNCTION(AzCore); + //========================================================================= + // QueueAsyncStreamLoad + //========================================================================= + void AssetManager::QueueAsyncStreamLoad(Asset asset, AZStd::shared_ptr dataStream, + const AZ::Data::AssetStreamInfo& streamInfo, bool isReload, + AssetHandler* handler, const AssetLoadParameters& loadParams, bool signalLoaded) + { + AZ_PROFILE_FUNCTION(AzCore); - // Set up the callback that will process the asset data once the raw file load is finished. - // The callback is declared as mutable so that we can clear weakAsset within the callback. The refcount in weakAsset - // can trigger an AssetManager::ReleaseAsset call. If this occurs during lambda cleanup, it could happen at any time - // on the file streamer thread as streamer requests get recycled, including during (or after) AssetManager shutdown. - // By controlling when the refcount is changed, we can ensure that it occurs while the AssetManager is still active. - auto assetDataStreamCallback = [this, loadParams, handler, dataStream, signalLoaded, isReload, - weakAsset = AssetInternal::WeakAsset(asset)] - (AZ::IO::IStreamerTypes::RequestStatus status) mutable - { - auto assetId = weakAsset.GetId(); + // Set up the callback that will process the asset data once the raw file load is finished. + // The callback is declared as mutable so that we can clear weakAsset within the callback. The refcount in weakAsset + // can trigger an AssetManager::ReleaseAsset call. If this occurs during lambda cleanup, it could happen at any time + // on the file streamer thread as streamer requests get recycled, including during (or after) AssetManager shutdown. + // By controlling when the refcount is changed, we can ensure that it occurs while the AssetManager is still active. + auto assetDataStreamCallback = [this, loadParams, handler, dataStream, signalLoaded, isReload, + weakAsset = AssetInternal::WeakAsset(asset)] + (AZ::IO::IStreamerTypes::RequestStatus status) mutable + { + auto assetId = weakAsset.GetId(); - Asset loadingAsset = weakAsset.GetStrongReference(); + Asset loadingAsset = weakAsset.GetStrongReference(); - if (loadingAsset) + if (loadingAsset) + { + AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetStreamerCallback %s", + loadingAsset.GetHint().c_str()); { - AZ_PROFILE_SCOPE(AzCore, "AZ::Data::LoadAssetStreamerCallback %s", - loadingAsset.GetHint().c_str()); + AZStd::scoped_lock assetLock(m_assetMutex); + AssetData* data = loadingAsset.Get(); + if (data->GetStatus() != AssetData::AssetStatus::Queued) { - AZStd::scoped_lock assetLock(m_assetMutex); - AssetData* data = loadingAsset.Get(); - if (data->GetStatus() != AssetData::AssetStatus::Queued) - { - AZ_Warning("AssetManager", false, "Asset %s no longer in Queued state, abandoning load", loadingAsset.GetId().ToString().c_str()); - return; - } - data->m_status = AssetData::AssetStatus::StreamReady; + AZ_Warning("AssetManager", false, "Asset %s no longer in Queued state, abandoning load", loadingAsset.GetId().ToString().c_str()); + return; } + data->m_status = AssetData::AssetStatus::StreamReady; + } - // The callback from AZ Streamer blocks the streaming thread until this function completes. To minimize the overhead, - // do the majority of the work in a separate job. - auto loadJob = aznew LoadAssetJob(this, loadingAsset, - dataStream, isReload, status, handler, loadParams, signalLoaded); + // The callback from AZ Streamer blocks the streaming thread until this function completes. To minimize the overhead, + // do the majority of the work in a separate job. + auto loadJob = aznew LoadAssetJob(this, loadingAsset, + dataStream, isReload, status, handler, loadParams, signalLoaded); - bool jobQueued = false; + bool jobQueued = false; - // If there's already an active blocking request waiting for this load to complete, let that thread handle - // the load itself instead of consuming a second thread. + // If there's already an active blocking request waiting for this load to complete, let that thread handle + // the load itself instead of consuming a second thread. + { + AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); + auto range = m_activeBlockingRequests.equal_range(assetId); + for(auto blockingRequest = range.first; blockingRequest != range.second; ++blockingRequest) { - AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); - auto range = m_activeBlockingRequests.equal_range(assetId); - for(auto blockingRequest = range.first; blockingRequest != range.second; ++blockingRequest) + if(blockingRequest->second->QueueAssetLoadJob(loadJob)) { - if(blockingRequest->second->QueueAssetLoadJob(loadJob)) - { - jobQueued = true; - break; - } + jobQueued = true; + break; } } - - if (!jobQueued) - { - loadJob->Start(); - } } - else + + if (!jobQueued) { - BlockingAssetLoadBus::Event(assetId, &BlockingAssetLoadBus::Events::OnLoadCanceled, assetId); - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, assetId); + loadJob->Start(); } + } + else + { + BlockingAssetLoadBus::Event(assetId, &BlockingAssetLoadBus::Events::OnLoadCanceled, assetId); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetCanceled, assetId); + } - // *After* the loadJob has been created, clear our asset references and remove the active streamer requests. - // This needs to happen after the loadJob creation to ensure that on AssetManager shutdown, there are no brief - // windows in which requests and/or jobs are still active after we've removed our tracking of the requests and jobs. + // *After* the loadJob has been created, clear our asset references and remove the active streamer requests. + // This needs to happen after the loadJob creation to ensure that on AssetManager shutdown, there are no brief + // windows in which requests and/or jobs are still active after we've removed our tracking of the requests and jobs. - // Also, if the asset references don't get cleared until after the callback completes, or at some indeterminate later - // time when the File Streamer cleans up the file requests (for the weakAsset lambda parameter), then it's possible that - // they will trigger a ReleaseAsset call sometime after the AssetManager has begun to shut down, which can lead to - // race conditions. + // Also, if the asset references don't get cleared until after the callback completes, or at some indeterminate later + // time when the File Streamer cleans up the file requests (for the weakAsset lambda parameter), then it's possible that + // they will trigger a ReleaseAsset call sometime after the AssetManager has begun to shut down, which can lead to + // race conditions. - // Make sure the streamer request is removed first before the asset is released - // If the asset is released first it could lead to a race condition where another thread starts loading the asset - // again and attempts to add a new streamer request with the same ID before the old one has been removed, causing - // that load request to fail - RemoveActiveStreamerRequest(assetId); - weakAsset = {}; - loadingAsset.Reset(); - }; + // Make sure the streamer request is removed first before the asset is released + // If the asset is released first it could lead to a race condition where another thread starts loading the asset + // again and attempts to add a new streamer request with the same ID before the old one has been removed, causing + // that load request to fail + RemoveActiveStreamerRequest(assetId); + weakAsset = {}; + loadingAsset.Reset(); + }; - auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, asset.GetType(), loadParams); + auto&& [deadline, priority] = GetEffectiveDeadlineAndPriority(*handler, asset.GetType(), loadParams); + + // Track the load request and queue the asset data stream load. + AddActiveStreamerRequest(asset.GetId(), dataStream); + dataStream->Open( + streamInfo.m_streamName, + streamInfo.m_dataOffset, + streamInfo.m_dataLen, + deadline, priority, assetDataStreamCallback); + } + + //========================================================================= + // NotifyAssetReady + //========================================================================= + void AssetManager::NotifyAssetReady(Asset asset) + { + AssetData* data = asset.Get(); + AZ_Assert(data, "NotifyAssetReady: asset is missing info!"); + data->m_status = AssetData::AssetStatus::Ready; - // Track the load request and queue the asset data stream load. - AddActiveStreamerRequest(asset.GetId(), dataStream); - dataStream->Open( - streamInfo.m_streamName, - streamInfo.m_dataOffset, - streamInfo.m_dataLen, - deadline, priority, assetDataStreamCallback); - } + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReady, asset); + } - //========================================================================= - // NotifyAssetReady - //========================================================================= - void AssetManager::NotifyAssetReady(Asset asset) - { - AssetData* data = asset.Get(); - AZ_Assert(data, "NotifyAssetReady: asset is missing info!"); - data->m_status = AssetData::AssetStatus::Ready; - - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReady, asset); - } + //========================================================================= + // NotifyAssetPreReload + //========================================================================= + void AssetManager::NotifyAssetPreReload(Asset asset) + { + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); + } - //========================================================================= - // NotifyAssetPreReload - //========================================================================= - void AssetManager::NotifyAssetPreReload(Asset asset) - { - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetPreReload, asset); - } + //========================================================================= + // NotifyAssetReloaded + //========================================================================= + void AssetManager::NotifyAssetReloaded(Asset asset) + { + AssignAssetData(asset); + } - //========================================================================= - // NotifyAssetReloaded - //========================================================================= - void AssetManager::NotifyAssetReloaded(Asset asset) + //========================================================================= + // NotifyAssetReloaded + //========================================================================= + void AssetManager::NotifyAssetReloadError(Asset asset) + { + // Failed reloads have no side effects. Just notify observers (error reporting, etc). { - AssignAssetData(asset); + AZStd::lock_guard assetLock(m_assetMutex); + m_reloads.erase(asset.GetId()); } + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReloadError, asset); + } - //========================================================================= - // NotifyAssetReloaded - //========================================================================= - void AssetManager::NotifyAssetReloadError(Asset asset) - { - // Failed reloads have no side effects. Just notify observers (error reporting, etc). - { - AZStd::lock_guard assetLock(m_assetMutex); - m_reloads.erase(asset.GetId()); - } - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetReloadError, asset); - } + //========================================================================= + // NotifyAssetError + //========================================================================= + void AssetManager::NotifyAssetError(Asset asset) + { + asset.Get()->m_status = AssetData::AssetStatus::Error; + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetError, asset); + } - //========================================================================= - // NotifyAssetError - //========================================================================= - void AssetManager::NotifyAssetError(Asset asset) - { - asset.Get()->m_status = AssetData::AssetStatus::Error; - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetError, asset); - } + void AssetManager::NotifyAssetCanceled(AssetId assetId) + { + AssetBus::Event(assetId, &AssetBus::Events::OnAssetCanceled, assetId); + } - void AssetManager::NotifyAssetCanceled(AssetId assetId) - { - AssetBus::Event(assetId, &AssetBus::Events::OnAssetCanceled, assetId); - } + void AssetManager::NotifyAssetContainerReady(Asset asset) + { + AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetContainerReady, asset); + } + + //========================================================================= + // AddJob + // [04/02/2014] + //========================================================================= + void AssetManager::AddJob(AssetDatabaseJob* job) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - void AssetManager::NotifyAssetContainerReady(Asset asset) - { - AssetBus::Event(asset.GetId(), &AssetBus::Events::OnAssetContainerReady, asset); - } + m_activeJobs.push_back(*job); + } - //========================================================================= - // AddJob - // [04/02/2014] - //========================================================================= - void AssetManager::AddJob(AssetDatabaseJob* job) + //========================================================================= + // ValidateAndRegisterAssetLoading + //========================================================================= + bool AssetManager::ValidateAndRegisterAssetLoading(const Asset& asset) + { + AssetData* data = asset.Get(); { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - - m_activeJobs.push_back(*job); - } - //========================================================================= - // ValidateAndRegisterAssetLoading - //========================================================================= - bool AssetManager::ValidateAndRegisterAssetLoading(const Asset& asset) - { - AssetData* data = asset.Get(); + AZStd::scoped_lock assetLock(m_assetMutex); + if (data) { - - AZStd::scoped_lock assetLock(m_assetMutex); - if (data) + // The purpose of this function is to validate this asset is still in a StreamReady + // and only then continue the load. We change status to loading if everything + // is expected which the blocking RegisterAssetLoading call does not do because it + // is already in loading status + if (data->GetStatus() != AssetData::AssetStatus::StreamReady) { - // The purpose of this function is to validate this asset is still in a StreamReady - // and only then continue the load. We change status to loading if everything - // is expected which the blocking RegisterAssetLoading call does not do because it - // is already in loading status - if (data->GetStatus() != AssetData::AssetStatus::StreamReady) - { - // Something else has attempted to load this asset - return false; - } - data->m_status = AssetData::AssetStatus::Loading; - UpdateDebugStatus(asset); + // Something else has attempted to load this asset + return false; } - } - - return true; - } - - //========================================================================= - // RegisterAssetLoading - //========================================================================= - void AssetManager::RegisterAssetLoading(const Asset& asset) - { - AZ_PROFILE_FUNCTION(AzCore); - - AssetData* data = asset.Get(); - if (data) - { data->m_status = AssetData::AssetStatus::Loading; UpdateDebugStatus(asset); } } - //========================================================================= - // UnregisterAssetLoadingByThread - //========================================================================= - void AssetManager::UnregisterAssetLoading([[maybe_unused]] const Asset& asset) - { - AZ_PROFILE_FUNCTION(AzCore); - } + return true; + } - //========================================================================= - // RemoveJob - // [04/02/2014] - //========================================================================= - void AssetManager::RemoveJob(AssetDatabaseJob* job) - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + //========================================================================= + // RegisterAssetLoading + //========================================================================= + void AssetManager::RegisterAssetLoading(const Asset& asset) + { + AZ_PROFILE_FUNCTION(AzCore); - m_activeJobs.erase(*job); + AssetData* data = asset.Get(); + if (data) + { + data->m_status = AssetData::AssetStatus::Loading; + UpdateDebugStatus(asset); } + } - //========================================================================= - // AddActiveStreamerRequest - //========================================================================= - void AssetManager::AddActiveStreamerRequest(AssetId assetId, AZStd::shared_ptr readRequest) - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + //========================================================================= + // UnregisterAssetLoadingByThread + //========================================================================= + void AssetManager::UnregisterAssetLoading([[maybe_unused]] const Asset& asset) + { + AZ_PROFILE_FUNCTION(AzCore); + } + + //========================================================================= + // RemoveJob + // [04/02/2014] + //========================================================================= + void AssetManager::RemoveJob(AssetDatabaseJob* job) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - // Track the request to allow for manual cancellation and for validating completion before AssetManager shutdown - [[maybe_unused]] auto inserted = - m_activeAssetDataStreamRequests.insert(AZStd::make_pair(assetId, readRequest)); - AZ_Assert(inserted.second, "Failed to insert streaming request into map for later retrieval by asset."); + m_activeJobs.erase(*job); + } - } + //========================================================================= + // AddActiveStreamerRequest + //========================================================================= + void AssetManager::AddActiveStreamerRequest(AssetId assetId, AZStd::shared_ptr readRequest) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - void AssetManager::RescheduleStreamerRequest(AssetId assetId, AZStd::chrono::milliseconds newDeadline, AZ::IO::IStreamerTypes::Priority newPriority) - { - AZStd::scoped_lock lock(m_activeJobOrRequestMutex); + // Track the request to allow for manual cancellation and for validating completion before AssetManager shutdown + [[maybe_unused]] auto inserted = + m_activeAssetDataStreamRequests.insert(AZStd::make_pair(assetId, readRequest)); + AZ_Assert(inserted.second, "Failed to insert streaming request into map for later retrieval by asset."); - auto iterator = m_activeAssetDataStreamRequests.find(assetId); + } - if (iterator != m_activeAssetDataStreamRequests.end()) - { - iterator->second->Reschedule(newDeadline, newPriority); - } - } + void AssetManager::RescheduleStreamerRequest(AssetId assetId, AZStd::chrono::milliseconds newDeadline, AZ::IO::IStreamerTypes::Priority newPriority) + { + AZStd::scoped_lock lock(m_activeJobOrRequestMutex); - //========================================================================= - // RemoveActiveStreamerRequest - //========================================================================= - void AssetManager::RemoveActiveStreamerRequest(AssetId assetData) + auto iterator = m_activeAssetDataStreamRequests.find(assetId); + + if (iterator != m_activeAssetDataStreamRequests.end()) { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - m_activeAssetDataStreamRequests.erase(assetData); + iterator->second->Reschedule(newDeadline, newPriority); } + } - //========================================================================= - // HasActiveJobsOrStreamerRequests - //========================================================================= - bool AssetManager::HasActiveJobsOrStreamerRequests() - { - AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + //========================================================================= + // RemoveActiveStreamerRequest + //========================================================================= + void AssetManager::RemoveActiveStreamerRequest(AssetId assetData) + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); + m_activeAssetDataStreamRequests.erase(assetData); + } + + //========================================================================= + // HasActiveJobsOrStreamerRequests + //========================================================================= + bool AssetManager::HasActiveJobsOrStreamerRequests() + { + AZStd::scoped_lock assetLock(m_activeJobOrRequestMutex); - return (!(m_activeJobs.empty() && m_activeAssetDataStreamRequests.empty())); - } + return (!(m_activeJobs.empty() && m_activeAssetDataStreamRequests.empty())); + } - //========================================================================= - // AddBlockingRequest - //========================================================================= - void AssetManager::AddBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) - { - AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); + //========================================================================= + // AddBlockingRequest + //========================================================================= + void AssetManager::AddBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) + { + AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); - [[maybe_unused]] auto inserted = m_activeBlockingRequests.insert(AZStd::make_pair(assetId, blockingRequest)); - AZ_Assert(inserted.second, "Failed to track blocking request for asset %s", assetId.ToString().c_str()); - } + [[maybe_unused]] auto inserted = m_activeBlockingRequests.insert(AZStd::make_pair(assetId, blockingRequest)); + AZ_Assert(inserted.second, "Failed to track blocking request for asset %s", assetId.ToString().c_str()); + } - //========================================================================= - // RemoveBlockingRequest - //========================================================================= - void AssetManager::RemoveBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) + //========================================================================= + // RemoveBlockingRequest + //========================================================================= + void AssetManager::RemoveBlockingRequest(AssetId assetId, WaitForAsset* blockingRequest) + { + AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); + [[maybe_unused]] bool requestFound = false; + for (auto assetIdIterator = m_activeBlockingRequests.find(assetId); assetIdIterator != m_activeBlockingRequests.end(); ) { - AZStd::scoped_lock requestLock(m_activeBlockingRequestMutex); - [[maybe_unused]] bool requestFound = false; - for (auto assetIdIterator = m_activeBlockingRequests.find(assetId); assetIdIterator != m_activeBlockingRequests.end(); ) + if (assetIdIterator->second == blockingRequest) { - if (assetIdIterator->second == blockingRequest) - { - m_activeBlockingRequests.erase(assetIdIterator); - requestFound = true; - break; - } - else - { - assetIdIterator++; - } + m_activeBlockingRequests.erase(assetIdIterator); + requestFound = true; + break; + } + else + { + assetIdIterator++; } - - AZ_Assert(requestFound, "Failed to erase blocking request for asset %s", assetId.ToString().c_str()); } + AZ_Assert(requestFound, "Failed to erase blocking request for asset %s", assetId.ToString().c_str()); + } - //========================================================================= - // GetLoadStreamInfoForAsset() - // [04/04/2014] - //========================================================================= - AssetStreamInfo AssetManager::GetLoadStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) + + //========================================================================= + // GetLoadStreamInfoForAsset() + // [04/04/2014] + //========================================================================= + AssetStreamInfo AssetManager::GetLoadStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) + { + AZStd::scoped_lock catalogLock(m_catalogMutex); + AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); + if (catIt == m_catalogs.end()) { - AZStd::scoped_lock catalogLock(m_catalogMutex); - AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); - if (catIt == m_catalogs.end()) - { - AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); - return AssetStreamInfo(); - } - return catIt->second->GetStreamInfoForLoad(assetId, assetType); + AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); + return AssetStreamInfo(); } + return catIt->second->GetStreamInfoForLoad(assetId, assetType); + } - //========================================================================= - // GetSaveStreamInfoForAsset() - // [04/04/2014] - //========================================================================= - AssetStreamInfo AssetManager::GetSaveStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) + //========================================================================= + // GetSaveStreamInfoForAsset() + // [04/04/2014] + //========================================================================= + AssetStreamInfo AssetManager::GetSaveStreamInfoForAsset(const AssetId& assetId, const AssetType& assetType) + { + AZStd::scoped_lock catalogLock(m_catalogMutex); + AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); + if (catIt == m_catalogs.end()) { - AZStd::scoped_lock catalogLock(m_catalogMutex); - AssetCatalogMap::iterator catIt = m_catalogs.find(assetType); - if (catIt == m_catalogs.end()) - { - AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); - return AssetStreamInfo(); - } - return catIt->second->GetStreamInfoForSave(assetId, assetType); + AZ_Error("Asset", false, "Asset [type:%s id:%s] with this type doesn't have a catalog!", assetType.template ToString().c_str(), assetId.ToString().c_str()); + return AssetStreamInfo(); } + return catIt->second->GetStreamInfoForSave(assetId, assetType); + } - //========================================================================= - // OnAssetReady - // [04/02/2014] - //========================================================================= - void AssetManager::OnAssetReady(const Asset& asset) - { - AZ_Assert(asset.Get(), "OnAssetReady fired for an asset with no data."); + //========================================================================= + // OnAssetReady + // [04/02/2014] + //========================================================================= + void AssetManager::OnAssetReady(const Asset& asset) + { + AZ_Assert(asset.Get(), "OnAssetReady fired for an asset with no data."); - // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). - asset.Get()->m_status = AssetData::AssetStatus::ReadyPreNotify; - UpdateDebugStatus(asset); + // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). + asset.Get()->m_status = AssetData::AssetStatus::ReadyPreNotify; + UpdateDebugStatus(asset); - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReady, this, Asset(asset)); - } + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReady, this, Asset(asset)); + } - //========================================================================= - // OnAssetError - //========================================================================= - void AssetManager::OnAssetError(const Asset& asset) - { - // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). - asset.Get()->m_status = AssetData::AssetStatus::Error; - UpdateDebugStatus(asset); + //========================================================================= + // OnAssetError + //========================================================================= + void AssetManager::OnAssetError(const Asset& asset) + { + // Set status immediately from within the AssetManagerBus dispatch, so it's committed before anyone is notified (e.g. job to job, via AssetJobBus). + asset.Get()->m_status = AssetData::AssetStatus::Error; + UpdateDebugStatus(asset); - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetError, this, Asset(asset)); - } + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetError, this, Asset(asset)); + } - void AssetManager::OnAssetCanceled(AssetId assetId) - { - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetCanceled, this, assetId); - } + void AssetManager::OnAssetCanceled(AssetId assetId) + { + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetCanceled, this, assetId); + } - void AssetManager::ReleaseOwnedAssetContainer(AssetContainer* assetContainer) - { - AZ_Assert(assetContainer, "Trying to release a null assetContainer pointer!"); - AZStd::scoped_lock lock(m_assetContainerMutex); - auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetContainer->GetContainerAssetId()); + void AssetManager::ReleaseOwnedAssetContainer(AssetContainer* assetContainer) + { + AZ_Assert(assetContainer, "Trying to release a null assetContainer pointer!"); + AZStd::scoped_lock lock(m_assetContainerMutex); + auto rangeItr = m_ownedAssetContainerLookup.equal_range(assetContainer->GetContainerAssetId()); - for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) + for (auto itr = rangeItr.first; itr != rangeItr.second; ++itr) + { + if (itr->second == assetContainer) { - if (itr->second == assetContainer) - { - m_ownedAssetContainerLookup.erase(itr); - break; - } + m_ownedAssetContainerLookup.erase(itr); + break; } - - m_ownedAssetContainers.erase(assetContainer); } - void AssetManager::OnAssetContainerReady(AssetContainer* assetContainer) - { - AssetBus::QueueFunction([this, assetContainer, asset = assetContainer->GetRootAsset()]() - { - NotifyAssetContainerReady(asset); - ReleaseOwnedAssetContainer(assetContainer); - }); - } + m_ownedAssetContainers.erase(assetContainer); + } - void AssetManager::OnAssetContainerCanceled(AssetContainer* assetContainer) + void AssetManager::OnAssetContainerReady(AssetContainer* assetContainer) + { + AssetBus::QueueFunction([this, assetContainer, asset = assetContainer->GetRootAsset()]() { - AssetBus::QueueFunction([this, assetContainer]() - { - ReleaseOwnedAssetContainer(assetContainer); - }); - } + NotifyAssetContainerReady(asset); + ReleaseOwnedAssetContainer(assetContainer); + }); + } - //========================================================================= - // OnAssetReloaded - //========================================================================= - void AssetManager::OnAssetReloaded(const Asset& asset) + void AssetManager::OnAssetContainerCanceled(AssetContainer* assetContainer) + { + AssetBus::QueueFunction([this, assetContainer]() { - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, Asset(asset)); - } + ReleaseOwnedAssetContainer(assetContainer); + }); + } - //========================================================================= - // OnAssetReloadError - //========================================================================= - void AssetManager::OnAssetReloadError(const Asset& asset) - { - // Queue broadcast message for delivery on game thread. - AssetBus::QueueFunction(&AssetManager::NotifyAssetReloadError, this, Asset(asset)); - } + //========================================================================= + // OnAssetReloaded + //========================================================================= + void AssetManager::OnAssetReloaded(const Asset& asset) + { + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReloaded, this, Asset(asset)); + } + + //========================================================================= + // OnAssetReloadError + //========================================================================= + void AssetManager::OnAssetReloadError(const Asset& asset) + { + // Queue broadcast message for delivery on game thread. + AssetBus::QueueFunction(&AssetManager::NotifyAssetReloadError, this, Asset(asset)); + } - //========================================================================= - // AssetHandler - // [04/03/2014] - //========================================================================= - AssetHandler::AssetHandler() - : m_nHandledTypes(0) - { - } + //========================================================================= + // AssetHandler + // [04/03/2014] + //========================================================================= + AssetHandler::AssetHandler() + : m_nHandledTypes(0) + { + } - //========================================================================= - // ~AssetHandler - // [04/03/2014] - //========================================================================= - AssetHandler::~AssetHandler() + //========================================================================= + // ~AssetHandler + // [04/03/2014] + //========================================================================= + AssetHandler::~AssetHandler() + { + if (m_nHandledTypes > 0) { - if (m_nHandledTypes > 0) - { - AssetManager::Instance().UnregisterHandler(this); - } - - AZ_Error("AssetDatabase", m_nHandledTypes == 0, "Asset handler is being destroyed but there are still %d asset types being handled by it!", (int)m_nHandledTypes); + AssetManager::Instance().UnregisterHandler(this); } - //========================================================================= - // LoadAssetDataFromStream - //========================================================================= - AssetHandler::LoadResult AssetHandler::LoadAssetDataFromStream( - const Asset& asset, - AZStd::shared_ptr stream, - const AssetFilterCB& assetLoadFilterCB) - { - AZ_PROFILE_SCOPE(AzCore, "AssetHandler::LoadAssetData - %s", asset.GetHint().c_str()); + AZ_Error("AssetDatabase", m_nHandledTypes == 0, "Asset handler is being destroyed but there are still %d asset types being handled by it!", (int)m_nHandledTypes); + } + + //========================================================================= + // LoadAssetDataFromStream + //========================================================================= + AssetHandler::LoadResult AssetHandler::LoadAssetDataFromStream( + const Asset& asset, + AZStd::shared_ptr stream, + const AssetFilterCB& assetLoadFilterCB) + { + AZ_PROFILE_SCOPE(AzCore, "AssetHandler::LoadAssetData - %s", asset.GetHint().c_str()); #ifdef AZ_ENABLE_TRACING - auto start = AZStd::chrono::system_clock::now(); + auto start = AZStd::chrono::system_clock::now(); #endif - LoadResult result = LoadAssetData(asset, stream, assetLoadFilterCB); + LoadResult result = LoadAssetData(asset, stream, assetLoadFilterCB); #ifdef AZ_ENABLE_TRACING - auto loadMs = AZStd::chrono::duration_cast( - AZStd::chrono::system_clock::now() - start); - AZ_Warning("AssetDatabase", (!cl_assetLoadWarningEnable) || - loadMs <= AZStd::chrono::milliseconds(cl_assetLoadWarningMsThreshold), - "Load time threshold exceeded: LoadAssetData call for %s took %" PRId64 " ms", - asset.GetHint().c_str(), loadMs.count()); + auto loadMs = AZStd::chrono::duration_cast( + AZStd::chrono::system_clock::now() - start); + AZ_Warning("AssetDatabase", (!cl_assetLoadWarningEnable) || + loadMs <= AZStd::chrono::milliseconds(cl_assetLoadWarningMsThreshold), + "Load time threshold exceeded: LoadAssetData call for %s took %" PRId64 " ms", + asset.GetHint().c_str(), loadMs.count()); #endif - return result; - } + return result; + } - //========================================================================= - // InitAsset - // [04/03/2014] - //========================================================================= - void AssetHandler::InitAsset(const Asset& asset, bool loadStageSucceeded, bool isReload) + //========================================================================= + // InitAsset + // [04/03/2014] + //========================================================================= + void AssetHandler::InitAsset(const Asset& asset, bool loadStageSucceeded, bool isReload) + { + if (loadStageSucceeded) { - if (loadStageSucceeded) + if (isReload) { - if (isReload) - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloaded, asset); - } - else - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReady, asset); - } + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloaded, asset); } else { - if (!isReload) - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetError, asset); - } - else - { - AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloadError, asset); - } + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReady, asset); } } - - void AssetManager::ValidateAndPostLoad(AZ::Data::Asset& asset, bool loadSucceeded, - bool isReload, AZ::Data::AssetHandler* assetHandler) + else { + if (!isReload) { - // We may need to revalidate that this asset hasn't already passed through postLoad - AZStd::scoped_lock assetLock(m_assetMutex); - if (asset->IsReady() || asset->m_status == AssetData::AssetStatus::LoadedPreReady) - { - return; - } - asset->m_status = AssetData::AssetStatus::LoadedPreReady; - UpdateDebugStatus(asset); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetError, asset); } - PostLoad(asset, loadSucceeded, isReload, assetHandler); - } - - void AssetManager::PostLoad(AZ::Data::Asset& asset, bool loadSucceeded, - bool isReload, AZ::Data::AssetHandler* assetHandler) - { - AZ_PROFILE_FUNCTION(AzCore); - if (!assetHandler) + else { - assetHandler = GetHandler(asset.GetType()); + AssetManagerBus::Broadcast(&AssetManagerBus::Events::OnAssetReloadError, asset); } + } + } - if (assetHandler) - { - // Queue the result for dispatch to main thread. - assetHandler->InitAsset(asset, loadSucceeded, isReload); - } - else + void AssetManager::ValidateAndPostLoad(AZ::Data::Asset& asset, bool loadSucceeded, + bool isReload, AZ::Data::AssetHandler* assetHandler) + { + { + // We may need to revalidate that this asset hasn't already passed through postLoad + AZStd::scoped_lock assetLock(m_assetMutex); + if (asset->IsReady() || asset->m_status == AssetData::AssetStatus::LoadedPreReady) { - AZ_Warning("AssetManager", false, "Couldn't find handler for asset %s (%s)", asset.GetId().ToString().c_str(), asset.GetHint().c_str()); + return; } + asset->m_status = AssetData::AssetStatus::LoadedPreReady; + UpdateDebugStatus(asset); + } + PostLoad(asset, loadSucceeded, isReload, assetHandler); + } - // Notify any dependent jobs. - BlockingAssetLoadBus::Event(asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadComplete); + void AssetManager::PostLoad(AZ::Data::Asset& asset, bool loadSucceeded, + bool isReload, AZ::Data::AssetHandler* assetHandler) + { + AZ_PROFILE_FUNCTION(AzCore); + if (!assetHandler) + { + assetHandler = GetHandler(asset.GetType()); + } - UnregisterAssetLoading(asset); + if (assetHandler) + { + // Queue the result for dispatch to main thread. + assetHandler->InitAsset(asset, loadSucceeded, isReload); + } + else + { + AZ_Warning("AssetManager", false, "Couldn't find handler for asset %s (%s)", asset.GetId().ToString().c_str(), asset.GetHint().c_str()); } - AZStd::shared_ptr AssetManager::GetAssetContainer(Asset asset, const AssetLoadParameters& loadParams) + // Notify any dependent jobs. + BlockingAssetLoadBus::Event(asset.GetId(), &BlockingAssetLoadBus::Events::OnLoadComplete); + + UnregisterAssetLoading(asset); + } + + AZStd::shared_ptr AssetManager::GetAssetContainer(Asset asset, const AssetLoadParameters& loadParams) + { + // If we're doing a custom load through a filter just hand back a one off container + if (loadParams.m_assetLoadFilterCB) { - // If we're doing a custom load through a filter just hand back a one off container - if (loadParams.m_assetLoadFilterCB) - { - return CreateAssetContainer(asset, loadParams); - } + return CreateAssetContainer(asset, loadParams); + } - AZStd::scoped_lock containerLock(m_assetContainerMutex); - AssetContainerKey containerKey{ asset.GetId(), loadParams }; + AZStd::scoped_lock containerLock(m_assetContainerMutex); + AssetContainerKey containerKey{ asset.GetId(), loadParams }; - auto curIter = m_assetContainers.find(containerKey); - if (curIter != m_assetContainers.end()) + auto curIter = m_assetContainers.find(containerKey); + if (curIter != m_assetContainers.end()) + { + auto newRef = curIter->second.lock(); + if (newRef && newRef->IsValid()) { - auto newRef = curIter->second.lock(); - if (newRef && newRef->IsValid()) - { - return newRef; - } - auto newContainer = CreateAssetContainer(asset, loadParams); - curIter->second = newContainer; - return newContainer; + return newRef; } auto newContainer = CreateAssetContainer(asset, loadParams); - - m_assetContainers.insert({ containerKey, newContainer }); - + curIter->second = newContainer; return newContainer; } + auto newContainer = CreateAssetContainer(asset, loadParams); - AZStd::shared_ptr AssetManager::CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams) const - { - return AZStd::shared_ptr( aznew AssetContainer(AZStd::move(asset), loadParams)); - } - } // namespace Data -} // namespace AZ + m_assetContainers.insert({ containerKey, newContainer }); + + return newContainer; + } + + AZStd::shared_ptr AssetManager::CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams) const + { + return AZStd::shared_ptr( aznew AssetContainer(AZStd::move(asset), loadParams)); + } +} // namespace AZ::Data size_t AZStd::hash::operator()(const AZ::Data::AssetContainerKey& obj) const { diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManager.h b/Code/Framework/AzCore/AzCore/Asset/AssetManager.h index f109bb278c..9666d434c1 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManager.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManager.h @@ -169,14 +169,14 @@ namespace AZ /// Register handler with the system for a particular asset type. /// A handler should be registered for each asset type it handles. /// Please note that all the handlers are registered just once during app startup from the main thread - /// and therefore this is not a thread safe method and should not be invoked from different threads. + /// and therefore this is not a thread safe method and should not be invoked from different threads. void RegisterHandler(AssetHandler* handler, const AssetType& assetType); /// Unregister handler from the asset system. /// Please note that all the handlers are unregistered just once during app shutdown from the main thread /// and therefore this is not a thread safe method and should not be invoked from different threads. void UnregisterHandler(AssetHandler* handler); // @} - + // @{ Asset catalog management /// Register a catalog with the system for a particular asset type. /// A catalog should be registered for each asset type it is responsible for. @@ -295,7 +295,7 @@ namespace AZ /** * Old 'legacy' assetIds and asset hints can be automatically replaced with new ones during deserialize / assignment. * This operation can be somewhat costly, and its only useful if the program subsequently re-saves the files its loading so that - * the asset hints and assetIds actually persist. Thus, it can be disabled in situations where you know you are not going to be + * the asset hints and assetIds actually persist. Thus, it can be disabled in situations where you know you are not going to be * saving over or creating new source files (for example builders/background apps) * By default, it is enabled. */ @@ -316,7 +316,7 @@ namespace AZ * This method must be invoked before you start unregistering handlers manually and shutting down the asset manager. * This method ensures that all jobs in flight are either canceled or completed. * This method is automatically called in the destructor but if you are unregistering handlers manually, - * you must invoke it yourself. + * you must invoke it yourself. */ void PrepareShutDown(); @@ -366,7 +366,7 @@ namespace AZ /** * Creates a new shared AssetContainer with an optional loadFilter * **/ - AZStd::shared_ptr CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams = AssetLoadParameters{}) const; + virtual AZStd::shared_ptr CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams = AssetLoadParameters{}) const; /** @@ -452,7 +452,7 @@ namespace AZ // Variant of RegisterAssetLoading used for jobs which have been queued and need to verify the status of the asset - // before loading in order to prevent cases where a load is queued, then a blocking load goes through, then the queued + // before loading in order to prevent cases where a load is queued, then a blocking load goes through, then the queued // load is processed. This validation step leaves the loaded (And potentially modified) data as is in that case. bool ValidateAndRegisterAssetLoading(const Asset& asset); @@ -482,7 +482,7 @@ namespace AZ * the blocking. That will result in a single thread deadlock. * * If you need to queue work, the logic needs to be similar to this: - * + * AssetHandler::LoadResult MyAssetHandler::LoadAssetData(const Asset& asset, AZStd::shared_ptr stream, const AZ::Data::AssetFilterCB& assetLoadFilterCB) { @@ -496,13 +496,13 @@ namespace AZ } else { - // queue job to load asset in thread identified by m_loadingThreadId + // queue job to load asset in thread identified by m_loadingThreadId auto* queuedJob = QueueLoadingOnOtherThread(...); // block waiting for queued job to complete queuedJob->BlockUntilComplete(); } - + . . . @@ -525,7 +525,7 @@ namespace AZ //! Result from LoadAssetData - it either finished loading, didn't finish and is waiting for more data, or had an error. enum class LoadResult : u8 { - + Error, // The provided data failed to load correctly MoreDataRequired, // The provided data loaded correctly, but more data is required to finish the asset load LoadComplete // The provided data loaded correctly, and the asset has been created diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h b/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h index f76ea19589..44707645d0 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetManagerBus.h @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -129,7 +130,8 @@ namespace AZ /// Remove a catalog from our delta list and rebuild the catalog from remaining items virtual bool RemoveDeltaCatalog(AZStd::shared_ptr /*deltaCatalog*/) { return true; } /// Creates a manifest with the given DeltaCatalog name - virtual bool CreateBundleManifest(const AZStd::string& /*deltaCatalogPath*/, const AZStd::vector& /*dependentBundleNames*/, const AZStd::string& /*fileDirectory*/, int /*bundleVersion*/, const AZStd::vector& /*levelDirs*/) { return false; } + virtual bool CreateBundleManifest(const AZStd::string& /*deltaCatalogPath*/, const AZStd::vector& /*dependentBundleNames*/, + const AZStd::string& /*fileDirectory*/, int /*bundleVersion*/, const AZStd::vector& /*levelDirs*/) { return false; } /// Creates an instance of a registry containing info for just the specified files, and writes it out to a file at the specified path virtual bool CreateDeltaCatalog(const AZStd::vector& /*files*/, const AZStd::string& /*filePath*/) { return false; } diff --git a/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp b/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp index fcc8cd6424..54e40c1fc0 100644 --- a/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Component/EntityUtils.cpp @@ -10,292 +10,289 @@ #include #include -namespace AZ +namespace AZ::EntityUtils { - namespace EntityUtils + //========================================================================= + // Reflect + //========================================================================= + void Reflect(ReflectContext* context) { - //========================================================================= - // Reflect - //========================================================================= - void Reflect(ReflectContext* context) + if (auto serializeContext = azrtti_cast(context)) { - if (auto serializeContext = azrtti_cast(context)) - { - serializeContext->Class()-> - Version(1)-> - Field("Entities", &SerializableEntityContainer::m_entities); - } + serializeContext->Class()-> + Version(1)-> + Field("Entities", &SerializableEntityContainer::m_entities); } + } - struct StackDataType - { - const SerializeContext::ClassData* m_classData; - const SerializeContext::ClassElement* m_elementData; - void* m_dataPtr; - bool m_isModifiedContainer; - }; + struct StackDataType + { + const SerializeContext::ClassData* m_classData; + const SerializeContext::ClassElement* m_elementData; + void* m_dataPtr; + bool m_isModifiedContainer; + }; + + //========================================================================= + // EnumerateEntityIds + //========================================================================= + void EnumerateEntityIds(const void* classPtr, const Uuid& classUuid, const EntityIdVisitor& visitor, SerializeContext* context) + { + AZ_PROFILE_FUNCTION(AzCore); - //========================================================================= - // EnumerateEntityIds - //========================================================================= - void EnumerateEntityIds(const void* classPtr, const Uuid& classUuid, const EntityIdVisitor& visitor, SerializeContext* context) + if (!context) { - AZ_PROFILE_FUNCTION(AzCore); - + context = GetApplicationSerializeContext(); if (!context) { - context = GetApplicationSerializeContext(); - if (!context) - { - AZ_Error("Serialization", false, "No serialize context provided! Failed to get component application default serialize context! ComponentApp is not started or input serialize context should not be null!"); - return; - } + AZ_Error("Serialization", false, "No serialize context provided! Failed to get component application default serialize context! ComponentApp is not started or input serialize context should not be null!"); + return; } - AZStd::vector parentStack; - parentStack.reserve(30); - auto beginCB = [ &](void* ptr, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* elementData) -> bool - { - (void)elementData; + } + AZStd::vector parentStack; + parentStack.reserve(30); + auto beginCB = [ &](void* ptr, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* elementData) -> bool + { + (void)elementData; - if (classData->m_typeId == SerializeTypeInfo::GetUuid()) + if (classData->m_typeId == SerializeTypeInfo::GetUuid()) + { + // determine if this is entity ref or just entityId (please refer to the function documentation for more info) + bool isEntityId = false; + if (!parentStack.empty() && parentStack.back()->m_typeId == SerializeTypeInfo::GetUuid()) { - // determine if this is entity ref or just entityId (please refer to the function documentation for more info) - bool isEntityId = false; - if (!parentStack.empty() && parentStack.back()->m_typeId == SerializeTypeInfo::GetUuid()) - { - // our parent in the entity (currently entity has only one EntityId member, but we can check the offset for future proof - AZ_Assert(elementData && strcmp(elementData->m_name, "Id") == 0, "class Entity, should have only ONE EntityId member, the actual entity id!"); - isEntityId = true; - } - - EntityId* entityIdPtr = (elementData->m_flags & SerializeContext::ClassElement::FLG_POINTER) ? - *reinterpret_cast(ptr) : reinterpret_cast(ptr); - visitor(*entityIdPtr, isEntityId, elementData); + // our parent in the entity (currently entity has only one EntityId member, but we can check the offset for future proof + AZ_Assert(elementData && strcmp(elementData->m_name, "Id") == 0, "class Entity, should have only ONE EntityId member, the actual entity id!"); + isEntityId = true; } - parentStack.push_back(classData); - return true; - }; + EntityId* entityIdPtr = (elementData->m_flags & SerializeContext::ClassElement::FLG_POINTER) ? + *reinterpret_cast(ptr) : reinterpret_cast(ptr); + visitor(*entityIdPtr, isEntityId, elementData); + } - auto endCB = [ &]() -> bool - { - parentStack.pop_back(); - return true; - }; - - SerializeContext::EnumerateInstanceCallContext callContext( - beginCB, - endCB, - context, - SerializeContext::ENUM_ACCESS_FOR_READ, - nullptr - ); + parentStack.push_back(classData); + return true; + }; - context->EnumerateInstanceConst( - &callContext, - classPtr, - classUuid, - nullptr, - nullptr - ); - } + auto endCB = [ &]() -> bool + { + parentStack.pop_back(); + return true; + }; - //========================================================================= - // GetApplicationSerializeContext - //========================================================================= - SerializeContext* GetApplicationSerializeContext() - { - SerializeContext* context = nullptr; - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - return context; - } + SerializeContext::EnumerateInstanceCallContext callContext( + beginCB, + endCB, + context, + SerializeContext::ENUM_ACCESS_FOR_READ, + nullptr + ); + + context->EnumerateInstanceConst( + &callContext, + classPtr, + classUuid, + nullptr, + nullptr + ); + } - //========================================================================= - // FindFirstDerivedComponent - //========================================================================= - Component* FindFirstDerivedComponent(const Entity* entity, const Uuid& typeId) + //========================================================================= + // GetApplicationSerializeContext + //========================================================================= + SerializeContext* GetApplicationSerializeContext() + { + SerializeContext* context = nullptr; + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + return context; + } + + //========================================================================= + // FindFirstDerivedComponent + //========================================================================= + Component* FindFirstDerivedComponent(const Entity* entity, const Uuid& typeId) + { + for (AZ::Component* component : entity->GetComponents()) { - for (AZ::Component* component : entity->GetComponents()) + if (azrtti_istypeof(typeId, component)) { - if (azrtti_istypeof(typeId, component)) - { - return component; - } + return component; } - return nullptr; - } - - Component* FindFirstDerivedComponent(EntityId entityId, const Uuid& typeId) - { - Entity* entity{}; - ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); - return entity ? FindFirstDerivedComponent(entity, typeId) : nullptr; } + return nullptr; + } - //========================================================================= - // FindDerivedComponents - //========================================================================= - Entity::ComponentArrayType FindDerivedComponents(const Entity* entity, const Uuid& typeId) + Component* FindFirstDerivedComponent(EntityId entityId, const Uuid& typeId) + { + Entity* entity{}; + ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); + return entity ? FindFirstDerivedComponent(entity, typeId) : nullptr; + } + + //========================================================================= + // FindDerivedComponents + //========================================================================= + Entity::ComponentArrayType FindDerivedComponents(const Entity* entity, const Uuid& typeId) + { + Entity::ComponentArrayType result; + for (AZ::Component* component : entity->GetComponents()) { - Entity::ComponentArrayType result; - for (AZ::Component* component : entity->GetComponents()) + if (azrtti_istypeof(typeId, component)) { - if (azrtti_istypeof(typeId, component)) - { - result.push_back(component); - } + result.push_back(component); } - return result; } + return result; + } - Entity::ComponentArrayType FindDerivedComponents(EntityId entityId, const Uuid& typeId) + Entity::ComponentArrayType FindDerivedComponents(EntityId entityId, const Uuid& typeId) + { + Entity* entity{}; + ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); + return entity ? FindDerivedComponents(entity, typeId) : Entity::ComponentArrayType(); + } + + bool EnumerateBaseRecursive(SerializeContext* context, const EnumerateBaseRecursiveVisitor& baseClassVisitor, const TypeId& typeToExamine) + { + AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); + if (!context) { - Entity* entity{}; - ComponentApplicationBus::BroadcastResult(entity, &ComponentApplicationRequests::FindEntity, entityId); - return entity ? FindDerivedComponents(entity, typeId) : Entity::ComponentArrayType(); + return false; } - bool EnumerateBaseRecursive(SerializeContext* context, const EnumerateBaseRecursiveVisitor& baseClassVisitor, const TypeId& typeToExamine) + AZStd::fixed_vector knownBaseClasses = { typeToExamine }; // avoid allocating heap here if possible. 64 types are 64*sizeof(Uuid) which is only 1k. + bool foundBaseClass = false; + auto enumerateBaseVisitor = [&baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId) { - AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); - if (!context) + if (!classData) { return false; } - AZStd::fixed_vector knownBaseClasses = { typeToExamine }; // avoid allocating heap here if possible. 64 types are 64*sizeof(Uuid) which is only 1k. - bool foundBaseClass = false; - auto enumerateBaseVisitor = [&baseClassVisitor, &knownBaseClasses](const AZ::SerializeContext::ClassData* classData, const TypeId& examineTypeId) + if (AZStd::find(knownBaseClasses.begin(), knownBaseClasses.end(), classData->m_typeId) == knownBaseClasses.end()) { - if (!classData) + if (knownBaseClasses.size() == 64) { + // this should be pretty unlikely since a single class would have to have many other classes in its heirarchy + // and it'd all have to be basically in one layer, as we are popping as we explore. + AZ_WarningOnce("EntityUtils", false, "While trying to find a base class, all available slots were consumed. consider increasing the size of knownBaseClasses.\n"); + // we cannot continue any further, assume we did not find it. return false; } + knownBaseClasses.push_back(classData->m_typeId); + } - if (AZStd::find(knownBaseClasses.begin(), knownBaseClasses.end(), classData->m_typeId) == knownBaseClasses.end()) - { - if (knownBaseClasses.size() == 64) - { - // this should be pretty unlikely since a single class would have to have many other classes in its heirarchy - // and it'd all have to be basically in one layer, as we are popping as we explore. - AZ_WarningOnce("EntityUtils", false, "While trying to find a base class, all available slots were consumed. consider increasing the size of knownBaseClasses.\n"); - // we cannot continue any further, assume we did not find it. - return false; - } - knownBaseClasses.push_back(classData->m_typeId); - } - - return baseClassVisitor(classData, examineTypeId); - }; - - while (!knownBaseClasses.empty() && !foundBaseClass) - { - TypeId toExamine = knownBaseClasses.back(); - knownBaseClasses.pop_back(); + return baseClassVisitor(classData, examineTypeId); + }; - context->EnumerateBase(enumerateBaseVisitor, toExamine); - } + while (!knownBaseClasses.empty() && !foundBaseClass) + { + TypeId toExamine = knownBaseClasses.back(); + knownBaseClasses.pop_back(); - return foundBaseClass; + context->EnumerateBase(enumerateBaseVisitor, toExamine); } - bool CheckIfClassIsDeprecated(SerializeContext* context, const TypeId& typeToExamine) + return foundBaseClass; + } + + bool CheckIfClassIsDeprecated(SerializeContext* context, const TypeId& typeToExamine) + { + bool isDeprecated = false; + auto classVisitorFn = [&isDeprecated](const AZ::SerializeContext::ClassData* classData, const TypeId& /*rttiBase*/) { - bool isDeprecated = false; - auto classVisitorFn = [&isDeprecated](const AZ::SerializeContext::ClassData* classData, const TypeId& /*rttiBase*/) + // Stop iterating once we stop receiving SerializeContext::ClassData*. + if (!classData) { - // Stop iterating once we stop receiving SerializeContext::ClassData*. - if (!classData) - { - return false; - } - - // Stop iterating if we've found that the class is deprecated - if (classData->IsDeprecated()) - { - isDeprecated = true; - return false; - } - - return true; // keep iterating - }; + return false; + } - // Check if the type is deprecated - const AZ::SerializeContext::ClassData* classData = context->FindClassData(typeToExamine); + // Stop iterating if we've found that the class is deprecated if (classData->IsDeprecated()) { - return true; + isDeprecated = true; + return false; } - // Check if any of its bases are deprecated - EnumerateBaseRecursive(context, classVisitorFn, typeToExamine); + return true; // keep iterating + }; - return isDeprecated; + // Check if the type is deprecated + const AZ::SerializeContext::ClassData* classData = context->FindClassData(typeToExamine); + if (classData->IsDeprecated()) + { + return true; } - - bool CheckDeclaresSerializeBaseClass(SerializeContext* context, const TypeId& typeToFind, const TypeId& typeToExamine) + + // Check if any of its bases are deprecated + EnumerateBaseRecursive(context, classVisitorFn, typeToExamine); + + return isDeprecated; + } + + bool CheckDeclaresSerializeBaseClass(SerializeContext* context, const TypeId& typeToFind, const TypeId& typeToExamine) + { + AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); + if (!context) { - AZ_Assert(context, "CheckDeclaresSerializeBaseClass called with no serialize context."); - if (!context) + return false; + } + + bool foundBaseClass = false; + auto baseClassVisitorFn = [&typeToFind, &foundBaseClass](const AZ::SerializeContext::ClassData* reflectedBase, const TypeId& /*rttiBase*/) + { + if (!reflectedBase) { - return false; + foundBaseClass = false; + return false; // stop iterating } - bool foundBaseClass = false; - auto baseClassVisitorFn = [&typeToFind, &foundBaseClass](const AZ::SerializeContext::ClassData* reflectedBase, const TypeId& /*rttiBase*/) + foundBaseClass = (reflectedBase->m_typeId == typeToFind); + if (foundBaseClass) { - if (!reflectedBase) - { - foundBaseClass = false; - return false; // stop iterating - } + return false; // we have a base, stop iterating + } - foundBaseClass = (reflectedBase->m_typeId == typeToFind); - if (foundBaseClass) - { - return false; // we have a base, stop iterating - } + return true; // keep iterating + }; - return true; // keep iterating - }; + EnumerateBaseRecursive(context, baseClassVisitorFn, typeToExamine); - EnumerateBaseRecursive(context, baseClassVisitorFn, typeToExamine); + return foundBaseClass; + } - return foundBaseClass; + bool RemoveDuplicateServicesOfAndAfterIterator( + const ComponentDescriptor::DependencyArrayType::iterator& iterator, + ComponentDescriptor::DependencyArrayType& providedServiceArray, + const Entity* entity) + { + // Build types that strip out AZ_Warnings will complain that entity is unused without this. + (void)entity; + if (iterator == providedServiceArray.end()) + { + return false; } - bool RemoveDuplicateServicesOfAndAfterIterator( - const ComponentDescriptor::DependencyArrayType::iterator& iterator, - ComponentDescriptor::DependencyArrayType& providedServiceArray, - const Entity* entity) + bool duplicateFound = false; + + for (ComponentDescriptor::DependencyArrayType::iterator duplicateCheckIter = AZStd::next(iterator); + duplicateCheckIter != providedServiceArray.end();) { - // Build types that strip out AZ_Warnings will complain that entity is unused without this. - (void)entity; - if (iterator == providedServiceArray.end()) + if (*iterator == *duplicateCheckIter) { - return false; + AZ_Warning("Entity", false, "Duplicate service %d found on entity %s [%s]", + *duplicateCheckIter, + entity ? entity->GetName().c_str() : "Entity not provided", + entity ? entity->GetId().ToString().c_str() : ""); + duplicateCheckIter = providedServiceArray.erase(duplicateCheckIter); + duplicateFound = true; } - - bool duplicateFound = false; - - for (ComponentDescriptor::DependencyArrayType::iterator duplicateCheckIter = AZStd::next(iterator); - duplicateCheckIter != providedServiceArray.end();) + else { - if (*iterator == *duplicateCheckIter) - { - AZ_Warning("Entity", false, "Duplicate service %d found on entity %s [%s]", - *duplicateCheckIter, - entity ? entity->GetName().c_str() : "Entity not provided", - entity ? entity->GetId().ToString().c_str() : ""); - duplicateCheckIter = providedServiceArray.erase(duplicateCheckIter); - duplicateFound = true; - } - else - { - ++duplicateCheckIter; - } + ++duplicateCheckIter; } - return duplicateFound; } - } // namespace EntityUtils -} // namespace AZ + return duplicateFound; + } +} // namespace AZ::EntityUtils diff --git a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp index 9db59bc781..ecab62d123 100644 --- a/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp +++ b/Code/Framework/AzCore/AzCore/Compression/zstd_compression.cpp @@ -57,6 +57,7 @@ void ZStd::StartCompressor(unsigned int compressionLevel) ZSTD_customMem customAlloc; customAlloc.customAlloc = reinterpret_cast(&AllocateMem); customAlloc.customFree = &FreeMem; + customAlloc.opaque = nullptr; AZ_UNUSED(compressionLevel); m_streamCompression = (ZSTD_createCStream_advanced(customAlloc)); diff --git a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp b/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp index 3cb895c992..c03b75d118 100644 --- a/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/AssetTracking.cpp @@ -14,323 +14,313 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug + namespace { - namespace - { - struct AssetTreeNode; - - // Per-thread data that needs to be stored. - struct ThreadData - { - AZStd::vector m_currentAssetStack; - }; + struct AssetTreeNode; - // Access thread data through a virtual function to ensure that the same thread-local data is being shared across DLLs. - // Otherwise, the thread_local variables are replicated across DLLs that link the AzCore library, and you'll get a - // different version in each module. - class ThreadDataProvider - { - public: - virtual ThreadData& GetThreadData() = 0; - }; - } + // Per-thread data that needs to be stored. + struct ThreadData + { + AZStd::vector m_currentAssetStack; + }; - class AssetTrackingImpl final : - public ThreadDataProvider + // Access thread data through a virtual function to ensure that the same thread-local data is being shared across DLLs. + // Otherwise, the thread_local variables are replicated across DLLs that link the AzCore library, and you'll get a + // different version in each module. + class ThreadDataProvider { public: - AZ_TYPE_INFO(AssetTrackingImpl, "{01E2A099-3523-40BE-80E0-E0ADD861BEE1}"); - AZ_CLASS_ALLOCATOR(AssetTrackingImpl, OSAllocator, 0); + virtual ThreadData& GetThreadData() = 0; + }; + } - AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable); - ~AssetTrackingImpl(); + class AssetTrackingImpl final : + public ThreadDataProvider + { + public: + AZ_TYPE_INFO(AssetTrackingImpl, "{01E2A099-3523-40BE-80E0-E0ADD861BEE1}"); + AZ_CLASS_ALLOCATOR(AssetTrackingImpl, OSAllocator, 0); - void AssetBegin(const char* id, const char* file, int line); - void AssetAttach(void* otherAllocation, const char* file, int line); - void AssetEnd(); + AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable); + ~AssetTrackingImpl(); - ThreadData& GetThreadData() override; + void AssetBegin(const char* id, const char* file, int line); + void AssetAttach(void* otherAllocation, const char* file, int line); + void AssetEnd(); - private: - static EnvironmentVariable& GetEnvironmentVariable(); - static AssetTrackingImpl* GetSharedInstance(); - static ThreadData& GetSharedThreadData(); + ThreadData& GetThreadData() override; - using PrimaryAssets = AZStd::unordered_map, AZStd::equal_to, AZStdAssetTrackingAllocator>; - using ThreadData = ThreadData; - using mutex_type = AZStd::mutex; - using lock_type = AZStd::lock_guard; + private: + static EnvironmentVariable& GetEnvironmentVariable(); + static AssetTrackingImpl* GetSharedInstance(); + static ThreadData& GetSharedThreadData(); - mutex_type m_mutex; - PrimaryAssets m_primaryAssets; - AssetTreeNodeBase* m_assetRoot = nullptr; - AssetAllocationTableBase* m_allocationTable = nullptr; - bool m_performingAnalysis = false; + using PrimaryAssets = AZStd::unordered_map, AZStd::equal_to, AZStdAssetTrackingAllocator>; + using ThreadData = ThreadData; + using mutex_type = AZStd::mutex; + using lock_type = AZStd::lock_guard; - friend class AssetTracking; - friend class AssetTracking::Scope; - }; + mutex_type m_mutex; + PrimaryAssets m_primaryAssets; + AssetTreeNodeBase* m_assetRoot = nullptr; + AssetAllocationTableBase* m_allocationTable = nullptr; + bool m_performingAnalysis = false; + + friend class AssetTracking; + friend class AssetTracking::Scope; + }; - } -} /////////////////////////////////////////////////////////////////////////////// // AssetTrackingImpl methods /////////////////////////////////////////////////////////////////////////////// -namespace AZ -{ - namespace Debug + AssetTrackingImpl::AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) : + m_assetRoot(&assetTree->GetRoot()), + m_allocationTable(allocationTable) { - AssetTrackingImpl::AssetTrackingImpl(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) : - m_assetRoot(&assetTree->GetRoot()), - m_allocationTable(allocationTable) - { - AZ_Assert(!GetSharedInstance(), "Only one AssetTrackingImpl can exist!"); + AZ_Assert(!GetSharedInstance(), "Only one AssetTrackingImpl can exist!"); - GetEnvironmentVariable().Set(this); - AllocatorManager::Instance().EnterProfilingMode(); - } + GetEnvironmentVariable().Set(this); + AllocatorManager::Instance().EnterProfilingMode(); + } + + AssetTrackingImpl::~AssetTrackingImpl() + { + AllocatorManager::Instance().ExitProfilingMode(); + GetEnvironmentVariable().Reset(); + } + + void AssetTrackingImpl::AssetBegin(const char* id, const char* file, int line) + { + // In the future it may be desirable to organize assets based on where in code the asset was entered into. + // For now these are ignored. + AZ_UNUSED(file); + AZ_UNUSED(line); + + using namespace Internal; + + AssetTrackingId assetId(id); + auto& threadData = GetSharedThreadData(); + AssetTreeNodeBase* parentAsset = threadData.m_currentAssetStack.empty() ? nullptr : threadData.m_currentAssetStack.back(); + AssetTreeNodeBase* childAsset; + AssetPrimaryInfo* assetPrimaryInfo; - AssetTrackingImpl::~AssetTrackingImpl() + if (!parentAsset) { - AllocatorManager::Instance().ExitProfilingMode(); - GetEnvironmentVariable().Reset(); + parentAsset = m_assetRoot; } - void AssetTrackingImpl::AssetBegin(const char* id, const char* file, int line) { - // In the future it may be desirable to organize assets based on where in code the asset was entered into. - // For now these are ignored. - AZ_UNUSED(file); - AZ_UNUSED(line); + lock_type lock(m_mutex); - using namespace Internal; + // Locate or create the primary record for this asset + auto primaryItr = m_primaryAssets.find(assetId); - AssetTrackingId assetId(id); - auto& threadData = GetSharedThreadData(); - AssetTreeNodeBase* parentAsset = threadData.m_currentAssetStack.empty() ? nullptr : threadData.m_currentAssetStack.back(); - AssetTreeNodeBase* childAsset; - AssetPrimaryInfo* assetPrimaryInfo; - - if (!parentAsset) + if (primaryItr != m_primaryAssets.end()) { - parentAsset = m_assetRoot; + assetPrimaryInfo = &primaryItr->second; } - + else { - lock_type lock(m_mutex); - - // Locate or create the primary record for this asset - auto primaryItr = m_primaryAssets.find(assetId); - - if (primaryItr != m_primaryAssets.end()) - { - assetPrimaryInfo = &primaryItr->second; - } - else - { - auto insertResult = m_primaryAssets.emplace(assetId, AssetPrimaryInfo()); - assetPrimaryInfo = &insertResult.first->second; - assetPrimaryInfo->m_id = &insertResult.first->first; - } - - // Add this asset to the stack for this thread's context - childAsset = parentAsset->FindOrAddChild(assetId, assetPrimaryInfo); + auto insertResult = m_primaryAssets.emplace(assetId, AssetPrimaryInfo()); + assetPrimaryInfo = &insertResult.first->second; + assetPrimaryInfo->m_id = &insertResult.first->first; } - threadData.m_currentAssetStack.push_back(childAsset); + // Add this asset to the stack for this thread's context + childAsset = parentAsset->FindOrAddChild(assetId, assetPrimaryInfo); } - void AssetTrackingImpl::AssetAttach(void* otherAllocation, const char* file, int line) - { - AZ_UNUSED(file); - AZ_UNUSED(line); + threadData.m_currentAssetStack.push_back(childAsset); + } - using namespace Internal; - - AssetTreeNodeBase* assetInfo = m_allocationTable->FindAllocation(otherAllocation); + void AssetTrackingImpl::AssetAttach(void* otherAllocation, const char* file, int line) + { + AZ_UNUSED(file); + AZ_UNUSED(line); - // We will push back a nullptr if there is no asset, this is necessary to balance the call to AssetEnd() - GetSharedThreadData().m_currentAssetStack.push_back(assetInfo); - } + using namespace Internal; - void AssetTrackingImpl::AssetEnd() - { - AZ_Assert(!GetSharedThreadData().m_currentAssetStack.empty(), "AssetEnd() called without matching AssetBegin() or AssetAttach. Use the AZ_ASSET_NAMED_SCOPE and AZ_ASSET_ATTACH_TO_SCOPE macros to avoid this!"); - GetSharedThreadData().m_currentAssetStack.pop_back(); - } + AssetTreeNodeBase* assetInfo = m_allocationTable->FindAllocation(otherAllocation); - AssetTrackingImpl* AssetTrackingImpl::GetSharedInstance() - { - auto environmentVariable = GetEnvironmentVariable(); + // We will push back a nullptr if there is no asset, this is necessary to balance the call to AssetEnd() + GetSharedThreadData().m_currentAssetStack.push_back(assetInfo); + } - if(environmentVariable) - { - return *environmentVariable; - } + void AssetTrackingImpl::AssetEnd() + { + AZ_Assert(!GetSharedThreadData().m_currentAssetStack.empty(), "AssetEnd() called without matching AssetBegin() or AssetAttach. Use the AZ_ASSET_NAMED_SCOPE and AZ_ASSET_ATTACH_TO_SCOPE macros to avoid this!"); + GetSharedThreadData().m_currentAssetStack.pop_back(); + } - return nullptr; - } + AssetTrackingImpl* AssetTrackingImpl::GetSharedInstance() + { + auto environmentVariable = GetEnvironmentVariable(); - ThreadData& AssetTrackingImpl::GetSharedThreadData() + if(environmentVariable) { - // Cast to the base type so our virtual call doesn't get optimized away. We require GetThreadData() to be executed in the same DLL every time. - return static_cast(GetSharedInstance())->GetThreadData(); + return *environmentVariable; } - AssetTrackingImpl::ThreadData& AssetTrackingImpl::GetThreadData() - { - static thread_local ThreadData* data = nullptr; - static thread_local typename AZStd::aligned_storage_t storage; + return nullptr; + } - if (!data) - { - data = new (&storage) ThreadData; - } + ThreadData& AssetTrackingImpl::GetSharedThreadData() + { + // Cast to the base type so our virtual call doesn't get optimized away. We require GetThreadData() to be executed in the same DLL every time. + return static_cast(GetSharedInstance())->GetThreadData(); + } - return *data; - } + AssetTrackingImpl::ThreadData& AssetTrackingImpl::GetThreadData() + { + static thread_local ThreadData* data = nullptr; + static thread_local typename AZStd::aligned_storage_t storage; - EnvironmentVariable& AssetTrackingImpl::GetEnvironmentVariable() + if (!data) { - static EnvironmentVariable assetTrackingImpl = Environment::CreateVariable(AzTypeInfo::Name()); - - return assetTrackingImpl; + data = new (&storage) ThreadData; } - /////////////////////////////////////////////////////////////////////////////// - // AssetTracking::Scope functions - /////////////////////////////////////////////////////////////////////////////// - - AssetTracking::Scope AssetTracking::Scope::ScopeFromAssetId(const char* file, int line, const char* fmt, ...) - { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - static const int BUFFER_SIZE = 1024; + return *data; + } - char buffer[BUFFER_SIZE]; - va_list args; - va_start(args, fmt); - azvsnprintf(buffer, BUFFER_SIZE, fmt, args); - va_end(args); + EnvironmentVariable& AssetTrackingImpl::GetEnvironmentVariable() + { + static EnvironmentVariable assetTrackingImpl = Environment::CreateVariable(AzTypeInfo::Name()); - impl->AssetBegin(buffer, file, line); - } + return assetTrackingImpl; + } - return Scope(); - } + /////////////////////////////////////////////////////////////////////////////// + // AssetTracking::Scope functions + /////////////////////////////////////////////////////////////////////////////// - AssetTracking::Scope AssetTracking::Scope::ScopeFromAttachment(void* attachTo, const char* file, int line) + AssetTracking::Scope AssetTracking::Scope::ScopeFromAssetId(const char* file, int line, const char* fmt, ...) + { + if (auto impl = AssetTrackingImpl::GetSharedInstance()) { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetAttach(attachTo, file, line); - } + static const int BUFFER_SIZE = 1024; - return Scope(); + char buffer[BUFFER_SIZE]; + va_list args; + va_start(args, fmt); + azvsnprintf(buffer, BUFFER_SIZE, fmt, args); + va_end(args); + + impl->AssetBegin(buffer, file, line); } - AssetTracking::Scope::~Scope() + return Scope(); + } + + AssetTracking::Scope AssetTracking::Scope::ScopeFromAttachment(void* attachTo, const char* file, int line) + { + if (auto impl = AssetTrackingImpl::GetSharedInstance()) { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetEnd(); - } + impl->AssetAttach(attachTo, file, line); } - AssetTracking::Scope::Scope() + return Scope(); + } + + AssetTracking::Scope::~Scope() + { + if (auto impl = AssetTrackingImpl::GetSharedInstance()) { + impl->AssetEnd(); } + } + + AssetTracking::Scope::Scope() + { + } - /////////////////////////////////////////////////////////////////////////////// - // AssetTracking functions - /////////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////////// + // AssetTracking functions + /////////////////////////////////////////////////////////////////////////////// - void AssetTracking::EnterScopeByAssetId(const char* file, int line, const char* fmt, ...) + void AssetTracking::EnterScopeByAssetId(const char* file, int line, const char* fmt, ...) + { + if (auto impl = AssetTrackingImpl::GetSharedInstance()) { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - static const int BUFFER_SIZE = 1024; + static const int BUFFER_SIZE = 1024; - char buffer[BUFFER_SIZE]; - va_list args; - va_start(args, fmt); - azvsnprintf(buffer, BUFFER_SIZE, fmt, args); - va_end(args); + char buffer[BUFFER_SIZE]; + va_list args; + va_start(args, fmt); + azvsnprintf(buffer, BUFFER_SIZE, fmt, args); + va_end(args); - impl->AssetBegin(buffer, file, line); - } + impl->AssetBegin(buffer, file, line); } + } - void AssetTracking::EnterScopeByAttachment(void* attachTo, const char* file, int line) + void AssetTracking::EnterScopeByAttachment(void* attachTo, const char* file, int line) + { + if (auto impl = AssetTrackingImpl::GetSharedInstance()) { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetAttach(attachTo, file, line); - } + impl->AssetAttach(attachTo, file, line); } + } - void AssetTracking::ExitScope() + void AssetTracking::ExitScope() + { + if (auto impl = AssetTrackingImpl::GetSharedInstance()) { - if (auto impl = AssetTrackingImpl::GetSharedInstance()) - { - impl->AssetEnd(); - } + impl->AssetEnd(); } + } - const char* AssetTracking::GetDebugScope() - { - // Output debug information about the current asset scope in the current thread. - // Do not use in production code. + const char* AssetTracking::GetDebugScope() + { + // Output debug information about the current asset scope in the current thread. + // Do not use in production code. #ifndef RELEASE - static const int BUFFER_SIZE = 1024; - static char buffer[BUFFER_SIZE]; - const auto& assetStack = AssetTrackingImpl::GetSharedInstance()->GetThreadData().m_currentAssetStack; + static const int BUFFER_SIZE = 1024; + static char buffer[BUFFER_SIZE]; + const auto& assetStack = AssetTrackingImpl::GetSharedInstance()->GetThreadData().m_currentAssetStack; - if (assetStack.empty()) - { - azsnprintf(buffer, BUFFER_SIZE, ""); - } - else + if (assetStack.empty()) + { + azsnprintf(buffer, BUFFER_SIZE, ""); + } + else + { + char* pos = buffer; + for (auto itr = assetStack.rbegin(); itr != assetStack.rend(); ++itr) { - char* pos = buffer; - for (auto itr = assetStack.rbegin(); itr != assetStack.rend(); ++itr) - { - pos += azsnprintf(pos, BUFFER_SIZE - (pos - buffer), "%s\n", (*itr)->GetAssetPrimaryInfo()->m_id->m_id.c_str()); + pos += azsnprintf(pos, BUFFER_SIZE - (pos - buffer), "%s\n", (*itr)->GetAssetPrimaryInfo()->m_id->m_id.c_str()); - if (pos >= buffer + BUFFER_SIZE) - { - break; - } + if (pos >= buffer + BUFFER_SIZE) + { + break; } } + } - return buffer; + return buffer; #else - return ""; + return ""; #endif - } + } - AssetTracking::AssetTracking(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) - { - m_impl.reset(aznew AssetTrackingImpl(assetTree, allocationTable)); - } + AssetTracking::AssetTracking(AssetTreeBase* assetTree, AssetAllocationTableBase* allocationTable) + { + m_impl.reset(aznew AssetTrackingImpl(assetTree, allocationTable)); + } - AssetTracking::~AssetTracking() - { - } + AssetTracking::~AssetTracking() + { + } - AssetTreeNodeBase* AssetTracking::GetCurrentThreadAsset() const - { - const auto& assetStack = m_impl->GetThreadData().m_currentAssetStack; - AssetTreeNodeBase* result = assetStack.empty() ? nullptr : assetStack.back(); + AssetTreeNodeBase* AssetTracking::GetCurrentThreadAsset() const + { + const auto& assetStack = m_impl->GetThreadData().m_currentAssetStack; + AssetTreeNodeBase* result = assetStack.empty() ? nullptr : assetStack.back(); - return result; - } + return result; } - } // namespace AzFramework diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp b/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp index 88a78de031..58fa1f6cca 100644 --- a/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/EventTrace.cpp @@ -11,19 +11,19 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug + EventTrace::ScopedSlice::ScopedSlice(const char* name, const char* category) + : m_Name(name) + , m_Category(category) + , m_Time(AZStd::GetTimeNowMicroSecond()) { - EventTrace::ScopedSlice::ScopedSlice(const char* name, const char* category) - : m_Name(name) - , m_Category(category) - , m_Time(AZStd::GetTimeNowMicroSecond()) - {} + } - EventTrace::ScopedSlice::~ScopedSlice() - { - EventTraceDrillerBus::TryQueueBroadcast(&EventTraceDrillerInterface::RecordSlice, m_Name, m_Category, AZStd::this_thread::get_id(), m_Time, (uint32_t)(AZStd::GetTimeNowMicroSecond() - m_Time)); - } + EventTrace::ScopedSlice::~ScopedSlice() + { + EventTraceDrillerBus::TryQueueBroadcast( + &EventTraceDrillerInterface::RecordSlice, m_Name, m_Category, AZStd::this_thread::get_id(), m_Time, + (uint32_t)(AZStd::GetTimeNowMicroSecond() - m_Time)); } -} +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp index 658021b018..d0722616f3 100644 --- a/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/EventTraceDriller.cpp @@ -11,151 +11,149 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug + namespace Crc { - namespace Crc - { - const u32 EventTraceDriller = AZ_CRC("EventTraceDriller", 0xf7aeae55); - const u32 Slice = AZ_CRC("Slice", 0x3dae78a5); - const u32 ThreadInfo = AZ_CRC("ThreadInfo", 0x89bf78be); - const u32 Name = AZ_CRC("Name", 0x5e237e06); - const u32 Category = AZ_CRC("Category", 0x064c19c1); - const u32 ThreadId = AZ_CRC("ThreadId", 0xd0fd9043); - const u32 Timestamp = AZ_CRC("Timestamp", 0xa5d6e63e); - const u32 Duration = AZ_CRC("Duration", 0x865f80c0); - const u32 Instant = AZ_CRC("Instant", 0x0e9047ad); - } + constexpr u32 EventTraceDriller = AZ_CRC_CE("EventTraceDriller"); + constexpr u32 Slice = AZ_CRC_CE("Slice"); + constexpr u32 ThreadInfo = AZ_CRC_CE("ThreadInfo"); + constexpr u32 Name = AZ_CRC_CE("Name"); + constexpr u32 Category = AZ_CRC_CE("Category"); + constexpr u32 ThreadId = AZ_CRC_CE("ThreadId"); + constexpr u32 Timestamp = AZ_CRC_CE("Timestamp"); + constexpr u32 Duration = AZ_CRC_CE("Duration"); + constexpr u32 Instant = AZ_CRC_CE("Instant"); + } - EventTraceDriller::EventTraceDriller() - { - EventTraceDrillerSetupBus::Handler::BusConnect(); - AZStd::ThreadDrillerEventBus::Handler::BusConnect(); - } + EventTraceDriller::EventTraceDriller() + { + EventTraceDrillerSetupBus::Handler::BusConnect(); + AZStd::ThreadDrillerEventBus::Handler::BusConnect(); + } - EventTraceDriller::~EventTraceDriller() - { - AZStd::ThreadDrillerEventBus::Handler::BusDisconnect(); - EventTraceDrillerSetupBus::Handler::BusDisconnect(); - } + EventTraceDriller::~EventTraceDriller() + { + AZStd::ThreadDrillerEventBus::Handler::BusDisconnect(); + EventTraceDrillerSetupBus::Handler::BusDisconnect(); + } - void EventTraceDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; + void EventTraceDriller::Start(const Param* params, int numParams) + { + (void)params; + (void)numParams; - EventTraceDrillerBus::Handler::BusConnect(); - TickBus::Handler::BusConnect(); + EventTraceDrillerBus::Handler::BusConnect(); + TickBus::Handler::BusConnect(); - EventTraceDrillerBus::AllowFunctionQueuing(true); - } + EventTraceDrillerBus::AllowFunctionQueuing(true); + } - void EventTraceDriller::Stop() - { - EventTraceDrillerBus::AllowFunctionQueuing(false); - EventTraceDrillerBus::ClearQueuedEvents(); + void EventTraceDriller::Stop() + { + EventTraceDrillerBus::AllowFunctionQueuing(false); + EventTraceDrillerBus::ClearQueuedEvents(); - EventTraceDrillerBus::Handler::BusDisconnect(); - TickBus::Handler::BusDisconnect(); - } + EventTraceDrillerBus::Handler::BusDisconnect(); + TickBus::Handler::BusDisconnect(); + } - void EventTraceDriller::OnTick(float deltaTime, ScriptTimePoint time) - { - (void)deltaTime; - (void)time; + void EventTraceDriller::OnTick(float deltaTime, ScriptTimePoint time) + { + (void)deltaTime; + (void)time; - AZ_TRACE_METHOD(); - RecordThreads(); - EventTraceDrillerBus::ExecuteQueuedEvents(); - } + AZ_TRACE_METHOD(); + RecordThreads(); + EventTraceDrillerBus::ExecuteQueuedEvents(); + } - void EventTraceDriller::SetThreadName(const AZStd::thread_id& id, const char* name) - { - AZStd::lock_guard lock(m_ThreadMutex); - m_Threads[(size_t)id.m_id] = ThreadData{ name }; - } + void EventTraceDriller::SetThreadName(const AZStd::thread_id& id, const char* name) + { + AZStd::lock_guard lock(m_ThreadMutex); + m_Threads[(size_t)id.m_id] = ThreadData{ name }; + } - void EventTraceDriller::OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) + void EventTraceDriller::OnThreadEnter(const AZStd::thread::id& id, const AZStd::thread_desc* desc) + { + if (desc && desc->m_name) { - if (desc && desc->m_name) - { - SetThreadName(id, desc->m_name); - } + SetThreadName(id, desc->m_name); } + } - void EventTraceDriller::OnThreadExit(const AZStd::thread::id& id) - { - AZStd::lock_guard lock(m_ThreadMutex); - m_Threads.erase((size_t)id.m_id); - } + void EventTraceDriller::OnThreadExit(const AZStd::thread::id& id) + { + AZStd::lock_guard lock(m_ThreadMutex); + m_Threads.erase((size_t)id.m_id); + } - void EventTraceDriller::RecordThreads() + void EventTraceDriller::RecordThreads() + { + if (!m_output || m_Threads.empty()) { - if (m_output && m_Threads.size()) - { - // Main bus mutex guards m_output. - auto& context = EventTraceDrillerBus::GetOrCreateContext(); - - AZStd::scoped_lock lock(context.m_contextMutex, m_ThreadMutex); - for (const auto& keyValue : m_Threads) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::ThreadInfo); - m_output->Write(Crc::ThreadId, keyValue.first); - m_output->Write(Crc::Name, keyValue.second.name); - m_output->EndTag(Crc::ThreadInfo); - m_output->EndTag(Crc::EventTraceDriller); - } - } + return; } + // Main bus mutex guards m_output. + auto& context = EventTraceDrillerBus::GetOrCreateContext(); - void EventTraceDriller::RecordSlice( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp, - AZ::u32 duration) + AZStd::scoped_lock lock(context.m_contextMutex, m_ThreadMutex); + for (const auto& keyValue : m_Threads) { m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Slice); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); - m_output->Write(Crc::Timestamp, timestamp); - m_output->Write(Crc::Duration, std::max(duration, 1u)); - m_output->EndTag(Crc::Slice); + m_output->BeginTag(Crc::ThreadInfo); + m_output->Write(Crc::ThreadId, keyValue.first); + m_output->Write(Crc::Name, keyValue.second.name); + m_output->EndTag(Crc::ThreadInfo); m_output->EndTag(Crc::EventTraceDriller); } + } - void EventTraceDriller::RecordInstantGlobal( - const char* name, - const char* category, - AZ::u64 timestamp) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Instant); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::Timestamp, timestamp); - m_output->EndTag(Crc::Instant); - m_output->EndTag(Crc::EventTraceDriller); - } + void EventTraceDriller::RecordSlice( + const char* name, + const char* category, + const AZStd::thread_id threadId, + AZ::u64 timestamp, + AZ::u32 duration) + { + m_output->BeginTag(Crc::EventTraceDriller); + m_output->BeginTag(Crc::Slice); + m_output->Write(Crc::Name, name); + m_output->Write(Crc::Category, category); + m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); + m_output->Write(Crc::Timestamp, timestamp); + m_output->Write(Crc::Duration, std::max(duration, 1u)); + m_output->EndTag(Crc::Slice); + m_output->EndTag(Crc::EventTraceDriller); + } - void EventTraceDriller::RecordInstantThread( - const char* name, - const char* category, - const AZStd::thread_id threadId, - AZ::u64 timestamp) - { - m_output->BeginTag(Crc::EventTraceDriller); - m_output->BeginTag(Crc::Instant); - m_output->Write(Crc::Name, name); - m_output->Write(Crc::Category, category); - m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); - m_output->Write(Crc::Timestamp, timestamp); - m_output->EndTag(Crc::Instant); - m_output->EndTag(Crc::EventTraceDriller); - } + void EventTraceDriller::RecordInstantGlobal( + const char* name, + const char* category, + AZ::u64 timestamp) + { + m_output->BeginTag(Crc::EventTraceDriller); + m_output->BeginTag(Crc::Instant); + m_output->Write(Crc::Name, name); + m_output->Write(Crc::Category, category); + m_output->Write(Crc::Timestamp, timestamp); + m_output->EndTag(Crc::Instant); + m_output->EndTag(Crc::EventTraceDriller); + } + + void EventTraceDriller::RecordInstantThread( + const char* name, + const char* category, + const AZStd::thread_id threadId, + AZ::u64 timestamp) + { + m_output->BeginTag(Crc::EventTraceDriller); + m_output->BeginTag(Crc::Instant); + m_output->Write(Crc::Name, name); + m_output->Write(Crc::Category, category); + m_output->Write(Crc::ThreadId, (size_t)threadId.m_id); + m_output->Write(Crc::Timestamp, timestamp); + m_output->EndTag(Crc::Instant); + m_output->EndTag(Crc::EventTraceDriller); } -} +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp index b9e4003500..2c2b8215c0 100644 --- a/Code/Framework/AzCore/AzCore/Debug/Trace.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/Trace.cpp @@ -78,6 +78,7 @@ namespace AZ::Debug constexpr LogLevel DefaultLogLevel = LogLevel::Info; AZ_CVAR_SCOPED(int, bg_traceLogLevel, DefaultLogLevel, nullptr, ConsoleFunctorFlags::Null, "Enable trace message logging in release mode. 0=disabled, 1=errors, 2=warnings, 3=info."); + AZ_CVAR_SCOPED(bool, bg_alwaysShowCallstack, false, nullptr, ConsoleFunctorFlags::Null, "Force stack trace output without allowing ebus interception."); /** * If any listener returns true, store the result so we don't outputs detailed information. @@ -279,6 +280,13 @@ namespace AZ::Debug TraceMessageResult result; EBUS_EVENT_RESULT(result, TraceMessageBus, OnPreAssert, fileName, line, funcName, message); + + if (bg_alwaysShowCallstack) + { + // If we're always showing the callstack, print it now before there's any chance of an ebus handler interrupting + PrintCallstack(g_dbgSystemWnd, 1); + } + if (result.m_value) { g_alreadyHandlingAssertOrFatal = false; @@ -304,7 +312,10 @@ namespace AZ::Debug } Output(g_dbgSystemWnd, "------------------------------------------------\n"); - PrintCallstack(g_dbgSystemWnd, 1); + if (!bg_alwaysShowCallstack) + { + PrintCallstack(g_dbgSystemWnd, 1); + } Output(g_dbgSystemWnd, "==================================================================\n"); char dialogBoxText[g_maxMessageLength]; @@ -529,6 +540,16 @@ namespace AZ::Debug } } + RawOutput(window, message); + } + + void Trace::RawOutput(const char* window, const char* message) + { + if (!window) + { + window = g_dbgSystemWnd; + } + // printf on Windows platforms seem to have a buffer length limit of 4096 characters // Therefore fwrite is used directly to write the window and message to stdout AZStd::string_view windowView{ window }; @@ -572,9 +593,19 @@ namespace AZ::Debug } azstrcat(lines[i], AZ_ARRAY_SIZE(lines[i]), "\n"); + // Use Output instead of AZ_Printf to be consistent with the exception output code and avoid // this accidentally being suppressed as a normal message - Output(window, lines[i]); + + if (bg_alwaysShowCallstack) + { + // Use Raw Output as this cannot be suppressed + RawOutput(window, lines[i]); + } + else + { + Output(window, lines[i]); + } } } } diff --git a/Code/Framework/AzCore/AzCore/Debug/Trace.h b/Code/Framework/AzCore/AzCore/Debug/Trace.h index 507ba48e53..fe33bf1b9c 100644 --- a/Code/Framework/AzCore/AzCore/Debug/Trace.h +++ b/Code/Framework/AzCore/AzCore/Debug/Trace.h @@ -73,6 +73,9 @@ namespace AZ static void Output(const char* window, const char* message); + /// Called by output to handle the actual output, does not interact with ebus or allow interception + static void RawOutput(const char* window, const char* message); + static void PrintCallstack(const char* window, unsigned int suppressCount = 0, void* nativeContext = 0); /// PEXCEPTION_POINTERS on Windows, always NULL on other platforms diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp index 7e9e5b146e..dbe66838a4 100644 --- a/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/TraceMessagesDriller.cpp @@ -9,94 +9,91 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug + //========================================================================= + // Start + // [2/6/2013] + //========================================================================= + void TraceMessagesDriller::Start(const Param* params, int numParams) { - //========================================================================= - // Start - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; - BusConnect(); - } + (void)params; + (void)numParams; + BusConnect(); + } - //========================================================================= - // Stop - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::Stop() - { - BusDisconnect(); - } + //========================================================================= + // Stop + // [2/6/2013] + //========================================================================= + void TraceMessagesDriller::Stop() + { + BusDisconnect(); + } - //========================================================================= - // OnAssert - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnAssert(const char* message) - { - // Not sure if we can really capture assert since the code will stop executing very soon. - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->Write(AZ_CRC("OnAssert", 0xb74db4ce), message); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } + //========================================================================= + // OnAssert + // [2/6/2013] + //========================================================================= + void TraceMessagesDriller::OnAssert(const char* message) + { + // Not sure if we can really capture assert since the code will stop executing very soon. + m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); + m_output->Write(AZ_CRC_CE("OnAssert"), message); + m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); + } - //========================================================================= - // OnException - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnException(const char* message) - { - // Not sure if we can really capture exception since the code will stop executing very soon. - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->Write(AZ_CRC("OnException", 0xfe457d12), message); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } + //========================================================================= + // OnException + // [2/6/2013] + //========================================================================= + void TraceMessagesDriller::OnException(const char* message) + { + // Not sure if we can really capture exception since the code will stop executing very soon. + m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); + m_output->Write(AZ_CRC_CE("OnException"), message); + m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); + } - //========================================================================= - // OnError - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnError(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->BeginTag(AZ_CRC("OnError", 0x4993c634)); - m_output->Write(AZ_CRC("Window", 0x8be4f9dd), window); - m_output->Write(AZ_CRC("Message", 0xb6bd307f), message); - m_output->EndTag(AZ_CRC("OnError", 0x4993c634)); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } + //========================================================================= + // OnError + // [2/6/2013] + //========================================================================= + void TraceMessagesDriller::OnError(const char* window, const char* message) + { + m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); + m_output->BeginTag(AZ_CRC_CE("OnError")); + m_output->Write(AZ_CRC_CE("Window"), window); + m_output->Write(AZ_CRC_CE("Message"), message); + m_output->EndTag(AZ_CRC_CE("OnError")); + m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); + } - //========================================================================= - // OnWarning - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnWarning(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->BeginTag(AZ_CRC("OnWarning", 0x7d90abea)); - m_output->Write(AZ_CRC("Window", 0x8be4f9dd), window); - m_output->Write(AZ_CRC("Message", 0xb6bd307f), message); - m_output->EndTag(AZ_CRC("OnWarning", 0x7d90abea)); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } + //========================================================================= + // OnWarning + // [2/6/2013] + //========================================================================= + void TraceMessagesDriller::OnWarning(const char* window, const char* message) + { + m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); + m_output->BeginTag(AZ_CRC_CE("OnWarning")); + m_output->Write(AZ_CRC_CE("Window"), window); + m_output->Write(AZ_CRC_CE("Message"), message); + m_output->EndTag(AZ_CRC_CE("OnWarning")); + m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); + } - //========================================================================= - // OnPrintf - // [2/6/2013] - //========================================================================= - void TraceMessagesDriller::OnPrintf(const char* window, const char* message) - { - m_output->BeginTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - m_output->BeginTag(AZ_CRC("OnPrintf", 0xd4b5c294)); - m_output->Write(AZ_CRC("Window", 0x8be4f9dd), window); - m_output->Write(AZ_CRC("Message", 0xb6bd307f), message); - m_output->EndTag(AZ_CRC("OnPrintf", 0xd4b5c294)); - m_output->EndTag(AZ_CRC("TraceMessagesDriller", 0xa61d1b00)); - } - } // namespace Debug + //========================================================================= + // OnPrintf + // [2/6/2013] + //========================================================================= + void TraceMessagesDriller::OnPrintf(const char* window, const char* message) + { + m_output->BeginTag(AZ_CRC_CE("TraceMessagesDriller")); + m_output->BeginTag(AZ_CRC_CE("OnPrintf")); + m_output->Write(AZ_CRC_CE("Window"), window); + m_output->Write(AZ_CRC_CE("Message"), message); + m_output->EndTag(AZ_CRC_CE("OnPrintf")); + m_output->EndTag(AZ_CRC_CE("TraceMessagesDriller")); + } } // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp b/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp index debbea5235..329a709994 100644 --- a/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp +++ b/Code/Framework/AzCore/AzCore/Debug/TraceReflection.cpp @@ -12,283 +12,280 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug + //! Trace Message Event Handler for Automation. + //! Since TraceMessageBus will be called from multiple threads and + //! python interpreter is single threaded, all the bus calls are + //! queued into a list and called at the end of the frame in the main thread. + //! @note this class is not using the usual AZ_EBUS_BEHAVIOR_BINDER + //! macro as the signature needs to be changed to connect to Tick bus. + class TraceMessageBusHandler + : public AZ::Debug::TraceMessageBus::Handler + , public AZ::BehaviorEBusHandler + , public AZ::TickBus::Handler { - //! Trace Message Event Handler for Automation. - //! Since TraceMessageBus will be called from multiple threads and - //! python interpreter is single threaded, all the bus calls are - //! queued into a list and called at the end of the frame in the main thread. - //! @note this class is not using the usual AZ_EBUS_BEHAVIOR_BINDER - //! macro as the signature needs to be changed to connect to Tick bus. - class TraceMessageBusHandler - : public AZ::Debug::TraceMessageBus::Handler - , public AZ::BehaviorEBusHandler - , public AZ::TickBus::Handler + public: + AZ_CLASS_ALLOCATOR(TraceMessageBusHandler, AZ::SystemAllocator, 0); + AZ_RTTI(TraceMessageBusHandler, "{5CDBAF09-5EB0-48AC-B327-2AF8601BB550}", AZ::BehaviorEBusHandler); + + TraceMessageBusHandler(); + + using EventFunctionsParameterPack = AZStd::Internal::pack_traits_arg_sequence< + decltype(&TraceMessageBusHandler::OnPreAssert), + decltype(&TraceMessageBusHandler::OnPreError), + decltype(&TraceMessageBusHandler::OnPreWarning), + decltype(&TraceMessageBusHandler::OnAssert), + decltype(&TraceMessageBusHandler::OnError), + decltype(&TraceMessageBusHandler::OnWarning), + decltype(&TraceMessageBusHandler::OnException), + decltype(&TraceMessageBusHandler::OnPrintf), + decltype(&TraceMessageBusHandler::OnOutput) + >; + + enum { - public: - AZ_CLASS_ALLOCATOR(TraceMessageBusHandler, AZ::SystemAllocator, 0); - AZ_RTTI(TraceMessageBusHandler, "{5CDBAF09-5EB0-48AC-B327-2AF8601BB550}", AZ::BehaviorEBusHandler); - - TraceMessageBusHandler(); - - using EventFunctionsParameterPack = AZStd::Internal::pack_traits_arg_sequence< - decltype(&TraceMessageBusHandler::OnPreAssert), - decltype(&TraceMessageBusHandler::OnPreError), - decltype(&TraceMessageBusHandler::OnPreWarning), - decltype(&TraceMessageBusHandler::OnAssert), - decltype(&TraceMessageBusHandler::OnError), - decltype(&TraceMessageBusHandler::OnWarning), - decltype(&TraceMessageBusHandler::OnException), - decltype(&TraceMessageBusHandler::OnPrintf), - decltype(&TraceMessageBusHandler::OnOutput) - >; - - enum - { - FN_OnPreAssert = 0, - FN_OnPreError, - FN_OnPreWarning, - FN_OnAssert, - FN_OnError, - FN_OnWarning, - FN_OnException, - FN_OnPrintf, - FN_OnOutput, - FN_MAX - }; - - static inline constexpr const char* m_functionNames[FN_MAX] = - { - "OnPreAssert", - "OnPreError", - "OnPreWarning", - "OnAssert", - "OnError", - "OnWarning", - "OnException", - "OnPrintf", - "OnOutput" - }; - - // AZ::BehaviorEBusHandler overrides... - int GetFunctionIndex(const char* functionName) const override; - void Disconnect() override; - bool Connect(AZ::BehaviorValueParameter* id = nullptr) override; - bool IsConnected() override; - bool IsConnectedId(AZ::BehaviorValueParameter* id) override; - - // TraceMessageBus - /* - * Note: Since at editor runtime there is already have a handler, for automation (OnPreAssert, OnPreWarning, OnPreWarning) - * must be used instead of (OnAssert, OnWarning, OnError) - */ - bool OnPreAssert(const char* fileName, int line, const char* func, const char* message) override; - bool OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) override; - bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override; - bool OnAssert(const char* message) override; - bool OnError(const char* window, const char* message) override; - bool OnWarning(const char* window, const char* message) override; - bool OnException(const char* message) override; - bool OnPrintf(const char* window, const char* message) override; - bool OnOutput(const char* window, const char* message) override; - - // AZ::TickBus::Handler overrides ... - void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; - int GetTickOrder() override; - - private: - void QueueMessageCall(AZStd::function messageCall); - void FlushMessageCalls(); - - AZStd::list> m_messageCalls; - AZStd::mutex m_messageCallsLock; + FN_OnPreAssert = 0, + FN_OnPreError, + FN_OnPreWarning, + FN_OnAssert, + FN_OnError, + FN_OnWarning, + FN_OnException, + FN_OnPrintf, + FN_OnOutput, + FN_MAX }; - TraceMessageBusHandler::TraceMessageBusHandler() + static inline constexpr const char* m_functionNames[FN_MAX] = { - m_events.resize(FN_MAX); - - SetEvent(&TraceMessageBusHandler::OnPreAssert, m_functionNames[FN_OnPreAssert]); - SetEvent(&TraceMessageBusHandler::OnPreError, m_functionNames[FN_OnPreError]); - SetEvent(&TraceMessageBusHandler::OnPreWarning, m_functionNames[FN_OnPreWarning]); - SetEvent(&TraceMessageBusHandler::OnAssert, m_functionNames[FN_OnAssert]); - SetEvent(&TraceMessageBusHandler::OnError, m_functionNames[FN_OnError]); - SetEvent(&TraceMessageBusHandler::OnWarning, m_functionNames[FN_OnWarning]); - SetEvent(&TraceMessageBusHandler::OnException, m_functionNames[FN_OnException]); - SetEvent(&TraceMessageBusHandler::OnPrintf, m_functionNames[FN_OnPrintf]); - SetEvent(&TraceMessageBusHandler::OnOutput, m_functionNames[FN_OnOutput]); - } + "OnPreAssert", + "OnPreError", + "OnPreWarning", + "OnAssert", + "OnError", + "OnWarning", + "OnException", + "OnPrintf", + "OnOutput" + }; - int TraceMessageBusHandler::GetFunctionIndex(const char* functionName) const + // AZ::BehaviorEBusHandler overrides... + int GetFunctionIndex(const char* functionName) const override; + void Disconnect() override; + bool Connect(AZ::BehaviorValueParameter* id = nullptr) override; + bool IsConnected() override; + bool IsConnectedId(AZ::BehaviorValueParameter* id) override; + + // TraceMessageBus + /* + * Note: Since at editor runtime there is already have a handler, for automation (OnPreAssert, OnPreWarning, OnPreWarning) + * must be used instead of (OnAssert, OnWarning, OnError) + */ + bool OnPreAssert(const char* fileName, int line, const char* func, const char* message) override; + bool OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) override; + bool OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) override; + bool OnAssert(const char* message) override; + bool OnError(const char* window, const char* message) override; + bool OnWarning(const char* window, const char* message) override; + bool OnException(const char* message) override; + bool OnPrintf(const char* window, const char* message) override; + bool OnOutput(const char* window, const char* message) override; + + // AZ::TickBus::Handler overrides ... + void OnTick(float deltaTime, AZ::ScriptTimePoint time) override; + int GetTickOrder() override; + + private: + void QueueMessageCall(AZStd::function messageCall); + void FlushMessageCalls(); + + AZStd::list> m_messageCalls; + AZStd::mutex m_messageCallsLock; + }; + + TraceMessageBusHandler::TraceMessageBusHandler() + { + m_events.resize(FN_MAX); + + SetEvent(&TraceMessageBusHandler::OnPreAssert, m_functionNames[FN_OnPreAssert]); + SetEvent(&TraceMessageBusHandler::OnPreError, m_functionNames[FN_OnPreError]); + SetEvent(&TraceMessageBusHandler::OnPreWarning, m_functionNames[FN_OnPreWarning]); + SetEvent(&TraceMessageBusHandler::OnAssert, m_functionNames[FN_OnAssert]); + SetEvent(&TraceMessageBusHandler::OnError, m_functionNames[FN_OnError]); + SetEvent(&TraceMessageBusHandler::OnWarning, m_functionNames[FN_OnWarning]); + SetEvent(&TraceMessageBusHandler::OnException, m_functionNames[FN_OnException]); + SetEvent(&TraceMessageBusHandler::OnPrintf, m_functionNames[FN_OnPrintf]); + SetEvent(&TraceMessageBusHandler::OnOutput, m_functionNames[FN_OnOutput]); + } + + int TraceMessageBusHandler::GetFunctionIndex(const char* functionName) const + { + for (int i = 0; i < FN_MAX; ++i) { - for (int i = 0; i < FN_MAX; ++i) + if (azstricmp(functionName, m_functionNames[i]) == 0) { - if (azstricmp(functionName, m_functionNames[i]) == 0) - { - return i; - } + return i; } - return -1; } + return -1; + } - void TraceMessageBusHandler::Disconnect() - { - AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); - AZ::TickBus::Handler::BusDisconnect(); - } + void TraceMessageBusHandler::Disconnect() + { + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); + AZ::TickBus::Handler::BusDisconnect(); + } - bool TraceMessageBusHandler::Connect(AZ::BehaviorValueParameter* id) - { - AZ::TickBus::Handler::BusConnect(); - return AZ::Internal::EBusConnector::Connect(this, id); - } + bool TraceMessageBusHandler::Connect(AZ::BehaviorValueParameter* id) + { + AZ::TickBus::Handler::BusConnect(); + return AZ::Internal::EBusConnector::Connect(this, id); + } - bool TraceMessageBusHandler::IsConnected() - { - return AZ::Internal::EBusConnector::IsConnected(this); - } + bool TraceMessageBusHandler::IsConnected() + { + return AZ::Internal::EBusConnector::IsConnected(this); + } - bool TraceMessageBusHandler::IsConnectedId(AZ::BehaviorValueParameter* id) - { - return AZ::Internal::EBusConnector::IsConnectedId(this, id); - } + bool TraceMessageBusHandler::IsConnectedId(AZ::BehaviorValueParameter* id) + { + return AZ::Internal::EBusConnector::IsConnectedId(this, id); + } - ////////////////////////////////////////////////////////////////////////// - // TraceMessageBusHandler Implementation - inline bool TraceMessageBusHandler::OnPreAssert(const char* fileName, int line, const char* func, const char* message) + ////////////////////////////////////////////////////////////////////////// + // TraceMessageBusHandler Implementation + inline bool TraceMessageBusHandler::OnPreAssert(const char* fileName, int line, const char* func, const char* message) + { + QueueMessageCall( + [this, fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() - { - Call(FN_OnPreAssert, fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); - }); - return false; - } + Call(FN_OnPreAssert, fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) + inline bool TraceMessageBusHandler::OnPreError(const char* window, const char* fileName, int line, const char* func, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() - { - Call(FN_OnPreError, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); - }); - return false; - } + Call(FN_OnPreError, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) + inline bool TraceMessageBusHandler::OnPreWarning(const char* window, const char* fileName, int line, const char* func, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), fileNameString = AZStd::string(fileName), line, funcString = AZStd::string(func), messageString = AZStd::string(message)]() - { - return Call(FN_OnPreWarning, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnPreWarning, windowString.c_str(), fileNameString.c_str(), line, funcString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnAssert(const char* message) + inline bool TraceMessageBusHandler::OnAssert(const char* message) + { + QueueMessageCall( + [this, messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, messageString = AZStd::string(message)]() - { - return Call(FN_OnAssert, messageString.c_str()); - }); - return false; - } + return Call(FN_OnAssert, messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnError(const char* window, const char* message) + inline bool TraceMessageBusHandler::OnError(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnError, windowString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnError, windowString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnWarning(const char* window, const char* message) + inline bool TraceMessageBusHandler::OnWarning(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnWarning, windowString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnWarning, windowString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnException(const char* message) + inline bool TraceMessageBusHandler::OnException(const char* message) + { + QueueMessageCall( + [this, messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, messageString = AZStd::string(message)]() - { - return Call(FN_OnException, messageString.c_str()); - }); - return false; - } + return Call(FN_OnException, messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnPrintf(const char* window, const char* message) + inline bool TraceMessageBusHandler::OnPrintf(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnPrintf, windowString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnPrintf, windowString.c_str(), messageString.c_str()); + }); + return false; + } - inline bool TraceMessageBusHandler::OnOutput(const char* window, const char* message) + inline bool TraceMessageBusHandler::OnOutput(const char* window, const char* message) + { + QueueMessageCall( + [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() { - QueueMessageCall( - [this, windowString = AZStd::string(window), messageString = AZStd::string(message)]() - { - return Call(FN_OnOutput, windowString.c_str(), messageString.c_str()); - }); - return false; - } + return Call(FN_OnOutput, windowString.c_str(), messageString.c_str()); + }); + return false; + } - void TraceMessageBusHandler::OnTick( - [[maybe_unused]] float deltaTime, - [[maybe_unused]] AZ::ScriptTimePoint time) - { - FlushMessageCalls(); - } + void TraceMessageBusHandler::OnTick( + [[maybe_unused]] float deltaTime, + [[maybe_unused]] AZ::ScriptTimePoint time) + { + FlushMessageCalls(); + } - int TraceMessageBusHandler::GetTickOrder() - { - return AZ::TICK_LAST; - } + int TraceMessageBusHandler::GetTickOrder() + { + return AZ::TICK_LAST; + } + + void TraceMessageBusHandler::QueueMessageCall(AZStd::function messageCall) + { + AZStd::lock_guard lock(m_messageCallsLock); + m_messageCalls.emplace_back(messageCall); + } - void TraceMessageBusHandler::QueueMessageCall(AZStd::function messageCall) + void TraceMessageBusHandler::FlushMessageCalls() + { + AZStd::list> messageCalls; { AZStd::lock_guard lock(m_messageCallsLock); - m_messageCalls.push_back(messageCall); + m_messageCalls.swap(messageCalls); // Move calls to a new list to release the lock as soon as possible } - void TraceMessageBusHandler::FlushMessageCalls() + for (auto& messageCall : messageCalls) { - AZStd::list> messageCalls; - { - AZStd::lock_guard lock(m_messageCallsLock); - m_messageCalls.swap(messageCalls); // Move calls to a new list to release the lock as soon as possible - } - - for (auto& messageCall : messageCalls) - { - messageCall(); - } + messageCall(); } + } - void TraceReflect(ReflectContext* context) + void TraceReflect(ReflectContext* context) + { + if (BehaviorContext* behaviorContext = azrtti_cast(context)) { - if (BehaviorContext* behaviorContext = azrtti_cast(context)) - { - behaviorContext->EBus("TraceMessageBus") - ->Attribute(AZ::Script::Attributes::Module, "debug") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) - ->Handler() - ; - } + behaviorContext->EBus("TraceMessageBus") + ->Attribute(AZ::Script::Attributes::Module, "debug") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation) + ->Handler() + ; } } -} +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/Driller.cpp b/Code/Framework/AzCore/AzCore/Driller/Driller.cpp index 41abd7793e..7e986be81e 100644 --- a/Code/Framework/AzCore/AzCore/Driller/Driller.cpp +++ b/Code/Framework/AzCore/AzCore/Driller/Driller.cpp @@ -14,291 +14,288 @@ #include -namespace AZ +namespace AZ::Debug { - namespace Debug + class DrillerManagerImpl + : public DrillerManager { - class DrillerManagerImpl - : public DrillerManager - { - public: - AZ_CLASS_ALLOCATOR(DrillerManagerImpl, OSAllocator, 0); + public: + AZ_CLASS_ALLOCATOR(DrillerManagerImpl, OSAllocator, 0); - typedef forward_list::type SessionListType; - SessionListType m_sessions; - typedef vector::type DrillerArrayType; - DrillerArrayType m_drillers; + using SessionListType = forward_list::type; + SessionListType m_sessions; + using DrillerArrayType = vector::type; + DrillerArrayType m_drillers; - ~DrillerManagerImpl() override; + ~DrillerManagerImpl() override; - void Register(Driller* factory) override; - void Unregister(Driller* factory) override; + void Register(Driller* factory) override; + void Unregister(Driller* factory) override; - void FrameUpdate() override; + void FrameUpdate() override; - DrillerSession* Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames = -1) override; - void Stop(DrillerSession* session) override; + DrillerSession* Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames = -1) override; + void Stop(DrillerSession* session) override; - int GetNumDrillers() const override { return static_cast(m_drillers.size()); } - Driller* GetDriller(int index) override { return m_drillers[index]; } - }; + int GetNumDrillers() const override { return static_cast(m_drillers.size()); } + Driller* GetDriller(int index) override { return m_drillers[index]; } + }; - ////////////////////////////////////////////////////////////////////////// - // Driller + ////////////////////////////////////////////////////////////////////////// + // Driller - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - AZ::u32 Driller::GetId() const - { - return AZ::Crc32(GetName()); - } + //========================================================================= + // Register + // [3/17/2011] + //========================================================================= + AZ::u32 Driller::GetId() const + { + return AZ::Crc32(GetName()); + } - ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller Manager + ////////////////////////////////////////////////////////////////////////// + // Driller Manager - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - DrillerManager* DrillerManager::Create(/*const Descriptor& desc*/) + //========================================================================= + // Register + // [3/17/2011] + //========================================================================= + DrillerManager* DrillerManager::Create(/*const Descriptor& desc*/) + { + const bool createAllocator = !AZ::AllocatorInstance::IsReady(); + if (createAllocator) { - const bool createAllocator = !AZ::AllocatorInstance::IsReady(); - if (createAllocator) - { - AZ::AllocatorInstance::Create(); - } - - DrillerManagerImpl* impl = aznew DrillerManagerImpl; - impl->m_ownsOSAllocator = createAllocator; - return impl; + AZ::AllocatorInstance::Create(); } - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - void DrillerManager::Destroy(DrillerManager* manager) + DrillerManagerImpl* impl = aznew DrillerManagerImpl; + impl->m_ownsOSAllocator = createAllocator; + return impl; + } + + //========================================================================= + // Register + // [3/17/2011] + //========================================================================= + void DrillerManager::Destroy(DrillerManager* manager) + { + const bool allocatorCreated = manager->m_ownsOSAllocator; + delete manager; + if (allocatorCreated) { - const bool allocatorCreated = manager->m_ownsOSAllocator; - delete manager; - if (allocatorCreated) - { - AZ::AllocatorInstance::Destroy(); - } + AZ::AllocatorInstance::Destroy(); } + } - ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerManagerImpl + ////////////////////////////////////////////////////////////////////////// + // DrillerManagerImpl - //========================================================================= - // ~DrillerManagerImpl - // [3/17/2011] - //========================================================================= - DrillerManagerImpl::~DrillerManagerImpl() + //========================================================================= + // ~DrillerManagerImpl + // [3/17/2011] + //========================================================================= + DrillerManagerImpl::~DrillerManagerImpl() + { + while (!m_sessions.empty()) { - while (!m_sessions.empty()) - { - Stop(&m_sessions.front()); - } - - while (!m_drillers.empty()) - { - Driller* driller = m_drillers[0]; - Unregister(driller); - delete driller; - } + Stop(&m_sessions.front()); } - //========================================================================= - // Register - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Register(Driller* driller) + while (!m_drillers.empty()) + { + Driller* driller = m_drillers[0]; + Unregister(driller); + delete driller; + } + } + + //========================================================================= + // Register + // [3/17/2011] + //========================================================================= + void + DrillerManagerImpl::Register(Driller* driller) + { + AZ_Assert(driller, "You must provide a valid factory!"); + for (size_t i = 0; i < m_drillers.size(); ++i) { - AZ_Assert(driller, "You must provide a valid factory!"); - for (size_t i = 0; i < m_drillers.size(); ++i) + if (m_drillers[i]->GetId() == driller->GetId()) { - if (m_drillers[i]->GetId() == driller->GetId()) - { - AZ_Error("Debug", false, "Driller with id %08x has already been registered! You can't have two factory instances for the same driller type", driller->GetId()); - return; - } + AZ_Error("Debug", false, "Driller with id %08x has already been registered! You can't have two factory instances for the same driller type", driller->GetId()); + return; } - m_drillers.push_back(driller); } - - //========================================================================= - // Unregister - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Unregister(Driller* driller) + m_drillers.push_back(driller); + } + + //========================================================================= + // Unregister + // [3/17/2011] + //========================================================================= + void + DrillerManagerImpl::Unregister(Driller* driller) + { + AZ_Assert(driller, "You must provide a valid factory!"); + for (DrillerArrayType::iterator iter = m_drillers.begin(); iter != m_drillers.end(); ++iter) { - AZ_Assert(driller, "You must provide a valid factory!"); - for (DrillerArrayType::iterator iter = m_drillers.begin(); iter != m_drillers.end(); ++iter) + if ((*iter)->GetId() == driller->GetId()) { - if ((*iter)->GetId() == driller->GetId()) - { - m_drillers.erase(iter); - return; - } + m_drillers.erase(iter); + return; } + } + + AZ_Error("Debug", false, "Failed to find driller factory with id %08x", driller->GetId()); + } - AZ_Error("Debug", false, "Failed to find driller factory with id %08x", driller->GetId()); + //========================================================================= + // FrameUpdate + // [3/17/2011] + //========================================================================= + void + DrillerManagerImpl::FrameUpdate() + { + if (m_sessions.empty()) + { + return; } - //========================================================================= - // FrameUpdate - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::FrameUpdate() + AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream + for (SessionListType::iterator sessionIter = m_sessions.begin(); sessionIter != m_sessions.end(); ) { - if (m_sessions.empty()) - { - return; - } + DrillerSession& s = *sessionIter; - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream - for (SessionListType::iterator sessionIter = m_sessions.begin(); sessionIter != m_sessions.end(); ) + // tick the drillers directly if they care. + for (size_t i = 0; i < s.drillers.size(); ++i) { - DrillerSession& s = *sessionIter; - - // tick the drillers directly if they care. - for (size_t i = 0; i < s.drillers.size(); ++i) - { - s.drillers[i]->Update(); - } + s.drillers[i]->Update(); + } - s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); + s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); - s.output->OnEndOfFrame(); + s.output->OnEndOfFrame(); - s.curFrame++; + s.curFrame++; - if (s.numFrames != -1) + if (s.numFrames != -1) + { + if (s.curFrame == s.numFrames) { - if (s.curFrame == s.numFrames) - { - Stop(&s); - continue; - } + Stop(&s); + continue; } + } - s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); - s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); + s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); + s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); - ++sessionIter; - } + ++sessionIter; } - - //========================================================================= - // Start - // [3/17/2011] - //========================================================================= - DrillerSession* - DrillerManagerImpl::Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames) + } + + //========================================================================= + // Start + // [3/17/2011] + //========================================================================= + DrillerSession* + DrillerManagerImpl::Start(DrillerOutputStream& output, const DrillerListType& drillerList, int numFrames) + { + if (drillerList.empty()) { - if (drillerList.empty()) - { - return nullptr; - } + return nullptr; + } - m_sessions.push_back(); - DrillerSession& s = m_sessions.back(); - s.curFrame = 0; - s.numFrames = numFrames; - s.output = &output; + m_sessions.push_back(); + DrillerSession& s = m_sessions.back(); + s.curFrame = 0; + s.numFrames = numFrames; + s.output = &output; - s.output->WriteHeader(); // first write the header in the stream + s.output->WriteHeader(); // first write the header in the stream - s.output->BeginTag(AZ_CRC("StartData", 0xecf3f53f)); - s.output->Write(AZ_CRC("Platform", 0x3952d0cb), (unsigned int)g_currentPlatform); - for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) + s.output->BeginTag(AZ_CRC("StartData", 0xecf3f53f)); + s.output->Write(AZ_CRC("Platform", 0x3952d0cb), (unsigned int)g_currentPlatform); + for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) + { + const DrillerInfo& di = *iDriller; + s.output->BeginTag(AZ_CRC("Driller", 0xa6e1fb73)); + s.output->Write(AZ_CRC("Name", 0x5e237e06), di.id); + for (int iParam = 0; iParam < (int)di.params.size(); ++iParam) { - const DrillerInfo& di = *iDriller; - s.output->BeginTag(AZ_CRC("Driller", 0xa6e1fb73)); - s.output->Write(AZ_CRC("Name", 0x5e237e06), di.id); - for (int iParam = 0; iParam < (int)di.params.size(); ++iParam) - { - s.output->BeginTag(AZ_CRC("Param", 0xa4fa7c89)); - s.output->Write(AZ_CRC("Name", 0x5e237e06), di.params[iParam].name); - s.output->Write(AZ_CRC("Description", 0x6de44026), di.params[iParam].desc); - s.output->Write(AZ_CRC("Type", 0x8cde5729), di.params[iParam].type); - s.output->Write(AZ_CRC("Value", 0x1d775834), di.params[iParam].value); - s.output->EndTag(AZ_CRC("Param", 0xa4fa7c89)); - } - s.output->EndTag(AZ_CRC("Driller", 0xa6e1fb73)); + s.output->BeginTag(AZ_CRC("Param", 0xa4fa7c89)); + s.output->Write(AZ_CRC("Name", 0x5e237e06), di.params[iParam].name); + s.output->Write(AZ_CRC("Description", 0x6de44026), di.params[iParam].desc); + s.output->Write(AZ_CRC("Type", 0x8cde5729), di.params[iParam].type); + s.output->Write(AZ_CRC("Value", 0x1d775834), di.params[iParam].value); + s.output->EndTag(AZ_CRC("Param", 0xa4fa7c89)); } - s.output->EndTag(AZ_CRC("StartData", 0xecf3f53f)); + s.output->EndTag(AZ_CRC("Driller", 0xa6e1fb73)); + } + s.output->EndTag(AZ_CRC("StartData", 0xecf3f53f)); - s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); - s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); + s.output->BeginTag(AZ_CRC("Frame", 0xb5f83ccd)); + s.output->Write(AZ_CRC("FrameNum", 0x85a1a919), s.curFrame); + { + AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream + for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) { - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); ///< Make sure no driller is writing to the stream - for (DrillerListType::const_iterator iDriller = drillerList.begin(); iDriller != drillerList.end(); ++iDriller) + Driller* driller = nullptr; + const DrillerInfo& di = *iDriller; + for (size_t iDesc = 0; iDesc < m_drillers.size(); ++iDesc) { - Driller* driller = nullptr; - const DrillerInfo& di = *iDriller; - for (size_t iDesc = 0; iDesc < m_drillers.size(); ++iDesc) + if (m_drillers[iDesc]->GetId() == di.id) { - if (m_drillers[iDesc]->GetId() == di.id) - { - driller = m_drillers[iDesc]; - AZ_Assert(driller->m_output == nullptr, "Driller with id %08x is already have an output stream %p (currently we support only 1 at a time)", di.id, driller->m_output); - driller->m_output = &output; - driller->Start(di.params.data(), static_cast(di.params.size())); - s.drillers.push_back(driller); - break; - } + driller = m_drillers[iDesc]; + AZ_Assert(driller->m_output == nullptr, "Driller with id %08x is already have an output stream %p (currently we support only 1 at a time)", di.id, driller->m_output); + driller->m_output = &output; + driller->Start(di.params.data(), static_cast(di.params.size())); + s.drillers.push_back(driller); + break; } - AZ_Warning("Driller", driller != nullptr, "We can't start a driller with id %d!", di.id); } + AZ_Warning("Driller", driller != nullptr, "We can't start a driller with id %d!", di.id); } - return &s; } + return &s; + } - //========================================================================= - // Stop - // [3/17/2011] - //========================================================================= - void - DrillerManagerImpl::Stop(DrillerSession* session) + //========================================================================= + // Stop + // [3/17/2011] + //========================================================================= + void + DrillerManagerImpl::Stop(DrillerSession* session) + { + SessionListType::iterator iter; + for (iter = m_sessions.begin(); iter != m_sessions.end(); ++iter) { - SessionListType::iterator iter; - for (iter = m_sessions.begin(); iter != m_sessions.end(); ++iter) + if (&*iter == session) { - if (&*iter == session) - { - break; - } + break; } + } - AZ_Assert(iter != m_sessions.end(), "We did not find session ID 0x%08x in the list!", session); - if (iter != m_sessions.end()) - { - DrillerSession& s = *session; + AZ_Assert(iter != m_sessions.end(), "We did not find session ID 0x%08x in the list!", session); + if (iter != m_sessions.end()) + { + DrillerSession& s = *session; + { + AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); + for (size_t i = 0; i < s.drillers.size(); ++i) { - AZStd::lock_guard lock(DrillerEBusMutex::GetMutex()); - for (size_t i = 0; i < s.drillers.size(); ++i) - { - s.drillers[i]->Stop(); - s.drillers[i]->m_output = nullptr; - } + s.drillers[i]->Stop(); + s.drillers[i]->m_output = nullptr; } - s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); - m_sessions.erase(iter); } + s.output->EndTag(AZ_CRC("Frame", 0xb5f83ccd)); + m_sessions.erase(iter); } - } // namespace Debug -} // namespace AZ + } +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp b/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp index 163db8a68b..a46736aa87 100644 --- a/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp +++ b/Code/Framework/AzCore/AzCore/Driller/DrillerBus.cpp @@ -12,57 +12,54 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug - { - ////////////////////////////////////////////////////////////////////////// - // Globals - // We need to synchronize all driller evens, so we have proper order, and access to the data - // We use a global mutex which should be used for all driller operations. - // The mutex is held in an environment variable so it works across DLLs. - EnvironmentVariable s_drillerGlobalMutex; - ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // Globals + // We need to synchronize all driller evens, so we have proper order, and access to the data + // We use a global mutex which should be used for all driller operations. + // The mutex is held in an environment variable so it works across DLLs. + EnvironmentVariable s_drillerGlobalMutex; + ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // lock - // [4/11/2011] - //========================================================================= - void DrillerEBusMutex::lock() - { - GetMutex().lock(); - } - //========================================================================= - // try_lock - // [4/11/2011] - //========================================================================= - bool DrillerEBusMutex::try_lock() - { - return GetMutex().try_lock(); - } + //========================================================================= + // lock + // [4/11/2011] + //========================================================================= + void DrillerEBusMutex::lock() + { + GetMutex().lock(); + } - //========================================================================= - // unlock - // [4/11/2011] - //========================================================================= - void DrillerEBusMutex::unlock() - { - GetMutex().unlock(); - } + //========================================================================= + // try_lock + // [4/11/2011] + //========================================================================= + bool DrillerEBusMutex::try_lock() + { + return GetMutex().try_lock(); + } - //========================================================================= - // unlock - // [4/11/2011] - //========================================================================= - AZStd::recursive_mutex& DrillerEBusMutex::GetMutex() + //========================================================================= + // unlock + // [4/11/2011] + //========================================================================= + void DrillerEBusMutex::unlock() + { + GetMutex().unlock(); + } + + //========================================================================= + // unlock + // [4/11/2011] + //========================================================================= + AZStd::recursive_mutex& DrillerEBusMutex::GetMutex() + { + if (!s_drillerGlobalMutex) { - if (!s_drillerGlobalMutex) - { - s_drillerGlobalMutex = Environment::CreateVariable(AZ_FUNCTION_SIGNATURE); - } - return *s_drillerGlobalMutex; + s_drillerGlobalMutex = Environment::CreateVariable(AZ_FUNCTION_SIGNATURE); } - } // namespace Debug -} // namespace AZ + return *s_drillerGlobalMutex; + } +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Driller/Stream.cpp b/Code/Framework/AzCore/AzCore/Driller/Stream.cpp index 14e983b09c..c86755149c 100644 --- a/Code/Framework/AzCore/AzCore/Driller/Stream.cpp +++ b/Code/Framework/AzCore/AzCore/Driller/Stream.cpp @@ -24,873 +24,870 @@ # include #endif // AZ_FILE_STREAM_COMPRESSION -namespace AZ +namespace AZ::Debug { - namespace Debug - { - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller output stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - void DrillerOutputStream::Write(u32 name, const AZ::Vector3& v) - { - float data[4]; - unsigned int dataSize = 3 * sizeof(float); - v.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Vector4& v) - { - float data[4]; - unsigned int dataSize = 4 * sizeof(float); - v.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Aabb& aabb) - { - float data[7]; - unsigned int dataSize = 6 * sizeof(float); - aabb.GetMin().StoreToFloat4(data); - aabb.GetMax().StoreToFloat4(&data[3]); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Obb& obb) - { - float data[10]; - unsigned int dataSize = 10 * sizeof(float); // position (Vector3), rotation (Quaternion) and halfLengths (Vector3) - obb.GetPosition().StoreToFloat3(data); - obb.GetRotation().StoreToFloat4(&data[3]); - obb.GetHalfLengths().StoreToFloat3(&data[7]); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Transform& tm) - { - float data[12]; - unsigned int dataSize = 12 * sizeof(float); - const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromTransform(tm); - matrix3x4.StoreToRowMajorFloat12(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Matrix3x3& tm) - { - float data[9]; - unsigned int dataSize = 9 * sizeof(float); - tm.StoreToRowMajorFloat9(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Matrix4x4& tm) - { - float data[16]; - unsigned int dataSize = 16 * sizeof(float); - tm.StoreToRowMajorFloat16(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Quaternion& tm) - { - float data[4]; - unsigned int dataSize = 4 * sizeof(float); - tm.StoreToFloat4(data); - StreamEntry de; - de.name = name; - de.sizeAndFlags = dataSize; - WriteBinary(de); - WriteBinary(data, dataSize); - } - void DrillerOutputStream::Write(u32 name, const AZ::Plane& plane) - { - Write(name, plane.GetPlaneEquationCoefficients()); - } - void DrillerOutputStream::WriteHeader() - { - StreamHeader sh; // StreamHeader should be endianess independent. - WriteBinary(&sh, sizeof(sh)); - } - - void DrillerOutputStream::WriteTimeUTC(u32 name) - { - AZStd::sys_time_t now = AZStd::GetTimeUTCMilliSecond(); - Write(name, now); - } + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // Driller output stream + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + void DrillerOutputStream::Write(u32 name, const AZ::Vector3& v) + { + float data[4]; + unsigned int dataSize = 3 * sizeof(float); + v.StoreToFloat4(data); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Vector4& v) + { + float data[4]; + unsigned int dataSize = 4 * sizeof(float); + v.StoreToFloat4(data); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Aabb& aabb) + { + float data[7]; + unsigned int dataSize = 6 * sizeof(float); + aabb.GetMin().StoreToFloat4(data); + aabb.GetMax().StoreToFloat4(&data[3]); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Obb& obb) + { + float data[10]; + unsigned int dataSize = 10 * sizeof(float); // position (Vector3), rotation (Quaternion) and halfLengths (Vector3) + obb.GetPosition().StoreToFloat3(data); + obb.GetRotation().StoreToFloat4(&data[3]); + obb.GetHalfLengths().StoreToFloat3(&data[7]); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Transform& tm) + { + float data[12]; + unsigned int dataSize = 12 * sizeof(float); + const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromTransform(tm); + matrix3x4.StoreToRowMajorFloat12(data); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Matrix3x3& tm) + { + float data[9]; + unsigned int dataSize = 9 * sizeof(float); + tm.StoreToRowMajorFloat9(data); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Matrix4x4& tm) + { + float data[16]; + unsigned int dataSize = 16 * sizeof(float); + tm.StoreToRowMajorFloat16(data); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Quaternion& tm) + { + float data[4]; + unsigned int dataSize = 4 * sizeof(float); + tm.StoreToFloat4(data); + StreamEntry de; + de.name = name; + de.sizeAndFlags = dataSize; + WriteBinary(de); + WriteBinary(data, dataSize); + } + void DrillerOutputStream::Write(u32 name, const AZ::Plane& plane) + { + Write(name, plane.GetPlaneEquationCoefficients()); + } + void DrillerOutputStream::WriteHeader() + { + StreamHeader sh; // StreamHeader should be endianess independent. + WriteBinary(&sh, sizeof(sh)); + } - void DrillerOutputStream::WriteTimeMicrosecond(u32 name) - { - AZStd::sys_time_t now = AZStd::GetTimeNowMicroSecond(); - Write(name, now); - } + void DrillerOutputStream::WriteTimeUTC(u32 name) + { + AZStd::sys_time_t now = AZStd::GetTimeUTCMilliSecond(); + Write(name, now); + } - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller Input Stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - bool DrillerInputStream::ReadHeader() + void DrillerOutputStream::WriteTimeMicrosecond(u32 name) + { + AZStd::sys_time_t now = AZStd::GetTimeNowMicroSecond(); + Write(name, now); + } + + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // Driller Input Stream + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + bool DrillerInputStream::ReadHeader() + { + DrillerOutputStream::StreamHeader sh; // StreamHeader should be endianess independent. + unsigned int numRead = ReadBinary(&sh, sizeof(sh)); + (void)numRead; + AZ_Error("IO", numRead == sizeof(sh), "We should have atleast %d bytes in the stream to read the header!", sizeof(sh)); + if (numRead != sizeof(sh)) { - DrillerOutputStream::StreamHeader sh; // StreamHeader should be endianess independent. - unsigned int numRead = ReadBinary(&sh, sizeof(sh)); - (void)numRead; - AZ_Error("IO", numRead == sizeof(sh), "We should have atleast %d bytes in the stream to read the header!", sizeof(sh)); - if (numRead != sizeof(sh)) - { - return false; - } - m_isEndianSwap = AZ::IsBigEndian(static_cast(sh.platform)) != AZ::IsBigEndian(AZ::g_currentPlatform); - return true; + return false; } + m_isEndianSwap = AZ::IsBigEndian(static_cast(sh.platform)) != AZ::IsBigEndian(AZ::g_currentPlatform); + return true; + } + + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // Driller file stream + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + //========================================================================= + // DrillerOutputFileStream::DrillerOutputFileStream + // [3/23/2011] + //========================================================================= + DrillerOutputFileStream::DrillerOutputFileStream() + { +#if defined(AZ_FILE_STREAM_COMPRESSION) + m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); + m_zlib->StartCompressor(2); +#endif + } - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller file stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - //========================================================================= - // DrillerOutputFileStream::DrillerOutputFileStream - // [3/23/2011] - //========================================================================= - DrillerOutputFileStream::DrillerOutputFileStream() - { + //========================================================================= + // DrillerOutputFileStream::~DrillerOutputFileStream + // [3/23/2011] + //========================================================================= + DrillerOutputFileStream::~DrillerOutputFileStream() + { #if defined(AZ_FILE_STREAM_COMPRESSION) - m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); - m_zlib->StartCompressor(2); + azdestroy(m_zlib, OSAllocator); #endif - } + } - //========================================================================= - // DrillerOutputFileStream::~DrillerOutputFileStream - // [3/23/2011] - //========================================================================= - DrillerOutputFileStream::~DrillerOutputFileStream() + //========================================================================= + // DrillerOutputFileStream::Open + // [3/23/2011] + //========================================================================= + bool DrillerOutputFileStream::Open(const char* fileName, int mode, int platformFlags) + { + if (IO::SystemFile::Open(fileName, mode, platformFlags)) { + m_dataBuffer.reserve(100 * 1024); #if defined(AZ_FILE_STREAM_COMPRESSION) - azdestroy(m_zlib, OSAllocator); + // // Enable optional: encode the file in the same format as the streamer so they are interchangeable + // IO::CompressorHeader ch; + // ch.SetAZCS(); + // ch.m_compressorId = IO::CompressorZLib::TypeId(); + // ch.m_uncompressedSize = 0; // will be updated later + // AZStd::endian_swap(ch.m_compressorId); + // AZStd::endian_swap(ch.m_uncompressedSize); + // IO::SystemFile::Write(&ch,sizeof(ch)); + // IO::CompressorZLibHeader zlibHdr; + // zlibHdr.m_numSeekPoints = 0; + // IO::SystemFile::Write(&zlibHdr,sizeof(zlibHdr)); #endif + return true; } + return false; + } - //========================================================================= - // DrillerOutputFileStream::Open - // [3/23/2011] - //========================================================================= - bool DrillerOutputFileStream::Open(const char* fileName, int mode, int platformFlags) + //========================================================================= + // DrillerOutputFileStream::Close + // [3/23/2011] + //========================================================================= + void DrillerOutputFileStream::Close() + { + unsigned int dataSizeInBuffer = static_cast(m_dataBuffer.size()); { - if (IO::SystemFile::Open(fileName, mode, platformFlags)) - { - m_dataBuffer.reserve(100 * 1024); #if defined(AZ_FILE_STREAM_COMPRESSION) - // // Enable optional: encode the file in the same format as the streamer so they are interchangeable - // IO::CompressorHeader ch; - // ch.SetAZCS(); - // ch.m_compressorId = IO::CompressorZLib::TypeId(); - // ch.m_uncompressedSize = 0; // will be updated later - // AZStd::endian_swap(ch.m_compressorId); - // AZStd::endian_swap(ch.m_uncompressedSize); - // IO::SystemFile::Write(&ch,sizeof(ch)); - // IO::CompressorZLibHeader zlibHdr; - // zlibHdr.m_numSeekPoints = 0; - // IO::SystemFile::Write(&zlibHdr,sizeof(zlibHdr)); -#endif - return true; + unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataSizeInBuffer); + if (m_compressionBuffer.size() < minCompressBufferSize) // grow compression buffer if needed + { + m_compressionBuffer.clear(); + m_compressionBuffer.resize(minCompressBufferSize); } - return false; - } - - //========================================================================= - // DrillerOutputFileStream::Close - // [3/23/2011] - //========================================================================= - void DrillerOutputFileStream::Close() + unsigned int compressedSize; + do + { + compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataSizeInBuffer, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size(), ZLib::FT_FINISH); + if (compressedSize) + { + IO::SystemFile::Write(m_compressionBuffer.data(), compressedSize); + } + } while (compressedSize > 0); + m_zlib->ResetCompressor(); +#else + if (dataSizeInBuffer) + { + IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); + } +#endif + m_dataBuffer.clear(); + } + IO::SystemFile::Close(); + } + //========================================================================= + // DrillerOutputFileStream::WriteBinary + // [3/23/2011] + //========================================================================= + void DrillerOutputFileStream::WriteBinary(const void* data, unsigned int dataSize) + { + size_t dataSizeInBuffer = m_dataBuffer.size(); + if (dataSizeInBuffer + dataSize > m_dataBuffer.capacity()) { - unsigned int dataSizeInBuffer = static_cast(m_dataBuffer.size()); + if (dataSizeInBuffer > 0) { #if defined(AZ_FILE_STREAM_COMPRESSION) - unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataSizeInBuffer); + // we need to flush the data + unsigned int dataToCompress = static_cast(dataSizeInBuffer); + unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataToCompress); if (m_compressionBuffer.size() < minCompressBufferSize) // grow compression buffer if needed { m_compressionBuffer.clear(); m_compressionBuffer.resize(minCompressBufferSize); } - unsigned int compressedSize; - do + while (dataToCompress > 0) { - compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataSizeInBuffer, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size(), ZLib::FT_FINISH); + unsigned int compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataToCompress, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size()); if (compressedSize) { IO::SystemFile::Write(m_compressionBuffer.data(), compressedSize); } - } while (compressedSize > 0); - m_zlib->ResetCompressor(); -#else - if (dataSizeInBuffer) - { - IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); } -#endif - m_dataBuffer.clear(); - } - IO::SystemFile::Close(); - } - //========================================================================= - // DrillerOutputFileStream::WriteBinary - // [3/23/2011] - //========================================================================= - void DrillerOutputFileStream::WriteBinary(const void* data, unsigned int dataSize) - { - size_t dataSizeInBuffer = m_dataBuffer.size(); - if (dataSizeInBuffer + dataSize > m_dataBuffer.capacity()) - { - if (dataSizeInBuffer > 0) - { -#if defined(AZ_FILE_STREAM_COMPRESSION) - // we need to flush the data - unsigned int dataToCompress = static_cast(dataSizeInBuffer); - unsigned int minCompressBufferSize = m_zlib->GetMinCompressedBufferSize(dataToCompress); - if (m_compressionBuffer.size() < minCompressBufferSize) // grow compression buffer if needed - { - m_compressionBuffer.clear(); - m_compressionBuffer.resize(minCompressBufferSize); - } - while (dataToCompress > 0) - { - unsigned int compressedSize = m_zlib->Compress(m_dataBuffer.data(), dataToCompress, m_compressionBuffer.data(), (unsigned)m_compressionBuffer.size()); - if (compressedSize) - { - IO::SystemFile::Write(m_compressionBuffer.data(), compressedSize); - } - } #else - IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); + IO::SystemFile::Write(m_dataBuffer.data(), m_dataBuffer.size()); #endif - m_dataBuffer.clear(); - } + m_dataBuffer.clear(); } - m_dataBuffer.insert(m_dataBuffer.end(), reinterpret_cast(data), reinterpret_cast(data) + dataSize); } + m_dataBuffer.insert(m_dataBuffer.end(), reinterpret_cast(data), reinterpret_cast(data) + dataSize); + } - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // Driller file input stream - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // DrillerInputFileStream::DrillerInputFileStream - // [3/23/2011] - //========================================================================= - DrillerInputFileStream::DrillerInputFileStream() - { + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // Driller file input stream + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + + //========================================================================= + // DrillerInputFileStream::DrillerInputFileStream + // [3/23/2011] + //========================================================================= + DrillerInputFileStream::DrillerInputFileStream() + { #if defined(AZ_FILE_STREAM_COMPRESSION) - m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); - m_zlib->StartDecompressor(); + m_zlib = azcreate(ZLib, (&AllocatorInstance::GetAllocator()), OSAllocator); + m_zlib->StartDecompressor(); #endif - } + } - //========================================================================= - // DrillerInputFileStream::DrillerInputFileStream - // [3/23/2011] - //========================================================================= - DrillerInputFileStream::~DrillerInputFileStream() - { + //========================================================================= + // DrillerInputFileStream::DrillerInputFileStream + // [3/23/2011] + //========================================================================= + DrillerInputFileStream::~DrillerInputFileStream() + { #if defined(AZ_FILE_STREAM_COMPRESSION) - azdestroy(m_zlib, OSAllocator); + azdestroy(m_zlib, OSAllocator); #endif - } + } - //========================================================================= - // DrillerInputFileStream::Open - // [3/23/2011] - //========================================================================= - bool DrillerInputFileStream::Open(const char* fileName, int mode, int platformFlags) + //========================================================================= + // DrillerInputFileStream::Open + // [3/23/2011] + //========================================================================= + bool DrillerInputFileStream::Open(const char* fileName, int mode, int platformFlags) + { + if (IO::SystemFile::Open(fileName, mode, platformFlags)) { - if (IO::SystemFile::Open(fileName, mode, platformFlags)) - { - DrillerOutputStream::StreamHeader sh; + DrillerOutputStream::StreamHeader sh; #if defined(AZ_FILE_STREAM_COMPRESSION) - // TODO: optional encode the file in the same format as the streamer so they are interchangeable + // TODO: optional encode the file in the same format as the streamer so they are interchangeable #endif - // first read the header of the stream file. - return ReadHeader(); + // first read the header of the stream file. + return ReadHeader(); + } + return false; + } + //========================================================================= + // DrillerInputFileStream::ReadBinary + // [3/23/2011] + //========================================================================= + unsigned int DrillerInputFileStream::ReadBinary(void* data, unsigned int maxDataSize) + { + // make sure the compressed buffer if full enough... + size_t dataToLoad = maxDataSize * 2; + m_compressedData.reserve(dataToLoad); + while (m_compressedData.size() < dataToLoad) + { + unsigned char buffer[10 * 1024]; + IO::SystemFile::SizeType bytesRead = Read(AZ_ARRAY_SIZE(buffer), buffer); + if (bytesRead > 0) + { + m_compressedData.insert(m_compressedData.end(), (unsigned char*)buffer, buffer + bytesRead); } - return false; - } - //========================================================================= - // DrillerInputFileStream::ReadBinary - // [3/23/2011] - //========================================================================= - unsigned int DrillerInputFileStream::ReadBinary(void* data, unsigned int maxDataSize) - { - // make sure the compressed buffer if full enough... - size_t dataToLoad = maxDataSize * 2; - m_compressedData.reserve(dataToLoad); - while (m_compressedData.size() < dataToLoad) + if (bytesRead < AZ_ARRAY_SIZE(buffer)) { - unsigned char buffer[10 * 1024]; - IO::SystemFile::SizeType bytesRead = Read(AZ_ARRAY_SIZE(buffer), buffer); - if (bytesRead > 0) - { - m_compressedData.insert(m_compressedData.end(), (unsigned char*)buffer, buffer + bytesRead); - } - if (bytesRead < AZ_ARRAY_SIZE(buffer)) - { - break; - } + break; } + } #if defined(AZ_FILE_STREAM_COMPRESSION) - unsigned int dataSize = maxDataSize; - unsigned int bytesProcessed = m_zlib->Decompress(m_compressedData.data(), (unsigned)m_compressedData.size(), data, dataSize); - unsigned int readSize = maxDataSize - dataSize; // Zlib::Decompress decrements the dataSize parameter by the amount uncompressed + unsigned int dataSize = maxDataSize; + unsigned int bytesProcessed = m_zlib->Decompress(m_compressedData.data(), (unsigned)m_compressedData.size(), data, dataSize); + unsigned int readSize = maxDataSize - dataSize; // Zlib::Decompress decrements the dataSize parameter by the amount uncompressed #else - unsigned int bytesProcessed = AZStd::GetMin((unsigned int)m_compressedData.size(), maxDataSize); - unsigned int readSize = bytesProcessed; - memcpy(data, m_compressedData.data(), readSize); + unsigned int bytesProcessed = AZStd::GetMin((unsigned int)m_compressedData.size(), maxDataSize); + unsigned int readSize = bytesProcessed; + memcpy(data, m_compressedData.data(), readSize); #endif - m_compressedData.erase(m_compressedData.begin(), m_compressedData.begin() + bytesProcessed); - return readSize; - } - - //========================================================================= - // DrillerInputFileStream::Close - // [3/23/2011] - //========================================================================= - void DrillerInputFileStream::Close() - { + m_compressedData.erase(m_compressedData.begin(), m_compressedData.begin() + bytesProcessed); + return readSize; + } + + //========================================================================= + // DrillerInputFileStream::Close + // [3/23/2011] + //========================================================================= + void DrillerInputFileStream::Close() + { #if defined(AZ_FILE_STREAM_COMPRESSION) - if (m_zlib) - { - m_zlib->ResetDecompressor(); - } -#endif // AZ_FILE_STREAM_COMPRESSION - AZ::IO::SystemFile::Close(); - } - - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerSAXParser - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - //========================================================================= - // DrillerSAXParser - // [3/23/2011] - //========================================================================= - DrillerSAXParser::DrillerSAXParser(const TagCallbackType& tcb, const DataCallbackType& dcb) - : m_tagCallback(tcb) - , m_dataCallback(dcb) + if (m_zlib) { + m_zlib->ResetDecompressor(); } - - //========================================================================= - // ProcessStream - // [3/23/2011] - //========================================================================= - void - DrillerSAXParser::ProcessStream(DrillerInputStream& stream) - { - static const int processChunkSize = 15 * 1024; - char buffer[processChunkSize]; - unsigned int dataSize; - bool isEndianSwap = stream.IsEndianSwap(); - while ((dataSize = stream.ReadBinary(buffer, processChunkSize)) > 0) +#endif // AZ_FILE_STREAM_COMPRESSION + AZ::IO::SystemFile::Close(); + } + + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // DrillerSAXParser + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + //========================================================================= + // DrillerSAXParser + // [3/23/2011] + //========================================================================= + DrillerSAXParser::DrillerSAXParser(const TagCallbackType& tcb, const DataCallbackType& dcb) + : m_tagCallback(tcb) + , m_dataCallback(dcb) + { + } + + //========================================================================= + // ProcessStream + // [3/23/2011] + //========================================================================= + void + DrillerSAXParser::ProcessStream(DrillerInputStream& stream) + { + static const int processChunkSize = 15 * 1024; + char buffer[processChunkSize]; + unsigned int dataSize; + bool isEndianSwap = stream.IsEndianSwap(); + while ((dataSize = stream.ReadBinary(buffer, processChunkSize)) > 0) + { + char* dataStart = buffer; + char* dataEnd = dataStart + dataSize; + bool dataInBuffer = false; + if (!m_buffer.empty()) { - char* dataStart = buffer; - char* dataEnd = dataStart + dataSize; - bool dataInBuffer = false; - if (!m_buffer.empty()) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - dataStart = m_buffer.data(); - dataEnd = dataStart + m_buffer.size(); - dataInBuffer = true; - } - const int entrySize = sizeof(DrillerOutputStream::StreamEntry); - while (dataStart != dataEnd) + m_buffer.insert(m_buffer.end(), dataStart, dataEnd); + dataStart = m_buffer.data(); + dataEnd = dataStart + m_buffer.size(); + dataInBuffer = true; + } + const int entrySize = sizeof(DrillerOutputStream::StreamEntry); + while (dataStart != dataEnd) + { + if ((dataEnd - dataStart) < entrySize) // we need at least one entry to proceed { - if ((dataEnd - dataStart) < entrySize) // we need at least one entry to proceed + // not enough data to process, buffer it. + if (!dataInBuffer) { - // not enough data to process, buffer it. - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - break; + m_buffer.insert(m_buffer.end(), dataStart, dataEnd); } + break; + } - DrillerOutputStream::StreamEntry* se = reinterpret_cast(dataStart); - if (isEndianSwap) - { - // endian swap - AZStd::endian_swap(se->name); - AZStd::endian_swap(se->sizeAndFlags); - } + DrillerOutputStream::StreamEntry* se = reinterpret_cast(dataStart); + if (isEndianSwap) + { + // endian swap + AZStd::endian_swap(se->name); + AZStd::endian_swap(se->sizeAndFlags); + } - u32 dataType = (se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataInternalMask) >> DrillerOutputStream::StreamEntry::dataInternalShift; - u32 value = se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataSizeMask; - Data de; - de.m_name = se->name; - de.m_stringPool = stream.GetStringPool(); - de.m_isPooledString = false; - de.m_isPooledStringCrc32 = false; - switch (dataType) - { - case DrillerOutputStream::StreamEntry::INT_TAG: - { - bool isStart = (value != 0); - m_tagCallback(se->name, isStart); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U8: - { - u8 value8 = static_cast(value); - de.m_data = &value8; - de.m_dataSize = 1; - de.m_isEndianSwap = false; - m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U16: + u32 dataType = (se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataInternalMask) >> DrillerOutputStream::StreamEntry::dataInternalShift; + u32 value = se->sizeAndFlags & DrillerOutputStream::StreamEntry::dataSizeMask; + Data de; + de.m_name = se->name; + de.m_stringPool = stream.GetStringPool(); + de.m_isPooledString = false; + de.m_isPooledStringCrc32 = false; + switch (dataType) + { + case DrillerOutputStream::StreamEntry::INT_TAG: + { + bool isStart = (value != 0); + m_tagCallback(se->name, isStart); + dataStart += entrySize; + } break; + case DrillerOutputStream::StreamEntry::INT_DATA_U8: + { + u8 value8 = static_cast(value); + de.m_data = &value8; + de.m_dataSize = 1; + de.m_isEndianSwap = false; + m_dataCallback(de); + dataStart += entrySize; + } break; + case DrillerOutputStream::StreamEntry::INT_DATA_U16: + { + u16 value16 = static_cast(value); + de.m_data = &value16; + de.m_dataSize = 2; + de.m_isEndianSwap = false; + m_dataCallback(de); + dataStart += entrySize; + } break; + case DrillerOutputStream::StreamEntry::INT_DATA_U29: + { + de.m_data = &value; + de.m_dataSize = 4; + de.m_isEndianSwap = false; + m_dataCallback(de); + dataStart += entrySize; + } break; + case DrillerOutputStream::StreamEntry::INT_POOLED_STRING: + { + unsigned int userDataSize = value; + if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) { - u16 value16 = static_cast(value); - de.m_data = &value16; - de.m_dataSize = 2; - de.m_isEndianSwap = false; - m_dataCallback(de); + // Add string to the pool + AZ_Assert(de.m_stringPool != nullptr, "We require a string pool to parse this stream"); + AZ::u32 crc32; + const char* stringPtr; dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_DATA_U29: - { - de.m_data = &value; - de.m_dataSize = 4; - de.m_isEndianSwap = false; + de.m_stringPool->InsertCopy(reinterpret_cast(dataStart), userDataSize, crc32, &stringPtr); + de.m_dataSize = userDataSize; + de.m_isEndianSwap = isEndianSwap; + de.m_isPooledString = true; + de.m_data = const_cast(static_cast(stringPtr)); m_dataCallback(de); - dataStart += entrySize; - } break; - case DrillerOutputStream::StreamEntry::INT_POOLED_STRING: + dataStart += userDataSize; + } + else { - unsigned int userDataSize = value; - if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) - { - // Add string to the pool - AZ_Assert(de.m_stringPool != nullptr, "We require a string pool to parse this stream"); - AZ::u32 crc32; - const char* stringPtr; - dataStart += entrySize; - de.m_stringPool->InsertCopy(reinterpret_cast(dataStart), userDataSize, crc32, &stringPtr); - de.m_dataSize = userDataSize; - de.m_isEndianSwap = isEndianSwap; - de.m_isPooledString = true; - de.m_data = const_cast(static_cast(stringPtr)); - m_dataCallback(de); - dataStart += userDataSize; - } - else + // we can't process data right now add it to the buffer (if we have not done that already) + if (!dataInBuffer) { - // we can't process data right now add it to the buffer (if we have not done that already) - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - dataEnd = dataStart; // exit the loop + m_buffer.insert(m_buffer.end(), dataStart, dataEnd); } - } break; - case DrillerOutputStream::StreamEntry::INT_POOLED_STRING_CRC32: + dataEnd = dataStart; // exit the loop + } + } break; + case DrillerOutputStream::StreamEntry::INT_POOLED_STRING_CRC32: + { + de.m_isPooledStringCrc32 = true; + AZ_Assert(value == 4, "The data size for a pooled string crc32 should be 4 bytes!"); + } // continue to INT_SIZE + case DrillerOutputStream::StreamEntry::INT_SIZE: + { + unsigned int userDataSize = value; + if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) // do we have all the date we need to process... { - de.m_isPooledStringCrc32 = true; - AZ_Assert(value == 4, "The data size for a pooled string crc32 should be 4 bytes!"); - } // continue to INT_SIZE - case DrillerOutputStream::StreamEntry::INT_SIZE: + dataStart += entrySize; + de.m_data = dataStart; + de.m_dataSize = userDataSize; + de.m_isEndianSwap = isEndianSwap; + m_dataCallback(de); + dataStart += userDataSize; + } + else { - unsigned int userDataSize = value; - if ((userDataSize + entrySize) <= (unsigned)(dataEnd - dataStart)) // do we have all the date we need to process... - { - dataStart += entrySize; - de.m_data = dataStart; - de.m_dataSize = userDataSize; - de.m_isEndianSwap = isEndianSwap; - m_dataCallback(de); - dataStart += userDataSize; - } - else + // we can't process data right now add it to the buffer (if we have not done that already) + if (!dataInBuffer) { - // we can't process data right now add it to the buffer (if we have not done that already) - if (!dataInBuffer) - { - m_buffer.insert(m_buffer.end(), dataStart, dataEnd); - } - dataEnd = dataStart; // exit the loop + m_buffer.insert(m_buffer.end(), dataStart, dataEnd); } - } break; - default: - { - AZ_Error("DrillerSAXParser",false,"Encounted unknown symbol (%i) while processing stream (%s). Aborting stream.\n",dataType, stream.GetIdentifier()); - - // If we can't process anything, we want to just escape the loop, to avoid spinning infinitely - dataEnd = dataStart; - } break; + dataEnd = dataStart; // exit the loop } - } - if (dataInBuffer) // if the data was in the buffer remove the processed data! + } break; + default: { - m_buffer.erase(m_buffer.begin(), m_buffer.begin() + (dataStart - m_buffer.data())); - } - } - } + AZ_Error("DrillerSAXParser",false,"Encounted unknown symbol (%i) while processing stream (%s). Aborting stream.\n",dataType, stream.GetIdentifier()); - void DrillerSAXParser::Data::Read(AZ::Vector3& v) const - { - AZ_Assert(m_dataSize == sizeof(float) * 3, "We are expecting 3 floats for Vector3 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 3); - m_isEndianSwap = false; - } - v = Vector3::CreateFromFloat3(data); - } - void DrillerSAXParser::Data::Read(AZ::Vector4& v) const - { - AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Vector4 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 4); - m_isEndianSwap = false; + // If we can't process anything, we want to just escape the loop, to avoid spinning infinitely + dataEnd = dataStart; + } break; + } } - v = Vector4::CreateFromFloat4(data); - } - void DrillerSAXParser::Data::Read(AZ::Aabb& aabb) const - { - AZ_Assert(m_dataSize == sizeof(float) * 6, "We are expecting 6 floats for Aabb element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) + if (dataInBuffer) // if the data was in the buffer remove the processed data! { - AZStd::endian_swap(data, data + 6); - m_isEndianSwap = false; + m_buffer.erase(m_buffer.begin(), m_buffer.begin() + (dataStart - m_buffer.data())); } - Vector3 min = Vector3::CreateFromFloat3(data); - Vector3 max = Vector3::CreateFromFloat3(&data[3]); - aabb = Aabb::CreateFromMinMax(min, max); } - void DrillerSAXParser::Data::Read(AZ::Obb& obb) const + } + + void DrillerSAXParser::Data::Read(AZ::Vector3& v) const + { + AZ_Assert(m_dataSize == sizeof(float) * 3, "We are expecting 3 floats for Vector3 element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) { - AZ_Assert(m_dataSize == sizeof(float) * 10, "We are expecting 10 floats for Obb element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 10); - m_isEndianSwap = false; - } - Vector3 position = Vector3::CreateFromFloat3(data); - Quaternion rotation = Quaternion::CreateFromFloat4(&data[3]); - Vector3 halfLengths = Vector3::CreateFromFloat3(&data[7]); - obb = Obb::CreateFromPositionRotationAndHalfLengths(position, rotation, halfLengths); + AZStd::endian_swap(data, data + 3); + m_isEndianSwap = false; } - void DrillerSAXParser::Data::Read(AZ::Transform& tm) const + v = Vector3::CreateFromFloat3(data); + } + void DrillerSAXParser::Data::Read(AZ::Vector4& v) const + { + AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Vector4 element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) { - AZ_Assert(m_dataSize == sizeof(float) * 12, "We are expecting 12 floats for Transform element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 12); - m_isEndianSwap = false; - } - const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromRowMajorFloat12(data); - tm = Transform::CreateFromMatrix3x4(matrix3x4); + AZStd::endian_swap(data, data + 4); + m_isEndianSwap = false; } - void DrillerSAXParser::Data::Read(AZ::Matrix3x3& tm) const + v = Vector4::CreateFromFloat4(data); + } + void DrillerSAXParser::Data::Read(AZ::Aabb& aabb) const + { + AZ_Assert(m_dataSize == sizeof(float) * 6, "We are expecting 6 floats for Aabb element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) + { + AZStd::endian_swap(data, data + 6); + m_isEndianSwap = false; + } + Vector3 min = Vector3::CreateFromFloat3(data); + Vector3 max = Vector3::CreateFromFloat3(&data[3]); + aabb = Aabb::CreateFromMinMax(min, max); + } + void DrillerSAXParser::Data::Read(AZ::Obb& obb) const + { + AZ_Assert(m_dataSize == sizeof(float) * 10, "We are expecting 10 floats for Obb element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) + { + AZStd::endian_swap(data, data + 10); + m_isEndianSwap = false; + } + Vector3 position = Vector3::CreateFromFloat3(data); + Quaternion rotation = Quaternion::CreateFromFloat4(&data[3]); + Vector3 halfLengths = Vector3::CreateFromFloat3(&data[7]); + obb = Obb::CreateFromPositionRotationAndHalfLengths(position, rotation, halfLengths); + } + void DrillerSAXParser::Data::Read(AZ::Transform& tm) const + { + AZ_Assert(m_dataSize == sizeof(float) * 12, "We are expecting 12 floats for Transform element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) { - AZ_Assert(m_dataSize == sizeof(float) * 9, "We are expecting 9 floats for Matrix3x3 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 9); - m_isEndianSwap = false; - } - tm = Matrix3x3::CreateFromRowMajorFloat9(data); + AZStd::endian_swap(data, data + 12); + m_isEndianSwap = false; } - void DrillerSAXParser::Data::Read(AZ::Matrix4x4& tm) const + const Matrix3x4 matrix3x4 = Matrix3x4::CreateFromRowMajorFloat12(data); + tm = Transform::CreateFromMatrix3x4(matrix3x4); + } + void DrillerSAXParser::Data::Read(AZ::Matrix3x3& tm) const + { + AZ_Assert(m_dataSize == sizeof(float) * 9, "We are expecting 9 floats for Matrix3x3 element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) { - AZ_Assert(m_dataSize == sizeof(float) * 16, "We are expecting 16 floats for Matrix4x4 element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 16); - m_isEndianSwap = false; - } - tm = Matrix4x4::CreateFromRowMajorFloat16(data); + AZStd::endian_swap(data, data + 9); + m_isEndianSwap = false; } - void DrillerSAXParser::Data::Read(AZ::Quaternion& tm) const + tm = Matrix3x3::CreateFromRowMajorFloat9(data); + } + void DrillerSAXParser::Data::Read(AZ::Matrix4x4& tm) const + { + AZ_Assert(m_dataSize == sizeof(float) * 16, "We are expecting 16 floats for Matrix4x4 element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) { - AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Quaternion element 0x%08x with size %d bytes", m_name, m_dataSize); - float* data = reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(data, data + 4); - m_isEndianSwap = false; - } - tm = Quaternion::CreateFromFloat4(data); + AZStd::endian_swap(data, data + 16); + m_isEndianSwap = false; } - void DrillerSAXParser::Data::Read(AZ::Plane& plane) const + tm = Matrix4x4::CreateFromRowMajorFloat16(data); + } + void DrillerSAXParser::Data::Read(AZ::Quaternion& tm) const + { + AZ_Assert(m_dataSize == sizeof(float) * 4, "We are expecting 4 floats for Quaternion element 0x%08x with size %d bytes", m_name, m_dataSize); + float* data = reinterpret_cast(m_data); + if (m_isEndianSwap) { - AZ::Vector4 coeff; - Read(coeff); - plane = Plane::CreateFromCoefficients(coeff.GetX(), coeff.GetY(), coeff.GetZ(), coeff.GetW()); + AZStd::endian_swap(data, data + 4); + m_isEndianSwap = false; } + tm = Quaternion::CreateFromFloat4(data); + } + void DrillerSAXParser::Data::Read(AZ::Plane& plane) const + { + AZ::Vector4 coeff; + Read(coeff); + plane = Plane::CreateFromCoefficients(coeff.GetX(), coeff.GetY(), coeff.GetZ(), coeff.GetW()); + } - const char* DrillerSAXParser::Data::PrepareString(unsigned int& stringLength) const + const char* DrillerSAXParser::Data::PrepareString(unsigned int& stringLength) const + { + const char* srcData = reinterpret_cast(m_data); + stringLength = m_dataSize; + if (m_stringPool) { - const char* srcData = reinterpret_cast(m_data); - stringLength = m_dataSize; - if (m_stringPool) + AZ::u32 crc32; + const char* stringPtr; + if (m_isPooledStringCrc32) { - AZ::u32 crc32; - const char* stringPtr; - if (m_isPooledStringCrc32) - { - crc32 = *reinterpret_cast(m_data); - if (m_isEndianSwap) - { - AZStd::endian_swap(crc32); - } - stringPtr = m_stringPool->Find(crc32); - AZ_Assert(stringPtr != nullptr, "Failed to find string with id 0x%08x in the string pool, proper stream read is impossible!", crc32); - stringLength = static_cast(strlen(stringPtr)); - } - else if (m_isPooledString) - { - stringPtr = srcData; // already stored in the pool just transfer the pointer - } - else + crc32 = *reinterpret_cast(m_data); + if (m_isEndianSwap) { - // Store copy of the string in the pool to save memory (keep only one reference of the string). - m_stringPool->InsertCopy(reinterpret_cast(srcData), stringLength, crc32, &stringPtr); + AZStd::endian_swap(crc32); } - srcData = stringPtr; + stringPtr = m_stringPool->Find(crc32); + AZ_Assert(stringPtr != nullptr, "Failed to find string with id 0x%08x in the string pool, proper stream read is impossible!", crc32); + stringLength = static_cast(strlen(stringPtr)); + } + else if (m_isPooledString) + { + stringPtr = srcData; // already stored in the pool just transfer the pointer } else { - AZ_Assert(m_isPooledString == false && m_isPooledStringCrc32 == false, "This stream requires using of a string pool as the string is send only once and afterwards only the Crc32 is used!"); + // Store copy of the string in the pool to save memory (keep only one reference of the string). + m_stringPool->InsertCopy(reinterpret_cast(srcData), stringLength, crc32, &stringPtr); } - return srcData; + srcData = stringPtr; + } + else + { + AZ_Assert(m_isPooledString == false && m_isPooledStringCrc32 == false, "This stream requires using of a string pool as the string is send only once and afterwards only the Crc32 is used!"); } + return srcData; + } + + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // DrillerDOMParser + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerDOMParser - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // Node::GetTag - // [1/23/2013] - //========================================================================= - const DrillerDOMParser::Node* DrillerDOMParser::Node::GetTag(u32 tagName) const + //========================================================================= + // Node::GetTag + // [1/23/2013] + //========================================================================= + const DrillerDOMParser::Node* DrillerDOMParser::Node::GetTag(u32 tagName) const + { + const Node* tagNode = nullptr; + for (Node::NodeListType::const_iterator i = m_tags.begin(); i != m_tags.end(); ++i) { - const Node* tagNode = nullptr; - for (Node::NodeListType::const_iterator i = m_tags.begin(); i != m_tags.end(); ++i) + if ((*i).m_name == tagName) { - if ((*i).m_name == tagName) - { - tagNode = &*i; - break; - } + tagNode = &*i; + break; } - return tagNode; } + return tagNode; + } - //========================================================================= - // Node::GetData - // [3/23/2011] - //========================================================================= - const DrillerDOMParser::Data* DrillerDOMParser::Node::GetData(u32 dataName) const + //========================================================================= + // Node::GetData + // [3/23/2011] + //========================================================================= + const DrillerDOMParser::Data* DrillerDOMParser::Node::GetData(u32 dataName) const + { + const Data* dataNode = nullptr; + for (Node::DataListType::const_iterator i = m_data.begin(); i != m_data.end(); ++i) { - const Data* dataNode = nullptr; - for (Node::DataListType::const_iterator i = m_data.begin(); i != m_data.end(); ++i) + if (i->m_name == dataName) { - if (i->m_name == dataName) - { - dataNode = &*i; - break; - } + dataNode = &*i; + break; } - return dataNode; } + return dataNode; + } - //========================================================================= - // DrillerDOMParser - // [3/23/2011] - //========================================================================= - DrillerDOMParser::DrillerDOMParser(bool isPersistentInputData) - : DrillerSAXParser(TagCallbackType(this, &DrillerDOMParser::OnTag), DataCallbackType(this, &DrillerDOMParser::OnData)) - , m_isPersistentInputData(isPersistentInputData) + //========================================================================= + // DrillerDOMParser + // [3/23/2011] + //========================================================================= + DrillerDOMParser::DrillerDOMParser(bool isPersistentInputData) + : DrillerSAXParser(TagCallbackType(this, &DrillerDOMParser::OnTag), DataCallbackType(this, &DrillerDOMParser::OnData)) + , m_isPersistentInputData(isPersistentInputData) + { + m_root.m_name = 0; + m_root.m_parent = nullptr; + m_topNode = &m_root; + } + static int g_numFree = 0; + //========================================================================= + // ~DrillerDOMParser + // [3/23/2011] + //========================================================================= + DrillerDOMParser::~DrillerDOMParser() + { + DeleteNode(m_root); + } + + //========================================================================= + // OnTag + // [3/23/2011] + //========================================================================= + void + DrillerDOMParser::OnTag(AZ::u32 name, bool isOpen) + { + if (isOpen) { - m_root.m_name = 0; - m_root.m_parent = nullptr; - m_topNode = &m_root; + m_topNode->m_tags.push_back(); + Node& node = m_topNode->m_tags.back(); + node.m_name = name; + node.m_parent = m_topNode; + + m_topNode = &node; } - static int g_numFree = 0; - //========================================================================= - // ~DrillerDOMParser - // [3/23/2011] - //========================================================================= - DrillerDOMParser::~DrillerDOMParser() + else { - DeleteNode(m_root); + AZ_Assert(m_topNode->m_name == name, "We have opened tag with name 0x%08x and closing with name 0x%08x", m_topNode->m_name, name); + m_topNode = m_topNode->m_parent; } - - //========================================================================= - // OnTag - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::OnTag(AZ::u32 name, bool isOpen) - { - if (isOpen) - { - m_topNode->m_tags.push_back(); - Node& node = m_topNode->m_tags.back(); - node.m_name = name; - node.m_parent = m_topNode; - - m_topNode = &node; - } - else - { - AZ_Assert(m_topNode->m_name == name, "We have opened tag with name 0x%08x and closing with name 0x%08x", m_topNode->m_name, name); - m_topNode = m_topNode->m_parent; - } - } - //========================================================================= - // OnData - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::OnData(const Data& data) + } + //========================================================================= + // OnData + // [3/23/2011] + //========================================================================= + void + DrillerDOMParser::OnData(const Data& data) + { + Data de = data; + if (!m_isPersistentInputData) + { + de.m_data = azmalloc(data.m_dataSize, 1, OSAllocator); + memcpy(const_cast(de.m_data), data.m_data, data.m_dataSize); + } + m_topNode->m_data.push_back(de); + } + //========================================================================= + // DeleteNode + // [3/23/2011] + //========================================================================= + void + DrillerDOMParser::DeleteNode(Node& node) + { + if (!m_isPersistentInputData) { - Data de = data; - if (!m_isPersistentInputData) + for (Node::DataListType::iterator iter = node.m_data.begin(); iter != node.m_data.end(); ++iter) { - de.m_data = azmalloc(data.m_dataSize, 1, OSAllocator); - memcpy(const_cast(de.m_data), data.m_data, data.m_dataSize); + azfree(iter->m_data, OSAllocator, iter->m_dataSize); + ++g_numFree; } - m_topNode->m_data.push_back(de); + node.m_data.clear(); } - //========================================================================= - // DeleteNode - // [3/23/2011] - //========================================================================= - void - DrillerDOMParser::DeleteNode(Node& node) + for (Node::NodeListType::iterator iter = node.m_tags.begin(); iter != node.m_tags.end(); ++iter) { - if (!m_isPersistentInputData) - { - for (Node::DataListType::iterator iter = node.m_data.begin(); iter != node.m_data.end(); ++iter) - { - azfree(iter->m_data, OSAllocator, iter->m_dataSize); - ++g_numFree; - } - node.m_data.clear(); - } - for (Node::NodeListType::iterator iter = node.m_tags.begin(); iter != node.m_tags.end(); ++iter) - { - DeleteNode(*iter); - } - node.m_tags.clear(); + DeleteNode(*iter); } + node.m_tags.clear(); + } + + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// + // DrillerSAXParserHandler + ////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - // DrillerSAXParserHandler - ////////////////////////////////////////////////////////////////////////// - ////////////////////////////////////////////////////////////////////////// - - //========================================================================= - // DrillerSAXParserHandler - // [3/14/2013] - //========================================================================= - DrillerSAXParserHandler::DrillerSAXParserHandler(DrillerHandlerParser* rootHandler) - : DrillerSAXParser(TagCallbackType(this, &DrillerSAXParserHandler::OnTag), DataCallbackType(this, &DrillerSAXParserHandler::OnData)) + //========================================================================= + // DrillerSAXParserHandler + // [3/14/2013] + //========================================================================= + DrillerSAXParserHandler::DrillerSAXParserHandler(DrillerHandlerParser* rootHandler) + : DrillerSAXParser(TagCallbackType(this, &DrillerSAXParserHandler::OnTag), DataCallbackType(this, &DrillerSAXParserHandler::OnData)) + { + // Push the root element + m_stack.push_back(rootHandler); + } + + //========================================================================= + // OnTag + // [3/14/2013] + //========================================================================= + void DrillerSAXParserHandler::OnTag(u32 name, bool isOpen) + { + if (m_stack.empty()) { - // Push the root element - m_stack.push_back(rootHandler); + return; } - //========================================================================= - // OnTag - // [3/14/2013] - //========================================================================= - void DrillerSAXParserHandler::OnTag(u32 name, bool isOpen) + DrillerHandlerParser* childHandler = nullptr; + DrillerHandlerParser* currentHandler = m_stack.back(); + if (isOpen) { - if (m_stack.size() == 0) + if (currentHandler != nullptr) { - return; + childHandler = currentHandler->OnEnterTag(name); + AZ_Warning("Driller", !currentHandler->IsWarnOnUnsupportedTags() || childHandler != nullptr, "Could not find handler for tag 0x%08x", name); } - - DrillerHandlerParser* childHandler = nullptr; - DrillerHandlerParser* currentHandler = m_stack.back(); - if (isOpen) - { - if (currentHandler != nullptr) - { - childHandler = currentHandler->OnEnterTag(name); - AZ_Warning("Driller", !currentHandler->IsWarnOnUnsupportedTags() || childHandler != nullptr, "Could not find handler for tag 0x%08x", name); - } - m_stack.push_back(childHandler); - } - else + m_stack.push_back(childHandler); + } + else + { + m_stack.pop_back(); + if (!m_stack.empty()) { - m_stack.pop_back(); - if (m_stack.size() > 0) + DrillerHandlerParser* parentHandler = m_stack.back(); + if (parentHandler) { - DrillerHandlerParser* parentHandler = m_stack.back(); - if (parentHandler) - { - parentHandler->OnExitTag(currentHandler, name); - } + parentHandler->OnExitTag(currentHandler, name); } } } + } - //========================================================================= - // OnData - // [3/14/2013] - //========================================================================= - void DrillerSAXParserHandler::OnData(const DrillerSAXParser::Data& data) + //========================================================================= + // OnData + // [3/14/2013] + //========================================================================= + void DrillerSAXParserHandler::OnData(const DrillerSAXParser::Data& data) + { + if (m_stack.empty()) { - if (m_stack.size() == 0) - { - return; - } + return; + } - DrillerHandlerParser* currentHandler = m_stack.back(); - if (currentHandler) - { - currentHandler->OnData(data); - } + DrillerHandlerParser* currentHandler = m_stack.back(); + if (currentHandler) + { + currentHandler->OnData(data); } - } // namespace Debug -} // namespace AZ + } +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp b/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp index fb9f8841a2..7878ec6e9e 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressionBus.cpp @@ -8,38 +8,35 @@ #include -namespace AZ +namespace AZ::IO { - namespace IO + CompressionInfo::CompressionInfo(CompressionInfo&& rhs) { - CompressionInfo::CompressionInfo(CompressionInfo&& rhs) - { - *this = AZStd::move(rhs); - } + *this = AZStd::move(rhs); + } - CompressionInfo& CompressionInfo::operator=(CompressionInfo&& rhs) - { - m_decompressor = AZStd::move(rhs.m_decompressor); - m_archiveFilename = AZStd::move(rhs.m_archiveFilename); - m_compressionTag = rhs.m_compressionTag; - m_offset = rhs.m_offset; - m_compressedSize = rhs.m_compressedSize; - m_uncompressedSize = rhs.m_uncompressedSize; - m_conflictResolution = rhs.m_conflictResolution; - m_isCompressed = rhs.m_isCompressed; - m_isSharedPak = rhs.m_isSharedPak; + CompressionInfo& CompressionInfo::operator=(CompressionInfo&& rhs) + { + m_decompressor = AZStd::move(rhs.m_decompressor); + m_archiveFilename = AZStd::move(rhs.m_archiveFilename); + m_compressionTag = rhs.m_compressionTag; + m_offset = rhs.m_offset; + m_compressedSize = rhs.m_compressedSize; + m_uncompressedSize = rhs.m_uncompressedSize; + m_conflictResolution = rhs.m_conflictResolution; + m_isCompressed = rhs.m_isCompressed; + m_isSharedPak = rhs.m_isSharedPak; - return *this; - } + return *this; + } - namespace CompressionUtils + namespace CompressionUtils + { + bool FindCompressionInfo(CompressionInfo& info, const AZStd::string_view filename) { - bool FindCompressionInfo(CompressionInfo& info, const AZStd::string_view filename) - { - bool result = false; - CompressionBus::Broadcast(&CompressionBus::Events::FindCompressionInfo, result, info, filename); - return result; - } + bool result = false; + CompressionBus::Broadcast(&CompressionBus::Events::FindCompressionInfo, result, info, filename); + return result; } } -} +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Compressor.cpp b/Code/Framework/AzCore/AzCore/IO/Compressor.cpp index e223730ce8..16527422ad 100644 --- a/Code/Framework/AzCore/AzCore/IO/Compressor.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Compressor.cpp @@ -10,32 +10,29 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + //========================================================================= + // WriteHeaderAndData + // [12/13/2012] + //========================================================================= + bool Compressor::WriteHeaderAndData(CompressorStream* compressorStream) { - //========================================================================= - // WriteHeaderAndData - // [12/13/2012] - //========================================================================= - bool Compressor::WriteHeaderAndData(CompressorStream* compressorStream) + AZ_Assert(compressorStream->CanWrite(), "Stream is not open for write!"); + AZ_Assert(compressorStream->GetCompressorData(), "Stream doesn't have attached compressor, call WriteCompressed first!"); + AZ_Assert(compressorStream->GetCompressorData()->m_compressor == this, "Invalid compressor data! Data belongs to a different compressor"); + CompressorHeader header; + header.SetAZCS(); + header.m_compressorId = GetTypeId(); + header.m_uncompressedSize = compressorStream->GetCompressorData()->m_uncompressedSize; + AZStd::endian_swap(header.m_compressorId); + AZStd::endian_swap(header.m_uncompressedSize); + GenericStream* baseStream = compressorStream->GetWrappedStream(); + if (baseStream->WriteAtOffset(sizeof(CompressorHeader), &header, 0U) == sizeof(CompressorHeader)) { - AZ_Assert(compressorStream->CanWrite(), "Stream is not open for write!"); - AZ_Assert(compressorStream->GetCompressorData(), "Stream doesn't have attached compressor, call WriteCompressed first!"); - AZ_Assert(compressorStream->GetCompressorData()->m_compressor == this, "Invalid compressor data! Data belongs to a different compressor"); - CompressorHeader header; - header.SetAZCS(); - header.m_compressorId = GetTypeId(); - header.m_uncompressedSize = compressorStream->GetCompressorData()->m_uncompressedSize; - AZStd::endian_swap(header.m_compressorId); - AZStd::endian_swap(header.m_uncompressedSize); - GenericStream* baseStream = compressorStream->GetWrappedStream(); - if (baseStream->WriteAtOffset(sizeof(CompressorHeader), &header, 0U) == sizeof(CompressorHeader)) - { - return true; - } - - return false; + return true; } - } // namespace IO -} // namespace AZ + + return false; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Compressor.h b/Code/Framework/AzCore/AzCore/IO/Compressor.h index 9b910a0ea4..340366d82f 100644 --- a/Code/Framework/AzCore/AzCore/IO/Compressor.h +++ b/Code/Framework/AzCore/AzCore/IO/Compressor.h @@ -5,74 +5,67 @@ * SPDX-License-Identifier: Apache-2.0 OR MIT * */ -#ifndef AZCORE_IO_COMPRESSOR_H -#define AZCORE_IO_COMPRESSOR_H +#pragma once #include -namespace AZ +namespace AZ::IO { - namespace IO - { - class CompressorStream; + class CompressorStream; - /** - * Compressor/Decompressor base interface. - * Used for all stream compressors. - */ - class Compressor - { - public: - typedef AZ::u64 SizeType; - static const int m_maxHeaderSize = 4096; /// When we open a stream to check if it's compressed we read the first m_maxHeaderSize bytes. - - virtual ~Compressor() {} - /// Return compressor type id. - virtual AZ::u32 GetTypeId() const = 0; - /// Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize. - virtual bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) = 0; - /// Called when we are about to start writing to a compressed stream. (Must be called first to write compressor header) - virtual bool WriteHeaderAndData(CompressorStream* stream); - /// Forwarded function from the Device when we from a compressed stream. - virtual SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) = 0; - /// Forwarded function from the Device when we write to a compressed stream. - virtual SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1)) = 0; - /// Write a seek point. - virtual bool WriteSeekPoint(CompressorStream* stream) { (void)stream; return false; } - /// Initializes Compressor for writing data. - virtual bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) { (void)stream; (void)compressionLevel; (void)autoSeekDataSize; return false; } - /// Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards). - virtual bool Close(CompressorStream* stream) = 0; - }; + /** + * Compressor/Decompressor base interface. + * Used for all stream compressors. + */ + class Compressor + { + public: + typedef AZ::u64 SizeType; + static const int m_maxHeaderSize = 4096; /// When we open a stream to check if it's compressed we read the first m_maxHeaderSize bytes. - /** - * Base compressor data assigned for all compressors. - */ - class CompressorData - { - public: - virtual ~CompressorData() {} + virtual ~Compressor() {} + /// Return compressor type id. + virtual AZ::u32 GetTypeId() const = 0; + /// Called when we open a stream to Read for the first time. Data contains the first. dataSize <= m_maxHeaderSize. + virtual bool ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) = 0; + /// Called when we are about to start writing to a compressed stream. (Must be called first to write compressor header) + virtual bool WriteHeaderAndData(CompressorStream* stream); + /// Forwarded function from the Device when we from a compressed stream. + virtual SizeType Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) = 0; + /// Forwarded function from the Device when we write to a compressed stream. + virtual SizeType Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset = SizeType(-1)) = 0; + /// Write a seek point. + virtual bool WriteSeekPoint(CompressorStream* stream) { (void)stream; return false; } + /// Initializes Compressor for writing data. + virtual bool StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) { (void)stream; (void)compressionLevel; (void)autoSeekDataSize; return false; } + /// Called just before we close the stream. All compression data will be flushed and finalized. (You can't add data afterwards). + virtual bool Close(CompressorStream* stream) = 0; + }; - Compressor* m_compressor; - AZ::u64 m_uncompressedSize; - }; + /** + * Base compressor data assigned for all compressors. + */ + class CompressorData + { + public: + virtual ~CompressorData() {} - /** - * All data is stored in network order (big endian). - */ - struct CompressorHeader - { - CompressorHeader() { m_azcs[0] = 0; m_azcs[1] = 0; m_azcs[2] = 0; m_azcs[3] = 0; } + Compressor* m_compressor; + AZ::u64 m_uncompressedSize; + }; - inline bool IsValid() const { return (m_azcs[0] == 'A' && m_azcs[1] == 'Z' && m_azcs[2] == 'C' && m_azcs[3] == 'S'); } - void SetAZCS() { m_azcs[0] = 'A'; m_azcs[1] = 'Z'; m_azcs[2] = 'C'; m_azcs[3] = 'S'; } + /** + * All data is stored in network order (big endian). + */ + struct CompressorHeader + { + CompressorHeader() { m_azcs[0] = 0; m_azcs[1] = 0; m_azcs[2] = 0; m_azcs[3] = 0; } - char m_azcs[4]; ///< String contains 'AZCS' AmaZon Compressed Stream - AZ::u32 m_compressorId; ///< Compression method. - AZ::u64 m_uncompressedSize; ///< Uncompressed file size. - }; - } // namespace IO -} // namespace AZ + bool IsValid() const { return (m_azcs[0] == 'A' && m_azcs[1] == 'Z' && m_azcs[2] == 'C' && m_azcs[3] == 'S'); } + void SetAZCS() { m_azcs[0] = 'A'; m_azcs[1] = 'Z'; m_azcs[2] = 'C'; m_azcs[3] = 'S'; } -#endif // AZCORE_IO_COMPRESSOR_H -#pragma once + char m_azcs[4]; ///< String contains 'AZCS' AmaZon Compressed Stream + AZ::u32 m_compressorId; ///< Compression method. + AZ::u64 m_uncompressedSize; ///< Uncompressed file size. + }; +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp b/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp index 6f82cc428d..a1012ee404 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressorStream.cpp @@ -15,9 +15,7 @@ #include #include -namespace AZ -{ -namespace IO +namespace AZ::IO { /*! \brief Constructs a compressor stream using the supplied filename and OpenFlags to open a file on disk @@ -300,7 +298,4 @@ Compressor* CompressorStream::CreateCompressor(AZ::u32 compressorId) return m_compressor.get(); } -} // namespace IO -} // namespace AZ - - +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp b/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp index f973c0e95a..03a218dbfe 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressorZLib.cpp @@ -13,543 +13,540 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO - { - //========================================================================= - // CompressorZLib - // [12/13/2012] - //========================================================================= - CompressorZLib::CompressorZLib(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) - : m_lastReadStream(nullptr) - , m_lastReadStreamOffset(0) - , m_lastReadStreamSize(0) - , m_compressedDataBuffer(nullptr) - , m_compressedDataBufferSize(dataBufferSize) - , m_compressedDataBufferUseCount(0) - , m_decompressionCachePerStream(decompressionCachePerStream) + //========================================================================= + // CompressorZLib + // [12/13/2012] + //========================================================================= + CompressorZLib::CompressorZLib(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) + : m_lastReadStream(nullptr) + , m_lastReadStreamOffset(0) + , m_lastReadStreamSize(0) + , m_compressedDataBuffer(nullptr) + , m_compressedDataBufferSize(dataBufferSize) + , m_compressedDataBufferUseCount(0) + , m_decompressionCachePerStream(decompressionCachePerStream) + { + AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB!", dataBufferSize); + AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB!", decompressionCachePerStream); + } + + //========================================================================= + // !CompressorZLib + // [12/13/2012] + //========================================================================= + CompressorZLib::~CompressorZLib() + { + AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZLib has it's data buffer still referenced, it means that %d compressed streams have NOT closed! Freeing data...", m_compressedDataBufferUseCount); + while (m_compressedDataBufferUseCount) { - AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB!", dataBufferSize); - AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB!", decompressionCachePerStream); + ReleaseDataBuffer(); } + } - //========================================================================= - // !CompressorZLib - // [12/13/2012] - //========================================================================= - CompressorZLib::~CompressorZLib() + //========================================================================= + // GetTypeId + // [12/13/2012] + //========================================================================= + AZ::u32 CompressorZLib::TypeId() + { + return AZ_CRC("ZLib", 0x73887d3a); + } + + //========================================================================= + // ReadHeaderAndData + // [12/13/2012] + //========================================================================= + bool CompressorZLib::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) + { + if (stream->GetCompressorData() != nullptr) // we already have compressor data { - AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZLib has it's data buffer still referenced, it means that %d compressed streams have NOT closed! Freeing data...", m_compressedDataBufferUseCount); - while (m_compressedDataBufferUseCount) - { - ReleaseDataBuffer(); - } + return false; } - //========================================================================= - // GetTypeId - // [12/13/2012] - //========================================================================= - AZ::u32 CompressorZLib::TypeId() + // Read the ZLib header should be after the default compression header... + // We should not be in this function otherwise. + if (dataSize < sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)) { - return AZ_CRC("ZLib", 0x73887d3a); + AZ_Assert(false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d!", dataSize, sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)); + return false; } - //========================================================================= - // ReadHeaderAndData - // [12/13/2012] - //========================================================================= - bool CompressorZLib::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) - { - if (stream->GetCompressorData() != nullptr) // we already have compressor data - { - return false; - } + AcquireDataBuffer(); - // Read the ZLib header should be after the default compression header... - // We should not be in this function otherwise. - if (dataSize < sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)) - { - AZ_Assert(false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d!", dataSize, sizeof(CompressorZLibHeader) + sizeof(ZLib::Header)); - return false; - } + CompressorZLibHeader* hdr = reinterpret_cast(data); + AZStd::endian_swap(hdr->m_numSeekPoints); + dataSize -= sizeof(CompressorZLibHeader); + data += sizeof(CompressorZLibHeader); - AcquireDataBuffer(); + CompressorZLibData* zlibData = aznew CompressorZLibData; + zlibData->m_compressor = this; + zlibData->m_uncompressedSize = 0; + zlibData->m_zlibHeader = *reinterpret_cast(data); + dataSize -= sizeof(zlibData->m_zlibHeader); + data += sizeof(zlibData->m_zlibHeader); + zlibData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(ZLib::Header); // start after the headers - CompressorZLibHeader* hdr = reinterpret_cast(data); - AZStd::endian_swap(hdr->m_numSeekPoints); - dataSize -= sizeof(CompressorZLibHeader); - data += sizeof(CompressorZLibHeader); + AZ_Assert(hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream!"); - CompressorZLibData* zlibData = aznew CompressorZLibData; - zlibData->m_compressor = this; - zlibData->m_uncompressedSize = 0; - zlibData->m_zlibHeader = *reinterpret_cast(data); - dataSize -= sizeof(zlibData->m_zlibHeader); - data += sizeof(zlibData->m_zlibHeader); - zlibData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(ZLib::Header); // start after the headers + // go the end of the file and read all sync points. + SizeType compressedFileEnd = stream->GetLength(); + if (compressedFileEnd == 0) + { + delete zlibData; + return false; + } - AZ_Assert(hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream!"); + zlibData->m_seekPoints.resize(hdr->m_numSeekPoints); + SizeType dataToRead = sizeof(CompressorZLibSeekPoint) * static_cast(hdr->m_numSeekPoints); + SizeType seekPointOffset = compressedFileEnd - dataToRead; + AZ_Assert(seekPointOffset <= compressedFileEnd, "We have an invalid archive, this is impossible!"); + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->ReadAtOffset(dataToRead, zlibData->m_seekPoints.data(), seekPointOffset) != dataToRead) + { + delete zlibData; + return false; + } + for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) + { + AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); + AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); + } - // go the end of the file and read all sync points. - SizeType compressedFileEnd = stream->GetLength(); - if (compressedFileEnd == 0) - { - delete zlibData; - return false; - } + if (m_decompressionCachePerStream) + { + zlibData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); + } - zlibData->m_seekPoints.resize(hdr->m_numSeekPoints); - SizeType dataToRead = sizeof(CompressorZLibSeekPoint) * static_cast(hdr->m_numSeekPoints); - SizeType seekPointOffset = compressedFileEnd - dataToRead; - AZ_Assert(seekPointOffset <= compressedFileEnd, "We have an invalid archive, this is impossible!"); - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->ReadAtOffset(dataToRead, zlibData->m_seekPoints.data(), seekPointOffset) != dataToRead) - { - delete zlibData; - return false; - } - for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) - { - AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); - AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); - } + zlibData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. - if (m_decompressionCachePerStream) - { - zlibData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); - } + zlibData->m_zlib.StartDecompressor(&zlibData->m_zlibHeader); - zlibData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. + stream->SetCompressorData(zlibData); - zlibData->m_zlib.StartDecompressor(&zlibData->m_zlibHeader); + return true; + } - stream->SetCompressorData(zlibData); + //========================================================================= + // WriteHeaderAndData + // [12/13/2012] + //========================================================================= + bool CompressorZLib::WriteHeaderAndData(CompressorStream* stream) + { + if (!Compressor::WriteHeaderAndData(stream)) + { + return false; + } + CompressorZLibData* compressorData = static_cast(stream->GetCompressorData()); + CompressorZLibHeader header; + header.m_numSeekPoints = static_cast(compressorData->m_seekPoints.size()); + AZStd::endian_swap(header.m_numSeekPoints); + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) + { return true; } - //========================================================================= - // WriteHeaderAndData - // [12/13/2012] - //========================================================================= - bool CompressorZLib::WriteHeaderAndData(CompressorStream* stream) + return false; + } + + //========================================================================= + // FillFromDecompressCache + // [12/14/2012] + //========================================================================= + inline CompressorZLib::SizeType CompressorZLib::FillFromDecompressCache(CompressorZLibData* zlibData, void*& buffer, SizeType& byteSize, SizeType& offset) + { + SizeType firstOffsetInCache = zlibData->m_decompressedCacheOffset; + SizeType lastOffsetInCache = firstOffsetInCache + zlibData->m_decompressedCacheDataSize; + SizeType firstDataOffset = offset; + SizeType lastDataOffset = offset + byteSize; + SizeType numCopied = 0; + if (firstOffsetInCache < lastDataOffset && lastOffsetInCache > firstDataOffset) // check if there is data in the cache { - if (!Compressor::WriteHeaderAndData(stream)) + size_t copyOffsetStart = 0; + size_t copyOffsetEnd = zlibData->m_decompressedCacheDataSize; + + size_t bufferCopyOffset = 0; + + if (firstOffsetInCache < firstDataOffset) { - return false; + copyOffsetStart = static_cast(firstDataOffset - firstOffsetInCache); } - - CompressorZLibData* compressorData = static_cast(stream->GetCompressorData()); - CompressorZLibHeader header; - header.m_numSeekPoints = static_cast(compressorData->m_seekPoints.size()); - AZStd::endian_swap(header.m_numSeekPoints); - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) + else { - return true; + bufferCopyOffset = static_cast(firstOffsetInCache - firstDataOffset); } - return false; - } - - //========================================================================= - // FillFromDecompressCache - // [12/14/2012] - //========================================================================= - inline CompressorZLib::SizeType CompressorZLib::FillFromDecompressCache(CompressorZLibData* zlibData, void*& buffer, SizeType& byteSize, SizeType& offset) - { - SizeType firstOffsetInCache = zlibData->m_decompressedCacheOffset; - SizeType lastOffsetInCache = firstOffsetInCache + zlibData->m_decompressedCacheDataSize; - SizeType firstDataOffset = offset; - SizeType lastDataOffset = offset + byteSize; - SizeType numCopied = 0; - if (firstOffsetInCache < lastDataOffset && lastOffsetInCache > firstDataOffset) // check if there is data in the cache + if (lastOffsetInCache >= lastDataOffset) { - size_t copyOffsetStart = 0; - size_t copyOffsetEnd = zlibData->m_decompressedCacheDataSize; - - size_t bufferCopyOffset = 0; - - if (firstOffsetInCache < firstDataOffset) - { - copyOffsetStart = static_cast(firstDataOffset - firstOffsetInCache); - } - else - { - bufferCopyOffset = static_cast(firstOffsetInCache - firstDataOffset); - } - - if (lastOffsetInCache >= lastDataOffset) - { - copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); - } - else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) - { - return 0; - } + copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); + } + else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) + { + return 0; + } - numCopied = copyOffsetEnd - copyOffsetStart; - memcpy(static_cast(buffer) + bufferCopyOffset, zlibData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); + numCopied = copyOffsetEnd - copyOffsetStart; + memcpy(static_cast(buffer) + bufferCopyOffset, zlibData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); - // adjust pointers and sizes - byteSize -= numCopied; - if (bufferCopyOffset == 0) - { - // copied in the start - buffer = reinterpret_cast(buffer) + numCopied; - offset += numCopied; - } + // adjust pointers and sizes + byteSize -= numCopied; + if (bufferCopyOffset == 0) + { + // copied in the start + buffer = reinterpret_cast(buffer) + numCopied; + offset += numCopied; } - - return numCopied; } - //========================================================================= - // FillFromCompressedCache - // [12/17/2012] - //========================================================================= - inline CompressorZLib::SizeType CompressorZLib::FillCompressedBuffer(CompressorStream* stream) + return numCopied; + } + + //========================================================================= + // FillFromCompressedCache + // [12/17/2012] + //========================================================================= + inline CompressorZLib::SizeType CompressorZLib::FillCompressedBuffer(CompressorStream* stream) + { + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + SizeType dataFromBuffer = 0; + if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse { - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - SizeType dataFromBuffer = 0; - if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse + if (zlibData->m_decompressNextOffset > m_lastReadStreamOffset) { - if (zlibData->m_decompressNextOffset > m_lastReadStreamOffset) + SizeType offsetInCache = zlibData->m_decompressNextOffset - m_lastReadStreamOffset; + if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap { - SizeType offsetInCache = zlibData->m_decompressNextOffset - m_lastReadStreamOffset; - if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap - { - // copy the usable part at the start of the - SizeType toMove = m_lastReadStreamSize - offsetInCache; - memmove(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); - dataFromBuffer += toMove; - } + // copy the usable part at the start of the + SizeType toMove = m_lastReadStreamSize - offsetInCache; + memmove(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); + dataFromBuffer += toMove; } } + } - SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; - SizeType readOffset = zlibData->m_decompressNextOffset + dataFromBuffer; - if (readOffset + toReadFromStream > zlibData->m_decompressLastOffset) - { - // don't read pass the end - AZ_Assert(readOffset <= zlibData->m_decompressLastOffset, "Read offset should always be before the end of stream!"); - toReadFromStream = zlibData->m_decompressLastOffset - readOffset; - } - - SizeType numReadFromStream = 0; - if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream - { - GenericStream* baseStream = stream->GetWrappedStream(); - numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); - } - - // update what's actually in the read data buffer. - m_lastReadStream = stream; - m_lastReadStreamOffset = zlibData->m_decompressNextOffset; - m_lastReadStreamSize = dataFromBuffer + numReadFromStream; - return m_lastReadStreamSize; + SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; + SizeType readOffset = zlibData->m_decompressNextOffset + dataFromBuffer; + if (readOffset + toReadFromStream > zlibData->m_decompressLastOffset) + { + // don't read pass the end + AZ_Assert(readOffset <= zlibData->m_decompressLastOffset, "Read offset should always be before the end of stream!"); + toReadFromStream = zlibData->m_decompressLastOffset - readOffset; } - /** - * Helper class to find the best seek point for a specific offset. - */ - struct CompareUpper + SizeType numReadFromStream = 0; + if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream { - inline bool operator()(const AZ::u64& offset, const CompressorZLibSeekPoint& sp) const {return offset < sp.m_uncompressedOffset; } - }; - - //========================================================================= - // Read - // [12/13/2012] - //========================================================================= - CompressorZLib::SizeType CompressorZLib::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + GenericStream* baseStream = stream->GetWrappedStream(); + numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); + } + + // update what's actually in the read data buffer. + m_lastReadStream = stream; + m_lastReadStreamOffset = zlibData->m_decompressNextOffset; + m_lastReadStreamSize = dataFromBuffer + numReadFromStream; + return m_lastReadStreamSize; + } + + /** + * Helper class to find the best seek point for a specific offset. + */ + struct CompareUpper + { + inline bool operator()(const AZ::u64& offset, const CompressorZLibSeekPoint& sp) const {return offset < sp.m_uncompressedOffset; } + }; + + //========================================================================= + // Read + // [12/13/2012] + //========================================================================= + CompressorZLib::SizeType CompressorZLib::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + { + AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled!"); + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zlibData->m_zlib.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s!"); + + // check if the request can be finished from the decompressed cache + SizeType numRead = FillFromDecompressCache(zlibData, buffer, byteSize, offset); + if (byteSize == 0) // are we done { - AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled!"); - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zlibData->m_zlib.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s!"); + return numRead; + } - // check if the request can be finished from the decompressed cache - SizeType numRead = FillFromDecompressCache(zlibData, buffer, byteSize, offset); - if (byteSize == 0) // are we done - { - return numRead; - } + // find the best seek point for current offset + CompressorZLibData::SeekPointArray::iterator it = AZStd::upper_bound(zlibData->m_seekPoints.begin(), zlibData->m_seekPoints.end(), offset, CompareUpper()); + AZ_Assert(it != zlibData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset!"); + const CompressorZLibSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) - // find the best seek point for current offset - CompressorZLibData::SeekPointArray::iterator it = AZStd::upper_bound(zlibData->m_seekPoints.begin(), zlibData->m_seekPoints.end(), offset, CompareUpper()); - AZ_Assert(it != zlibData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset!"); - const CompressorZLibSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) + // if read is continuous continue with decompression + bool isJumpToSeekPoint = false; + SizeType lastOffsetInCache = zlibData->m_decompressedCacheOffset + zlibData->m_decompressedCacheDataSize; + if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. + { + isJumpToSeekPoint = true; + } + else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. + { + isJumpToSeekPoint = true; + } - // if read is continuous continue with decompression - bool isJumpToSeekPoint = false; - SizeType lastOffsetInCache = zlibData->m_decompressedCacheOffset + zlibData->m_decompressedCacheDataSize; - if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. - { - isJumpToSeekPoint = true; - } - else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. - { - isJumpToSeekPoint = true; - } + if (isJumpToSeekPoint) + { + zlibData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point + zlibData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset + zlibData->m_decompressedCacheDataSize = 0; // invalidate the cache + zlibData->m_zlib.ResetDecompressor(&zlibData->m_zlibHeader); // reset decompressor and setup the header. + } - if (isJumpToSeekPoint) + // decompress and move forward until the request is done + while (byteSize > 0) + { + // fill buffer with compressed data + SizeType compressedDataSize = FillCompressedBuffer(stream); + if (compressedDataSize == 0) { - zlibData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point - zlibData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset - zlibData->m_decompressedCacheDataSize = 0; // invalidate the cache - zlibData->m_zlib.ResetDecompressor(&zlibData->m_zlibHeader); // reset decompressor and setup the header. + return numRead; // we are done reading and obviously we did not managed to read all data } - - // decompress and move forward until the request is done - while (byteSize > 0) + unsigned int processedCompressedData = 0; + while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. { - // fill buffer with compressed data - SizeType compressedDataSize = FillCompressedBuffer(stream); - if (compressedDataSize == 0) - { - return numRead; // we are done reading and obviously we did not managed to read all data - } - unsigned int processedCompressedData = 0; - while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. + // if we have data in the cache move to the next offset, we always move forward by default. + zlibData->m_decompressedCacheOffset += zlibData->m_decompressedCacheDataSize; + + // decompress in the cache buffer + u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size + unsigned int processed = zlibData->m_zlib.Decompress(&m_compressedDataBuffer[processedCompressedData], static_cast(compressedDataSize) - processedCompressedData, zlibData->m_decompressedCache, availDecompressedCacheSize); + zlibData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; + if (processed == 0) { - // if we have data in the cache move to the next offset, we always move forward by default. - zlibData->m_decompressedCacheOffset += zlibData->m_decompressedCacheDataSize; - - // decompress in the cache buffer - u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size - unsigned int processed = zlibData->m_zlib.Decompress(&m_compressedDataBuffer[processedCompressedData], static_cast(compressedDataSize) - processedCompressedData, zlibData->m_decompressedCache, availDecompressedCacheSize); - zlibData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; - if (processed == 0) - { - break; // we processed everything we could, load more compressed data. - } - processedCompressedData += processed; - // fill what we can from the cache - numRead += FillFromDecompressCache(zlibData, buffer, byteSize, offset); + break; // we processed everything we could, load more compressed data. } - // update next read position the the compressed stream - zlibData->m_decompressNextOffset += processedCompressedData; + processedCompressedData += processed; + // fill what we can from the cache + numRead += FillFromDecompressCache(zlibData, buffer, byteSize, offset); } - return numRead; + // update next read position the the compressed stream + zlibData->m_decompressNextOffset += processedCompressedData; } + return numRead; + } + + //========================================================================= + // Write + // [12/13/2012] + //========================================================================= + CompressorZLib::SizeType CompressorZLib::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) + { + (void)offset; - //========================================================================= - // Write - // [12/13/2012] - //========================================================================= - CompressorZLib::SizeType CompressorZLib::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) - { - (void)offset; - - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); - AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream!"); + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); + AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream!"); - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zlibData->m_zlib.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream!"); + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zlibData->m_zlib.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream!"); - const u8* bytes = reinterpret_cast(data); - unsigned int dataToCompress = static_cast(byteSize); - while (dataToCompress != 0) + const u8* bytes = reinterpret_cast(data); + unsigned int dataToCompress = static_cast(byteSize); + while (dataToCompress != 0) + { + unsigned int oldDataToCompress = dataToCompress; + unsigned int compressedSize = zlibData->m_zlib.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); + if (compressedSize) { - unsigned int oldDataToCompress = dataToCompress; - unsigned int compressedSize = zlibData->m_zlib.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); - if (compressedSize) + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return numWritten; // error we could not write all data - } + return numWritten; // error we could not write all data } - bytes += oldDataToCompress - dataToCompress; } - zlibData->m_uncompressedSize += byteSize; + bytes += oldDataToCompress - dataToCompress; + } + zlibData->m_uncompressedSize += byteSize; - if (zlibData->m_autoSeekSize > 0) + if (zlibData->m_autoSeekSize > 0) + { + // insert a seek point if needed. + if (zlibData->m_seekPoints.empty()) { - // insert a seek point if needed. - if (zlibData->m_seekPoints.empty()) - { - if (zlibData->m_uncompressedSize >= zlibData->m_autoSeekSize) - { - WriteSeekPoint(stream); - } - } - else if ((zlibData->m_uncompressedSize - zlibData->m_seekPoints.back().m_uncompressedOffset) > zlibData->m_autoSeekSize) + if (zlibData->m_uncompressedSize >= zlibData->m_autoSeekSize) { WriteSeekPoint(stream); } } - return byteSize; + else if ((zlibData->m_uncompressedSize - zlibData->m_seekPoints.back().m_uncompressedOffset) > zlibData->m_autoSeekSize) + { + WriteSeekPoint(stream); + } } + return byteSize; + } + + //========================================================================= + // WriteSeekPoint + // [12/13/2012] + //========================================================================= + bool CompressorZLib::WriteSeekPoint(CompressorStream* stream) + { + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - //========================================================================= - // WriteSeekPoint - // [12/13/2012] - //========================================================================= - bool CompressorZLib::WriteSeekPoint(CompressorStream* stream) - { - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled! Call Stream::WriteCompressed after you create the file!"); - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - unsigned int compressedSize; - unsigned int dataToCompress = 0; - do + unsigned int compressedSize; + unsigned int dataToCompress = 0; + do + { + compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FULL_FLUSH); + if (compressedSize) { - compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FULL_FLUSH); - if (compressedSize) + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return false; // error we wrote less than than requested! - } + return false; // error we wrote less than than requested! } - } while (dataToCompress != 0); - - CompressorZLibSeekPoint sp; - sp.m_compressedOffset = stream->GetLength(); - sp.m_uncompressedOffset = zlibData->m_uncompressedSize; - zlibData->m_seekPoints.push_back(sp); - return true; - } - - //========================================================================= - // StartCompressor - // [12/13/2012] - //========================================================================= - bool CompressorZLib::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) - { - AZ_Assert(stream && stream->GetCompressorData() == nullptr, "Stream has compressor already enabled!"); + } + } while (dataToCompress != 0); + + CompressorZLibSeekPoint sp; + sp.m_compressedOffset = stream->GetLength(); + sp.m_uncompressedOffset = zlibData->m_uncompressedSize; + zlibData->m_seekPoints.push_back(sp); + return true; + } + + //========================================================================= + // StartCompressor + // [12/13/2012] + //========================================================================= + bool CompressorZLib::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) + { + AZ_Assert(stream && stream->GetCompressorData() == nullptr, "Stream has compressor already enabled!"); - AcquireDataBuffer(); + AcquireDataBuffer(); - CompressorZLibData* zlibData = aznew CompressorZLibData; - zlibData->m_compressor = this; - zlibData->m_zlibHeader = 0; // not used for compression - zlibData->m_uncompressedSize = 0; - zlibData->m_autoSeekSize = autoSeekDataSize; - compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels + CompressorZLibData* zlibData = aznew CompressorZLibData; + zlibData->m_compressor = this; + zlibData->m_zlibHeader = 0; // not used for compression + zlibData->m_uncompressedSize = 0; + zlibData->m_autoSeekSize = autoSeekDataSize; + compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels - zlibData->m_zlib.StartCompressor(compressionLevel); + zlibData->m_zlib.StartCompressor(compressionLevel); - stream->SetCompressorData(zlibData); + stream->SetCompressorData(zlibData); - if (WriteHeaderAndData(stream)) - { - // add the first and always present seek point at the start of the compressed stream - CompressorZLibSeekPoint sp; - sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(zlibData->m_zlibHeader); - sp.m_uncompressedOffset = 0; - zlibData->m_seekPoints.push_back(sp); - return true; - } - return false; + if (WriteHeaderAndData(stream)) + { + // add the first and always present seek point at the start of the compressed stream + CompressorZLibSeekPoint sp; + sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZLibHeader) + sizeof(zlibData->m_zlibHeader); + sp.m_uncompressedOffset = 0; + zlibData->m_seekPoints.push_back(sp); + return true; } + return false; + } + + //========================================================================= + // Close + // [12/13/2012] + //========================================================================= + bool CompressorZLib::Close(CompressorStream* stream) + { + AZ_Assert(stream->IsOpen(), "Stream is not open to be closed!"); - //========================================================================= - // Close - // [12/13/2012] - //========================================================================= - bool CompressorZLib::Close(CompressorStream* stream) - { - AZ_Assert(stream->IsOpen(), "Stream is not open to be closed!"); + CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); + GenericStream* baseStream = stream->GetWrappedStream(); - CompressorZLibData* zlibData = static_cast(stream->GetCompressorData()); - GenericStream* baseStream = stream->GetWrappedStream(); + bool result = true; + if (zlibData->m_zlib.IsCompressorStarted()) + { + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - bool result = true; - if (zlibData->m_zlib.IsCompressorStarted()) + // flush all compressed data + unsigned int compressedSize; + unsigned int dataToCompress = 0; + do { - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - - // flush all compressed data - unsigned int compressedSize; - unsigned int dataToCompress = 0; - do - { - compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FINISH); - if (compressedSize) - { - baseStream->Write(compressedSize, m_compressedDataBuffer); - } - } while (dataToCompress != 0); - - result = WriteHeaderAndData(stream); - if (result) + compressedSize = zlibData->m_zlib.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZLib::FT_FINISH); + if (compressedSize) { - // now write the seek points and the end of the file - for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) - { - AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); - AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); - } - SizeType dataToWrite = zlibData->m_seekPoints.size() * sizeof(CompressorZLibSeekPoint); - baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); - result = (baseStream->Write(dataToWrite, zlibData->m_seekPoints.data()) == dataToWrite); + baseStream->Write(compressedSize, m_compressedDataBuffer); } - } - else + } while (dataToCompress != 0); + + result = WriteHeaderAndData(stream); + if (result) { - if (m_lastReadStream == stream) + // now write the seek points and the end of the file + for (size_t i = 0; i < zlibData->m_seekPoints.size(); ++i) { - m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. + AZStd::endian_swap(zlibData->m_seekPoints[i].m_compressedOffset); + AZStd::endian_swap(zlibData->m_seekPoints[i].m_uncompressedOffset); } + SizeType dataToWrite = zlibData->m_seekPoints.size() * sizeof(CompressorZLibSeekPoint); + baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); + result = (baseStream->Write(dataToWrite, zlibData->m_seekPoints.data()) == dataToWrite); } - - // if we have decompressor cache delete it - if (zlibData->m_decompressedCache) + } + else + { + if (m_lastReadStream == stream) { - azfree(zlibData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); + m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. } - - ReleaseDataBuffer(); - - // last step reset strream compressor data. - stream->SetCompressorData(nullptr); - return result; } - //========================================================================= - // AcquireDataBuffer - // [2/27/2013] - //========================================================================= - void CompressorZLib::AcquireDataBuffer() + // if we have decompressor cache delete it + if (zlibData->m_decompressedCache) { - if (m_compressedDataBuffer == nullptr) - { - AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); - m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer - } - ++m_compressedDataBufferUseCount; + azfree(zlibData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); } - //========================================================================= - // ReleaseDataBuffer - // [2/27/2013] - //========================================================================= - void CompressorZLib::ReleaseDataBuffer() + ReleaseDataBuffer(); + + // last step reset strream compressor data. + stream->SetCompressorData(nullptr); + return result; + } + + //========================================================================= + // AcquireDataBuffer + // [2/27/2013] + //========================================================================= + void CompressorZLib::AcquireDataBuffer() + { + if (m_compressedDataBuffer == nullptr) { - --m_compressedDataBufferUseCount; - if (m_compressedDataBufferUseCount == 0) - { - AZ_Assert(m_compressedDataBuffer != nullptr, "Invalid data buffer! We should have a non null pointer!"); - azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); - m_compressedDataBuffer = nullptr; - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer - } + AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); + m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZLib")); + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer + } + ++m_compressedDataBufferUseCount; + } + + //========================================================================= + // ReleaseDataBuffer + // [2/27/2013] + //========================================================================= + void CompressorZLib::ReleaseDataBuffer() + { + --m_compressedDataBufferUseCount; + if (m_compressedDataBufferUseCount == 0) + { + AZ_Assert(m_compressedDataBuffer != nullptr, "Invalid data buffer! We should have a non null pointer!"); + azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); + m_compressedDataBuffer = nullptr; + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer } - } // namespace IO -} // namespace AZ + } +} // namespace AZ::IO #endif // #if !defined(AZCORE_EXCLUDE_ZLIB) diff --git a/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp b/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp index b1631d2d22..91f380d73b 100644 --- a/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp +++ b/Code/Framework/AzCore/AzCore/IO/CompressorZStd.cpp @@ -14,478 +14,475 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + CompressorZStd::CompressorZStd(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) + : m_compressedDataBufferSize(dataBufferSize) + , m_decompressionCachePerStream(decompressionCachePerStream) + { - CompressorZStd::CompressorZStd(unsigned int decompressionCachePerStream, unsigned int dataBufferSize) - : m_compressedDataBufferSize(dataBufferSize) - , m_decompressionCachePerStream(decompressionCachePerStream) + AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB.", dataBufferSize); + AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB.", decompressionCachePerStream); + } + CompressorZStd::~CompressorZStd() + { + AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZStd has it's data buffer still referenced, it means that %d compressed streams have NOT closed. Freeing data...", m_compressedDataBufferUseCount); + while (m_compressedDataBufferUseCount) { - AZ_Assert((dataBufferSize % (32 * 1024)) == 0, "Data buffer size %d must be multiple of 32 KB.", dataBufferSize); - AZ_Assert((decompressionCachePerStream % (32 * 1024)) == 0, "Decompress cache size %d must be multiple of 32 KB.", decompressionCachePerStream); + ReleaseDataBuffer(); } + } - CompressorZStd::~CompressorZStd() + AZ::u32 CompressorZStd::TypeId() + { + return AZ_CRC("ZStd", 0x72fd505e); + } + + bool CompressorZStd::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) + { + if (stream->GetCompressorData() != nullptr) // we already have compressor data { - AZ_Warning("IO", m_compressedDataBufferUseCount == 0, "CompressorZStd has it's data buffer still referenced, it means that %d compressed streams have NOT closed. Freeing data...", m_compressedDataBufferUseCount); - while (m_compressedDataBufferUseCount) - { - ReleaseDataBuffer(); - } + return false; } - AZ::u32 CompressorZStd::TypeId() + // Read the ZStd header should be after the default compression header... + // We should not be in this function otherwise. + if (dataSize < sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)) { - return AZ_CRC("ZStd", 0x72fd505e); + AZ_Error("CompressorZStd", false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d.", dataSize, sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)); + return false; } - bool CompressorZStd::ReadHeaderAndData(CompressorStream* stream, AZ::u8* data, unsigned int dataSize) - { - if (stream->GetCompressorData() != nullptr) // we already have compressor data - { - return false; - } + AcquireDataBuffer(); - // Read the ZStd header should be after the default compression header... - // We should not be in this function otherwise. - if (dataSize < sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)) - { - AZ_Error("CompressorZStd", false, "We did not read enough data, we have only %d bytes left in the buffer and we need %d.", dataSize, sizeof(CompressorZStdHeader) + sizeof(ZStd::Header)); - return false; - } + CompressorZStdHeader* hdr = reinterpret_cast(data); + dataSize -= sizeof(CompressorZStdHeader); + data += sizeof(CompressorZStdHeader); - AcquireDataBuffer(); + AZStd::unique_ptr zstdData = AZStd::make_unique(); + zstdData->m_compressor = this; + zstdData->m_uncompressedSize = 0; + zstdData->m_zstdHeader = *reinterpret_cast(data); + dataSize -= sizeof(zstdData->m_zstdHeader); + data += sizeof(zstdData->m_zstdHeader); + zstdData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(ZStd::Header); // start after the headers - CompressorZStdHeader* hdr = reinterpret_cast(data); - dataSize -= sizeof(CompressorZStdHeader); - data += sizeof(CompressorZStdHeader); + AZ_Error("CompressorZStd", hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream."); - AZStd::unique_ptr zstdData = AZStd::make_unique(); - zstdData->m_compressor = this; - zstdData->m_uncompressedSize = 0; - zstdData->m_zstdHeader = *reinterpret_cast(data); - dataSize -= sizeof(zstdData->m_zstdHeader); - data += sizeof(zstdData->m_zstdHeader); - zstdData->m_decompressNextOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(ZStd::Header); // start after the headers + // go the end of the file and read all sync points. + SizeType compressedFileEnd = stream->GetLength(); + if (compressedFileEnd == 0) + { + return false; + } - AZ_Error("CompressorZStd", hdr->m_numSeekPoints > 0, "We should have at least one seek point for the entire stream."); + zstdData->m_seekPoints.resize(hdr->m_numSeekPoints); + SizeType dataToRead = sizeof(CompressorZStdSeekPoint) * static_cast(hdr->m_numSeekPoints); + SizeType seekPointOffset = compressedFileEnd - dataToRead; - // go the end of the file and read all sync points. - SizeType compressedFileEnd = stream->GetLength(); - if (compressedFileEnd == 0) - { - return false; - } + if (seekPointOffset > compressedFileEnd) + { + AZ_Error("CompressorZStd", false, "We have an invalid archive, this is impossible."); + return false; + } - zstdData->m_seekPoints.resize(hdr->m_numSeekPoints); - SizeType dataToRead = sizeof(CompressorZStdSeekPoint) * static_cast(hdr->m_numSeekPoints); - SizeType seekPointOffset = compressedFileEnd - dataToRead; + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->ReadAtOffset(dataToRead, zstdData->m_seekPoints.data(), seekPointOffset) != dataToRead) + { + return false; + } - if (seekPointOffset > compressedFileEnd) - { - AZ_Error("CompressorZStd", false, "We have an invalid archive, this is impossible."); - return false; - } + if (m_decompressionCachePerStream) + { + zstdData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); + } - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->ReadAtOffset(dataToRead, zstdData->m_seekPoints.data(), seekPointOffset) != dataToRead) - { - return false; - } + zstdData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. - if (m_decompressionCachePerStream) - { - zstdData->m_decompressedCache = reinterpret_cast(azmalloc(m_decompressionCachePerStream, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); - } + zstdData->m_zstd.StartDecompressor(); - zstdData->m_decompressLastOffset = seekPointOffset; // set the start address of the seek points as the last valid read address for the compressed stream. + stream->SetCompressorData(zstdData.release()); - zstdData->m_zstd.StartDecompressor(); + return true; + } - stream->SetCompressorData(zstdData.release()); + bool CompressorZStd::WriteHeaderAndData(CompressorStream* stream) + { + if (!Compressor::WriteHeaderAndData(stream)) + { + return false; + } + CompressorZStdData* compressorData = static_cast(stream->GetCompressorData()); + CompressorZStdHeader header; + header.m_numSeekPoints = aznumeric_caster(compressorData->m_seekPoints.size()); + GenericStream* baseStream = stream->GetWrappedStream(); + if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) + { return true; } - bool CompressorZStd::WriteHeaderAndData(CompressorStream* stream) + return false; + } + + inline CompressorZStd::SizeType CompressorZStd::FillFromDecompressCache(CompressorZStdData* zstdData, void*& buffer, SizeType& byteSize, SizeType& offset) + { + SizeType firstOffsetInCache = zstdData->m_decompressedCacheOffset; + SizeType lastOffsetInCache = firstOffsetInCache + zstdData->m_decompressedCacheDataSize; + SizeType firstDataOffset = offset; + SizeType lastDataOffset = offset + byteSize; + SizeType numCopied = 0; + if (firstOffsetInCache < lastDataOffset && lastOffsetInCache >= firstDataOffset) // check if there is data in the cache { - if (!Compressor::WriteHeaderAndData(stream)) + size_t copyOffsetStart = 0; + size_t copyOffsetEnd = zstdData->m_decompressedCacheDataSize; + + size_t bufferCopyOffset = 0; + + if (firstOffsetInCache < firstDataOffset) { - return false; + copyOffsetStart = aznumeric_caster(firstDataOffset - firstOffsetInCache); } - - CompressorZStdData* compressorData = static_cast(stream->GetCompressorData()); - CompressorZStdHeader header; - header.m_numSeekPoints = aznumeric_caster(compressorData->m_seekPoints.size()); - GenericStream* baseStream = stream->GetWrappedStream(); - if (baseStream->WriteAtOffset(sizeof(header), &header, sizeof(CompressorHeader)) == sizeof(header)) + else { - return true; + bufferCopyOffset = aznumeric_caster(firstOffsetInCache - firstDataOffset); } - return false; - } - - inline CompressorZStd::SizeType CompressorZStd::FillFromDecompressCache(CompressorZStdData* zstdData, void*& buffer, SizeType& byteSize, SizeType& offset) - { - SizeType firstOffsetInCache = zstdData->m_decompressedCacheOffset; - SizeType lastOffsetInCache = firstOffsetInCache + zstdData->m_decompressedCacheDataSize; - SizeType firstDataOffset = offset; - SizeType lastDataOffset = offset + byteSize; - SizeType numCopied = 0; - if (firstOffsetInCache < lastDataOffset && lastOffsetInCache >= firstDataOffset) // check if there is data in the cache + if (lastOffsetInCache >= lastDataOffset) { - size_t copyOffsetStart = 0; - size_t copyOffsetEnd = zstdData->m_decompressedCacheDataSize; - - size_t bufferCopyOffset = 0; - - if (firstOffsetInCache < firstDataOffset) - { - copyOffsetStart = aznumeric_caster(firstDataOffset - firstOffsetInCache); - } - else - { - bufferCopyOffset = aznumeric_caster(firstOffsetInCache - firstDataOffset); - } - - if (lastOffsetInCache >= lastDataOffset) - { - copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); - } - else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) - { - return 0; - } + copyOffsetEnd -= static_cast(lastOffsetInCache - lastDataOffset); + } + else if (bufferCopyOffset > 0) // the cache block is in the middle of the data, we can't use it (since we need to split buffer request into 2) + { + return 0; + } - numCopied = copyOffsetEnd - copyOffsetStart; - memcpy(static_cast(buffer) + bufferCopyOffset, zstdData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); + numCopied = copyOffsetEnd - copyOffsetStart; + memcpy(static_cast(buffer) + bufferCopyOffset, zstdData->m_decompressedCache + copyOffsetStart, static_cast(numCopied)); - // adjust pointers and sizes - byteSize -= numCopied; - if (bufferCopyOffset == 0) - { - // copied in the start - buffer = reinterpret_cast(buffer) + numCopied; - offset += numCopied; - } + // adjust pointers and sizes + byteSize -= numCopied; + if (bufferCopyOffset == 0) + { + // copied in the start + buffer = reinterpret_cast(buffer) + numCopied; + offset += numCopied; } - - return numCopied; } - inline CompressorZStd::SizeType CompressorZStd::FillCompressedBuffer(CompressorStream* stream) + return numCopied; + } + + inline CompressorZStd::SizeType CompressorZStd::FillCompressedBuffer(CompressorStream* stream) + { + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + SizeType dataFromBuffer = 0; + if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse { - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - SizeType dataFromBuffer = 0; - if (stream == m_lastReadStream) // if the buffer is filled with data from the current stream, try to reuse + if (zstdData->m_decompressNextOffset > m_lastReadStreamOffset) { - if (zstdData->m_decompressNextOffset > m_lastReadStreamOffset) + SizeType offsetInCache = zstdData->m_decompressNextOffset - m_lastReadStreamOffset; + if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap { - SizeType offsetInCache = zstdData->m_decompressNextOffset - m_lastReadStreamOffset; - if (offsetInCache < m_lastReadStreamSize) // last check if there is data overlap - { - // copy the usable part at the start of the buffer - SizeType toMove = m_lastReadStreamSize - offsetInCache; - memcpy(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); - dataFromBuffer += toMove; - } + // copy the usable part at the start of the buffer + SizeType toMove = m_lastReadStreamSize - offsetInCache; + memcpy(m_compressedDataBuffer, &m_compressedDataBuffer[static_cast(offsetInCache)], static_cast(toMove)); + dataFromBuffer += toMove; } } + } - SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; - SizeType readOffset = zstdData->m_decompressNextOffset + dataFromBuffer; - if (readOffset + toReadFromStream > zstdData->m_decompressLastOffset) - { - // don't read past the end - AZ_Assert(readOffset <= zstdData->m_decompressLastOffset, "Read offset should always be before the end of stream."); - toReadFromStream = zstdData->m_decompressLastOffset - readOffset; - } - - SizeType numReadFromStream = 0; - if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream - { - GenericStream* baseStream = stream->GetWrappedStream(); - numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); - } + SizeType toReadFromStream = m_compressedDataBufferSize - dataFromBuffer; + SizeType readOffset = zstdData->m_decompressNextOffset + dataFromBuffer; + if (readOffset + toReadFromStream > zstdData->m_decompressLastOffset) + { + // don't read past the end + AZ_Assert(readOffset <= zstdData->m_decompressLastOffset, "Read offset should always be before the end of stream."); + toReadFromStream = zstdData->m_decompressLastOffset - readOffset; + } - // update what's actually in the read data buffer. - m_lastReadStream = stream; - m_lastReadStreamOffset = zstdData->m_decompressNextOffset; - m_lastReadStreamSize = dataFromBuffer + numReadFromStream; - return m_lastReadStreamSize; + SizeType numReadFromStream = 0; + if (toReadFromStream) // if we did not reuse the whole buffer, read some data from the stream + { + GenericStream* baseStream = stream->GetWrappedStream(); + numReadFromStream = baseStream->ReadAtOffset(toReadFromStream, &m_compressedDataBuffer[static_cast(dataFromBuffer)], readOffset); } - struct ZStdCompareUpper + // update what's actually in the read data buffer. + m_lastReadStream = stream; + m_lastReadStreamOffset = zstdData->m_decompressNextOffset; + m_lastReadStreamSize = dataFromBuffer + numReadFromStream; + return m_lastReadStreamSize; + } + + struct ZStdCompareUpper + { + bool operator()(const AZ::u64& offset, const CompressorZStdSeekPoint& sp) const { - bool operator()(const AZ::u64& offset, const CompressorZStdSeekPoint& sp) const - { - return offset < sp.m_uncompressedOffset; - } - }; + return offset < sp.m_uncompressedOffset; + } + }; + + CompressorZStd::SizeType CompressorZStd::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + { + AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled."); + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zstdData->m_zstd.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s."); - CompressorZStd::SizeType CompressorZStd::Read(CompressorStream* stream, SizeType byteSize, SizeType offset, void* buffer) + // check if the request can be finished from the decompressed cache + SizeType numRead = FillFromDecompressCache(zstdData, buffer, byteSize, offset); + if (byteSize == 0) // are we done { - AZ_Assert(stream->GetCompressorData(), "This stream doesn't have decompression enabled."); - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zstdData->m_zstd.IsCompressorStarted(), "You can't read/decompress while writing a compressed stream %s."); + return numRead; + } - // check if the request can be finished from the decompressed cache - SizeType numRead = FillFromDecompressCache(zstdData, buffer, byteSize, offset); - if (byteSize == 0) // are we done - { - return numRead; - } + // find the best seek point for current offset + CompressorZStdData::SeekPointArray::iterator it = AZStd::upper_bound(zstdData->m_seekPoints.begin(), zstdData->m_seekPoints.end(), offset, ZStdCompareUpper()); + AZ_Assert(it != zstdData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset."); + const CompressorZStdSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) - // find the best seek point for current offset - CompressorZStdData::SeekPointArray::iterator it = AZStd::upper_bound(zstdData->m_seekPoints.begin(), zstdData->m_seekPoints.end(), offset, ZStdCompareUpper()); - AZ_Assert(it != zstdData->m_seekPoints.begin(), "This should be impossible, we should always have a valid seek point at 0 offset."); - const CompressorZStdSeekPoint& bestSeekPoint = *(--it); // get the previous (so it includes the current offset) + // if read is continuous continue with decompression + bool isJumpToSeekPoint = false; + SizeType lastOffsetInCache = zstdData->m_decompressedCacheOffset + zstdData->m_decompressedCacheDataSize; + if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. + { + isJumpToSeekPoint = true; + } + else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. + { + isJumpToSeekPoint = true; + } - // if read is continuous continue with decompression - bool isJumpToSeekPoint = false; - SizeType lastOffsetInCache = zstdData->m_decompressedCacheOffset + zstdData->m_decompressedCacheDataSize; - if (bestSeekPoint.m_uncompressedOffset > lastOffsetInCache) // if the best seek point is forward, jump forward to it. - { - isJumpToSeekPoint = true; - } - else if (offset < lastOffsetInCache) // if the seek point is in the past and the requested offset is not in the cache jump back to it. - { - isJumpToSeekPoint = true; - } + if (isJumpToSeekPoint) + { + zstdData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point + zstdData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset + zstdData->m_decompressedCacheDataSize = 0; // invalidate the cache + zstdData->m_zstd.ResetDecompressor(&zstdData->m_zstdHeader); // reset decompressor and setup the header. + } - if (isJumpToSeekPoint) + // decompress and move forward until the request is done + while (byteSize > 0) + { + // fill buffer with compressed data + SizeType compressedDataSize = FillCompressedBuffer(stream); + if (compressedDataSize == 0) { - zstdData->m_decompressNextOffset = bestSeekPoint.m_compressedOffset; // set next read point - zstdData->m_decompressedCacheOffset = bestSeekPoint.m_uncompressedOffset; // set uncompressed offset - zstdData->m_decompressedCacheDataSize = 0; // invalidate the cache - zstdData->m_zstd.ResetDecompressor(&zstdData->m_zstdHeader); // reset decompressor and setup the header. + return numRead; // we are done reading and obviously we did not managed to read all data } - - // decompress and move forward until the request is done - while (byteSize > 0) + unsigned int processedCompressedData = 0; + while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. { - // fill buffer with compressed data - SizeType compressedDataSize = FillCompressedBuffer(stream); - if (compressedDataSize == 0) + // if we have data in the cache move to the next offset, we always move forward by default. + zstdData->m_decompressedCacheOffset += zstdData->m_decompressedCacheDataSize; + + // decompress in the cache buffer + u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size + size_t nextBlockSize; + unsigned int processed = zstdData->m_zstd.Decompress(&m_compressedDataBuffer[processedCompressedData], + static_cast(compressedDataSize) - processedCompressedData, + zstdData->m_decompressedCache, + availDecompressedCacheSize, + &nextBlockSize); + zstdData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; + if (processed == 0) { - return numRead; // we are done reading and obviously we did not managed to read all data + break; // we processed everything we could, load more compressed data. } - unsigned int processedCompressedData = 0; - while (byteSize > 0 && processedCompressedData < compressedDataSize) // decompressed data either until we are done with the request (byteSize == 0) or we need to fill the compression buffer again. - { - // if we have data in the cache move to the next offset, we always move forward by default. - zstdData->m_decompressedCacheOffset += zstdData->m_decompressedCacheDataSize; - - // decompress in the cache buffer - u32 availDecompressedCacheSize = m_decompressionCachePerStream; // reset buffer size - size_t nextBlockSize; - unsigned int processed = zstdData->m_zstd.Decompress(&m_compressedDataBuffer[processedCompressedData], - static_cast(compressedDataSize) - processedCompressedData, - zstdData->m_decompressedCache, - availDecompressedCacheSize, - &nextBlockSize); - zstdData->m_decompressedCacheDataSize = m_decompressionCachePerStream - availDecompressedCacheSize; - if (processed == 0) - { - break; // we processed everything we could, load more compressed data. - } - processedCompressedData += processed; - // fill what we can from the cache - numRead += FillFromDecompressCache(zstdData, buffer, byteSize, offset); - } - // update next read position the the compressed stream - zstdData->m_decompressNextOffset += processedCompressedData; + processedCompressedData += processed; + // fill what we can from the cache + numRead += FillFromDecompressCache(zstdData, buffer, byteSize, offset); } - return numRead; + // update next read position the the compressed stream + zstdData->m_decompressNextOffset += processedCompressedData; } + return numRead; + } - CompressorZStd::SizeType CompressorZStd::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) - { - AZ_UNUSED(offset); + CompressorZStd::SizeType CompressorZStd::Write(CompressorStream* stream, SizeType byteSize, const void* data, SizeType offset) + { + AZ_UNUSED(offset); - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); - AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream."); + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); + AZ_Assert(offset == SizeType(-1) || offset == stream->GetCurPos(), "We can write compressed data only at the end of the stream."); - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - AZ_Assert(!zstdData->m_zstd.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream."); + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + AZ_Assert(!zstdData->m_zstd.IsDecompressorStarted(), "You can't write while reading/decompressing a compressed stream."); - const u8* bytes = reinterpret_cast(data); - unsigned int dataToCompress = aznumeric_caster(byteSize); - while (dataToCompress != 0) + const u8* bytes = reinterpret_cast(data); + unsigned int dataToCompress = aznumeric_caster(byteSize); + while (dataToCompress != 0) + { + unsigned int oldDataToCompress = dataToCompress; + unsigned int compressedSize = zstdData->m_zstd.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); + if (compressedSize) { - unsigned int oldDataToCompress = dataToCompress; - unsigned int compressedSize = zstdData->m_zstd.Compress(bytes, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize); - if (compressedSize) + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return numWritten; // error we could not write all data - } + return numWritten; // error we could not write all data } - bytes += oldDataToCompress - dataToCompress; } - zstdData->m_uncompressedSize += byteSize; + bytes += oldDataToCompress - dataToCompress; + } + zstdData->m_uncompressedSize += byteSize; - if (zstdData->m_autoSeekSize > 0) + if (zstdData->m_autoSeekSize > 0) + { + // insert a seek point if needed. + if (zstdData->m_seekPoints.empty()) { - // insert a seek point if needed. - if (zstdData->m_seekPoints.empty()) - { - if (zstdData->m_uncompressedSize >= zstdData->m_autoSeekSize) - { - WriteSeekPoint(stream); - } - } - else if ((zstdData->m_uncompressedSize - zstdData->m_seekPoints.back().m_uncompressedOffset) > zstdData->m_autoSeekSize) + if (zstdData->m_uncompressedSize >= zstdData->m_autoSeekSize) { WriteSeekPoint(stream); } } - return byteSize; + else if ((zstdData->m_uncompressedSize - zstdData->m_seekPoints.back().m_uncompressedOffset) > zstdData->m_autoSeekSize) + { + WriteSeekPoint(stream); + } } + return byteSize; + } - bool CompressorZStd::WriteSeekPoint(CompressorStream* stream) - { - AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + bool CompressorZStd::WriteSeekPoint(CompressorStream* stream) + { + AZ_Assert(stream && stream->GetCompressorData(), "This stream doesn't have compression enabled. Call Stream::WriteCompressed after you create the file."); + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - unsigned int compressedSize; - unsigned int dataToCompress = 0; - do + unsigned int compressedSize; + unsigned int dataToCompress = 0; + do + { + compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FULL_FLUSH); + if (compressedSize) { - compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FULL_FLUSH); - if (compressedSize) + GenericStream* baseStream = stream->GetWrappedStream(); + SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); + if (numWritten != compressedSize) { - GenericStream* baseStream = stream->GetWrappedStream(); - SizeType numWritten = baseStream->Write(compressedSize, m_compressedDataBuffer); - if (numWritten != compressedSize) - { - return false; // error we wrote less than than requested! - } + return false; // error we wrote less than than requested! } - } while (dataToCompress != 0); + } + } while (dataToCompress != 0); - CompressorZStdSeekPoint sp; - sp.m_compressedOffset = stream->GetLength(); - sp.m_uncompressedOffset = zstdData->m_uncompressedSize; - zstdData->m_seekPoints.push_back(sp); - return true; - } + CompressorZStdSeekPoint sp; + sp.m_compressedOffset = stream->GetLength(); + sp.m_uncompressedOffset = zstdData->m_uncompressedSize; + zstdData->m_seekPoints.push_back(sp); + return true; + } - bool CompressorZStd::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) - { - AZ_Assert(stream && !stream->GetCompressorData(), "Stream has compressor already enabled."); + bool CompressorZStd::StartCompressor(CompressorStream* stream, int compressionLevel, SizeType autoSeekDataSize) + { + AZ_Assert(stream && !stream->GetCompressorData(), "Stream has compressor already enabled."); - AcquireDataBuffer(); + AcquireDataBuffer(); - CompressorZStdData* zstdData = aznew CompressorZStdData; - zstdData->m_compressor = this; - zstdData->m_zstdHeader = 0; // not used for compression - zstdData->m_uncompressedSize = 0; - zstdData->m_autoSeekSize = autoSeekDataSize; - compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels + CompressorZStdData* zstdData = aznew CompressorZStdData; + zstdData->m_compressor = this; + zstdData->m_zstdHeader = 0; // not used for compression + zstdData->m_uncompressedSize = 0; + zstdData->m_autoSeekSize = autoSeekDataSize; + compressionLevel = AZ::GetClamp(compressionLevel, 1, 9); // remap to zlib levels - zstdData->m_zstd.StartCompressor(compressionLevel); + zstdData->m_zstd.StartCompressor(compressionLevel); - stream->SetCompressorData(zstdData); + stream->SetCompressorData(zstdData); - if (WriteHeaderAndData(stream)) - { - // add the first and always present seek point at the start of the compressed stream - CompressorZStdSeekPoint sp; - sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(zstdData->m_zstdHeader); - sp.m_uncompressedOffset = 0; - zstdData->m_seekPoints.push_back(sp); - return true; - } - return false; + if (WriteHeaderAndData(stream)) + { + // add the first and always present seek point at the start of the compressed stream + CompressorZStdSeekPoint sp; + sp.m_compressedOffset = sizeof(CompressorHeader) + sizeof(CompressorZStdHeader) + sizeof(zstdData->m_zstdHeader); + sp.m_uncompressedOffset = 0; + zstdData->m_seekPoints.push_back(sp); + return true; } + return false; + } - bool CompressorZStd::Close(CompressorStream* stream) - { - AZ_Assert(stream->IsOpen(), "Stream is not open to be closed."); + bool CompressorZStd::Close(CompressorStream* stream) + { + AZ_Assert(stream->IsOpen(), "Stream is not open to be closed."); - CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); - GenericStream* baseStream = stream->GetWrappedStream(); + CompressorZStdData* zstdData = static_cast(stream->GetCompressorData()); + GenericStream* baseStream = stream->GetWrappedStream(); - bool result = true; - if (zstdData->m_zstd.IsCompressorStarted()) - { - m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). + bool result = true; + if (zstdData->m_zstd.IsCompressorStarted()) + { + m_lastReadStream = nullptr; // invalidate last read position, otherwise m_dataBuffer will be corrupted (as we are about to write in it). - // flush all compressed data - unsigned int compressedSize; - unsigned int dataToCompress = 0; - do - { - compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FINISH); - if (compressedSize) - { - baseStream->Write(compressedSize, m_compressedDataBuffer); - } - } while (dataToCompress != 0); - - result = WriteHeaderAndData(stream); - if (result) - { - SizeType dataToWrite = zstdData->m_seekPoints.size() * sizeof(CompressorZStdSeekPoint); - baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); - result = (baseStream->Write(dataToWrite, zstdData->m_seekPoints.data()) == dataToWrite); - } - } - else + // flush all compressed data + unsigned int compressedSize; + unsigned int dataToCompress = 0; + do { - if (m_lastReadStream == stream) + compressedSize = zstdData->m_zstd.Compress(nullptr, dataToCompress, m_compressedDataBuffer, m_compressedDataBufferSize, ZStd::FT_FINISH); + if (compressedSize) { - m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. + baseStream->Write(compressedSize, m_compressedDataBuffer); } - } + } while (dataToCompress != 0); - // if we have decompressor cache delete it - if (zstdData->m_decompressedCache) + result = WriteHeaderAndData(stream); + if (result) { - azfree(zstdData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); + SizeType dataToWrite = zstdData->m_seekPoints.size() * sizeof(CompressorZStdSeekPoint); + baseStream->Seek(0U, GenericStream::SeekMode::ST_SEEK_END); + result = (baseStream->Write(dataToWrite, zstdData->m_seekPoints.data()) == dataToWrite); } - - ReleaseDataBuffer(); - - // last step reset strream compressor data. - stream->SetCompressorData(nullptr); - return result; } - - void CompressorZStd::AcquireDataBuffer() + else { - if (m_compressedDataBuffer == nullptr) + if (m_lastReadStream == stream) { - AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); - m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer + m_lastReadStream = nullptr; // invalidate the data in m_dataBuffer if it was from the current stream. } - ++m_compressedDataBufferUseCount; } - void CompressorZStd::ReleaseDataBuffer() + // if we have decompressor cache delete it + if (zstdData->m_decompressedCache) { - --m_compressedDataBufferUseCount; - if (m_compressedDataBufferUseCount == 0) - { - AZ_Assert(m_compressedDataBuffer, "Invalid data buffer. We should have a non null pointer."); - azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); - m_compressedDataBuffer = nullptr; - m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer - } + azfree(zstdData->m_decompressedCache, AZ::SystemAllocator, m_decompressionCachePerStream, m_CompressedDataBufferAlignment); + } + + ReleaseDataBuffer(); + + // last step reset strream compressor data. + stream->SetCompressorData(nullptr); + return result; + } + + void CompressorZStd::AcquireDataBuffer() + { + if (m_compressedDataBuffer == nullptr) + { + AZ_Assert(m_compressedDataBufferUseCount == 0, "Buffer usecount should be 0 if the buffer is NULL"); + m_compressedDataBuffer = reinterpret_cast(azmalloc(m_compressedDataBufferSize, m_CompressedDataBufferAlignment, AZ::SystemAllocator, "CompressorZStd")); + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer + } + ++m_compressedDataBufferUseCount; + } + + void CompressorZStd::ReleaseDataBuffer() + { + --m_compressedDataBufferUseCount; + if (m_compressedDataBufferUseCount == 0) + { + AZ_Assert(m_compressedDataBuffer, "Invalid data buffer. We should have a non null pointer."); + azfree(m_compressedDataBuffer, AZ::SystemAllocator, m_compressedDataBufferSize, m_CompressedDataBufferAlignment); + m_compressedDataBuffer = nullptr; + m_lastReadStream = nullptr; // reset the cache info in the m_dataBuffer } - } // namespace IO -} // namespace AZ + } +} // namespace AZ::IO #endif // #if !defined(AZCORE_EXCLUDE_ZSTD) diff --git a/Code/Framework/AzCore/AzCore/IO/FileIO.cpp b/Code/Framework/AzCore/AzCore/IO/FileIO.cpp index 837aca8d84..3522187131 100644 --- a/Code/Framework/AzCore/AzCore/IO/FileIO.cpp +++ b/Code/Framework/AzCore/AzCore/IO/FileIO.cpp @@ -21,485 +21,482 @@ # define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ #endif -namespace AZ +namespace AZ::IO { - namespace IO - { - static EnvironmentVariable g_fileIOInstance; - static EnvironmentVariable g_directFileIOInstance; - static const char* s_EngineFileIOName = "EngineFileIO"; - static const char* s_DirectFileIOName = "DirectFileIO"; + static EnvironmentVariable g_fileIOInstance; + static EnvironmentVariable g_directFileIOInstance; + static const char* s_EngineFileIOName = "EngineFileIO"; + static const char* s_DirectFileIOName = "DirectFileIO"; - FileIOBase* FileIOBase::GetInstance() + FileIOBase* FileIOBase::GetInstance() + { + if (!g_fileIOInstance) { - if (!g_fileIOInstance) - { - g_fileIOInstance = Environment::FindVariable(s_EngineFileIOName); - } - - return g_fileIOInstance ? (*g_fileIOInstance) : nullptr; + g_fileIOInstance = Environment::FindVariable(s_EngineFileIOName); } - void FileIOBase::SetInstance(FileIOBase* instance) - { - if (!g_fileIOInstance) - { - g_fileIOInstance = Environment::CreateVariable(s_EngineFileIOName); - (*g_fileIOInstance) = nullptr; - } - - // at this point we're guaranteed to have g_fileIOInstance. Its value might be null. - - if ((instance) && (g_fileIOInstance) && (*g_fileIOInstance)) - { - AZ_Error("FileIO", false, "FileIOBase::SetInstance was called without first destroying the old instance and setting it to nullptr"); - } + return g_fileIOInstance ? (*g_fileIOInstance) : nullptr; + } - (*g_fileIOInstance) = instance; + void FileIOBase::SetInstance(FileIOBase* instance) + { + if (!g_fileIOInstance) + { + g_fileIOInstance = Environment::CreateVariable(s_EngineFileIOName); + (*g_fileIOInstance) = nullptr; } - FileIOBase* FileIOBase::GetDirectInstance() + // at this point we're guaranteed to have g_fileIOInstance. Its value might be null. + + if ((instance) && (g_fileIOInstance) && (*g_fileIOInstance)) { - if (!g_directFileIOInstance) - { - g_directFileIOInstance = Environment::FindVariable(s_DirectFileIOName); - } + AZ_Error("FileIO", false, "FileIOBase::SetInstance was called without first destroying the old instance and setting it to nullptr"); + } - // for backwards compatibilty, return the regular instance if this is not attached - if (!g_directFileIOInstance) - { - return GetInstance(); - } + (*g_fileIOInstance) = instance; + } - return g_directFileIOInstance ? (*g_directFileIOInstance) : nullptr; + FileIOBase* FileIOBase::GetDirectInstance() + { + if (!g_directFileIOInstance) + { + g_directFileIOInstance = Environment::FindVariable(s_DirectFileIOName); } - void FileIOBase::SetDirectInstance(FileIOBase* instance) + // for backwards compatibilty, return the regular instance if this is not attached + if (!g_directFileIOInstance) { - if (!g_directFileIOInstance) - { - g_directFileIOInstance = Environment::CreateVariable(s_DirectFileIOName); - (*g_directFileIOInstance) = nullptr; - } - - // at this point we're guaranteed to have g_directFileIOInstance. Its value might be null. + return GetInstance(); + } - if ((instance) && (g_directFileIOInstance) && (*g_directFileIOInstance)) - { - AZ_Error("FileIO", false, "FileIOBase::SetDirectInstance was called without first destroying the old instance and setting it to nullptr"); - } + return g_directFileIOInstance ? (*g_directFileIOInstance) : nullptr; + } - (*g_directFileIOInstance) = instance; + void FileIOBase::SetDirectInstance(FileIOBase* instance) + { + if (!g_directFileIOInstance) + { + g_directFileIOInstance = Environment::CreateVariable(s_DirectFileIOName); + (*g_directFileIOInstance) = nullptr; } - AZStd::optional FileIOBase::ConvertToAlias(const AZ::IO::PathView& path) const - { - AZ::IO::FixedMaxPath convertedPath; - if (ConvertToAlias(convertedPath, path)) - { - return convertedPath; - } + // at this point we're guaranteed to have g_directFileIOInstance. Its value might be null. - return AZStd::nullopt; + if ((instance) && (g_directFileIOInstance) && (*g_directFileIOInstance)) + { + AZ_Error("FileIO", false, "FileIOBase::SetDirectInstance was called without first destroying the old instance and setting it to nullptr"); } - AZStd::optional FileIOBase::ResolvePath(const AZ::IO::PathView& path) const - { - AZ::IO::FixedMaxPath resolvedPath; - if (ResolvePath(resolvedPath, path)) - { - return resolvedPath; - } + (*g_directFileIOInstance) = instance; + } - return AZStd::nullopt; + AZStd::optional FileIOBase::ConvertToAlias(const AZ::IO::PathView& path) const + { + AZ::IO::FixedMaxPath convertedPath; + if (ConvertToAlias(convertedPath, path)) + { + return convertedPath; } - SeekType GetSeekTypeFromFSeekMode(int mode) + return AZStd::nullopt; + } + + AZStd::optional FileIOBase::ResolvePath(const AZ::IO::PathView& path) const + { + AZ::IO::FixedMaxPath resolvedPath; + if (ResolvePath(resolvedPath, path)) { - switch (mode) - { - case SEEK_SET: - return SeekType::SeekFromStart; - case SEEK_CUR: - return SeekType::SeekFromCurrent; - case SEEK_END: - return SeekType::SeekFromEnd; - } + return resolvedPath; + } + + return AZStd::nullopt; + } - // Must have some default, hitting here means some random int mode + SeekType GetSeekTypeFromFSeekMode(int mode) + { + switch (mode) + { + case SEEK_SET: return SeekType::SeekFromStart; + case SEEK_CUR: + return SeekType::SeekFromCurrent; + case SEEK_END: + return SeekType::SeekFromEnd; } - int GetFSeekModeFromSeekType(SeekType type) - { - switch (type) - { - case SeekType::SeekFromStart: - return SEEK_SET; - case SeekType::SeekFromCurrent: - return SEEK_CUR; - case SeekType::SeekFromEnd: - return SEEK_END; - } + // Must have some default, hitting here means some random int mode + return SeekType::SeekFromStart; + } + int GetFSeekModeFromSeekType(SeekType type) + { + switch (type) + { + case SeekType::SeekFromStart: return SEEK_SET; + case SeekType::SeekFromCurrent: + return SEEK_CUR; + case SeekType::SeekFromEnd: + return SEEK_END; } - void UpdateOpenModeForReading(OpenMode& openMode) - { - if (AnyFlag(openMode & OpenMode::ModeRead)) - { - if (AnyFlag(openMode & OpenMode::ModeText)) - { - OpenMode extraModes = openMode & (OpenMode::ModeUpdate | OpenMode::ModeAppend); - openMode = OpenMode::ModeRead | OpenMode::ModeBinary | extraModes; - } - else if (!AnyFlag(openMode & OpenMode::ModeBinary)) - { - // if you haven't supplied any flag, supply binary - openMode = openMode | OpenMode::ModeBinary; - } - } - } + return SEEK_SET; + } - OpenMode GetOpenModeFromStringMode(const char* mode) + void UpdateOpenModeForReading(OpenMode& openMode) + { + if (AnyFlag(openMode & OpenMode::ModeRead)) { - OpenMode openMode = OpenMode::Invalid; - - if (strstr(mode, "w")) + if (AnyFlag(openMode & OpenMode::ModeText)) { - openMode |= OpenMode::ModeWrite; + OpenMode extraModes = openMode & (OpenMode::ModeUpdate | OpenMode::ModeAppend); + openMode = OpenMode::ModeRead | OpenMode::ModeBinary | extraModes; } - - if (strstr(mode, "r")) + else if (!AnyFlag(openMode & OpenMode::ModeBinary)) { - openMode |= OpenMode::ModeRead; + // if you haven't supplied any flag, supply binary + openMode = openMode | OpenMode::ModeBinary; } + } + } - if (strstr(mode, "a")) - { - openMode |= OpenMode::ModeAppend; - } + OpenMode GetOpenModeFromStringMode(const char* mode) + { + OpenMode openMode = OpenMode::Invalid; - if (strstr(mode, "b")) - { - openMode |= OpenMode::ModeBinary; - } + if (strstr(mode, "w")) + { + openMode |= OpenMode::ModeWrite; + } - if (strstr(mode, "t")) - { - openMode |= OpenMode::ModeText; - } + if (strstr(mode, "r")) + { + openMode |= OpenMode::ModeRead; + } - if (strstr(mode, "+")) - { - openMode |= OpenMode::ModeUpdate; - } + if (strstr(mode, "a")) + { + openMode |= OpenMode::ModeAppend; + } + + if (strstr(mode, "b")) + { + openMode |= OpenMode::ModeBinary; + } - UpdateOpenModeForReading(openMode); + if (strstr(mode, "t")) + { + openMode |= OpenMode::ModeText; + } - return openMode; + if (strstr(mode, "+")) + { + openMode |= OpenMode::ModeUpdate; } - const char* GetStringModeFromOpenMode(OpenMode mode) + UpdateOpenModeForReading(openMode); + + return openMode; + } + + const char* GetStringModeFromOpenMode(OpenMode mode) + { + UpdateOpenModeForReading(mode); + // Append is highest priority, followed by write and then read + // APPEND + if (AnyFlag(mode & OpenMode::ModeAppend)) { - UpdateOpenModeForReading(mode); - // Append is highest priority, followed by write and then read - // APPEND - if (AnyFlag(mode & OpenMode::ModeAppend)) + if (AnyFlag(mode & OpenMode::ModeUpdate)) { - if (AnyFlag(mode & OpenMode::ModeUpdate)) - { - if (AnyFlag(mode & OpenMode::ModeBinary)) - { - return "a+b"; - } - if (AnyFlag(mode & OpenMode::ModeText)) - { - return "a+t"; - } - return "a+"; - } if (AnyFlag(mode & OpenMode::ModeBinary)) { - return "ab"; + return "a+b"; } if (AnyFlag(mode & OpenMode::ModeText)) { - return "at"; + return "a+t"; } - return "a"; + return "a+"; + } + if (AnyFlag(mode & OpenMode::ModeBinary)) + { + return "ab"; } + if (AnyFlag(mode & OpenMode::ModeText)) + { + return "at"; + } + return "a"; + } - // WRITE - if (AnyFlag(mode & OpenMode::ModeWrite)) + // WRITE + if (AnyFlag(mode & OpenMode::ModeWrite)) + { + if (AnyFlag(mode & OpenMode::ModeUpdate)) { - if (AnyFlag(mode & OpenMode::ModeUpdate)) - { - if (AnyFlag(mode & OpenMode::ModeBinary)) - { - return "w+b"; - } - if (AnyFlag(mode & OpenMode::ModeText)) - { - return "w+t"; - } - return "w+"; - } if (AnyFlag(mode & OpenMode::ModeBinary)) { - return "wb"; + return "w+b"; } if (AnyFlag(mode & OpenMode::ModeText)) { - return "wt"; + return "w+t"; } - return "w"; + return "w+"; } + if (AnyFlag(mode & OpenMode::ModeBinary)) + { + return "wb"; + } + if (AnyFlag(mode & OpenMode::ModeText)) + { + return "wt"; + } + return "w"; + } - // READ - if (AnyFlag(mode & OpenMode::ModeRead)) + // READ + if (AnyFlag(mode & OpenMode::ModeRead)) + { + if (AnyFlag(mode & OpenMode::ModeUpdate)) { - if (AnyFlag(mode & OpenMode::ModeUpdate)) - { - if (AnyFlag(mode & OpenMode::ModeBinary)) - { - return "r+b"; - } - if (AnyFlag(mode & OpenMode::ModeText)) - { - return "r+t"; - } - return "r+"; - } if (AnyFlag(mode & OpenMode::ModeBinary)) { - return "rb"; + return "r+b"; } if (AnyFlag(mode & OpenMode::ModeText)) { - return "rt"; + return "r+t"; } - return "r"; + return "r+"; } - - // Bad open mode passed in - AZ_Error("FileIO", false, "A bad open mode was sent to GetStringModeFromOpenMode()"); - return ""; + if (AnyFlag(mode & OpenMode::ModeBinary)) + { + return "rb"; + } + if (AnyFlag(mode & OpenMode::ModeText)) + { + return "rt"; + } + return "r"; } - bool NameMatchesFilter(const char* name, const char* filter) - { - return AZStd::wildcard_match(filter, name); - } + // Bad open mode passed in + AZ_Error("FileIO", false, "A bad open mode was sent to GetStringModeFromOpenMode()"); + return ""; + } - FileIOStream::FileIOStream() - : m_handle(InvalidHandle) - , m_mode(OpenMode::Invalid) - , m_ownsHandle(true) - { + bool NameMatchesFilter(const char* name, const char* filter) + { + return AZStd::wildcard_match(filter, name); + } - } + FileIOStream::FileIOStream() + : m_handle(InvalidHandle) + , m_mode(OpenMode::Invalid) + , m_ownsHandle(true) + { - FileIOStream::FileIOStream(HandleType fileHandle, AZ::IO::OpenMode mode, bool ownsHandle) - : m_handle(fileHandle) - , m_mode(mode) - , m_ownsHandle(ownsHandle) - { - - FileIOBase* fileIO = FileIOBase::GetInstance(); - AZ_Assert(fileIO, "FileIO is not initialized."); - AZStd::array resolvedPath{ {0} }; - fileIO->GetFilename(m_handle, resolvedPath.data(), resolvedPath.size() - 1); - m_filename = resolvedPath.data(); - } + } - FileIOStream::FileIOStream(const char* path, AZ::IO::OpenMode mode, bool errorOnFailure) - : m_handle(InvalidHandle) - , m_mode(mode) - , m_errorOnFailure(errorOnFailure) - { - Open(path, mode); - } + FileIOStream::FileIOStream(HandleType fileHandle, AZ::IO::OpenMode mode, bool ownsHandle) + : m_handle(fileHandle) + , m_mode(mode) + , m_ownsHandle(ownsHandle) + { - FileIOStream::~FileIOStream() - { - if (m_ownsHandle) - { - Close(); - } - } + FileIOBase* fileIO = FileIOBase::GetInstance(); + AZ_Assert(fileIO, "FileIO is not initialized."); + AZStd::array resolvedPath{ {0} }; + fileIO->GetFilename(m_handle, resolvedPath.data(), resolvedPath.size() - 1); + m_filename = resolvedPath.data(); + } + + FileIOStream::FileIOStream(const char* path, AZ::IO::OpenMode mode, bool errorOnFailure) + : m_handle(InvalidHandle) + , m_mode(mode) + , m_errorOnFailure(errorOnFailure) + { + Open(path, mode); + } - bool FileIOStream::Open(const char* path, OpenMode mode) + FileIOStream::~FileIOStream() + { + if (m_ownsHandle) { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - FileIOBase* fileIO = FileIOBase::GetInstance(); - Close(); - - const Result result = fileIO->Open(path, mode, m_handle); - m_ownsHandle = IsOpen(); - m_mode = mode; - - if (IsOpen()) - { - // Not using supplied path parameter as it may be unresolved - AZStd::array resolvedPath{ {0} }; - fileIO->GetFilename(m_handle, resolvedPath.data(), resolvedPath.size() - 1); - m_filename = resolvedPath.data(); - } - else - { - // remember the file name so you can try again with ReOpen - m_filename = path; - } - - AZ_PROFILE_INTERVAL_START_COLORED(AzCore, &m_filename, 0xff0000ff, "FileIO: %s", m_filename.c_str()); - return result; } + } - bool FileIOStream::ReOpen() - { - Close(); - return (m_mode != OpenMode::Invalid) ? Open(m_filename.data(), m_mode) : false; - } + bool FileIOStream::Open(const char* path, OpenMode mode) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + FileIOBase* fileIO = FileIOBase::GetInstance(); - void FileIOStream::Close() - { - if (m_handle != InvalidHandle) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + Close(); - FileIOBase::GetInstance()->Close(m_handle); - m_handle = InvalidHandle; - m_ownsHandle = false; - AZ_PROFILE_INTERVAL_END(AzCore, &m_filename); - } - } + const Result result = fileIO->Open(path, mode, m_handle); + m_ownsHandle = IsOpen(); + m_mode = mode; - bool FileIOStream::IsOpen() const + if (IsOpen()) { - return (m_handle != InvalidHandle); + // Not using supplied path parameter as it may be unresolved + AZStd::array resolvedPath{ {0} }; + fileIO->GetFilename(m_handle, resolvedPath.data(), resolvedPath.size() - 1); + m_filename = resolvedPath.data(); } - - /*! - \brief Retrieves underlying FileIO Handle from file stream - \return HandleType - */ - HandleType FileIOStream::GetHandle() const + else { - return m_handle; + // remember the file name so you can try again with ReOpen + m_filename = path; } - /*! - \brief Retrieves filename - \return const char* - */ - const char* FileIOStream::GetFilename() const - { - return m_filename.data(); - } + AZ_PROFILE_INTERVAL_START_COLORED(AzCore, &m_filename, 0xff0000ff, "FileIO: %s", m_filename.c_str()); + return result; + } - /*! - \brief Retrieves OpenMode flags used to open this file - \return OpenMode - */ - AZ::IO::OpenMode FileIOStream::GetModeFlags() const - { - return m_mode; - } + bool FileIOStream::ReOpen() + { + Close(); + return (m_mode != OpenMode::Invalid) ? Open(m_filename.data(), m_mode) : false; + } - bool FileIOStream::CanSeek() const + void FileIOStream::Close() + { + if (m_handle != InvalidHandle) { - return true; - } + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - bool FileIOStream::CanRead() const - { - return (m_mode & (OpenMode::ModeRead | OpenMode::ModeUpdate)) != OpenMode::Invalid; + FileIOBase::GetInstance()->Close(m_handle); + m_handle = InvalidHandle; + m_ownsHandle = false; + AZ_PROFILE_INTERVAL_END(AzCore, &m_filename); } + } - bool FileIOStream::CanWrite() const - { - return (m_mode & (OpenMode::ModeWrite | OpenMode::ModeAppend | OpenMode::ModeUpdate)) != OpenMode::Invalid; - } + bool FileIOStream::IsOpen() const + { + return (m_handle != InvalidHandle); + } + + /*! + \brief Retrieves underlying FileIO Handle from file stream + \return HandleType + */ + HandleType FileIOStream::GetHandle() const + { + return m_handle; + } + + /*! + \brief Retrieves filename + \return const char* + */ + const char* FileIOStream::GetFilename() const + { + return m_filename.data(); + } + + /*! + \brief Retrieves OpenMode flags used to open this file + \return OpenMode + */ + AZ::IO::OpenMode FileIOStream::GetModeFlags() const + { + return m_mode; + } - void FileIOStream::Seek(OffsetType bytes, SeekMode mode) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot seek on a FileIOStream that is not open."); + bool FileIOStream::CanSeek() const + { + return true; + } - SeekType seekType = SeekType::SeekFromCurrent; - switch (mode) - { - case GenericStream::ST_SEEK_BEGIN: - seekType = SeekType::SeekFromStart; - break; - case GenericStream::ST_SEEK_CUR: - seekType = SeekType::SeekFromCurrent; - break; - case GenericStream::ST_SEEK_END: - seekType = SeekType::SeekFromEnd; - break; - default: - seekType = SeekType::SeekFromCurrent; - break; - } + bool FileIOStream::CanRead() const + { + return (m_mode & (OpenMode::ModeRead | OpenMode::ModeUpdate)) != OpenMode::Invalid; + } - const Result result = FileIOBase::GetInstance()->Seek(m_handle, static_cast(bytes), seekType); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Seek failed."); - } + bool FileIOStream::CanWrite() const + { + return (m_mode & (OpenMode::ModeWrite | OpenMode::ModeAppend | OpenMode::ModeUpdate)) != OpenMode::Invalid; + } - SizeType FileIOStream::Read(SizeType bytes, void* oBuffer) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot read from a FileIOStream that is not open."); + void FileIOStream::Seek(OffsetType bytes, SeekMode mode) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot seek on a FileIOStream that is not open."); - AZ::u64 bytesRead = 0; - const Result result = FileIOBase::GetInstance()->Read(m_handle, oBuffer, bytes, m_errorOnFailure, &bytesRead); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Read failed in file %s.", m_filename.empty() ? "NULL" : m_filename.c_str()); - return static_cast(bytesRead); + SeekType seekType = SeekType::SeekFromCurrent; + switch (mode) + { + case GenericStream::ST_SEEK_BEGIN: + seekType = SeekType::SeekFromStart; + break; + case GenericStream::ST_SEEK_CUR: + seekType = SeekType::SeekFromCurrent; + break; + case GenericStream::ST_SEEK_END: + seekType = SeekType::SeekFromEnd; + break; + default: + seekType = SeekType::SeekFromCurrent; + break; } - SizeType FileIOStream::Write(SizeType bytes, const void* iBuffer) - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot write to a FileIOStream that is not open."); + const Result result = FileIOBase::GetInstance()->Seek(m_handle, static_cast(bytes), seekType); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Seek failed."); + } - AZ::u64 bytesWritten = 0; - const Result result = FileIOBase::GetInstance()->Write(m_handle, iBuffer, bytes, &bytesWritten); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Write failed."); - return static_cast(bytesWritten); - } + SizeType FileIOStream::Read(SizeType bytes, void* oBuffer) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot read from a FileIOStream that is not open."); - SizeType FileIOStream::GetCurPos() const - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); + AZ::u64 bytesRead = 0; + const Result result = FileIOBase::GetInstance()->Read(m_handle, oBuffer, bytes, m_errorOnFailure, &bytesRead); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Read failed in file %s.", m_filename.empty() ? "NULL" : m_filename.c_str()); + return static_cast(bytesRead); + } - AZ::u64 currentPosition = 0; - const Result result = FileIOBase::GetInstance()->Tell(m_handle, currentPosition); - (void)result; - AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "GetCurPos failed."); - return static_cast(currentPosition); - } + SizeType FileIOStream::Write(SizeType bytes, const void* iBuffer) + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot write to a FileIOStream that is not open."); - SizeType FileIOStream::GetLength() const - { - AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); - AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); + AZ::u64 bytesWritten = 0; + const Result result = FileIOBase::GetInstance()->Write(m_handle, iBuffer, bytes, &bytesWritten); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "Write failed."); + return static_cast(bytesWritten); + } - SizeType fileLengthBytes = 0; - if (!FileIOBase::GetInstance()->Size(m_handle, fileLengthBytes)) - { - AZ_Error("FileIOStream", false, "GetLength failed."); - } + SizeType FileIOStream::GetCurPos() const + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); + + AZ::u64 currentPosition = 0; + const Result result = FileIOBase::GetInstance()->Tell(m_handle, currentPosition); + (void)result; + AZ_Error("FileIOStream", result.GetResultCode() == ResultCode::Success, "GetCurPos failed."); + return static_cast(currentPosition); + } + + SizeType FileIOStream::GetLength() const + { + AZ_Assert(FileIOBase::GetInstance(), "FileIO is not initialized."); + AZ_Assert(IsOpen(), "Cannot use a FileIOStream that is not open."); - return fileLengthBytes; + SizeType fileLengthBytes = 0; + if (!FileIOBase::GetInstance()->Size(m_handle, fileLengthBytes)) + { + AZ_Error("FileIOStream", false, "GetLength failed."); } - } // namespace IO -} // namespace AZ + return fileLengthBytes; + } + +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp b/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp index 1e3a31f8ab..222a36ef70 100644 --- a/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp +++ b/Code/Framework/AzCore/AzCore/IO/IOUtils.cpp @@ -10,69 +10,64 @@ #include #include /// this_thread sleep_for. -namespace AZ +namespace AZ::IO { - namespace IO - { - int TranslateOpenModeToSystemFileMode(const char* path, OpenMode mode) + int TranslateOpenModeToSystemFileMode(const char* path, OpenMode mode) + { + int systemFileMode = 0; + bool read = AnyFlag(mode & OpenMode::ModeRead) || AnyFlag(mode & OpenMode::ModeUpdate); + bool write = AnyFlag(mode & OpenMode::ModeWrite) || AnyFlag(mode & OpenMode::ModeUpdate) || AnyFlag(mode & OpenMode::ModeAppend); + if (write) { - int systemFileMode = 0; - bool read = AnyFlag(mode & OpenMode::ModeRead) || AnyFlag(mode & OpenMode::ModeUpdate); - bool write = AnyFlag(mode & OpenMode::ModeWrite) || AnyFlag(mode & OpenMode::ModeUpdate) || AnyFlag(mode & OpenMode::ModeAppend); - if (write) + // If writing the file, create the file in all cases (except r+) + if (!SystemFile::Exists(path) && !(AnyFlag(mode & OpenMode::ModeRead) && AnyFlag(mode & OpenMode::ModeUpdate))) { - // If writing the file, create the file in all cases (except r+) - if (!SystemFile::Exists(path) && !(AnyFlag(mode & OpenMode::ModeRead) && AnyFlag(mode & OpenMode::ModeUpdate))) - { - // LocalFileIO creates by default - systemFileMode |= SystemFile::SF_OPEN_CREATE; - } - - if (AnyFlag(mode & OpenMode::ModeCreatePath)) - { - systemFileMode |= SystemFile::SF_OPEN_CREATE_PATH; - } + // LocalFileIO creates by default + systemFileMode |= SystemFile::SF_OPEN_CREATE; + } - // If appending, append. - if (AnyFlag(mode & OpenMode::ModeAppend)) - { - systemFileMode |= SystemFile::SF_OPEN_APPEND; - } - // If writing and not appending, empty the file - else if (AnyFlag(mode & OpenMode::ModeWrite)) - { - systemFileMode |= SystemFile::SF_OPEN_TRUNCATE; - } + if (AnyFlag(mode & OpenMode::ModeCreatePath)) + { + systemFileMode |= SystemFile::SF_OPEN_CREATE_PATH; + } - // If reading, set read/write, otherwise just write - if (read) - { - systemFileMode |= SystemFile::SF_OPEN_READ_WRITE; - } - else - { - systemFileMode |= SystemFile::SF_OPEN_WRITE_ONLY; - } + // If appending, append. + if (AnyFlag(mode & OpenMode::ModeAppend)) + { + systemFileMode |= SystemFile::SF_OPEN_APPEND; } - else if (read) + // If writing and not appending, empty the file + else if (AnyFlag(mode & OpenMode::ModeWrite)) { - systemFileMode |= SystemFile::SF_OPEN_READ_ONLY; + systemFileMode |= SystemFile::SF_OPEN_TRUNCATE; } - return systemFileMode; - } - - bool RetryOpenStream(FileIOStream& stream, int numRetries, int delayBetweenRetry) - { - while ((!stream.IsOpen()) && (numRetries > 0)) + // If reading, set read/write, otherwise just write + if (read) + { + systemFileMode |= SystemFile::SF_OPEN_READ_WRITE; + } + else { - numRetries--; - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(delayBetweenRetry)); - stream.ReOpen(); + systemFileMode |= SystemFile::SF_OPEN_WRITE_ONLY; } - return stream.IsOpen(); } - } // namespace IO -} // namespace AZ + else if (read) + { + systemFileMode |= SystemFile::SF_OPEN_READ_ONLY; + } + return systemFileMode; + } + bool RetryOpenStream(FileIOStream& stream, int numRetries, int delayBetweenRetry) + { + while ((!stream.IsOpen()) && (numRetries > 0)) + { + numRetries--; + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(delayBetweenRetry)); + stream.ReOpen(); + } + return stream.IsOpen(); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp index e838324408..6c873f3050 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/BlockCache.cpp @@ -15,736 +15,733 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr BlockCacheConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr BlockCacheConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) + size_t blockSize; + switch (m_blockSize) { - size_t blockSize; - switch (m_blockSize) - { - case BlockSize::MaxTransfer: - blockSize = hardware.m_maxTransfer; - break; - case BlockSize::MemoryAlignment: - blockSize = hardware.m_maxPhysicalSectorSize; - break; - case BlockSize::SizeAlignment: - blockSize = hardware.m_maxLogicalSectorSize; - break; - default: - blockSize = m_blockSize; - break; - } - - u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); - if (blockSize * 2 > cacheSize) - { - AZ_Warning("Streamer", false, "Size (%u) for BlockCache isn't big enough to hold at least two cache blocks of size (%zu). " - "The cache size will be increased to fit 2 cache blocks.", cacheSize, blockSize); - cacheSize = aznumeric_caster(blockSize * 2); - } + case BlockSize::MaxTransfer: + blockSize = hardware.m_maxTransfer; + break; + case BlockSize::MemoryAlignment: + blockSize = hardware.m_maxPhysicalSectorSize; + break; + case BlockSize::SizeAlignment: + blockSize = hardware.m_maxLogicalSectorSize; + break; + default: + blockSize = m_blockSize; + break; + } - auto stackEntry = AZStd::make_shared( - cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), false); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; + u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); + if (blockSize * 2 > cacheSize) + { + AZ_Warning("Streamer", false, "Size (%u) for BlockCache isn't big enough to hold at least two cache blocks of size (%zu). " + "The cache size will be increased to fit 2 cache blocks.", cacheSize, blockSize); + cacheSize = aznumeric_caster(blockSize * 2); } - void BlockCacheConfig::Reflect(AZ::ReflectContext* context) + auto stackEntry = AZStd::make_shared( + cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), false); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } + + void BlockCacheConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Enum() - ->Version(1) - ->Value("MaxTransfer", BlockSize::MaxTransfer) - ->Value("MemoryAlignment", BlockSize::MemoryAlignment) - ->Value("SizeAlignment", BlockSize::SizeAlignment); - - serializeContext->Class() - ->Version(1) - ->Field("CacheSizeMib", &BlockCacheConfig::m_cacheSizeMib) - ->Field("BlockSize", &BlockCacheConfig::m_blockSize); - } + serializeContext->Enum() + ->Version(1) + ->Value("MaxTransfer", BlockSize::MaxTransfer) + ->Value("MemoryAlignment", BlockSize::MemoryAlignment) + ->Value("SizeAlignment", BlockSize::SizeAlignment); + + serializeContext->Class() + ->Version(1) + ->Field("CacheSizeMib", &BlockCacheConfig::m_cacheSizeMib) + ->Field("BlockSize", &BlockCacheConfig::m_blockSize); } + } + + static constexpr char CacheHitRateName[] = "Cache hit rate"; + static constexpr char CacheableName[] = "Cacheable"; - static constexpr char CacheHitRateName[] = "Cache hit rate"; - static constexpr char CacheableName[] = "Cacheable"; + void BlockCache::Section::Prefix(const Section& section) + { + AZ_Assert(section.m_used, "Trying to prefix an unused section"); + AZ_Assert(!m_wait && !section.m_wait, "Can't merge two section that are already waiting for data to be loaded."); - void BlockCache::Section::Prefix(const Section& section) + if (m_used) { - AZ_Assert(section.m_used, "Trying to prefix an unused section"); - AZ_Assert(!m_wait && !section.m_wait, "Can't merge two section that are already waiting for data to be loaded."); + AZ_Assert(m_blockOffset == 0, "Unable to add a block cache to this one as this block requires an offset upon completion."); - if (m_used) - { - AZ_Assert(m_blockOffset == 0, "Unable to add a block cache to this one as this block requires an offset upon completion."); - - AZ_Assert(section.m_readOffset < m_readOffset, "The block that's being merged needs to come before this block."); - m_readOffset = section.m_readOffset + section.m_blockOffset; // Remove any alignment that might have been added. - m_readSize += section.m_readSize - section.m_blockOffset; - - AZ_Assert(section.m_output < m_output, "The block that's being merged needs to come before this block."); - m_output = section.m_output; - m_copySize += section.m_copySize; - } - else - { - m_used = true; - m_readOffset = section.m_readOffset + section.m_blockOffset; - m_readSize = section.m_readSize - section.m_blockOffset; - m_output = section.m_output; - m_copySize = section.m_copySize; - } - m_blockOffset = 0; // Two merged sections do not support caching. - } - - BlockCache::BlockCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) - : StreamStackEntry("Block cache") - , m_alignment(alignment) - , m_onlyEpilogWrites(onlyEpilogWrites) - { - AZ_Assert(IStreamerTypes::IsPowerOf2(alignment), "Alignment needs to be a power of 2."); - AZ_Assert(IStreamerTypes::IsAlignedTo(blockSize, alignment), "Block size needs to be a multiple of the alignment."); - - m_numBlocks = aznumeric_caster(cacheSize / blockSize); - m_cacheSize = cacheSize - (cacheSize % blockSize); // Only use the amount needed for the cache. - m_blockSize = blockSize; - if (m_numBlocks == 1) - { - m_onlyEpilogWrites = true; - } - - m_cache = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( - m_cacheSize, alignment, 0, "AZ::IO::Streamer BlockCache", __FILE__, __LINE__)); - m_cachedPaths = AZStd::unique_ptr(new RequestPath[m_numBlocks]); - m_cachedOffsets = AZStd::unique_ptr(new u64[m_numBlocks]); - m_blockLastTouched = AZStd::unique_ptr(new TimePoint[m_numBlocks]); - m_inFlightRequests = AZStd::unique_ptr(new FileRequest*[m_numBlocks]); - - ResetCache(); - } + AZ_Assert(section.m_readOffset < m_readOffset, "The block that's being merged needs to come before this block."); + m_readOffset = section.m_readOffset + section.m_blockOffset; // Remove any alignment that might have been added. + m_readSize += section.m_readSize - section.m_blockOffset; - BlockCache::~BlockCache() + AZ_Assert(section.m_output < m_output, "The block that's being merged needs to come before this block."); + m_output = section.m_output; + m_copySize += section.m_copySize; + } + else { - AZ::AllocatorInstance::Get().DeAllocate(m_cache, m_cacheSize, m_alignment); + m_used = true; + m_readOffset = section.m_readOffset + section.m_blockOffset; + m_readSize = section.m_readSize - section.m_blockOffset; + m_output = section.m_output; + m_copySize = section.m_copySize; } + m_blockOffset = 0; // Two merged sections do not support caching. + } - void BlockCache::QueueRequest(FileRequest* request) - { - AZ_Assert(request, "QueueRequest was provided a null request."); + BlockCache::BlockCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) + : StreamStackEntry("Block cache") + , m_alignment(alignment) + , m_onlyEpilogWrites(onlyEpilogWrites) + { + AZ_Assert(IStreamerTypes::IsPowerOf2(alignment), "Alignment needs to be a power of 2."); + AZ_Assert(IStreamerTypes::IsAlignedTo(blockSize, alignment), "Block size needs to be a multiple of the alignment."); - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - ReadFile(request, args); - return; - } - else - { - if constexpr (AZStd::is_same_v) - { - FlushCache(args.m_path); - } - else if constexpr (AZStd::is_same_v) - { - FlushEntireCache(); - } - StreamStackEntry::QueueRequest(request); - } - }, request->GetCommand()); + m_numBlocks = aznumeric_caster(cacheSize / blockSize); + m_cacheSize = cacheSize - (cacheSize % blockSize); // Only use the amount needed for the cache. + m_blockSize = blockSize; + if (m_numBlocks == 1) + { + m_onlyEpilogWrites = true; } - bool BlockCache::ExecuteRequests() + m_cache = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( + m_cacheSize, alignment, 0, "AZ::IO::Streamer BlockCache", __FILE__, __LINE__)); + m_cachedPaths = AZStd::unique_ptr(new RequestPath[m_numBlocks]); + m_cachedOffsets = AZStd::unique_ptr(new u64[m_numBlocks]); + m_blockLastTouched = AZStd::unique_ptr(new TimePoint[m_numBlocks]); + m_inFlightRequests = AZStd::unique_ptr(new FileRequest*[m_numBlocks]); + + ResetCache(); + } + + BlockCache::~BlockCache() + { + AZ::AllocatorInstance::Get().DeAllocate(m_cache, m_cacheSize, m_alignment); + } + + void BlockCache::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + + AZStd::visit([this, request](auto&& args) { - size_t delayedCount = m_delayedSections.size(); - - bool delayedRequestProcessed = false; - for (size_t i = 0; i < delayedCount; ++i) + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - Section& delayed = m_delayedSections.front(); - AZ_Assert(delayed.m_parent, "Delayed section doesn't have a reference to the original request."); - auto data = AZStd::get_if(&delayed.m_parent->GetCommand()); - AZ_Assert(data, "A request in the delayed queue of the BlockCache didn't have a parent with read data."); - // This call can add the same section to the back of the queue if there's not - // enough space. Because of this the entry needs to be removed from the delayed - // list no matter what the result is of ServiceFromCache. - if (ServiceFromCache(delayed.m_parent, delayed, data->m_path, data->m_sharedRead) != CacheResult::Delayed) + ReadFile(request, args); + return; + } + else + { + if constexpr (AZStd::is_same_v) { - delayedRequestProcessed = true; + FlushCache(args.m_path); } - m_delayedSections.pop_front(); + else if constexpr (AZStd::is_same_v) + { + FlushEntireCache(); + } + StreamStackEntry::QueueRequest(request); } - bool nextResult = StreamStackEntry::ExecuteRequests(); - return nextResult || delayedRequestProcessed; - } + }, request->GetCommand()); + } - void BlockCache::UpdateStatus(Status& status) const + bool BlockCache::ExecuteRequests() + { + size_t delayedCount = m_delayedSections.size(); + + bool delayedRequestProcessed = false; + for (size_t i = 0; i < delayedCount; ++i) { - StreamStackEntry::UpdateStatus(status); - s32 numAvailableSlots = CalculateAvailableRequestSlots(); - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); - status.m_isIdle = status.m_isIdle && - static_cast(numAvailableSlots) == m_numBlocks && - m_delayedSections.empty(); + Section& delayed = m_delayedSections.front(); + AZ_Assert(delayed.m_parent, "Delayed section doesn't have a reference to the original request."); + auto data = AZStd::get_if(&delayed.m_parent->GetCommand()); + AZ_Assert(data, "A request in the delayed queue of the BlockCache didn't have a parent with read data."); + // This call can add the same section to the back of the queue if there's not + // enough space. Because of this the entry needs to be removed from the delayed + // list no matter what the result is of ServiceFromCache. + if (ServiceFromCache(delayed.m_parent, delayed, data->m_path, data->m_sharedRead) != CacheResult::Delayed) + { + delayedRequestProcessed = true; + } + m_delayedSections.pop_front(); } + bool nextResult = StreamStackEntry::ExecuteRequests(); + return nextResult || delayedRequestProcessed; + } - void BlockCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) - { - // Have the stack downstream estimate the completion time for the requests that are waiting for a slot to execute in. - AddDelayedRequests(internalPending); + void BlockCache::UpdateStatus(Status& status) const + { + StreamStackEntry::UpdateStatus(status); + s32 numAvailableSlots = CalculateAvailableRequestSlots(); + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); + status.m_isIdle = status.m_isIdle && + static_cast(numAvailableSlots) == m_numBlocks && + m_delayedSections.empty(); + } + + void BlockCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) + { + // Have the stack downstream estimate the completion time for the requests that are waiting for a slot to execute in. + AddDelayedRequests(internalPending); - StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); + StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); - // The in-flight requests don't have to be updated because the subdivided request will bubble up in order so the final - // write will be the latest completion time. Requests that have a wait on another request though will need to be update - // as the estimation of the in-flight request needs to be copied to the wait request to get an accurate prediction. - UpdatePendingRequestEstimations(); + // The in-flight requests don't have to be updated because the subdivided request will bubble up in order so the final + // write will be the latest completion time. Requests that have a wait on another request though will need to be update + // as the estimation of the in-flight request needs to be copied to the wait request to get an accurate prediction. + UpdatePendingRequestEstimations(); - // Technically here the wait commands for the delayed sections should be updated as well, but it's the parent that's interesting, - // not the wait so don't waste cycles updating the wait. - } + // Technically here the wait commands for the delayed sections should be updated as well, but it's the parent that's interesting, + // not the wait so don't waste cycles updating the wait. + } - void BlockCache::AddDelayedRequests(AZStd::vector& internalPending) + void BlockCache::AddDelayedRequests(AZStd::vector& internalPending) + { + for (auto& section : m_delayedSections) { - for (auto& section : m_delayedSections) - { - internalPending.push_back(section.m_parent); - } + internalPending.push_back(section.m_parent); } + } - void BlockCache::UpdatePendingRequestEstimations() + void BlockCache::UpdatePendingRequestEstimations() + { + for (auto it : m_pendingRequests) { - for (auto it : m_pendingRequests) + Section& section = it.second; + AZ_Assert(section.m_cacheBlockIndex != s_fileNotCached, "An in-flight cache section doesn't have a cache block associated with it."); + AZ_Assert(m_inFlightRequests[section.m_cacheBlockIndex], + "Cache block %i is reported as being in-flight but has no request.", section.m_cacheBlockIndex); + if (section.m_wait) { - Section& section = it.second; - AZ_Assert(section.m_cacheBlockIndex != s_fileNotCached, "An in-flight cache section doesn't have a cache block associated with it."); - AZ_Assert(m_inFlightRequests[section.m_cacheBlockIndex], - "Cache block %i is reported as being in-flight but has no request.", section.m_cacheBlockIndex); - if (section.m_wait) - { - AZ_Assert(section.m_parent, "A cache section with a wait request pending is missing a parent to wait on."); - auto largestTime = AZStd::max(section.m_parent->GetEstimatedCompletion(), it.first->GetEstimatedCompletion()); - section.m_wait->SetEstimatedCompletion(largestTime); - } + AZ_Assert(section.m_parent, "A cache section with a wait request pending is missing a parent to wait on."); + auto largestTime = AZStd::max(section.m_parent->GetEstimatedCompletion(), it.first->GetEstimatedCompletion()); + section.m_wait->SetEstimatedCompletion(largestTime); } } + } - void BlockCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + void BlockCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + { + if (!m_next) { - if (!m_next) - { - request->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); - return; - } + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + return; + } - auto continueReadFile = [this, request](FileRequest& fileSizeRequest) - { - AZ_PROFILE_FUNCTION(AzCore); - AZ_Assert(m_numMetaDataRetrievalInProgress > 0, - "More requests have completed meta data retrieval in the Block Cache than were requested."); - m_numMetaDataRetrievalInProgress--; - if (fileSizeRequest.GetStatus() == IStreamerTypes::RequestStatus::Completed) + auto continueReadFile = [this, request](FileRequest& fileSizeRequest) + { + AZ_PROFILE_FUNCTION(AzCore); + AZ_Assert(m_numMetaDataRetrievalInProgress > 0, + "More requests have completed meta data retrieval in the Block Cache than were requested."); + m_numMetaDataRetrievalInProgress--; + if (fileSizeRequest.GetStatus() == IStreamerTypes::RequestStatus::Completed) + { + auto& requestInfo = AZStd::get(fileSizeRequest.GetCommand()); + if (requestInfo.m_found) { - auto& requestInfo = AZStd::get(fileSizeRequest.GetCommand()); - if (requestInfo.m_found) - { - ContinueReadFile(request, requestInfo.m_fileSize); - return; - } + ContinueReadFile(request, requestInfo.m_fileSize); + return; } - // Couldn't find the file size so don't try to split and pass the request to the next entry in the stack. - StreamStackEntry::QueueRequest(request); - }; - m_numMetaDataRetrievalInProgress++; - FileRequest* fileSizeRequest = m_context->GetNewInternalRequest(); - fileSizeRequest->CreateFileMetaDataRetrieval(data.m_path); - fileSizeRequest->SetCompletionCallback(AZStd::move(continueReadFile)); - StreamStackEntry::QueueRequest(fileSizeRequest); - } - void BlockCache::ContinueReadFile(FileRequest* request, u64 fileLength) - { - Section prolog; - Section main; - Section epilog; + } + // Couldn't find the file size so don't try to split and pass the request to the next entry in the stack. + StreamStackEntry::QueueRequest(request); + }; + m_numMetaDataRetrievalInProgress++; + FileRequest* fileSizeRequest = m_context->GetNewInternalRequest(); + fileSizeRequest->CreateFileMetaDataRetrieval(data.m_path); + fileSizeRequest->SetCompletionCallback(AZStd::move(continueReadFile)); + StreamStackEntry::QueueRequest(fileSizeRequest); + } + void BlockCache::ContinueReadFile(FileRequest* request, u64 fileLength) + { + Section prolog; + Section main; + Section epilog; - auto& data = AZStd::get(request->GetCommand()); + auto& data = AZStd::get(request->GetCommand()); - if (!SplitRequest(prolog, main, epilog, data.m_path, fileLength, data.m_offset, data.m_size, - reinterpret_cast(data.m_output))) - { - m_context->MarkRequestAsCompleted(request); - return; - } + if (!SplitRequest(prolog, main, epilog, data.m_path, fileLength, data.m_offset, data.m_size, + reinterpret_cast(data.m_output))) + { + m_context->MarkRequestAsCompleted(request); + return; + } - if (prolog.m_used || epilog.m_used) - { - m_cacheableStat.PushSample(1.0); - Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); - } - else - { - // Nothing to cache so simply forward the call to the next entry in the stack for direct reading. - m_cacheableStat.PushSample(0.0); - Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); - m_next->QueueRequest(request); - return; - } + if (prolog.m_used || epilog.m_used) + { + m_cacheableStat.PushSample(1.0); + Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); + } + else + { + // Nothing to cache so simply forward the call to the next entry in the stack for direct reading. + m_cacheableStat.PushSample(0.0); + Statistic::PlotImmediate(m_name, CacheableName, m_cacheableStat.GetMostRecentSample()); + m_next->QueueRequest(request); + return; + } - bool fullyCached = true; - if (prolog.m_used) + bool fullyCached = true; + if (prolog.m_used) + { + if (m_onlyEpilogWrites && (main.m_used || epilog.m_used)) { - if (m_onlyEpilogWrites && (main.m_used || epilog.m_used)) + // Only the epilog is allowed to write to the cache, but a previous read could + // still have cached the prolog, so check the cache and use the data if it's there + // otherwise merge the section with the main section to have the data read. + if (ReadFromCache(request, prolog, data.m_path) == CacheResult::CacheMiss) { - // Only the epilog is allowed to write to the cache, but a previous read could - // still have cached the prolog, so check the cache and use the data if it's there - // otherwise merge the section with the main section to have the data read. - if (ReadFromCache(request, prolog, data.m_path) == CacheResult::CacheMiss) - { - // The data isn't cached so put the prolog in front of the main section - // so it's read in one read request. If main wasn't used, prefixing the prolog - // will cause it to be filled in and used. - main.Prefix(prolog); - m_hitRateStat.PushSample(0.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - } - else - { - m_hitRateStat.PushSample(1.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - } + // The data isn't cached so put the prolog in front of the main section + // so it's read in one read request. If main wasn't used, prefixing the prolog + // will cause it to be filled in and used. + main.Prefix(prolog); + m_hitRateStat.PushSample(0.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); } else { - // If m_onlyEpilogWrites is set but main and epilog are not filled in, it means that - // the request was so small it fits in one cache block, in which case the prolog and - // epilog are practically the same. Or this code is reached because both prolog and - // epilog are allowed to write. - bool readFromCache = (ServiceFromCache(request, prolog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); - fullyCached = readFromCache && fullyCached; - - m_hitRateStat.PushSample(readFromCache ? 1.0 : 0.0); + m_hitRateStat.PushSample(1.0); Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); } } - - if (main.m_used) - { - FileRequest* mainRequest = m_context->GetNewInternalRequest(); - // No need for a callback as there's nothing to do after the read has been completed. - mainRequest->CreateRead(request, main.m_output, main.m_readSize, data.m_path, - main.m_readOffset, main.m_readSize, data.m_sharedRead); - m_next->QueueRequest(mainRequest); - fullyCached = false; - } - - if (epilog.m_used) + else { - bool readFromCache = (ServiceFromCache(request, epilog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); + // If m_onlyEpilogWrites is set but main and epilog are not filled in, it means that + // the request was so small it fits in one cache block, in which case the prolog and + // epilog are practically the same. Or this code is reached because both prolog and + // epilog are allowed to write. + bool readFromCache = (ServiceFromCache(request, prolog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); fullyCached = readFromCache && fullyCached; m_hitRateStat.PushSample(readFromCache ? 1.0 : 0.0); Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); } - - if (fullyCached) - { - request->SetStatus(IStreamerTypes::RequestStatus::Completed); - m_context->MarkRequestAsCompleted(request); - } - } - - void BlockCache::FlushCache(const RequestPath& filePath) - { - for (u32 i = 0; i < m_numBlocks; ++i) - { - if (m_cachedPaths[i] == filePath) - { - ResetCacheEntry(i); - } - } } - void BlockCache::FlushEntireCache() + if (main.m_used) { - ResetCache(); + FileRequest* mainRequest = m_context->GetNewInternalRequest(); + // No need for a callback as there's nothing to do after the read has been completed. + mainRequest->CreateRead(request, main.m_output, main.m_readSize, data.m_path, + main.m_readOffset, main.m_readSize, data.m_sharedRead); + m_next->QueueRequest(mainRequest); + fullyCached = false; } - void BlockCache::CollectStatistics(AZStd::vector& statistics) const + if (epilog.m_used) { - statistics.push_back(Statistic::CreatePercentage(m_name, CacheHitRateName, CalculateHitRatePercentage())); - statistics.push_back(Statistic::CreatePercentage(m_name, CacheableName, CalculateCacheableRatePercentage())); - statistics.push_back(Statistic::CreateInteger(m_name, "Available slots", CalculateAvailableRequestSlots())); - - StreamStackEntry::CollectStatistics(statistics); - } + bool readFromCache = (ServiceFromCache(request, epilog, data.m_path, data.m_sharedRead) == CacheResult::ReadFromCache); + fullyCached = readFromCache && fullyCached; - double BlockCache::CalculateHitRatePercentage() const - { - return m_hitRateStat.GetAverage(); + m_hitRateStat.PushSample(readFromCache ? 1.0 : 0.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); } - double BlockCache::CalculateCacheableRatePercentage() const + if (fullyCached) { - return m_cacheableStat.GetAverage(); + request->SetStatus(IStreamerTypes::RequestStatus::Completed); + m_context->MarkRequestAsCompleted(request); } + } - s32 BlockCache::CalculateAvailableRequestSlots() const - { - return aznumeric_cast(m_numBlocks) - m_numInFlightRequests - m_numMetaDataRetrievalInProgress - - aznumeric_cast(m_delayedSections.size()); - } - - BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, const RequestPath& filePath) + void BlockCache::FlushCache(const RequestPath& filePath) + { + for (u32 i = 0; i < m_numBlocks; ++i) { - u32 cacheLocation = FindInCache(filePath, section.m_readOffset); - if (cacheLocation != s_fileNotCached) - { - return ReadFromCache(request, section, cacheLocation); - } - else + if (m_cachedPaths[i] == filePath) { - return CacheResult::CacheMiss; + ResetCacheEntry(i); } } + } - BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, u32 cacheBlock) - { - if (!IsCacheBlockInFlight(cacheBlock)) - { - TouchBlock(cacheBlock); - memcpy(section.m_output, GetCacheBlockData(cacheBlock) + section.m_blockOffset, section.m_copySize); - return CacheResult::ReadFromCache; - } - else - { - AZ_Assert(section.m_wait == nullptr, "A wait request has to be set on a block cache section, but one has already been assigned."); - FileRequest* wait = m_context->GetNewInternalRequest(); - wait->CreateWait(request); - section.m_cacheBlockIndex = cacheBlock; - section.m_parent = request; - section.m_wait = wait; - m_pendingRequests.emplace(m_inFlightRequests[cacheBlock], section); - return CacheResult::Queued; - } - } + void BlockCache::FlushEntireCache() + { + ResetCache(); + } - BlockCache::CacheResult BlockCache::ServiceFromCache( - FileRequest* request, Section& section, const RequestPath& filePath, bool sharedRead) - { - AZ_Assert(m_next, "ServiceFromCache in BlockCache was called when the cache doesn't have a way to read files."); + void BlockCache::CollectStatistics(AZStd::vector& statistics) const + { + statistics.push_back(Statistic::CreatePercentage(m_name, CacheHitRateName, CalculateHitRatePercentage())); + statistics.push_back(Statistic::CreatePercentage(m_name, CacheableName, CalculateCacheableRatePercentage())); + statistics.push_back(Statistic::CreateInteger(m_name, "Available slots", CalculateAvailableRequestSlots())); - u32 cacheLocation = FindInCache(filePath, section.m_readOffset); - if (cacheLocation == s_fileNotCached) - { - m_hitRateStat.PushSample(0.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); + StreamStackEntry::CollectStatistics(statistics); + } - section.m_parent = request; - cacheLocation = RecycleOldestBlock(filePath, section.m_readOffset); - if (cacheLocation != s_fileNotCached) - { - FileRequest* readRequest = m_context->GetNewInternalRequest(); - readRequest->CreateRead(request, GetCacheBlockData(cacheLocation), m_blockSize, filePath, section.m_readOffset, - section.m_readSize, sharedRead); - readRequest->SetCompletionCallback([this](FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - CompleteRead(request); - }); - section.m_cacheBlockIndex = cacheLocation; - m_inFlightRequests[cacheLocation] = readRequest; - m_numInFlightRequests++; - - // If set, this is the wait added by the delay. - if (section.m_wait) - { - m_context->MarkRequestAsCompleted(section.m_wait); - section.m_wait = nullptr; - } + double BlockCache::CalculateHitRatePercentage() const + { + return m_hitRateStat.GetAverage(); + } - m_pendingRequests.emplace(readRequest, section); - m_next->QueueRequest(readRequest); - return CacheResult::Queued; - } - else - { - // There's no more space in the cache to store this request to. This is because there are more in-flight requests than - // there are slots in the cache. Delay the request until there's a slot available but add a wait for the section to - // make sure the request can't complete if some parts are read. - if (!section.m_wait) - { - section.m_wait = m_context->GetNewInternalRequest(); - section.m_wait->CreateWait(request); - } - m_delayedSections.push_back(section); - return CacheResult::Delayed; - } - } - else - { - // If set, this is the wait added by the delay when the cache was full. - if (section.m_wait) - { - m_context->MarkRequestAsCompleted(section.m_wait); - section.m_wait = nullptr; - } + double BlockCache::CalculateCacheableRatePercentage() const + { + return m_cacheableStat.GetAverage(); + } - m_hitRateStat.PushSample(1.0); - Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); + s32 BlockCache::CalculateAvailableRequestSlots() const + { + return aznumeric_cast(m_numBlocks) - m_numInFlightRequests - m_numMetaDataRetrievalInProgress - + aznumeric_cast(m_delayedSections.size()); + } - return ReadFromCache(request, section, cacheLocation); - } + BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, const RequestPath& filePath) + { + u32 cacheLocation = FindInCache(filePath, section.m_readOffset); + if (cacheLocation != s_fileNotCached) + { + return ReadFromCache(request, section, cacheLocation); + } + else + { + return CacheResult::CacheMiss; } + } - void BlockCache::CompleteRead(FileRequest& request) + BlockCache::CacheResult BlockCache::ReadFromCache(FileRequest* request, Section& section, u32 cacheBlock) + { + if (!IsCacheBlockInFlight(cacheBlock)) { - auto requestInfo = m_pendingRequests.equal_range(&request); - AZ_Assert(requestInfo.first != requestInfo.second, "Block cache was asked to complete a file request it never queued."); + TouchBlock(cacheBlock); + memcpy(section.m_output, GetCacheBlockData(cacheBlock) + section.m_blockOffset, section.m_copySize); + return CacheResult::ReadFromCache; + } + else + { + AZ_Assert(section.m_wait == nullptr, "A wait request has to be set on a block cache section, but one has already been assigned."); + FileRequest* wait = m_context->GetNewInternalRequest(); + wait->CreateWait(request); + section.m_cacheBlockIndex = cacheBlock; + section.m_parent = request; + section.m_wait = wait; + m_pendingRequests.emplace(m_inFlightRequests[cacheBlock], section); + return CacheResult::Queued; + } + } + + BlockCache::CacheResult BlockCache::ServiceFromCache( + FileRequest* request, Section& section, const RequestPath& filePath, bool sharedRead) + { + AZ_Assert(m_next, "ServiceFromCache in BlockCache was called when the cache doesn't have a way to read files."); - IStreamerTypes::RequestStatus requestStatus = request.GetStatus(); - bool requestWasSuccessful = requestStatus == IStreamerTypes::RequestStatus::Completed; - u32 cacheBlockIndex = requestInfo.first->second.m_cacheBlockIndex; + u32 cacheLocation = FindInCache(filePath, section.m_readOffset); + if (cacheLocation == s_fileNotCached) + { + m_hitRateStat.PushSample(0.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); - for (auto it = requestInfo.first; it != requestInfo.second; ++it) + section.m_parent = request; + cacheLocation = RecycleOldestBlock(filePath, section.m_readOffset); + if (cacheLocation != s_fileNotCached) { - Section& section = it->second; - AZ_Assert(section.m_cacheBlockIndex == cacheBlockIndex, - "Section associated with the file request is referencing the incorrect cache block (%u vs %u).", cacheBlockIndex, section.m_cacheBlockIndex); + FileRequest* readRequest = m_context->GetNewInternalRequest(); + readRequest->CreateRead(request, GetCacheBlockData(cacheLocation), m_blockSize, filePath, section.m_readOffset, + section.m_readSize, sharedRead); + readRequest->SetCompletionCallback([this](FileRequest& request) + { + AZ_PROFILE_FUNCTION(AzCore); + CompleteRead(request); + }); + section.m_cacheBlockIndex = cacheLocation; + m_inFlightRequests[cacheLocation] = readRequest; + m_numInFlightRequests++; + + // If set, this is the wait added by the delay. if (section.m_wait) { - section.m_wait->SetStatus(requestStatus); m_context->MarkRequestAsCompleted(section.m_wait); section.m_wait = nullptr; } - if (requestWasSuccessful) - { - memcpy(section.m_output, GetCacheBlockData(cacheBlockIndex) + section.m_blockOffset, section.m_copySize); - } - } - - if (requestWasSuccessful) - { - TouchBlock(cacheBlockIndex); - m_inFlightRequests[cacheBlockIndex] = nullptr; + m_pendingRequests.emplace(readRequest, section); + m_next->QueueRequest(readRequest); + return CacheResult::Queued; } else { - ResetCacheEntry(cacheBlockIndex); - } - AZ_Assert(m_numInFlightRequests > 0, "Clearing out an in-flight request, but there shouldn't be any in flight according to records."); - m_numInFlightRequests--; - m_pendingRequests.erase(&request); - } - - bool BlockCache::SplitRequest(Section& prolog, Section& main, Section& epilog, - [[maybe_unused]] const RequestPath& filePath, u64 fileLength, - u64 offset, u64 size, u8* buffer) const - { - AZ_Assert(offset + size <= fileLength, "File at path '%s' is being read past the end of the file.", filePath.GetRelativePath()); - - // - // Prolog - // This looks at the request and sees if there's anything in front of the file that should be cached. This also - // deals with the situation where the entire file request fits inside the cache which could mean there's data - // left after the file as well that could be cached. - // - u64 roundedOffsetStart = AZ_SIZE_ALIGN_DOWN(offset, aznumeric_cast(m_blockSize)); - - u64 blockReadSizeStart = AZStd::min(fileLength - roundedOffsetStart, aznumeric_cast(m_blockSize)); - // Check if the request is on the left edge of the cache block, which means there's nothing in front of it - // that could be cached. - if (roundedOffsetStart == offset) - { - if (offset + size >= fileLength) - { - // The entire (remainder) of the file is read so there's nothing to cache - main.m_readOffset = offset; - main.m_readSize = size; - main.m_output = buffer; - main.m_used = true; - return true; - } - else if (size < blockReadSizeStart) + // There's no more space in the cache to store this request to. This is because there are more in-flight requests than + // there are slots in the cache. Delay the request until there's a slot available but add a wait for the section to + // make sure the request can't complete if some parts are read. + if (!section.m_wait) { - // The entire request fits inside a single cache block, but there's more file to read. - prolog.m_readOffset = offset; - prolog.m_readSize = blockReadSizeStart; - prolog.m_blockOffset = 0; - prolog.m_output = buffer; - prolog.m_copySize = size; - prolog.m_used = true; - return true; + section.m_wait = m_context->GetNewInternalRequest(); + section.m_wait->CreateWait(request); } - // In any other case it means that the entire block would be read so caching has no effect. + m_delayedSections.push_back(section); + return CacheResult::Delayed; } - else + } + else + { + // If set, this is the wait added by the delay when the cache was full. + if (section.m_wait) { - // There is a portion of the file before that's not requested so always cache this block. - const u64 blockOffset = offset - roundedOffsetStart; - prolog.m_readOffset = roundedOffsetStart; - prolog.m_blockOffset = blockOffset; - prolog.m_output = buffer; - prolog.m_used = true; - - const bool isEntirelyInCache = blockOffset + size <= blockReadSizeStart; - if (isEntirelyInCache) - { - // The read size is already clamped to the file size above when blockReadSizeStart is set. - AZ_Assert(roundedOffsetStart + blockReadSizeStart <= fileLength, - "Read size in block cache was set to %llu but this is beyond the file length of %llu.", - roundedOffsetStart + blockReadSizeStart, fileLength); - prolog.m_readSize = blockReadSizeStart; - prolog.m_copySize = size; - - // There won't be anything else coming after this so continue reading. - return true; - } - else - { - prolog.m_readSize = blockReadSizeStart; - prolog.m_copySize = blockReadSizeStart - blockOffset; - } + m_context->MarkRequestAsCompleted(section.m_wait); + section.m_wait = nullptr; } + m_hitRateStat.PushSample(1.0); + Statistic::PlotImmediate(m_name, CacheHitRateName, m_hitRateStat.GetMostRecentSample()); + + return ReadFromCache(request, section, cacheLocation); + } + } - // - // Epilog - // Since the prolog already takes care of the situation where the file fits entirely in the cache the epilog is - // much simpler as it only has to look at the case where there is more file after the request to read for caching. - // - u64 roundedOffsetEnd = AZ_SIZE_ALIGN_DOWN(offset + size, aznumeric_cast(m_blockSize)); - u64 copySize = offset + size - roundedOffsetEnd; - u64 blockReadSizeEnd = m_blockSize; - if ((roundedOffsetEnd + blockReadSizeEnd) > fileLength) + void BlockCache::CompleteRead(FileRequest& request) + { + auto requestInfo = m_pendingRequests.equal_range(&request); + AZ_Assert(requestInfo.first != requestInfo.second, "Block cache was asked to complete a file request it never queued."); + + IStreamerTypes::RequestStatus requestStatus = request.GetStatus(); + bool requestWasSuccessful = requestStatus == IStreamerTypes::RequestStatus::Completed; + u32 cacheBlockIndex = requestInfo.first->second.m_cacheBlockIndex; + + for (auto it = requestInfo.first; it != requestInfo.second; ++it) + { + Section& section = it->second; + AZ_Assert(section.m_cacheBlockIndex == cacheBlockIndex, + "Section associated with the file request is referencing the incorrect cache block (%u vs %u).", cacheBlockIndex, section.m_cacheBlockIndex); + if (section.m_wait) { - blockReadSizeEnd = fileLength - roundedOffsetEnd; + section.m_wait->SetStatus(requestStatus); + m_context->MarkRequestAsCompleted(section.m_wait); + section.m_wait = nullptr; } - // If the read doesn't align with the edge of the cache - if (copySize != 0 && copySize < blockReadSizeEnd) + if (requestWasSuccessful) { - epilog.m_readOffset = roundedOffsetEnd; - epilog.m_readSize = blockReadSizeEnd; - epilog.m_blockOffset = 0; - epilog.m_output = buffer + (roundedOffsetEnd - offset); - epilog.m_copySize = copySize; - epilog.m_used = true; + memcpy(section.m_output, GetCacheBlockData(cacheBlockIndex) + section.m_blockOffset, section.m_copySize); } + } - // - // Main - // If this point is reached there's potentially a block between the prolog and epilog that can be directly read. - // - u64 adjustedOffset = offset; - if (prolog.m_used) + if (requestWasSuccessful) + { + TouchBlock(cacheBlockIndex); + m_inFlightRequests[cacheBlockIndex] = nullptr; + } + else + { + ResetCacheEntry(cacheBlockIndex); + } + AZ_Assert(m_numInFlightRequests > 0, "Clearing out an in-flight request, but there shouldn't be any in flight according to records."); + m_numInFlightRequests--; + m_pendingRequests.erase(&request); + } + + bool BlockCache::SplitRequest(Section& prolog, Section& main, Section& epilog, + [[maybe_unused]] const RequestPath& filePath, u64 fileLength, + u64 offset, u64 size, u8* buffer) const + { + AZ_Assert(offset + size <= fileLength, "File at path '%s' is being read past the end of the file.", filePath.GetRelativePath()); + + // + // Prolog + // This looks at the request and sees if there's anything in front of the file that should be cached. This also + // deals with the situation where the entire file request fits inside the cache which could mean there's data + // left after the file as well that could be cached. + // + u64 roundedOffsetStart = AZ_SIZE_ALIGN_DOWN(offset, aznumeric_cast(m_blockSize)); + + u64 blockReadSizeStart = AZStd::min(fileLength - roundedOffsetStart, aznumeric_cast(m_blockSize)); + // Check if the request is on the left edge of the cache block, which means there's nothing in front of it + // that could be cached. + if (roundedOffsetStart == offset) + { + if (offset + size >= fileLength) { - adjustedOffset += prolog.m_copySize; - size -= prolog.m_copySize; + // The entire (remainder) of the file is read so there's nothing to cache + main.m_readOffset = offset; + main.m_readSize = size; + main.m_output = buffer; + main.m_used = true; + return true; } - if (epilog.m_used) + else if (size < blockReadSizeStart) { - size -= epilog.m_copySize; + // The entire request fits inside a single cache block, but there's more file to read. + prolog.m_readOffset = offset; + prolog.m_readSize = blockReadSizeStart; + prolog.m_blockOffset = 0; + prolog.m_output = buffer; + prolog.m_copySize = size; + prolog.m_used = true; + return true; } - AZ_Assert(IStreamerTypes::IsAlignedTo(adjustedOffset, m_blockSize), - "The adjustments made by the prolog should guarantee the offset is aligned to a cache block."); - if (size != 0) + // In any other case it means that the entire block would be read so caching has no effect. + } + else + { + // There is a portion of the file before that's not requested so always cache this block. + const u64 blockOffset = offset - roundedOffsetStart; + prolog.m_readOffset = roundedOffsetStart; + prolog.m_blockOffset = blockOffset; + prolog.m_output = buffer; + prolog.m_used = true; + + const bool isEntirelyInCache = blockOffset + size <= blockReadSizeStart; + if (isEntirelyInCache) + { + // The read size is already clamped to the file size above when blockReadSizeStart is set. + AZ_Assert(roundedOffsetStart + blockReadSizeStart <= fileLength, + "Read size in block cache was set to %llu but this is beyond the file length of %llu.", + roundedOffsetStart + blockReadSizeStart, fileLength); + prolog.m_readSize = blockReadSizeStart; + prolog.m_copySize = size; + + // There won't be anything else coming after this so continue reading. + return true; + } + else { - main.m_readOffset = adjustedOffset; - main.m_readSize = size; - main.m_output = buffer + (adjustedOffset - offset); - main.m_used = true; + prolog.m_readSize = blockReadSizeStart; + prolog.m_copySize = blockReadSizeStart - blockOffset; } - - return true; } - u8* BlockCache::GetCacheBlockData(u32 index) + + // + // Epilog + // Since the prolog already takes care of the situation where the file fits entirely in the cache the epilog is + // much simpler as it only has to look at the case where there is more file after the request to read for caching. + // + u64 roundedOffsetEnd = AZ_SIZE_ALIGN_DOWN(offset + size, aznumeric_cast(m_blockSize)); + u64 copySize = offset + size - roundedOffsetEnd; + u64 blockReadSizeEnd = m_blockSize; + if ((roundedOffsetEnd + blockReadSizeEnd) > fileLength) { - AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); - return m_cache + (index * m_blockSize); + blockReadSizeEnd = fileLength - roundedOffsetEnd; } - void BlockCache::TouchBlock(u32 index) + // If the read doesn't align with the edge of the cache + if (copySize != 0 && copySize < blockReadSizeEnd) { - AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); - m_blockLastTouched[index] = AZStd::chrono::high_resolution_clock::now(); + epilog.m_readOffset = roundedOffsetEnd; + epilog.m_readSize = blockReadSizeEnd; + epilog.m_blockOffset = 0; + epilog.m_output = buffer + (roundedOffsetEnd - offset); + epilog.m_copySize = copySize; + epilog.m_used = true; } - u32 BlockCache::RecycleOldestBlock(const RequestPath& filePath, u64 offset) + // + // Main + // If this point is reached there's potentially a block between the prolog and epilog that can be directly read. + // + u64 adjustedOffset = offset; + if (prolog.m_used) { - AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to recycle a block cache needs to be a multiple of the block size."); + adjustedOffset += prolog.m_copySize; + size -= prolog.m_copySize; + } + if (epilog.m_used) + { + size -= epilog.m_copySize; + } + AZ_Assert(IStreamerTypes::IsAlignedTo(adjustedOffset, m_blockSize), + "The adjustments made by the prolog should guarantee the offset is aligned to a cache block."); + if (size != 0) + { + main.m_readOffset = adjustedOffset; + main.m_readSize = size; + main.m_output = buffer + (adjustedOffset - offset); + main.m_used = true; + } - // Find the oldest cache block. - TimePoint oldest = m_blockLastTouched[0]; - u32 oldestIndex = 0; - for (u32 i = 1; i < m_numBlocks; ++i) - { - if (m_blockLastTouched[i] < oldest && !m_inFlightRequests[i]) - { - oldest = m_blockLastTouched[i]; - oldestIndex = i; - } - } + return true; + } - if (!IsCacheBlockInFlight(oldestIndex)) - { - // Recycle the block. - m_cachedPaths[oldestIndex] = filePath; - m_cachedOffsets[oldestIndex] = offset; - TouchBlock(oldestIndex); - return oldestIndex; - } - else - { - return s_fileNotCached; - } - } + u8* BlockCache::GetCacheBlockData(u32 index) + { + AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); + return m_cache + (index * m_blockSize); + } - u32 BlockCache::FindInCache(const RequestPath& filePath, u64 offset) const + void BlockCache::TouchBlock(u32 index) + { + AZ_Assert(index < m_numBlocks, "Index for touch a cache entry in the BlockCache is out of bounds."); + m_blockLastTouched[index] = AZStd::chrono::high_resolution_clock::now(); + } + + u32 BlockCache::RecycleOldestBlock(const RequestPath& filePath, u64 offset) + { + AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to recycle a block cache needs to be a multiple of the block size."); + + // Find the oldest cache block. + TimePoint oldest = m_blockLastTouched[0]; + u32 oldestIndex = 0; + for (u32 i = 1; i < m_numBlocks; ++i) { - AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to find a block in the block cache needs to be a multiple of the block size."); - for (u32 i = 0; i < m_numBlocks; ++i) + if (m_blockLastTouched[i] < oldest && !m_inFlightRequests[i]) { - if (m_cachedPaths[i] == filePath && m_cachedOffsets[i] == offset) - { - return i; - } + oldest = m_blockLastTouched[i]; + oldestIndex = i; } - - return s_fileNotCached; } - bool BlockCache::IsCacheBlockInFlight(u32 index) const + if (!IsCacheBlockInFlight(oldestIndex)) { - AZ_Assert(index < m_numBlocks, "Index for checking if a cache block is in flight is out of bounds."); - return m_inFlightRequests[index] != nullptr; + // Recycle the block. + m_cachedPaths[oldestIndex] = filePath; + m_cachedOffsets[oldestIndex] = offset; + TouchBlock(oldestIndex); + return oldestIndex; } - - void BlockCache::ResetCacheEntry(u32 index) + else { - AZ_Assert(index < m_numBlocks, "Index for resetting a cache entry in the BlockCache is out of bounds."); - - m_cachedPaths[index].Clear(); - m_cachedOffsets[index] = 0; - m_blockLastTouched[index] = TimePoint::min(); - m_inFlightRequests[index] = nullptr; + return s_fileNotCached; } + } - void BlockCache::ResetCache() + u32 BlockCache::FindInCache(const RequestPath& filePath, u64 offset) const + { + AZ_Assert((offset & (m_blockSize - 1)) == 0, "The offset used to find a block in the block cache needs to be a multiple of the block size."); + for (u32 i = 0; i < m_numBlocks; ++i) { - for (u32 i = 0; i < m_numBlocks; ++i) + if (m_cachedPaths[i] == filePath && m_cachedOffsets[i] == offset) { - ResetCacheEntry(i); + return i; } - m_numInFlightRequests = 0; } - } // namespace IO -} // namespace AZ + + return s_fileNotCached; + } + + bool BlockCache::IsCacheBlockInFlight(u32 index) const + { + AZ_Assert(index < m_numBlocks, "Index for checking if a cache block is in flight is out of bounds."); + return m_inFlightRequests[index] != nullptr; + } + + void BlockCache::ResetCacheEntry(u32 index) + { + AZ_Assert(index < m_numBlocks, "Index for resetting a cache entry in the BlockCache is out of bounds."); + + m_cachedPaths[index].Clear(); + m_cachedOffsets[index] = 0; + m_blockLastTouched[index] = TimePoint::min(); + m_inFlightRequests[index] = nullptr; + } + + void BlockCache::ResetCache() + { + for (u32 i = 0; i < m_numBlocks; ++i) + { + ResetCacheEntry(i); + } + m_numInFlightRequests = 0; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp index e0e512e21f..b80a1ea724 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/DedicatedCache.cpp @@ -12,320 +12,317 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr DedicatedCacheConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr DedicatedCacheConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) + size_t blockSize; + switch (m_blockSize) { - size_t blockSize; - switch (m_blockSize) - { - case BlockCacheConfig::BlockSize::MaxTransfer: - blockSize = hardware.m_maxTransfer; - break; - case BlockCacheConfig::BlockSize::MemoryAlignment: - blockSize = hardware.m_maxPhysicalSectorSize; - break; - case BlockCacheConfig::BlockSize::SizeAlignment: - blockSize = hardware.m_maxLogicalSectorSize; - break; - default: - blockSize = m_blockSize; - break; - } - - u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); - if (blockSize > cacheSize) - { - AZ_Warning("Streamer", false, "Size (%u) for DedicatedCache isn't big enough to hold at least one cache blocks of size (%zu). " - "The cache size will be increased to fit one cache block.", cacheSize, blockSize); - cacheSize = aznumeric_caster(blockSize); - } + case BlockCacheConfig::BlockSize::MaxTransfer: + blockSize = hardware.m_maxTransfer; + break; + case BlockCacheConfig::BlockSize::MemoryAlignment: + blockSize = hardware.m_maxPhysicalSectorSize; + break; + case BlockCacheConfig::BlockSize::SizeAlignment: + blockSize = hardware.m_maxLogicalSectorSize; + break; + default: + blockSize = m_blockSize; + break; + } - auto stackEntry = AZStd::make_shared( - cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), m_writeOnlyEpilog); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; + u32 cacheSize = static_cast(m_cacheSizeMib * 1_mib); + if (blockSize > cacheSize) + { + AZ_Warning("Streamer", false, "Size (%u) for DedicatedCache isn't big enough to hold at least one cache blocks of size (%zu). " + "The cache size will be increased to fit one cache block.", cacheSize, blockSize); + cacheSize = aznumeric_caster(blockSize); } - void DedicatedCacheConfig::Reflect(AZ::ReflectContext* context) + auto stackEntry = AZStd::make_shared( + cacheSize, aznumeric_cast(blockSize), aznumeric_cast(hardware.m_maxPhysicalSectorSize), m_writeOnlyEpilog); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } + + void DedicatedCacheConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Class() - ->Version(1) - ->Field("CacheSizeMib", &DedicatedCacheConfig::m_cacheSizeMib) - ->Field("BlockSize", &DedicatedCacheConfig::m_blockSize) - ->Field("WriteOnlyEpilog", &DedicatedCacheConfig::m_writeOnlyEpilog); - } + serializeContext->Class() + ->Version(1) + ->Field("CacheSizeMib", &DedicatedCacheConfig::m_cacheSizeMib) + ->Field("BlockSize", &DedicatedCacheConfig::m_blockSize) + ->Field("WriteOnlyEpilog", &DedicatedCacheConfig::m_writeOnlyEpilog); } + } + + // + // DedicatedCache + // - // - // DedicatedCache - // + DedicatedCache::DedicatedCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) + : StreamStackEntry("Dedicated cache") + , m_cacheSize(cacheSize) + , m_alignment(alignment) + , m_blockSize(blockSize) + , m_onlyEpilogWrites(onlyEpilogWrites) + { + } - DedicatedCache::DedicatedCache(u64 cacheSize, u32 blockSize, u32 alignment, bool onlyEpilogWrites) - : StreamStackEntry("Dedicated cache") - , m_cacheSize(cacheSize) - , m_alignment(alignment) - , m_blockSize(blockSize) - , m_onlyEpilogWrites(onlyEpilogWrites) + void DedicatedCache::SetNext(AZStd::shared_ptr next) + { + m_next = AZStd::move(next); + for (AZStd::unique_ptr& cache : m_cachedFileCaches) { + cache->SetNext(m_next); } + } - void DedicatedCache::SetNext(AZStd::shared_ptr next) + void DedicatedCache::SetContext(StreamerContext& context) + { + StreamStackEntry::SetContext(context); + for (AZStd::unique_ptr& cache : m_cachedFileCaches) { - m_next = AZStd::move(next); - for (AZStd::unique_ptr& cache : m_cachedFileCaches) - { - cache->SetNext(m_next); - } + cache->SetContext(context); } + } + + void DedicatedCache::PrepareRequest(FileRequest* request) + { + AZ_Assert(request, "PrepareRequest was provided a null request."); - void DedicatedCache::SetContext(StreamerContext& context) + // Claim the requests so other entries can't claim it and make updates. + AZStd::visit([this, request](auto&& args) { - StreamStackEntry::SetContext(context); - for (AZStd::unique_ptr& cache : m_cachedFileCaches) + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - cache->SetContext(context); + args.m_range = FileRange::CreateRangeForEntireFile(); + m_context->PushPreparedRequest(request); } - } - - void DedicatedCache::PrepareRequest(FileRequest* request) - { - AZ_Assert(request, "PrepareRequest was provided a null request."); - - // Claim the requests so other entries can't claim it and make updates. - AZStd::visit([this, request](auto&& args) + else if constexpr (AZStd::is_same_v) { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - args.m_range = FileRange::CreateRangeForEntireFile(); - m_context->PushPreparedRequest(request); - } - else if constexpr (AZStd::is_same_v) - { - args.m_range = FileRange::CreateRangeForEntireFile(); - m_context->PushPreparedRequest(request); - } - else - { - StreamStackEntry::PrepareRequest(request); - } - }, request->GetCommand()); - } + args.m_range = FileRange::CreateRangeForEntireFile(); + m_context->PushPreparedRequest(request); + } + else + { + StreamStackEntry::PrepareRequest(request); + } + }, request->GetCommand()); + } - void DedicatedCache::QueueRequest(FileRequest* request) - { - AZ_Assert(request, "QueueRequest was provided a null request."); + void DedicatedCache::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); - AZStd::visit([this, request](auto&& args) + AZStd::visit([this, request](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - ReadFile(request, args); - return; - } - else if constexpr (AZStd::is_same_v) - { - CreateDedicatedCache(request, args); - return; - } - else if constexpr (AZStd::is_same_v) + ReadFile(request, args); + return; + } + else if constexpr (AZStd::is_same_v) + { + CreateDedicatedCache(request, args); + return; + } + else if constexpr (AZStd::is_same_v) + { + DestroyDedicatedCache(request, args); + return; + } + else + { + if constexpr (AZStd::is_same_v) { - DestroyDedicatedCache(request, args); - return; + FlushCache(args.m_path); } - else + else if constexpr (AZStd::is_same_v) { - if constexpr (AZStd::is_same_v) - { - FlushCache(args.m_path); - } - else if constexpr (AZStd::is_same_v) - { - FlushEntireCache(); - } - StreamStackEntry::QueueRequest(request); + FlushEntireCache(); } - }, request->GetCommand()); - } + StreamStackEntry::QueueRequest(request); + } + }, request->GetCommand()); + } - bool DedicatedCache::ExecuteRequests() + bool DedicatedCache::ExecuteRequests() + { + bool hasProcessedRequest = false; + for (AZStd::unique_ptr& cache : m_cachedFileCaches) { - bool hasProcessedRequest = false; - for (AZStd::unique_ptr& cache : m_cachedFileCaches) - { - hasProcessedRequest = cache->ExecuteRequests() || hasProcessedRequest; - } - return StreamStackEntry::ExecuteRequests() || hasProcessedRequest; + hasProcessedRequest = cache->ExecuteRequests() || hasProcessedRequest; } + return StreamStackEntry::ExecuteRequests() || hasProcessedRequest; + } - void DedicatedCache::UpdateStatus(Status& status) const - { - // Available slots are not updated because the dedicated caches are often - // small and specific to a tiny subset of files that are loaded. It would therefore - // return a small number of slots that would needlessly hamper streaming as it doesn't - // apply to the majority of files. + void DedicatedCache::UpdateStatus(Status& status) const + { + // Available slots are not updated because the dedicated caches are often + // small and specific to a tiny subset of files that are loaded. It would therefore + // return a small number of slots that would needlessly hamper streaming as it doesn't + // apply to the majority of files. - bool isIdle = true; - for (auto& cache : m_cachedFileCaches) - { - Status blockStatus; - cache->UpdateStatus(blockStatus); - isIdle = isIdle && blockStatus.m_isIdle; - } - status.m_isIdle = status.m_isIdle && isIdle; - StreamStackEntry::UpdateStatus(status); + bool isIdle = true; + for (auto& cache : m_cachedFileCaches) + { + Status blockStatus; + cache->UpdateStatus(blockStatus); + isIdle = isIdle && blockStatus.m_isIdle; } + status.m_isIdle = status.m_isIdle && isIdle; + StreamStackEntry::UpdateStatus(status); + } - void DedicatedCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, - AZStd::vector& internalPending, StreamerContext::PreparedQueue::iterator pendingBegin, - StreamerContext::PreparedQueue::iterator pendingEnd) + void DedicatedCache::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, + AZStd::vector& internalPending, StreamerContext::PreparedQueue::iterator pendingBegin, + StreamerContext::PreparedQueue::iterator pendingEnd) + { + for (auto& cache : m_cachedFileCaches) { - for (auto& cache : m_cachedFileCaches) - { - cache->AddDelayedRequests(internalPending); - } + cache->AddDelayedRequests(internalPending); + } - StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); + StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); - for (auto& cache : m_cachedFileCaches) - { - cache->UpdatePendingRequestEstimations(); - } + for (auto& cache : m_cachedFileCaches) + { + cache->UpdatePendingRequestEstimations(); } + } - void DedicatedCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + void DedicatedCache::ReadFile(FileRequest* request, FileRequest::ReadData& data) + { + size_t index = FindCache(data.m_path, data.m_offset); + if (index == s_fileNotFound) { - size_t index = FindCache(data.m_path, data.m_offset); - if (index == s_fileNotFound) + m_usagePercentageStat.PushSample(0.0); + if (m_next) { - m_usagePercentageStat.PushSample(0.0); - if (m_next) - { - m_next->QueueRequest(request); - } + m_next->QueueRequest(request); } - else - { - m_usagePercentageStat.PushSample(1.0); - BlockCache& cache = *m_cachedFileCaches[index]; - cache.QueueRequest(request); + } + else + { + m_usagePercentageStat.PushSample(1.0); + BlockCache& cache = *m_cachedFileCaches[index]; + cache.QueueRequest(request); #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - m_overallHitRateStat.PushSample(cache.CalculateHitRatePercentage()); - m_overallCacheableRateStat.PushSample(cache.CalculateCacheableRatePercentage()); + m_overallHitRateStat.PushSample(cache.CalculateHitRatePercentage()); + m_overallCacheableRateStat.PushSample(cache.CalculateCacheableRatePercentage()); #endif - } } + } - void DedicatedCache::FlushCache(const RequestPath& filePath) + void DedicatedCache::FlushCache(const RequestPath& filePath) + { + size_t count = m_cachedFileNames.size(); + for (size_t i = 0; i < count; ++i) { - size_t count = m_cachedFileNames.size(); - for (size_t i = 0; i < count; ++i) + if (m_cachedFileNames[i] == filePath) { - if (m_cachedFileNames[i] == filePath) - { - // Flush the entire block cache as it's entirely dedicated to the found file. - m_cachedFileCaches[i]->FlushEntireCache(); - } + // Flush the entire block cache as it's entirely dedicated to the found file. + m_cachedFileCaches[i]->FlushEntireCache(); } } + } - void DedicatedCache::FlushEntireCache() + void DedicatedCache::FlushEntireCache() + { + for (AZStd::unique_ptr& cache : m_cachedFileCaches) { - for (AZStd::unique_ptr& cache : m_cachedFileCaches) - { - cache->FlushEntireCache(); - } + cache->FlushEntireCache(); } + } - void DedicatedCache::CollectStatistics(AZStd::vector& statistics) const - { - statistics.push_back(Statistic::CreatePercentage(m_name, "Reads from dedicated cache", m_usagePercentageStat.GetAverage())); + void DedicatedCache::CollectStatistics(AZStd::vector& statistics) const + { + statistics.push_back(Statistic::CreatePercentage(m_name, "Reads from dedicated cache", m_usagePercentageStat.GetAverage())); #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - statistics.push_back(Statistic::CreatePercentage(m_name, "Overall cacheable rate", m_overallCacheableRateStat.GetAverage())); - statistics.push_back(Statistic::CreatePercentage(m_name, "Overall hit rate", m_overallHitRateStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, "Overall cacheable rate", m_overallCacheableRateStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, "Overall hit rate", m_overallHitRateStat.GetAverage())); #endif - statistics.push_back(Statistic::CreateInteger(m_name, "Num dedicated caches", aznumeric_caster(m_cachedFileNames.size()))); - StreamStackEntry::CollectStatistics(statistics); - } + statistics.push_back(Statistic::CreateInteger(m_name, "Num dedicated caches", aznumeric_caster(m_cachedFileNames.size()))); + StreamStackEntry::CollectStatistics(statistics); + } - void DedicatedCache::CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data) + void DedicatedCache::CreateDedicatedCache(FileRequest* request, FileRequest::CreateDedicatedCacheData& data) + { + size_t index = FindCache(data.m_path, data.m_range); + if (index == s_fileNotFound) { - size_t index = FindCache(data.m_path, data.m_range); - if (index == s_fileNotFound) - { - index = m_cachedFileCaches.size(); - m_cachedFileNames.push_back(data.m_path); - m_cachedFileRanges.push_back(data.m_range); - m_cachedFileCaches.push_back(AZStd::make_unique(m_cacheSize, m_blockSize, m_alignment, m_onlyEpilogWrites)); - m_cachedFileCaches[index]->SetNext(m_next); - m_cachedFileCaches[index]->SetContext(*m_context); - m_cachedFileRefCounts.push_back(1); - } - else - { - ++m_cachedFileRefCounts[index]; - } - request->SetStatus(IStreamerTypes::RequestStatus::Completed); - m_context->MarkRequestAsCompleted(request); + index = m_cachedFileCaches.size(); + m_cachedFileNames.push_back(data.m_path); + m_cachedFileRanges.push_back(data.m_range); + m_cachedFileCaches.push_back(AZStd::make_unique(m_cacheSize, m_blockSize, m_alignment, m_onlyEpilogWrites)); + m_cachedFileCaches[index]->SetNext(m_next); + m_cachedFileCaches[index]->SetContext(*m_context); + m_cachedFileRefCounts.push_back(1); } + else + { + ++m_cachedFileRefCounts[index]; + } + request->SetStatus(IStreamerTypes::RequestStatus::Completed); + m_context->MarkRequestAsCompleted(request); + } - void DedicatedCache::DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data) + void DedicatedCache::DestroyDedicatedCache(FileRequest* request, FileRequest::DestroyDedicatedCacheData& data) + { + size_t index = FindCache(data.m_path, data.m_range); + if (index != s_fileNotFound) { - size_t index = FindCache(data.m_path, data.m_range); - if (index != s_fileNotFound) + if (m_cachedFileRefCounts[index] > 0) { - if (m_cachedFileRefCounts[index] > 0) + --m_cachedFileRefCounts[index]; + if (m_cachedFileRefCounts[index] == 0) { - --m_cachedFileRefCounts[index]; - if (m_cachedFileRefCounts[index] == 0) - { - m_cachedFileNames.erase(m_cachedFileNames.begin() + index); - m_cachedFileRanges.erase(m_cachedFileRanges.begin() + index); - m_cachedFileCaches.erase(m_cachedFileCaches.begin() + index); - m_cachedFileRefCounts.erase(m_cachedFileRefCounts.begin() + index); - } - request->SetStatus(IStreamerTypes::RequestStatus::Completed); - m_context->MarkRequestAsCompleted(request); - return; + m_cachedFileNames.erase(m_cachedFileNames.begin() + index); + m_cachedFileRanges.erase(m_cachedFileRanges.begin() + index); + m_cachedFileCaches.erase(m_cachedFileCaches.begin() + index); + m_cachedFileRefCounts.erase(m_cachedFileRefCounts.begin() + index); } + request->SetStatus(IStreamerTypes::RequestStatus::Completed); + m_context->MarkRequestAsCompleted(request); + return; } - request->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); } + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + } - size_t DedicatedCache::FindCache(const RequestPath& filename, FileRange range) + size_t DedicatedCache::FindCache(const RequestPath& filename, FileRange range) + { + size_t count = m_cachedFileNames.size(); + for (size_t i = 0; i < count; ++i) { - size_t count = m_cachedFileNames.size(); - for (size_t i = 0; i < count; ++i) + if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i] == range) { - if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i] == range) - { - return i; - } + return i; } - return s_fileNotFound; } + return s_fileNotFound; + } - size_t DedicatedCache::FindCache(const RequestPath& filename, u64 offset) + size_t DedicatedCache::FindCache(const RequestPath& filename, u64 offset) + { + size_t count = m_cachedFileNames.size(); + for (size_t i = 0; i < count; ++i) { - size_t count = m_cachedFileNames.size(); - for (size_t i = 0; i < count; ++i) + if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i].IsInRange(offset)) { - if (m_cachedFileNames[i] == filename && m_cachedFileRanges[i].IsInRange(offset)) - { - return i; - } + return i; } - return s_fileNotFound; } - } // namespace IO -} // namespace AZ + return s_fileNotFound; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp index df4f77b722..3a568d3f47 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRange.cpp @@ -8,104 +8,101 @@ #include -namespace AZ +namespace AZ::IO { - namespace IO + FileRange FileRange::CreateRange(u64 offset, u64 size) { - FileRange FileRange::CreateRange(u64 offset, u64 size) - { - FileRange result; - result.m_hasOffsetEndSet = true; - result.m_isEntireFile = false; - result.m_offsetBegin = offset; - result.m_offsetEnd = offset + size; - return result; - } + FileRange result; + result.m_hasOffsetEndSet = true; + result.m_isEntireFile = false; + result.m_offsetBegin = offset; + result.m_offsetEnd = offset + size; + return result; + } - FileRange FileRange::CreateRangeForEntireFile() - { - FileRange result; - result.m_hasOffsetEndSet = false; - result.m_isEntireFile = true; - result.m_offsetBegin = 0; - result.m_offsetEnd = (static_cast(1) << 63) - 1; - return result; - } + FileRange FileRange::CreateRangeForEntireFile() + { + FileRange result; + result.m_hasOffsetEndSet = false; + result.m_isEntireFile = true; + result.m_offsetBegin = 0; + result.m_offsetEnd = (static_cast(1) << 63) - 1; + return result; + } - FileRange FileRange::CreateRangeForEntireFile(u64 fileSize) - { - FileRange result; - result.m_hasOffsetEndSet = true; - result.m_isEntireFile = true; - result.m_offsetBegin = 0; - result.m_offsetEnd = fileSize; - return result; - } + FileRange FileRange::CreateRangeForEntireFile(u64 fileSize) + { + FileRange result; + result.m_hasOffsetEndSet = true; + result.m_isEntireFile = true; + result.m_offsetBegin = 0; + result.m_offsetEnd = fileSize; + return result; + } - FileRange::FileRange() - : m_isEntireFile(false) - , m_offsetBegin(0) - , m_hasOffsetEndSet(false) - , m_offsetEnd(0) - { - } + FileRange::FileRange() + : m_isEntireFile(false) + , m_offsetBegin(0) + , m_hasOffsetEndSet(false) + , m_offsetEnd(0) + { + } - bool FileRange::operator==(const FileRange& rhs) const + bool FileRange::operator==(const FileRange& rhs) const + { + if (m_isEntireFile) { - if (m_isEntireFile) - { - return rhs.m_isEntireFile && m_offsetBegin == rhs.m_offsetBegin; - } - else - { - return m_offsetBegin == rhs.m_offsetBegin && m_offsetEnd == rhs.m_offsetEnd; - } + return rhs.m_isEntireFile && m_offsetBegin == rhs.m_offsetBegin; } - - bool FileRange::operator!=(const FileRange& rhs) const + else { - if (m_isEntireFile) - { - return !rhs.m_isEntireFile || m_offsetBegin != rhs.m_offsetBegin; - } - else - { - return m_offsetBegin != rhs.m_offsetBegin || m_offsetEnd != rhs.m_offsetEnd; - } + return m_offsetBegin == rhs.m_offsetBegin && m_offsetEnd == rhs.m_offsetEnd; } + } - bool FileRange::IsEntireFile() const + bool FileRange::operator!=(const FileRange& rhs) const + { + if (m_isEntireFile) { - return m_isEntireFile != 0; + return !rhs.m_isEntireFile || m_offsetBegin != rhs.m_offsetBegin; } - - bool FileRange::IsSizeKnown() const + else { - // m_hasOffsetEndSet being zero has the special meaning that the file size has not - // specifically been set yet. - return m_hasOffsetEndSet != 0; + return m_offsetBegin != rhs.m_offsetBegin || m_offsetEnd != rhs.m_offsetEnd; } + } - bool FileRange::IsInRange(u64 offset) const - { - return m_offsetBegin <= offset && offset < m_offsetEnd; - } + bool FileRange::IsEntireFile() const + { + return m_isEntireFile != 0; + } - u64 FileRange::GetOffset() const - { - return m_offsetBegin; - } + bool FileRange::IsSizeKnown() const + { + // m_hasOffsetEndSet being zero has the special meaning that the file size has not + // specifically been set yet. + return m_hasOffsetEndSet != 0; + } - u64 FileRange::GetSize() const - { - AZ_Assert(m_hasOffsetEndSet, "Calling GetSize on a FileRange that doesn't have a size specified."); - return m_offsetEnd - m_offsetBegin; - } + bool FileRange::IsInRange(u64 offset) const + { + return m_offsetBegin <= offset && offset < m_offsetEnd; + } - u64 FileRange::GetEndPoint() const - { - AZ_Assert(m_hasOffsetEndSet, "Calling GetEndPoint on a FileRange that doesn't have an end offset specified."); - return m_offsetEnd; - } - } // namespace IO -} // namesapce AZ + u64 FileRange::GetOffset() const + { + return m_offsetBegin; + } + + u64 FileRange::GetSize() const + { + AZ_Assert(m_hasOffsetEndSet, "Calling GetSize on a FileRange that doesn't have a size specified."); + return m_offsetEnd - m_offsetBegin; + } + + u64 FileRange::GetEndPoint() const + { + AZ_Assert(m_hasOffsetEndSet, "Calling GetEndPoint on a FileRange that doesn't have an end offset specified."); + return m_offsetEnd; + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp index 7b9cde76d3..fc05b77b36 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FileRequest.cpp @@ -12,469 +12,466 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO - { - // - // Command structures. - // - - FileRequest::ExternalRequestData::ExternalRequestData(FileRequestPtr&& request) - : m_request(AZStd::move(request)) - {} - - FileRequest::RequestPathStoreData::RequestPathStoreData(RequestPath path) - : m_path(AZStd::move(path)) - {} - - FileRequest::ReadRequestData::ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - : m_path(AZStd::move(path)) - , m_allocator(nullptr) - , m_deadline(deadline) - , m_output(output) - , m_outputSize(outputSize) - , m_offset(offset) - , m_size(size) - , m_priority(priority) - , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. - {} - - FileRequest::ReadRequestData::ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, - u64 offset, u64 size, AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - : m_path(AZStd::move(path)) - , m_allocator(allocator) - , m_deadline(deadline) - , m_output(nullptr) - , m_outputSize(0) - , m_offset(offset) - , m_size(size) - , m_priority(priority) - , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. - {} - - FileRequest::ReadRequestData::~ReadRequestData() + // + // Command structures. + // + + FileRequest::ExternalRequestData::ExternalRequestData(FileRequestPtr&& request) + : m_request(AZStd::move(request)) + {} + + FileRequest::RequestPathStoreData::RequestPathStoreData(RequestPath path) + : m_path(AZStd::move(path)) + {} + + FileRequest::ReadRequestData::ReadRequestData(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + : m_path(AZStd::move(path)) + , m_allocator(nullptr) + , m_deadline(deadline) + , m_output(output) + , m_outputSize(outputSize) + , m_offset(offset) + , m_size(size) + , m_priority(priority) + , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. + {} + + FileRequest::ReadRequestData::ReadRequestData(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, + u64 offset, u64 size, AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + : m_path(AZStd::move(path)) + , m_allocator(allocator) + , m_deadline(deadline) + , m_output(nullptr) + , m_outputSize(0) + , m_offset(offset) + , m_size(size) + , m_priority(priority) + , m_memoryType(IStreamerTypes::MemoryType::ReadWrite) // Only generic memory can be assigned externally. + {} + + FileRequest::ReadRequestData::~ReadRequestData() + { + if (m_allocator != nullptr) { - if (m_allocator != nullptr) + if (m_output != nullptr) { - if (m_output != nullptr) - { - m_allocator->Release(m_output); - } - m_allocator->UnlockAllocator(); + m_allocator->Release(m_output); } - } - - FileRequest::ReadData::ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead) - : m_output(output) - , m_outputSize(outputSize) - , m_path(path) - , m_offset(offset) - , m_size(size) - , m_sharedRead(sharedRead) - {} - - FileRequest::CompressedReadData::CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize) - : m_compressionInfo(AZStd::move(compressionInfo)) - , m_output(output) - , m_readOffset(readOffset) - , m_readSize(readSize) - {} - - FileRequest::FileExistsCheckData::FileExistsCheckData(const RequestPath& path) - : m_path(path) - {} - - FileRequest::FileMetaDataRetrievalData::FileMetaDataRetrievalData(const RequestPath& path) - : m_path(path) - {} - - FileRequest::CancelData::CancelData(FileRequestPtr target) - : m_target(AZStd::move(target)) - {} - - FileRequest::FlushData::FlushData(RequestPath path) - : m_path(AZStd::move(path)) - {} - - FileRequest::RescheduleData::RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, - IStreamerTypes::Priority newPriority) - : m_target(AZStd::move(target)) - , m_newDeadline(newDeadline) - , m_newPriority(newPriority) - {} - - FileRequest::CreateDedicatedCacheData::CreateDedicatedCacheData(RequestPath path, const FileRange& range) - : m_path(AZStd::move(path)) - , m_range(range) - {} - - FileRequest::DestroyDedicatedCacheData::DestroyDedicatedCacheData(RequestPath path, const FileRange& range) - : m_path(AZStd::move(path)) - , m_range(range) - {} - - FileRequest::ReportData::ReportData(ReportType reportType) - : m_reportType(reportType) - {} - - FileRequest::CustomData::CustomData(AZStd::any data, bool failWhenUnhandled) - : m_data(AZStd::move(data)) - , m_failWhenUnhandled(failWhenUnhandled) - {} - - - // - // FileRequest - // - - FileRequest::FileRequest(Usage usage) - : m_usage(usage) - { - Reset(); - } - - FileRequest::~FileRequest() - { - Reset(); - } - - void FileRequest::CreateRequestLink(FileRequestPtr&& request) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'RequestLink', but another task was already assigned."); - m_parent = request->m_request.m_parent; - request->m_request.m_parent = this; - m_dependencies++; - m_command.emplace(AZStd::move(request)); - } - - void FileRequest::CreateRequestPathStore(FileRequest* parent, RequestPath path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'CreateRequestPathStore', but another task was already assigned."); - m_command.emplace(AZStd::move(path)); - SetOptionalParent(parent); - } + m_allocator->UnlockAllocator(); + } + } + + FileRequest::ReadData::ReadData(void* output, u64 outputSize, const RequestPath& path, u64 offset, u64 size, bool sharedRead) + : m_output(output) + , m_outputSize(outputSize) + , m_path(path) + , m_offset(offset) + , m_size(size) + , m_sharedRead(sharedRead) + {} + + FileRequest::CompressedReadData::CompressedReadData(CompressionInfo&& compressionInfo, void* output, u64 readOffset, u64 readSize) + : m_compressionInfo(AZStd::move(compressionInfo)) + , m_output(output) + , m_readOffset(readOffset) + , m_readSize(readSize) + {} + + FileRequest::FileExistsCheckData::FileExistsCheckData(const RequestPath& path) + : m_path(path) + {} + + FileRequest::FileMetaDataRetrievalData::FileMetaDataRetrievalData(const RequestPath& path) + : m_path(path) + {} + + FileRequest::CancelData::CancelData(FileRequestPtr target) + : m_target(AZStd::move(target)) + {} + + FileRequest::FlushData::FlushData(RequestPath path) + : m_path(AZStd::move(path)) + {} + + FileRequest::RescheduleData::RescheduleData(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, + IStreamerTypes::Priority newPriority) + : m_target(AZStd::move(target)) + , m_newDeadline(newDeadline) + , m_newPriority(newPriority) + {} + + FileRequest::CreateDedicatedCacheData::CreateDedicatedCacheData(RequestPath path, const FileRange& range) + : m_path(AZStd::move(path)) + , m_range(range) + {} + + FileRequest::DestroyDedicatedCacheData::DestroyDedicatedCacheData(RequestPath path, const FileRange& range) + : m_path(AZStd::move(path)) + , m_range(range) + {} + + FileRequest::ReportData::ReportData(ReportType reportType) + : m_reportType(reportType) + {} + + FileRequest::CustomData::CustomData(AZStd::any data, bool failWhenUnhandled) + : m_data(AZStd::move(data)) + , m_failWhenUnhandled(failWhenUnhandled) + {} + + + // + // FileRequest + // + + FileRequest::FileRequest(Usage usage) + : m_usage(usage) + { + Reset(); + } - void FileRequest::CreateReadRequest(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); - m_command.emplace(AZStd::move(path), output, outputSize, offset, size, deadline, priority); - } + FileRequest::~FileRequest() + { + Reset(); + } - void FileRequest::CreateReadRequest(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, - AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); - m_command.emplace(AZStd::move(path), allocator, offset, size, deadline, priority); - } + void FileRequest::CreateRequestLink(FileRequestPtr&& request) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'RequestLink', but another task was already assigned."); + m_parent = request->m_request.m_parent; + request->m_request.m_parent = this; + m_dependencies++; + m_command.emplace(AZStd::move(request)); + } + + void FileRequest::CreateRequestPathStore(FileRequest* parent, RequestPath path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'CreateRequestPathStore', but another task was already assigned."); + m_command.emplace(AZStd::move(path)); + SetOptionalParent(parent); + } + + void FileRequest::CreateReadRequest(RequestPath path, void* output, u64 outputSize, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); + m_command.emplace(AZStd::move(path), output, outputSize, offset, size, deadline, priority); + } - void FileRequest::CreateRead(FileRequest* parent, void* output, u64 outputSize, const RequestPath& path, - u64 offset, u64 size, bool sharedRead) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Read', but another task was already assigned."); - m_command.emplace(output, outputSize, AZStd::move(path), offset, size, sharedRead); - SetOptionalParent(parent); - } + void FileRequest::CreateReadRequest(RequestPath path, IStreamerTypes::RequestMemoryAllocator* allocator, u64 offset, u64 size, + AZStd::chrono::system_clock::time_point deadline, IStreamerTypes::Priority priority) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'ReadRequest', but another task was already assigned."); + m_command.emplace(AZStd::move(path), allocator, offset, size, deadline, priority); + } - void FileRequest::CreateCompressedRead(FileRequest* parent, const CompressionInfo& compressionInfo, - void* output, u64 readOffset, u64 readSize) - { - CreateCompressedRead(parent, CompressionInfo(compressionInfo), output, readOffset, readSize); - } + void FileRequest::CreateRead(FileRequest* parent, void* output, u64 outputSize, const RequestPath& path, + u64 offset, u64 size, bool sharedRead) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Read', but another task was already assigned."); + m_command.emplace(output, outputSize, AZStd::move(path), offset, size, sharedRead); + SetOptionalParent(parent); + } + + void FileRequest::CreateCompressedRead(FileRequest* parent, const CompressionInfo& compressionInfo, + void* output, u64 readOffset, u64 readSize) + { + CreateCompressedRead(parent, CompressionInfo(compressionInfo), output, readOffset, readSize); + } - void FileRequest::CreateCompressedRead(FileRequest* parent, CompressionInfo&& compressionInfo, - void* output, u64 readOffset, u64 readSize) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'CompressedRead', but another task was already assigned."); - m_command.emplace(AZStd::move(compressionInfo), output, readOffset, readSize); - SetOptionalParent(parent); - } + void FileRequest::CreateCompressedRead(FileRequest* parent, CompressionInfo&& compressionInfo, + void* output, u64 readOffset, u64 readSize) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'CompressedRead', but another task was already assigned."); + m_command.emplace(AZStd::move(compressionInfo), output, readOffset, readSize); + SetOptionalParent(parent); + } - void FileRequest::CreateWait(FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Wait', but another task was already assigned."); - m_command.emplace(); - SetOptionalParent(parent); - } + void FileRequest::CreateWait(FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Wait', but another task was already assigned."); + m_command.emplace(); + SetOptionalParent(parent); + } - void FileRequest::CreateFileExistsCheck(const RequestPath& path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'FileExistsCheck', but another task was already assigned."); - m_command.emplace(path); - } + void FileRequest::CreateFileExistsCheck(const RequestPath& path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'FileExistsCheck', but another task was already assigned."); + m_command.emplace(path); + } - void FileRequest::CreateFileMetaDataRetrieval(const RequestPath& path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'FileMetaDataRetrieval', but another task was already assigned."); - m_command.emplace(path); - } + void FileRequest::CreateFileMetaDataRetrieval(const RequestPath& path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'FileMetaDataRetrieval', but another task was already assigned."); + m_command.emplace(path); + } - void FileRequest::CreateCancel(FileRequestPtr target) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Cancel', but another task was already assigned."); - m_command.emplace(AZStd::move(target)); - } + void FileRequest::CreateCancel(FileRequestPtr target) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Cancel', but another task was already assigned."); + m_command.emplace(AZStd::move(target)); + } - void FileRequest::CreateReschedule(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, - IStreamerTypes::Priority newPriority) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Reschedule', but another task was already assigned."); - m_command.emplace(AZStd::move(target), newDeadline, newPriority); - } + void FileRequest::CreateReschedule(FileRequestPtr target, AZStd::chrono::system_clock::time_point newDeadline, + IStreamerTypes::Priority newPriority) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Reschedule', but another task was already assigned."); + m_command.emplace(AZStd::move(target), newDeadline, newPriority); + } - void FileRequest::CreateFlush(RequestPath path) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Flush', but another task was already assigned."); - m_command.emplace(AZStd::move(path)); - } + void FileRequest::CreateFlush(RequestPath path) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Flush', but another task was already assigned."); + m_command.emplace(AZStd::move(path)); + } - void FileRequest::CreateFlushAll() - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'FlushAll', but another task was already assigned."); - m_command.emplace(); - } + void FileRequest::CreateFlushAll() + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'FlushAll', but another task was already assigned."); + m_command.emplace(); + } - void FileRequest::CreateDedicatedCacheCreation(RequestPath path, const FileRange& range, FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'CreateDedicateCache', but another task was already assigned."); - m_command.emplace(AZStd::move(path), range); - SetOptionalParent(parent); - } + void FileRequest::CreateDedicatedCacheCreation(RequestPath path, const FileRange& range, FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'CreateDedicateCache', but another task was already assigned."); + m_command.emplace(AZStd::move(path), range); + SetOptionalParent(parent); + } - void FileRequest::CreateDedicatedCacheDestruction(RequestPath path, const FileRange& range, FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'DestroyDedicateCache', but another task was already assigned."); - m_command.emplace(AZStd::move(path), range); - SetOptionalParent(parent); - } + void FileRequest::CreateDedicatedCacheDestruction(RequestPath path, const FileRange& range, FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'DestroyDedicateCache', but another task was already assigned."); + m_command.emplace(AZStd::move(path), range); + SetOptionalParent(parent); + } - void FileRequest::CreateReport(ReportData::ReportType reportType) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Report', but another task was already assigned."); - m_command.emplace(reportType); - } + void FileRequest::CreateReport(ReportData::ReportType reportType) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Report', but another task was already assigned."); + m_command.emplace(reportType); + } - void FileRequest::CreateCustom(AZStd::any data, bool failWhenUnhandled, FileRequest* parent) - { - AZ_Assert(AZStd::holds_alternative(m_command), - "Attempting to set FileRequest to 'Custom', but another task was already assigned."); - m_command.emplace(AZStd::move(data), failWhenUnhandled); - SetOptionalParent(parent); - } + void FileRequest::CreateCustom(AZStd::any data, bool failWhenUnhandled, FileRequest* parent) + { + AZ_Assert(AZStd::holds_alternative(m_command), + "Attempting to set FileRequest to 'Custom', but another task was already assigned."); + m_command.emplace(AZStd::move(data), failWhenUnhandled); + SetOptionalParent(parent); + } - void FileRequest::SetCompletionCallback(OnCompletionCallback callback) - { - m_onCompletion = AZStd::move(callback); - } + void FileRequest::SetCompletionCallback(OnCompletionCallback callback) + { + m_onCompletion = AZStd::move(callback); + } - FileRequest::CommandVariant& FileRequest::GetCommand() - { - return m_command; - } + FileRequest::CommandVariant& FileRequest::GetCommand() + { + return m_command; + } - const FileRequest::CommandVariant& FileRequest::GetCommand() const - { - return m_command; - } + const FileRequest::CommandVariant& FileRequest::GetCommand() const + { + return m_command; + } - IStreamerTypes::RequestStatus FileRequest::GetStatus() const - { - return m_status; - } + IStreamerTypes::RequestStatus FileRequest::GetStatus() const + { + return m_status; + } - void FileRequest::SetStatus(IStreamerTypes::RequestStatus newStatus) - { - IStreamerTypes::RequestStatus currentStatus = m_status; - switch (newStatus) + void FileRequest::SetStatus(IStreamerTypes::RequestStatus newStatus) + { + IStreamerTypes::RequestStatus currentStatus = m_status; + switch (newStatus) + { + case IStreamerTypes::RequestStatus::Pending: + [[fallthrough]]; + case IStreamerTypes::RequestStatus::Queued: + [[fallthrough]]; + case IStreamerTypes::RequestStatus::Processing: + if (currentStatus == IStreamerTypes::RequestStatus::Failed || + currentStatus == IStreamerTypes::RequestStatus::Canceled || + currentStatus == IStreamerTypes::RequestStatus::Completed) + { + return; + } + break; + case IStreamerTypes::RequestStatus::Completed: + if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Canceled) + { + return; + } + break; + case IStreamerTypes::RequestStatus::Canceled: + if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Completed) { - case IStreamerTypes::RequestStatus::Pending: - [[fallthrough]]; - case IStreamerTypes::RequestStatus::Queued: - [[fallthrough]]; - case IStreamerTypes::RequestStatus::Processing: - if (currentStatus == IStreamerTypes::RequestStatus::Failed || - currentStatus == IStreamerTypes::RequestStatus::Canceled || - currentStatus == IStreamerTypes::RequestStatus::Completed) - { - return; - } - break; - case IStreamerTypes::RequestStatus::Completed: - if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Canceled) - { - return; - } - break; - case IStreamerTypes::RequestStatus::Canceled: - if (currentStatus == IStreamerTypes::RequestStatus::Failed || currentStatus == IStreamerTypes::RequestStatus::Completed) - { - return; - } - break; - case IStreamerTypes::RequestStatus::Failed: - [[fallthrough]]; - default: - break; + return; } - m_status = newStatus; + break; + case IStreamerTypes::RequestStatus::Failed: + [[fallthrough]]; + default: + break; } + m_status = newStatus; + } - FileRequest* FileRequest::GetParent() - { - return m_parent; - } + FileRequest* FileRequest::GetParent() + { + return m_parent; + } - const FileRequest* FileRequest::GetParent() const - { - return m_parent; - } + const FileRequest* FileRequest::GetParent() const + { + return m_parent; + } - size_t FileRequest::GetNumDependencies() const - { - return m_dependencies; - } + size_t FileRequest::GetNumDependencies() const + { + return m_dependencies; + } - bool FileRequest::FailsWhenUnhandled() const + bool FileRequest::FailsWhenUnhandled() const + { + return AZStd::visit([](auto&& args) { - return AZStd::visit([](auto&& args) + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - AZ_Assert(false, - "Request does not contain a valid command. It may have been reset already or was never assigned a command."); - return true; - } - else if constexpr (AZStd::is_same_v) - { - return args.m_failWhenUnhandled; - } - else - { - return Command::s_failWhenUnhandled; - } - }, m_command); - } - - void FileRequest::Reset() - { - m_command = AZStd::monostate{}; - m_onCompletion = &OnCompletionPlaceholder; - m_estimatedCompletion = AZStd::chrono::system_clock::time_point(); - m_parent = nullptr; - m_status = IStreamerTypes::RequestStatus::Pending; - m_dependencies = 0; - } - - void FileRequest::SetOptionalParent(FileRequest* parent) - { - if (parent) + AZ_Assert(false, + "Request does not contain a valid command. It may have been reset already or was never assigned a command."); + return true; + } + else if constexpr (AZStd::is_same_v) { - m_parent = parent; - AZ_Assert(parent->m_dependencies < std::numeric_limitsm_dependencies)>::max(), - "A file request dependency was added, but the parent can't have any more dependencies."); - ++parent->m_dependencies; + return args.m_failWhenUnhandled; } - } - - bool FileRequest::WorksOn(FileRequestPtr& request) const - { - const FileRequest* current = this; - while (current) + else { - auto* link = AZStd::get_if(¤t->m_command); - if (!link) - { - current = current->m_parent; - } - else - { - return link->m_request == request; - } + return Command::s_failWhenUnhandled; } - return false; - } + }, m_command); + } - size_t FileRequest::GetPendingId() const + void FileRequest::Reset() + { + m_command = AZStd::monostate{}; + m_onCompletion = &OnCompletionPlaceholder; + m_estimatedCompletion = AZStd::chrono::system_clock::time_point(); + m_parent = nullptr; + m_status = IStreamerTypes::RequestStatus::Pending; + m_dependencies = 0; + } + + void FileRequest::SetOptionalParent(FileRequest* parent) + { + if (parent) { - return m_pendingId; + m_parent = parent; + AZ_Assert(parent->m_dependencies < std::numeric_limitsm_dependencies)>::max(), + "A file request dependency was added, but the parent can't have any more dependencies."); + ++parent->m_dependencies; } + } - void FileRequest::SetEstimatedCompletion(AZStd::chrono::system_clock::time_point time) + bool FileRequest::WorksOn(FileRequestPtr& request) const + { + const FileRequest* current = this; + while (current) { - FileRequest* current = this; - do + auto* link = AZStd::get_if(¤t->m_command); + if (!link) { - current->m_estimatedCompletion = time; current = current->m_parent; - } while (current); + } + else + { + return link->m_request == request; + } } + return false; + } + + size_t FileRequest::GetPendingId() const + { + return m_pendingId; + } - AZStd::chrono::system_clock::time_point FileRequest::GetEstimatedCompletion() const + void FileRequest::SetEstimatedCompletion(AZStd::chrono::system_clock::time_point time) + { + FileRequest* current = this; + do { - return m_estimatedCompletion; - } + current->m_estimatedCompletion = time; + current = current->m_parent; + } while (current); + } - // - // ExternalFileRequest - // + AZStd::chrono::system_clock::time_point FileRequest::GetEstimatedCompletion() const + { + return m_estimatedCompletion; + } - ExternalFileRequest::ExternalFileRequest(StreamerContext* owner) - : m_request(FileRequest::Usage::External) - , m_owner(owner) - { - } + // + // ExternalFileRequest + // - void ExternalFileRequest::add_ref() - { - m_refCount++; - } + ExternalFileRequest::ExternalFileRequest(StreamerContext* owner) + : m_request(FileRequest::Usage::External) + , m_owner(owner) + { + } - void ExternalFileRequest::release() - { - if (--m_refCount == 0) - { - AZ_Assert(m_owner, "No owning context set for the file request."); - m_owner->RecycleRequest(this); - } - } + void ExternalFileRequest::add_ref() + { + m_refCount++; + } - bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs) + void ExternalFileRequest::release() + { + if (--m_refCount == 0) { - return lhs.m_request == &rhs->m_request; + AZ_Assert(m_owner, "No owning context set for the file request."); + m_owner->RecycleRequest(this); } + } - bool operator==(const FileRequestPtr& lhs, const FileRequestHandle& rhs) - { - return rhs == lhs; - } + bool operator==(const FileRequestHandle& lhs, const FileRequestPtr& rhs) + { + return lhs.m_request == &rhs->m_request; + } - bool operator!=(const FileRequestHandle& lhs, const FileRequestPtr& rhs) - { - return !(lhs == rhs); - } + bool operator==(const FileRequestPtr& lhs, const FileRequestHandle& rhs) + { + return rhs == lhs; + } - bool operator!=(const FileRequestPtr& lhs, const FileRequestHandle& rhs) - { - return !(rhs == lhs); - } - } // namespace IO -} // namespace AZ + bool operator!=(const FileRequestHandle& lhs, const FileRequestPtr& rhs) + { + return !(lhs == rhs); + } + + bool operator!=(const FileRequestPtr& lhs, const FileRequestHandle& rhs) + { + return !(rhs == lhs); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp index 797f96e53f..723a5d62c8 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/FullFileDecompressor.cpp @@ -21,720 +21,717 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr FullFileDecompressorConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr FullFileDecompressorConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) - { - auto stackEntry = AZStd::make_shared( - m_maxNumReads, m_maxNumJobs, aznumeric_caster(hardware.m_maxPhysicalSectorSize)); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; - } + auto stackEntry = AZStd::make_shared( + m_maxNumReads, m_maxNumJobs, aznumeric_caster(hardware.m_maxPhysicalSectorSize)); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } - void FullFileDecompressorConfig::Reflect(AZ::ReflectContext* context) + void FullFileDecompressorConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Class() - ->Version(1) - ->Field("MaxNumReads", &FullFileDecompressorConfig::m_maxNumReads) - ->Field("MaxNumJobs", &FullFileDecompressorConfig::m_maxNumJobs); - } + serializeContext->Class() + ->Version(1) + ->Field("MaxNumReads", &FullFileDecompressorConfig::m_maxNumReads) + ->Field("MaxNumJobs", &FullFileDecompressorConfig::m_maxNumJobs); } + } #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - static constexpr char DecompBoundName[] = "Decompression bound"; - static constexpr char ReadBoundName[] = "Read bound"; + static constexpr char DecompBoundName[] = "Decompression bound"; + static constexpr char ReadBoundName[] = "Read bound"; #endif // AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - bool FullFileDecompressor::DecompressionInformation::IsProcessing() const + bool FullFileDecompressor::DecompressionInformation::IsProcessing() const + { + return !!m_compressedData; + } + + FullFileDecompressor::FullFileDecompressor(u32 maxNumReads, u32 maxNumJobs, u32 alignment) + : StreamStackEntry("Full file decompressor") + , m_maxNumReads(maxNumReads) + , m_maxNumJobs(maxNumJobs) + , m_alignment(alignment) + { + JobManagerDesc jobDesc; + jobDesc.m_jobManagerName = "Full File Decompressor"; + u32 numThreads = AZ::GetMin(maxNumJobs, AZStd::thread::hardware_concurrency()); + for (u32 i = 0; i < numThreads; ++i) { - return !!m_compressedData; + jobDesc.m_workerThreads.push_back(JobManagerThreadDesc()); } - - FullFileDecompressor::FullFileDecompressor(u32 maxNumReads, u32 maxNumJobs, u32 alignment) - : StreamStackEntry("Full file decompressor") - , m_maxNumReads(maxNumReads) - , m_maxNumJobs(maxNumJobs) - , m_alignment(alignment) - { - JobManagerDesc jobDesc; - jobDesc.m_jobManagerName = "Full File Decompressor"; - u32 numThreads = AZ::GetMin(maxNumJobs, AZStd::thread::hardware_concurrency()); - for (u32 i = 0; i < numThreads; ++i) - { - jobDesc.m_workerThreads.push_back(JobManagerThreadDesc()); - } - m_decompressionJobManager = AZStd::make_unique(jobDesc); - m_decompressionjobContext = AZStd::make_unique(*m_decompressionJobManager); - - m_processingJobs = AZStd::make_unique(maxNumJobs); + m_decompressionJobManager = AZStd::make_unique(jobDesc); + m_decompressionjobContext = AZStd::make_unique(*m_decompressionJobManager); - m_readBuffers = AZStd::make_unique(maxNumReads); - m_readRequests = AZStd::make_unique(maxNumReads); - m_readBufferStatus = AZStd::make_unique(maxNumReads); - for (u32 i = 0; i < maxNumReads; ++i) - { - m_readBufferStatus[i] = ReadBufferStatus::Unused; - } - - // Add initial dummy values to the stats to avoid division by zero later on and avoid needing branches. - m_bytesDecompressed.PushEntry(1); - m_decompressionDurationMicroSec.PushEntry(1); - } + m_processingJobs = AZStd::make_unique(maxNumJobs); - void FullFileDecompressor::PrepareRequest(FileRequest* request) + m_readBuffers = AZStd::make_unique(maxNumReads); + m_readRequests = AZStd::make_unique(maxNumReads); + m_readBufferStatus = AZStd::make_unique(maxNumReads); + for (u32 i = 0; i < maxNumReads; ++i) { - AZ_Assert(request, "PrepareRequest was provided a null request."); - - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - PrepareReadRequest(request, args); - } - else if constexpr (AZStd::is_same_v || - AZStd::is_same_v) - { - PrepareDedicatedCache(request, args.m_path); - } - else - { - StreamStackEntry::PrepareRequest(request); - } - }, request->GetCommand()); + m_readBufferStatus[i] = ReadBufferStatus::Unused; } - void FullFileDecompressor::QueueRequest(FileRequest* request) - { - AZ_Assert(request, "QueueRequest was provided a null request."); + // Add initial dummy values to the stats to avoid division by zero later on and avoid needing branches. + m_bytesDecompressed.PushEntry(1); + m_decompressionDurationMicroSec.PushEntry(1); + } - AZStd::visit([this, request](auto&& args) - { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) - { - m_pendingReads.push_back(request); - } - else if constexpr (AZStd::is_same_v) - { - m_pendingFileExistChecks.push_back(request); - } - else - { - StreamStackEntry::QueueRequest(request); - } - }, request->GetCommand()); - } + void FullFileDecompressor::PrepareRequest(FileRequest* request) + { + AZ_Assert(request, "PrepareRequest was provided a null request."); - bool FullFileDecompressor::ExecuteRequests() + AZStd::visit([this, request](auto&& args) { - bool result = false; - // First queue jobs as this might open up new read slots. - if (m_numInFlightReads > 0 && m_numRunningJobs < m_maxNumJobs) + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - result = StartDecompressions(); + PrepareReadRequest(request, args); } - - // Queue as many new reads as possible. - while (!m_pendingReads.empty() && m_numInFlightReads < m_maxNumReads) + else if constexpr (AZStd::is_same_v || + AZStd::is_same_v) { - StartArchiveRead(m_pendingReads.front()); - m_pendingReads.pop_front(); - result = true; + PrepareDedicatedCache(request, args.m_path); } - - // If nothing else happened and there is at least one pending file exist check request, run one of those. - if (!result && !m_pendingFileExistChecks.empty()) + else { - FileExistsCheck(m_pendingFileExistChecks.front()); - m_pendingFileExistChecks.pop_front(); - result = true; + StreamStackEntry::PrepareRequest(request); } + }, request->GetCommand()); + } -#if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - bool allPendingDecompression = true; - bool allReading = true; - for (u32 i = 0; i < m_maxNumReads; ++i) + void FullFileDecompressor::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + + AZStd::visit([this, request](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) { - allPendingDecompression = - allPendingDecompression && (m_readBufferStatus[i] == ReadBufferStatus::PendingDecompression); - allReading = - allReading && (m_readBufferStatus[i] == ReadBufferStatus::ReadInFlight); + m_pendingReads.push_back(request); } + else if constexpr (AZStd::is_same_v) + { + m_pendingFileExistChecks.push_back(request); + } + else + { + StreamStackEntry::QueueRequest(request); + } + }, request->GetCommand()); + } - m_decompressionBoundStat.PushSample(allPendingDecompression ? 1.0 : 0.0); - Statistic::PlotImmediate(m_name, DecompBoundName, m_decompressionBoundStat.GetMostRecentSample()); - - m_readBoundStat.PushSample(allReading && (m_numRunningJobs < m_maxNumJobs) ? 1.0 : 0.0); - Statistic::PlotImmediate(m_name, ReadBoundName, m_readBoundStat.GetMostRecentSample()); -#endif + bool FullFileDecompressor::ExecuteRequests() + { + bool result = false; + // First queue jobs as this might open up new read slots. + if (m_numInFlightReads > 0 && m_numRunningJobs < m_maxNumJobs) + { + result = StartDecompressions(); + } - return StreamStackEntry::ExecuteRequests() || result; + // Queue as many new reads as possible. + while (!m_pendingReads.empty() && m_numInFlightReads < m_maxNumReads) + { + StartArchiveRead(m_pendingReads.front()); + m_pendingReads.pop_front(); + result = true; } - void FullFileDecompressor::UpdateStatus(Status& status) const + // If nothing else happened and there is at least one pending file exist check request, run one of those. + if (!result && !m_pendingFileExistChecks.empty()) { - StreamStackEntry::UpdateStatus(status); - s32 numAvailableSlots = aznumeric_cast(m_maxNumReads - m_numInFlightReads); - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); - status.m_isIdle = status.m_isIdle && IsIdle(); + FileExistsCheck(m_pendingFileExistChecks.front()); + m_pendingFileExistChecks.pop_front(); + result = true; } - void FullFileDecompressor::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, - StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) +#if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO + bool allPendingDecompression = true; + bool allReading = true; + for (u32 i = 0; i < m_maxNumReads; ++i) { - // Create predictions for all pending requests. Some will be further processed after this. - AZStd::reverse_copy(m_pendingFileExistChecks.begin(), m_pendingFileExistChecks.end(), AZStd::back_inserter(internalPending)); - AZStd::reverse_copy(m_pendingReads.begin(), m_pendingReads.end(), AZStd::back_inserter(internalPending)); + allPendingDecompression = + allPendingDecompression && (m_readBufferStatus[i] == ReadBufferStatus::PendingDecompression); + allReading = + allReading && (m_readBufferStatus[i] == ReadBufferStatus::ReadInFlight); + } - StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); + m_decompressionBoundStat.PushSample(allPendingDecompression ? 1.0 : 0.0); + Statistic::PlotImmediate(m_name, DecompBoundName, m_decompressionBoundStat.GetMostRecentSample()); - double totalBytesDecompressed = aznumeric_caster(m_bytesDecompressed.GetTotal()); - double totalDecompressionDuration = aznumeric_caster(m_decompressionDurationMicroSec.GetTotal()); - AZStd::chrono::microseconds cumulativeDelay = AZStd::chrono::microseconds::max(); + m_readBoundStat.PushSample(allReading && (m_numRunningJobs < m_maxNumJobs) ? 1.0 : 0.0); + Statistic::PlotImmediate(m_name, ReadBoundName, m_readBoundStat.GetMostRecentSample()); +#endif - // Check the number of jobs that are processing. - for (u32 i = 0; i < m_maxNumJobs; ++i) - { - if (m_processingJobs[i].IsProcessing()) - { - FileRequest* compressedRequest = m_processingJobs[i].m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in the decompression queue in FullFileDecompressor didn't contain compression read data."); - - size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; - auto decompressionDuration = AZStd::chrono::microseconds( - aznumeric_cast((bytesToDecompress * totalDecompressionDuration) / totalBytesDecompressed)); - auto timeInProcessing = now - m_processingJobs[i].m_jobStartTime; - auto timeLeft = decompressionDuration > timeInProcessing ? decompressionDuration - timeInProcessing : AZStd::chrono::microseconds(0); - // Get the shortest time as this indicates the next decompression to become available. - cumulativeDelay = AZStd::min(timeLeft, cumulativeDelay); - m_processingJobs[i].m_waitRequest->SetEstimatedCompletion(now + timeLeft); - } - } - if (cumulativeDelay == AZStd::chrono::microseconds::max()) - { - cumulativeDelay = AZStd::chrono::microseconds(0); - } + return StreamStackEntry::ExecuteRequests() || result; + } - // Next update all reads that are in flight. These will have an estimation for the read to complete, but will then be queued - // for decompression, so add the time needed decompression. Assume that decompression happens in parallel. - AZStd::chrono::microseconds decompressionDelay = - AZStd::chrono::microseconds(aznumeric_cast(m_decompressionJobDelayMicroSec.CalculateAverage())); - AZStd::chrono::microseconds smallestDecompressionDuration = AZStd::chrono::microseconds::max(); - for (u32 i = 0; i < m_maxNumReads; ++i) - { - AZStd::chrono::system_clock::time_point baseTime; - switch (m_readBufferStatus[i]) - { - case ReadBufferStatus::Unused: - continue; - case ReadBufferStatus::ReadInFlight: - // Internal read requests can start and complete but pending finalization before they're ever scheduled in which case - // the estimated time is not set. - baseTime = m_readRequests[i]->GetEstimatedCompletion(); - if (baseTime == AZStd::chrono::system_clock::time_point()) - { - baseTime = now; - } - break; - case ReadBufferStatus::PendingDecompression: - baseTime = now; - break; - default: - AZ_Assert(false, "Unsupported buffer type: %i.", m_readBufferStatus[i]); - continue; - } + void FullFileDecompressor::UpdateStatus(Status& status) const + { + StreamStackEntry::UpdateStatus(status); + s32 numAvailableSlots = aznumeric_cast(m_maxNumReads - m_numInFlightReads); + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); + status.m_isIdle = status.m_isIdle && IsIdle(); + } + + void FullFileDecompressor::UpdateCompletionEstimates(AZStd::chrono::system_clock::time_point now, AZStd::vector& internalPending, + StreamerContext::PreparedQueue::iterator pendingBegin, StreamerContext::PreparedQueue::iterator pendingEnd) + { + // Create predictions for all pending requests. Some will be further processed after this. + AZStd::reverse_copy(m_pendingFileExistChecks.begin(), m_pendingFileExistChecks.end(), AZStd::back_inserter(internalPending)); + AZStd::reverse_copy(m_pendingReads.begin(), m_pendingReads.end(), AZStd::back_inserter(internalPending)); + + StreamStackEntry::UpdateCompletionEstimates(now, internalPending, pendingBegin, pendingEnd); + + double totalBytesDecompressed = aznumeric_caster(m_bytesDecompressed.GetTotal()); + double totalDecompressionDuration = aznumeric_caster(m_decompressionDurationMicroSec.GetTotal()); + AZStd::chrono::microseconds cumulativeDelay = AZStd::chrono::microseconds::max(); - baseTime += cumulativeDelay; // Delay until the first decompression slot becomes available. - baseTime += decompressionDelay; // The average time it takes for the job system to pick up the decompression job. - - // Calculate the amount of time it will take to decompress the data. - FileRequest* compressedRequest = m_readRequests[i]->GetParent(); + // Check the number of jobs that are processing. + for (u32 i = 0; i < m_maxNumJobs; ++i) + { + if (m_processingJobs[i].IsProcessing()) + { + FileRequest* compressedRequest = m_processingJobs[i].m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); auto data = AZStd::get_if(&compressedRequest->GetCommand()); - + AZ_Assert(data, "Compressed request in the decompression queue in FullFileDecompressor didn't contain compression read data."); + size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; auto decompressionDuration = AZStd::chrono::microseconds( aznumeric_cast((bytesToDecompress * totalDecompressionDuration) / totalBytesDecompressed)); - smallestDecompressionDuration = AZStd::min(smallestDecompressionDuration, decompressionDuration); - baseTime += decompressionDuration; - - m_readRequests[i]->SetEstimatedCompletion(baseTime); - } - if (smallestDecompressionDuration != AZStd::chrono::microseconds::max()) - { - cumulativeDelay += smallestDecompressionDuration; // Time after which the decompression jobs and pending reads have completed. + auto timeInProcessing = now - m_processingJobs[i].m_jobStartTime; + auto timeLeft = decompressionDuration > timeInProcessing ? decompressionDuration - timeInProcessing : AZStd::chrono::microseconds(0); + // Get the shortest time as this indicates the next decompression to become available. + cumulativeDelay = AZStd::min(timeLeft, cumulativeDelay); + m_processingJobs[i].m_waitRequest->SetEstimatedCompletion(now + timeLeft); } + } + if (cumulativeDelay == AZStd::chrono::microseconds::max()) + { + cumulativeDelay = AZStd::chrono::microseconds(0); + } - // For all internally pending compressed reads add the decompression time. The read time will have already been added downstream. - // Because this call will go from the top of the stack to the bottom, but estimation is calculated from the bottom to the top, this - // list should be processed in reverse order. - for (auto pendingIt = internalPending.rbegin(); pendingIt != internalPending.rend(); ++pendingIt) + // Next update all reads that are in flight. These will have an estimation for the read to complete, but will then be queued + // for decompression, so add the time needed decompression. Assume that decompression happens in parallel. + AZStd::chrono::microseconds decompressionDelay = + AZStd::chrono::microseconds(aznumeric_cast(m_decompressionJobDelayMicroSec.CalculateAverage())); + AZStd::chrono::microseconds smallestDecompressionDuration = AZStd::chrono::microseconds::max(); + for (u32 i = 0; i < m_maxNumReads; ++i) + { + AZStd::chrono::system_clock::time_point baseTime; + switch (m_readBufferStatus[i]) { - EstimateCompressedReadRequest(*pendingIt, cumulativeDelay, decompressionDelay, - totalDecompressionDuration, totalBytesDecompressed); + case ReadBufferStatus::Unused: + continue; + case ReadBufferStatus::ReadInFlight: + // Internal read requests can start and complete but pending finalization before they're ever scheduled in which case + // the estimated time is not set. + baseTime = m_readRequests[i]->GetEstimatedCompletion(); + if (baseTime == AZStd::chrono::system_clock::time_point()) + { + baseTime = now; + } + break; + case ReadBufferStatus::PendingDecompression: + baseTime = now; + break; + default: + AZ_Assert(false, "Unsupported buffer type: %i.", m_readBufferStatus[i]); + continue; } - // Finally add a prediction for all the requests that are waiting to be queued. - for (auto requestIt = pendingBegin; requestIt != pendingEnd; ++requestIt) - { - EstimateCompressedReadRequest(*requestIt, cumulativeDelay, decompressionDelay, - totalDecompressionDuration, totalBytesDecompressed); - } + baseTime += cumulativeDelay; // Delay until the first decompression slot becomes available. + baseTime += decompressionDelay; // The average time it takes for the job system to pick up the decompression job. + + // Calculate the amount of time it will take to decompress the data. + FileRequest* compressedRequest = m_readRequests[i]->GetParent(); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); + + size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; + auto decompressionDuration = AZStd::chrono::microseconds( + aznumeric_cast((bytesToDecompress * totalDecompressionDuration) / totalBytesDecompressed)); + smallestDecompressionDuration = AZStd::min(smallestDecompressionDuration, decompressionDuration); + baseTime += decompressionDuration; + + m_readRequests[i]->SetEstimatedCompletion(baseTime); + } + if (smallestDecompressionDuration != AZStd::chrono::microseconds::max()) + { + cumulativeDelay += smallestDecompressionDuration; // Time after which the decompression jobs and pending reads have completed. } - void FullFileDecompressor::EstimateCompressedReadRequest(FileRequest* request, AZStd::chrono::microseconds& cumulativeDelay, - AZStd::chrono::microseconds decompressionDelay, double totalDecompressionDurationUs, double totalBytesDecompressed) const + // For all internally pending compressed reads add the decompression time. The read time will have already been added downstream. + // Because this call will go from the top of the stack to the bottom, but estimation is calculated from the bottom to the top, this + // list should be processed in reverse order. + for (auto pendingIt = internalPending.rbegin(); pendingIt != internalPending.rend(); ++pendingIt) { - auto data = AZStd::get_if(&request->GetCommand()); - if (data) - { - AZStd::chrono::microseconds processingTime = decompressionDelay; - size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; - processingTime += AZStd::chrono::microseconds( - aznumeric_cast((bytesToDecompress * totalDecompressionDurationUs) / totalBytesDecompressed)); - - cumulativeDelay += processingTime; - request->SetEstimatedCompletion(request->GetEstimatedCompletion() + processingTime); - } + EstimateCompressedReadRequest(*pendingIt, cumulativeDelay, decompressionDelay, + totalDecompressionDuration, totalBytesDecompressed); } - void FullFileDecompressor::CollectStatistics(AZStd::vector& statistics) const + // Finally add a prediction for all the requests that are waiting to be queued. + for (auto requestIt = pendingBegin; requestIt != pendingEnd; ++requestIt) { - constexpr double bytesToMB = 1.0 / (1024.0 * 1024.0); - constexpr double usToSec = 1.0 / (1000.0 * 1000.0); - constexpr double usToMs = 1.0 / 1000.0; + EstimateCompressedReadRequest(*requestIt, cumulativeDelay, decompressionDelay, + totalDecompressionDuration, totalBytesDecompressed); + } + } - if (m_bytesDecompressed.GetNumRecorded() > 1) // There's always a default added. - { - //It only makes sense to add decompression statistics when reading from PAK files. - statistics.push_back(Statistic::CreateInteger(m_name, "Available decompression slots", m_maxNumJobs - m_numRunningJobs)); - statistics.push_back(Statistic::CreateInteger(m_name, "Available read slots", m_maxNumReads - m_numInFlightReads)); - statistics.push_back(Statistic::CreateInteger(m_name, "Pending decompression", m_numPendingDecompression)); - statistics.push_back(Statistic::CreateFloat(m_name, "Buffer memory (MB)", m_memoryUsage * bytesToMB)); + void FullFileDecompressor::EstimateCompressedReadRequest(FileRequest* request, AZStd::chrono::microseconds& cumulativeDelay, + AZStd::chrono::microseconds decompressionDelay, double totalDecompressionDurationUs, double totalBytesDecompressed) const + { + auto data = AZStd::get_if(&request->GetCommand()); + if (data) + { + AZStd::chrono::microseconds processingTime = decompressionDelay; + size_t bytesToDecompress = data->m_compressionInfo.m_compressedSize; + processingTime += AZStd::chrono::microseconds( + aznumeric_cast((bytesToDecompress * totalDecompressionDurationUs) / totalBytesDecompressed)); - double averageJobStartDelay = m_decompressionJobDelayMicroSec.CalculateAverage() * usToMs; - statistics.push_back(Statistic::CreateFloat(m_name, "Decompression job delay (avg. ms)", averageJobStartDelay)); + cumulativeDelay += processingTime; + request->SetEstimatedCompletion(request->GetEstimatedCompletion() + processingTime); + } + } - double totalBytesDecompressedMB = m_bytesDecompressed.GetTotal() * bytesToMB; - double totalDecompressionTimeSec = m_decompressionDurationMicroSec.GetTotal() * usToSec; - statistics.push_back(Statistic::CreateFloat(m_name, "Decompression Speed per job (avg. mbps)", totalBytesDecompressedMB / totalDecompressionTimeSec)); + void FullFileDecompressor::CollectStatistics(AZStd::vector& statistics) const + { + constexpr double bytesToMB = 1.0 / (1024.0 * 1024.0); + constexpr double usToSec = 1.0 / (1000.0 * 1000.0); + constexpr double usToMs = 1.0 / 1000.0; + + if (m_bytesDecompressed.GetNumRecorded() > 1) // There's always a default added. + { + //It only makes sense to add decompression statistics when reading from PAK files. + statistics.push_back(Statistic::CreateInteger(m_name, "Available decompression slots", m_maxNumJobs - m_numRunningJobs)); + statistics.push_back(Statistic::CreateInteger(m_name, "Available read slots", m_maxNumReads - m_numInFlightReads)); + statistics.push_back(Statistic::CreateInteger(m_name, "Pending decompression", m_numPendingDecompression)); + statistics.push_back(Statistic::CreateFloat(m_name, "Buffer memory (MB)", m_memoryUsage * bytesToMB)); + + double averageJobStartDelay = m_decompressionJobDelayMicroSec.CalculateAverage() * usToMs; + statistics.push_back(Statistic::CreateFloat(m_name, "Decompression job delay (avg. ms)", averageJobStartDelay)); + + double totalBytesDecompressedMB = m_bytesDecompressed.GetTotal() * bytesToMB; + double totalDecompressionTimeSec = m_decompressionDurationMicroSec.GetTotal() * usToSec; + statistics.push_back(Statistic::CreateFloat(m_name, "Decompression Speed per job (avg. mbps)", totalBytesDecompressedMB / totalDecompressionTimeSec)); #if AZ_STREAMER_ADD_EXTRA_PROFILING_INFO - statistics.push_back(Statistic::CreatePercentage(m_name, DecompBoundName, m_decompressionBoundStat.GetAverage())); - statistics.push_back(Statistic::CreatePercentage(m_name, ReadBoundName, m_readBoundStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, DecompBoundName, m_decompressionBoundStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, ReadBoundName, m_readBoundStat.GetAverage())); #endif - } - - StreamStackEntry::CollectStatistics(statistics); } - bool FullFileDecompressor::IsIdle() const - { - return - m_pendingReads.empty() && - m_pendingFileExistChecks.empty() && - m_numInFlightReads == 0 && - m_numPendingDecompression == 0 && - m_numRunningJobs == 0; - } + StreamStackEntry::CollectStatistics(statistics); + } - void FullFileDecompressor::PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data) + bool FullFileDecompressor::IsIdle() const + { + return + m_pendingReads.empty() && + m_pendingFileExistChecks.empty() && + m_numInFlightReads == 0 && + m_numPendingDecompression == 0 && + m_numRunningJobs == 0; + } + + void FullFileDecompressor::PrepareReadRequest(FileRequest* request, FileRequest::ReadRequestData& data) + { + CompressionInfo info; + if (CompressionUtils::FindCompressionInfo(info, data.m_path.GetRelativePath())) { - CompressionInfo info; - if (CompressionUtils::FindCompressionInfo(info, data.m_path.GetRelativePath())) + FileRequest* nextRequest = m_context->GetNewInternalRequest(); + if (info.m_isCompressed) { - FileRequest* nextRequest = m_context->GetNewInternalRequest(); - if (info.m_isCompressed) - { - AZ_Assert(info.m_decompressor, - "FullFileDecompressor::PrepareRequest found a compressed file, but no decompressor to decompress with."); - nextRequest->CreateCompressedRead(request, AZStd::move(info), data.m_output, data.m_offset, data.m_size); - } - else - { - FileRequest* pathStorageRequest = m_context->GetNewInternalRequest(); - pathStorageRequest->CreateRequestPathStore(request, AZStd::move(info.m_archiveFilename)); - auto& pathStorage = AZStd::get(pathStorageRequest->GetCommand()); + AZ_Assert(info.m_decompressor, + "FullFileDecompressor::PrepareRequest found a compressed file, but no decompressor to decompress with."); + nextRequest->CreateCompressedRead(request, AZStd::move(info), data.m_output, data.m_offset, data.m_size); + } + else + { + FileRequest* pathStorageRequest = m_context->GetNewInternalRequest(); + pathStorageRequest->CreateRequestPathStore(request, AZStd::move(info.m_archiveFilename)); + auto& pathStorage = AZStd::get(pathStorageRequest->GetCommand()); - nextRequest->CreateRead(pathStorageRequest, data.m_output, data.m_outputSize, pathStorage.m_path, - info.m_offset + data.m_offset, data.m_size, info.m_isSharedPak); - } + nextRequest->CreateRead(pathStorageRequest, data.m_output, data.m_outputSize, pathStorage.m_path, + info.m_offset + data.m_offset, data.m_size, info.m_isSharedPak); + } - if (info.m_conflictResolution == ConflictResolution::PreferFile) + if (info.m_conflictResolution == ConflictResolution::PreferFile) + { + auto callback = [this, nextRequest](const FileRequest& checkRequest) { - auto callback = [this, nextRequest](const FileRequest& checkRequest) + AZ_PROFILE_FUNCTION(AzCore); + auto check = AZStd::get_if(&checkRequest.GetCommand()); + AZ_Assert(check, + "Callback in FullFileDecompressor::PrepareReadRequest expected FileExistsCheck but got another command."); + if (check->m_found) { - AZ_PROFILE_FUNCTION(AzCore); - auto check = AZStd::get_if(&checkRequest.GetCommand()); - AZ_Assert(check, - "Callback in FullFileDecompressor::PrepareReadRequest expected FileExistsCheck but got another command."); - if (check->m_found) + FileRequest* originalRequest = m_context->RejectRequest(nextRequest); + if (AZStd::holds_alternative(originalRequest->GetCommand())) { - FileRequest* originalRequest = m_context->RejectRequest(nextRequest); - if (AZStd::holds_alternative(originalRequest->GetCommand())) - { - originalRequest = m_context->RejectRequest(originalRequest); - } - StreamStackEntry::PrepareRequest(originalRequest); + originalRequest = m_context->RejectRequest(originalRequest); } - else - { - m_context->PushPreparedRequest(nextRequest); - } - }; - FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); - fileCheckRequest->CreateFileExistsCheck(data.m_path); - fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); - StreamStackEntry::QueueRequest(fileCheckRequest); - } - else - { - m_context->PushPreparedRequest(nextRequest); - } + StreamStackEntry::PrepareRequest(originalRequest); + } + else + { + m_context->PushPreparedRequest(nextRequest); + } + }; + FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); + fileCheckRequest->CreateFileExistsCheck(data.m_path); + fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); + StreamStackEntry::QueueRequest(fileCheckRequest); } else { - StreamStackEntry::PrepareRequest(request); + m_context->PushPreparedRequest(nextRequest); } } + else + { + StreamStackEntry::PrepareRequest(request); + } + } - void FullFileDecompressor::PrepareDedicatedCache(FileRequest* request, const RequestPath& path) + void FullFileDecompressor::PrepareDedicatedCache(FileRequest* request, const RequestPath& path) + { + CompressionInfo info; + if (CompressionUtils::FindCompressionInfo(info, path.GetRelativePath())) { - CompressionInfo info; - if (CompressionUtils::FindCompressionInfo(info, path.GetRelativePath())) + FileRequest* nextRequest = m_context->GetNewInternalRequest(); + AZStd::visit([request, &info, nextRequest](auto&& args) + { + using Command = AZStd::decay_t; + if constexpr (AZStd::is_same_v) + { + nextRequest->CreateDedicatedCacheCreation(AZStd::move(info.m_archiveFilename), + FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); + } + else if constexpr (AZStd::is_same_v) + { + nextRequest->CreateDedicatedCacheDestruction(AZStd::move(info.m_archiveFilename), + FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); + } + }, request->GetCommand()); + + if (info.m_conflictResolution == ConflictResolution::PreferFile) { - FileRequest* nextRequest = m_context->GetNewInternalRequest(); - AZStd::visit([request, &info, nextRequest](auto&& args) + auto callback = [this, nextRequest](const FileRequest& checkRequest) { - using Command = AZStd::decay_t; - if constexpr (AZStd::is_same_v) + AZ_PROFILE_FUNCTION(AzCore); + auto check = AZStd::get_if(&checkRequest.GetCommand()); + AZ_Assert(check, + "Callback in FullFileDecompressor::PrepareDedicatedCache expected FileExistsCheck but got another command."); + if (check->m_found) { - nextRequest->CreateDedicatedCacheCreation(AZStd::move(info.m_archiveFilename), - FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); + FileRequest* originalRequest = nextRequest->GetParent(); + m_context->RejectRequest(nextRequest); + StreamStackEntry::PrepareRequest(originalRequest); } - else if constexpr (AZStd::is_same_v) + else { - nextRequest->CreateDedicatedCacheDestruction(AZStd::move(info.m_archiveFilename), - FileRange::CreateRange(info.m_offset, info.m_compressedSize), request); + m_context->PushPreparedRequest(nextRequest); } - }, request->GetCommand()); - - if (info.m_conflictResolution == ConflictResolution::PreferFile) - { - auto callback = [this, nextRequest](const FileRequest& checkRequest) - { - AZ_PROFILE_FUNCTION(AzCore); - auto check = AZStd::get_if(&checkRequest.GetCommand()); - AZ_Assert(check, - "Callback in FullFileDecompressor::PrepareDedicatedCache expected FileExistsCheck but got another command."); - if (check->m_found) - { - FileRequest* originalRequest = nextRequest->GetParent(); - m_context->RejectRequest(nextRequest); - StreamStackEntry::PrepareRequest(originalRequest); - } - else - { - m_context->PushPreparedRequest(nextRequest); - } - }; - FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); - fileCheckRequest->CreateFileExistsCheck(path); - fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); - StreamStackEntry::QueueRequest(fileCheckRequest); - } - else - { - m_context->PushPreparedRequest(nextRequest); - } + }; + FileRequest* fileCheckRequest = m_context->GetNewInternalRequest(); + fileCheckRequest->CreateFileExistsCheck(path); + fileCheckRequest->SetCompletionCallback(AZStd::move(callback)); + StreamStackEntry::QueueRequest(fileCheckRequest); } else { - StreamStackEntry::PrepareRequest(request); + m_context->PushPreparedRequest(nextRequest); } } - - void FullFileDecompressor::FileExistsCheck(FileRequest* checkRequest) + else { - auto& fileCheckRequest = AZStd::get(checkRequest->GetCommand()); - CompressionInfo info; - if (CompressionUtils::FindCompressionInfo(info, fileCheckRequest.m_path.GetRelativePath())) - { - fileCheckRequest.m_found = true; - } - else - { - // The file isn't in the archive but might still exist as a loose file, so let the next node have a shot. - StreamStackEntry::QueueRequest(checkRequest); - } + StreamStackEntry::PrepareRequest(request); } + } - void FullFileDecompressor::StartArchiveRead(FileRequest* compressedReadRequest) + void FullFileDecompressor::FileExistsCheck(FileRequest* checkRequest) + { + auto& fileCheckRequest = AZStd::get(checkRequest->GetCommand()); + CompressionInfo info; + if (CompressionUtils::FindCompressionInfo(info, fileCheckRequest.m_path.GetRelativePath())) { - if (!m_next) - { - compressedReadRequest->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(compressedReadRequest); - return; - } - - for (u32 i = 0; i < m_maxNumReads; ++i) - { - if (m_readBufferStatus[i] == ReadBufferStatus::Unused) - { - auto data = AZStd::get_if(&compressedReadRequest->GetCommand()); - AZ_Assert(data, "Compressed request that's starting a read in FullFileDecompressor didn't contain compression read data."); - AZ_Assert(data->m_compressionInfo.m_decompressor, - "FileRequest for FullFileDecompressor is missing a decompression callback."); - - CompressionInfo& info = data->m_compressionInfo; - AZ_Assert(info.m_decompressor, "FullFileDecompressor is planning to a queue a request for reading but couldn't find a decompressor."); - - // The buffer is aligned down but the offset is not corrected. If the offset was adjusted it would mean the same data is read - // multiple times and negates the block cache's ability to detect these cases. By still adjusting it means that the reads between - // the BlockCache's prolog and epilog are read into aligned buffers. - size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); - size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); - m_readBuffers[i] = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( - bufferSize, m_alignment, 0, "AZ::IO::Streamer FullFileDecompressor", __FILE__, __LINE__)); - m_memoryUsage += bufferSize; - - FileRequest* archiveReadRequest = m_context->GetNewInternalRequest(); - archiveReadRequest->CreateRead(compressedReadRequest, m_readBuffers[i] + offsetAdjustment, bufferSize, info.m_archiveFilename, - info.m_offset, info.m_compressedSize, info.m_isSharedPak); - archiveReadRequest->SetCompletionCallback( - [this, readSlot = i](FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - FinishArchiveRead(&request, readSlot); - }); - m_next->QueueRequest(archiveReadRequest); - - m_readRequests[i] = archiveReadRequest; - m_readBufferStatus[i] = ReadBufferStatus::ReadInFlight; - - AZ_Assert(m_numInFlightReads < m_maxNumReads, - "A FileRequest was queued for reading in FullFileDecompressor, but there's no slots available."); - m_numInFlightReads++; - - return; - } - } - AZ_Assert(false, "%u of %u read slots are use in the FullFileDecompressor, but no empty slot was found.", m_numInFlightReads, m_maxNumReads); + fileCheckRequest.m_found = true; + } + else + { + // The file isn't in the archive but might still exist as a loose file, so let the next node have a shot. + StreamStackEntry::QueueRequest(checkRequest); } + } - void FullFileDecompressor::FinishArchiveRead(FileRequest* readRequest, u32 readSlot) + void FullFileDecompressor::StartArchiveRead(FileRequest* compressedReadRequest) + { + if (!m_next) { - AZ_Assert(m_readRequests[readSlot] == readRequest, - "Request in the archive read slot isn't the same as request that's being completed."); + compressedReadRequest->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(compressedReadRequest); + return; + } - FileRequest* compressedRequest = readRequest->GetParent(); - AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); - - if (readRequest->GetStatus() == IStreamerTypes::RequestStatus::Completed) - { - m_readBufferStatus[readSlot] = ReadBufferStatus::PendingDecompression; - ++m_numPendingDecompression; - - // Add this wait so the compressed request isn't fully completed yet as only the read part is done. The - // job thread will finish this wait, which in turn will trigger this function again on the main streaming thread. - FileRequest* waitRequest = m_context->GetNewInternalRequest(); - waitRequest->CreateWait(compressedRequest); - m_readRequests[readSlot] = waitRequest; - } - else + for (u32 i = 0; i < m_maxNumReads; ++i) + { + if (m_readBufferStatus[i] == ReadBufferStatus::Unused) { - auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in FullFileDecompressor that finished unsuccessfully didn't contain compression read data."); + auto data = AZStd::get_if(&compressedReadRequest->GetCommand()); + AZ_Assert(data, "Compressed request that's starting a read in FullFileDecompressor didn't contain compression read data."); + AZ_Assert(data->m_compressionInfo.m_decompressor, + "FileRequest for FullFileDecompressor is missing a decompression callback."); + CompressionInfo& info = data->m_compressionInfo; + AZ_Assert(info.m_decompressor, "FullFileDecompressor is planning to a queue a request for reading but couldn't find a decompressor."); + + // The buffer is aligned down but the offset is not corrected. If the offset was adjusted it would mean the same data is read + // multiple times and negates the block cache's ability to detect these cases. By still adjusting it means that the reads between + // the BlockCache's prolog and epilog are read into aligned buffers. size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); - m_memoryUsage -= bufferSize; + m_readBuffers[i] = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( + bufferSize, m_alignment, 0, "AZ::IO::Streamer FullFileDecompressor", __FILE__, __LINE__)); + m_memoryUsage += bufferSize; + + FileRequest* archiveReadRequest = m_context->GetNewInternalRequest(); + archiveReadRequest->CreateRead(compressedReadRequest, m_readBuffers[i] + offsetAdjustment, bufferSize, info.m_archiveFilename, + info.m_offset, info.m_compressedSize, info.m_isSharedPak); + archiveReadRequest->SetCompletionCallback( + [this, readSlot = i](FileRequest& request) + { + AZ_PROFILE_FUNCTION(AzCore); + FinishArchiveRead(&request, readSlot); + }); + m_next->QueueRequest(archiveReadRequest); - if (m_readBuffers[readSlot] != nullptr) - { - AZ::AllocatorInstance::Get().DeAllocate(m_readBuffers[readSlot], bufferSize, m_alignment); - m_readBuffers[readSlot] = nullptr; - } - m_readRequests[readSlot] = nullptr; - m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; - AZ_Assert(m_numInFlightReads > 0, - "Trying to decrement a read request after it was canceled or failed in FullFileDecompressor, " - "but no read requests are supposed to be queued."); - m_numInFlightReads--; + m_readRequests[i] = archiveReadRequest; + m_readBufferStatus[i] = ReadBufferStatus::ReadInFlight; + + AZ_Assert(m_numInFlightReads < m_maxNumReads, + "A FileRequest was queued for reading in FullFileDecompressor, but there's no slots available."); + m_numInFlightReads++; + + return; + } + } + AZ_Assert(false, "%u of %u read slots are use in the FullFileDecompressor, but no empty slot was found.", m_numInFlightReads, m_maxNumReads); + } + + void FullFileDecompressor::FinishArchiveRead(FileRequest* readRequest, u32 readSlot) + { + AZ_Assert(m_readRequests[readSlot] == readRequest, + "Request in the archive read slot isn't the same as request that's being completed."); + + FileRequest* compressedRequest = readRequest->GetParent(); + AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); + + if (readRequest->GetStatus() == IStreamerTypes::RequestStatus::Completed) + { + m_readBufferStatus[readSlot] = ReadBufferStatus::PendingDecompression; + ++m_numPendingDecompression; + + // Add this wait so the compressed request isn't fully completed yet as only the read part is done. The + // job thread will finish this wait, which in turn will trigger this function again on the main streaming thread. + FileRequest* waitRequest = m_context->GetNewInternalRequest(); + waitRequest->CreateWait(compressedRequest); + m_readRequests[readSlot] = waitRequest; + } + else + { + auto data = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(data, "Compressed request in FullFileDecompressor that finished unsuccessfully didn't contain compression read data."); + CompressionInfo& info = data->m_compressionInfo; + size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); + size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); + m_memoryUsage -= bufferSize; + + if (m_readBuffers[readSlot] != nullptr) + { + AZ::AllocatorInstance::Get().DeAllocate(m_readBuffers[readSlot], bufferSize, m_alignment); + m_readBuffers[readSlot] = nullptr; } + m_readRequests[readSlot] = nullptr; + m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; + AZ_Assert(m_numInFlightReads > 0, + "Trying to decrement a read request after it was canceled or failed in FullFileDecompressor, " + "but no read requests are supposed to be queued."); + m_numInFlightReads--; } + } - bool FullFileDecompressor::StartDecompressions() + bool FullFileDecompressor::StartDecompressions() + { + bool queuedJobs = false; + u32 jobSlot = 0; + for (u32 readSlot = 0; readSlot < m_maxNumReads; ++readSlot) { - bool queuedJobs = false; - u32 jobSlot = 0; - for (u32 readSlot = 0; readSlot < m_maxNumReads; ++readSlot) + // Find completed read. + if (m_readBufferStatus[readSlot] != ReadBufferStatus::PendingDecompression) { - // Find completed read. - if (m_readBufferStatus[readSlot] != ReadBufferStatus::PendingDecompression) + continue; + } + + // Find decompression slot + for (; jobSlot < m_maxNumJobs; ++jobSlot) + { + if (m_processingJobs[jobSlot].IsProcessing()) { continue; } - // Find decompression slot - for (; jobSlot < m_maxNumJobs; ++jobSlot) - { - if (m_processingJobs[jobSlot].IsProcessing()) - { - continue; - } - - FileRequest* waitRequest = m_readRequests[readSlot]; - AZ_Assert(AZStd::holds_alternative(waitRequest->GetCommand()), - "File request waiting for decompression wasn't marked as being a wait operation."); - FileRequest* compressedRequest = waitRequest->GetParent(); - AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); - - waitRequest->SetCompletionCallback([this, jobSlot](FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - FinishDecompression(&request, jobSlot); - }); - - DecompressionInformation& info = m_processingJobs[jobSlot]; - info.m_waitRequest = waitRequest; - info.m_queueStartTime = AZStd::chrono::high_resolution_clock::now(); - info.m_jobStartTime = info.m_queueStartTime; // Set these to the same in case the scheduler requests an update before the job has started. - info.m_compressedData = m_readBuffers[readSlot]; // Transfer ownership of the pointer. - m_readBuffers[readSlot] = nullptr; - - AZ::Job* decompressionJob; - auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in FullFileDecompressor that's starting decompression didn't contain compression read data."); - AZ_Assert(data->m_compressionInfo.m_decompressor, "FullFileDecompressor is queuing a decompression job but couldn't find a decompressor."); - - info.m_alignmentOffset = aznumeric_caster(data->m_compressionInfo.m_offset - - AZ_SIZE_ALIGN_DOWN(data->m_compressionInfo.m_offset, aznumeric_cast(m_alignment))); - - if (data->m_readOffset == 0 && data->m_readSize == data->m_compressionInfo.m_uncompressedSize) - { - auto job = [this, &info]() - { - FullDecompression(m_context, info); - }; - decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); - } - else + FileRequest* waitRequest = m_readRequests[readSlot]; + AZ_Assert(AZStd::holds_alternative(waitRequest->GetCommand()), + "File request waiting for decompression wasn't marked as being a wait operation."); + FileRequest* compressedRequest = waitRequest->GetParent(); + AZ_Assert(compressedRequest, "Read requests started by FullFileDecompressor is missing a parent request."); + + waitRequest->SetCompletionCallback([this, jobSlot](FileRequest& request) { - m_memoryUsage += data->m_compressionInfo.m_uncompressedSize; - auto job = [this, &info]() - { - PartialDecompression(m_context, info); - }; - decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); - } - --m_numPendingDecompression; - ++m_numRunningJobs; - decompressionJob->Start(); + AZ_PROFILE_FUNCTION(AzCore); + FinishDecompression(&request, jobSlot); + }); - m_readRequests[readSlot] = nullptr; - m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; - AZ_Assert(m_numInFlightReads > 0, "Trying to decrement a read request after it's queued for decompression in FullFileDecompressor, but no read requests are supposed to be queued."); - m_numInFlightReads--; + DecompressionInformation& info = m_processingJobs[jobSlot]; + info.m_waitRequest = waitRequest; + info.m_queueStartTime = AZStd::chrono::high_resolution_clock::now(); + info.m_jobStartTime = info.m_queueStartTime; // Set these to the same in case the scheduler requests an update before the job has started. + info.m_compressedData = m_readBuffers[readSlot]; // Transfer ownership of the pointer. + m_readBuffers[readSlot] = nullptr; - queuedJobs = true; - break; - } + AZ::Job* decompressionJob; + auto data = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(data, "Compressed request in FullFileDecompressor that's starting decompression didn't contain compression read data."); + AZ_Assert(data->m_compressionInfo.m_decompressor, "FullFileDecompressor is queuing a decompression job but couldn't find a decompressor."); - if (m_numInFlightReads == 0 || m_numRunningJobs == m_maxNumJobs) + info.m_alignmentOffset = aznumeric_caster(data->m_compressionInfo.m_offset - + AZ_SIZE_ALIGN_DOWN(data->m_compressionInfo.m_offset, aznumeric_cast(m_alignment))); + + if (data->m_readOffset == 0 && data->m_readSize == data->m_compressionInfo.m_uncompressedSize) { - return queuedJobs; + auto job = [this, &info]() + { + FullDecompression(m_context, info); + }; + decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); } - } - return queuedJobs; - } + else + { + m_memoryUsage += data->m_compressionInfo.m_uncompressedSize; + auto job = [this, &info]() + { + PartialDecompression(m_context, info); + }; + decompressionJob = AZ::CreateJobFunction(job, true, m_decompressionjobContext.get()); + } + --m_numPendingDecompression; + ++m_numRunningJobs; + decompressionJob->Start(); - void FullFileDecompressor::FinishDecompression([[maybe_unused]] FileRequest* waitRequest, u32 jobSlot) - { - DecompressionInformation& jobInfo = m_processingJobs[jobSlot]; - AZ_Assert(jobInfo.m_waitRequest == waitRequest, "Job slot didn't contain the expected wait request."); + m_readRequests[readSlot] = nullptr; + m_readBufferStatus[readSlot] = ReadBufferStatus::Unused; + AZ_Assert(m_numInFlightReads > 0, "Trying to decrement a read request after it's queued for decompression in FullFileDecompressor, but no read requests are supposed to be queued."); + m_numInFlightReads--; - auto endTime = AZStd::chrono::high_resolution_clock::now(); + queuedJobs = true; + break; + } - FileRequest* compressedRequest = jobInfo.m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto data = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(data, "Compressed request in FullFileDecompressor that completed decompression didn't contain compression read data."); - CompressionInfo& info = data->m_compressionInfo; - size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); - size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); - m_memoryUsage -= bufferSize; - if (data->m_readOffset != 0 || data->m_readSize != data->m_compressionInfo.m_uncompressedSize) + if (m_numInFlightReads == 0 || m_numRunningJobs == m_maxNumJobs) { - m_memoryUsage -= data->m_compressionInfo.m_uncompressedSize; + return queuedJobs; } - - m_decompressionJobDelayMicroSec.PushEntry(AZStd::chrono::duration_cast( - jobInfo.m_jobStartTime - jobInfo.m_queueStartTime).count()); - m_decompressionDurationMicroSec.PushEntry(AZStd::chrono::duration_cast( - endTime - jobInfo.m_jobStartTime).count()); - m_bytesDecompressed.PushEntry(data->m_compressionInfo.m_compressedSize); - - AZ::AllocatorInstance::Get().DeAllocate(jobInfo.m_compressedData, bufferSize, m_alignment); - jobInfo.m_compressedData = nullptr; - AZ_Assert(m_numRunningJobs > 0, "About to complete a decompression job, but the internal count doesn't see a running job."); - --m_numRunningJobs; - return; } + return queuedJobs; + } - void FullFileDecompressor::FullDecompression(StreamerContext* context, DecompressionInformation& info) + void FullFileDecompressor::FinishDecompression([[maybe_unused]] FileRequest* waitRequest, u32 jobSlot) + { + DecompressionInformation& jobInfo = m_processingJobs[jobSlot]; + AZ_Assert(jobInfo.m_waitRequest == waitRequest, "Job slot didn't contain the expected wait request."); + + auto endTime = AZStd::chrono::high_resolution_clock::now(); + + FileRequest* compressedRequest = jobInfo.m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); + auto data = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(data, "Compressed request in FullFileDecompressor that completed decompression didn't contain compression read data."); + CompressionInfo& info = data->m_compressionInfo; + size_t offsetAdjustment = info.m_offset - AZ_SIZE_ALIGN_DOWN(info.m_offset, aznumeric_cast(m_alignment)); + size_t bufferSize = AZ_SIZE_ALIGN_UP((info.m_compressedSize + offsetAdjustment), aznumeric_cast(m_alignment)); + m_memoryUsage -= bufferSize; + if (data->m_readOffset != 0 || data->m_readSize != data->m_compressionInfo.m_uncompressedSize) { - info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); - - FileRequest* compressedRequest = info.m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto request = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(request, "Compressed request in FullFileDecompressor that's running full decompression didn't contain compression read data."); - CompressionInfo& compressionInfo = request->m_compressionInfo; - AZ_Assert(compressionInfo.m_decompressor, "Full decompressor job started, but there's no decompressor callback assigned."); - - AZ_Assert(request->m_readOffset == 0, "FullFileDecompressor is doing a full decompression on a file request with an offset (%zu).", - request->m_readOffset); - AZ_Assert(compressionInfo.m_uncompressedSize == request->m_readSize, - "FullFileDecompressor is doing a full decompression, but the target buffer size (%llu) doesn't match the decompressed size (%zu).", - request->m_readSize, compressionInfo.m_uncompressedSize); - - bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, - compressionInfo.m_compressedSize, request->m_output, compressionInfo.m_uncompressedSize); - info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); - - context->MarkRequestAsCompleted(info.m_waitRequest); - context->WakeUpSchedulingThread(); + m_memoryUsage -= data->m_compressionInfo.m_uncompressedSize; } - void FullFileDecompressor::PartialDecompression(StreamerContext* context, DecompressionInformation& info) - { - info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); - - FileRequest* compressedRequest = info.m_waitRequest->GetParent(); - AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); - auto request = AZStd::get_if(&compressedRequest->GetCommand()); - AZ_Assert(request, "Compressed request in FullFileDecompressor that's running partial decompression didn't contain compression read data."); - CompressionInfo& compressionInfo = request->m_compressionInfo; - AZ_Assert(compressionInfo.m_decompressor, "Partial decompressor job started, but there's no decompressor callback assigned."); - - AZStd::unique_ptr decompressionBuffer = AZStd::unique_ptr(new u8[compressionInfo.m_uncompressedSize]); - bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, - compressionInfo.m_compressedSize, decompressionBuffer.get(), compressionInfo.m_uncompressedSize); - info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); - - memcpy(request->m_output, decompressionBuffer.get() + request->m_readOffset, request->m_readSize); - - context->MarkRequestAsCompleted(info.m_waitRequest); - context->WakeUpSchedulingThread(); - } - } // namespace IO -} // namespace AZ + m_decompressionJobDelayMicroSec.PushEntry(AZStd::chrono::duration_cast( + jobInfo.m_jobStartTime - jobInfo.m_queueStartTime).count()); + m_decompressionDurationMicroSec.PushEntry(AZStd::chrono::duration_cast( + endTime - jobInfo.m_jobStartTime).count()); + m_bytesDecompressed.PushEntry(data->m_compressionInfo.m_compressedSize); + + AZ::AllocatorInstance::Get().DeAllocate(jobInfo.m_compressedData, bufferSize, m_alignment); + jobInfo.m_compressedData = nullptr; + AZ_Assert(m_numRunningJobs > 0, "About to complete a decompression job, but the internal count doesn't see a running job."); + --m_numRunningJobs; + return; + } + + void FullFileDecompressor::FullDecompression(StreamerContext* context, DecompressionInformation& info) + { + info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); + + FileRequest* compressedRequest = info.m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); + auto request = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(request, "Compressed request in FullFileDecompressor that's running full decompression didn't contain compression read data."); + CompressionInfo& compressionInfo = request->m_compressionInfo; + AZ_Assert(compressionInfo.m_decompressor, "Full decompressor job started, but there's no decompressor callback assigned."); + + AZ_Assert(request->m_readOffset == 0, "FullFileDecompressor is doing a full decompression on a file request with an offset (%zu).", + request->m_readOffset); + AZ_Assert(compressionInfo.m_uncompressedSize == request->m_readSize, + "FullFileDecompressor is doing a full decompression, but the target buffer size (%llu) doesn't match the decompressed size (%zu).", + request->m_readSize, compressionInfo.m_uncompressedSize); + + bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, + compressionInfo.m_compressedSize, request->m_output, compressionInfo.m_uncompressedSize); + info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); + + context->MarkRequestAsCompleted(info.m_waitRequest); + context->WakeUpSchedulingThread(); + } + + void FullFileDecompressor::PartialDecompression(StreamerContext* context, DecompressionInformation& info) + { + info.m_jobStartTime = AZStd::chrono::high_resolution_clock::now(); + + FileRequest* compressedRequest = info.m_waitRequest->GetParent(); + AZ_Assert(compressedRequest, "A wait request attached to FullFileDecompressor was completed but didn't have a parent compressed request."); + auto request = AZStd::get_if(&compressedRequest->GetCommand()); + AZ_Assert(request, "Compressed request in FullFileDecompressor that's running partial decompression didn't contain compression read data."); + CompressionInfo& compressionInfo = request->m_compressionInfo; + AZ_Assert(compressionInfo.m_decompressor, "Partial decompressor job started, but there's no decompressor callback assigned."); + + AZStd::unique_ptr decompressionBuffer = AZStd::unique_ptr(new u8[compressionInfo.m_uncompressedSize]); + bool success = compressionInfo.m_decompressor(compressionInfo, info.m_compressedData + info.m_alignmentOffset, + compressionInfo.m_compressedSize, decompressionBuffer.get(), compressionInfo.m_uncompressedSize); + info.m_waitRequest->SetStatus(success ? IStreamerTypes::RequestStatus::Completed : IStreamerTypes::RequestStatus::Failed); + + memcpy(request->m_output, decompressionBuffer.get() + request->m_readOffset, request->m_readSize); + + context->MarkRequestAsCompleted(info.m_waitRequest); + context->WakeUpSchedulingThread(); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp b/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp index 00c1c63933..a952e31a93 100644 --- a/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp +++ b/Code/Framework/AzCore/AzCore/IO/Streamer/ReadSplitter.cpp @@ -14,376 +14,373 @@ #include #include -namespace AZ +namespace AZ::IO { - namespace IO + AZStd::shared_ptr ReadSplitterConfig::AddStreamStackEntry( + const HardwareInformation& hardware, AZStd::shared_ptr parent) { - AZStd::shared_ptr ReadSplitterConfig::AddStreamStackEntry( - const HardwareInformation& hardware, AZStd::shared_ptr parent) + size_t splitSize; + switch (m_splitSize) { - size_t splitSize; - switch (m_splitSize) - { - case SplitSize::MaxTransfer: - splitSize = hardware.m_maxTransfer; - break; - case SplitSize::MemoryAlignment: - splitSize = hardware.m_maxPhysicalSectorSize; - break; - default: - splitSize = m_splitSize; - break; - } - - size_t bufferSize = m_bufferSizeMib * 1_mib; - if (bufferSize < splitSize) - { - AZ_Warning("Streamer", false, "The buffer size for the Read Splitter is smaller than the individual split size. " - "It will be increased to fit at least one split."); - bufferSize = splitSize; - } - - auto stackEntry = AZStd::make_shared( - splitSize, - aznumeric_caster(hardware.m_maxPhysicalSectorSize), - aznumeric_caster(hardware.m_maxLogicalSectorSize), - bufferSize, m_adjustOffset, m_splitAlignedRequests); - stackEntry->SetNext(AZStd::move(parent)); - return stackEntry; + case SplitSize::MaxTransfer: + splitSize = hardware.m_maxTransfer; + break; + case SplitSize::MemoryAlignment: + splitSize = hardware.m_maxPhysicalSectorSize; + break; + default: + splitSize = m_splitSize; + break; } - void ReadSplitterConfig::Reflect(AZ::ReflectContext* context) + size_t bufferSize = m_bufferSizeMib * 1_mib; + if (bufferSize < splitSize) { - if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) - { - serializeContext->Enum() - ->Version(1) - ->Value("MaxTransfer", SplitSize::MaxTransfer) - ->Value("MemoryAlignment", SplitSize::MemoryAlignment); - - serializeContext->Class() - ->Version(1) - ->Field("BufferSizeMib", &ReadSplitterConfig::m_bufferSizeMib) - ->Field("SplitSize", &ReadSplitterConfig::m_splitSize) - ->Field("AdjustOffset", &ReadSplitterConfig::m_adjustOffset) - ->Field("SplitAlignedRequests", &ReadSplitterConfig::m_splitAlignedRequests); - } + AZ_Warning("Streamer", false, "The buffer size for the Read Splitter is smaller than the individual split size. " + "It will be increased to fit at least one split."); + bufferSize = splitSize; } - static constexpr char AvgNumSubReadsName[] = "Avg. num sub reads"; - static constexpr char AlignedReadsName[] = "Aligned reads"; - static constexpr char NumAvailableBufferSlotsName[] = "Num available buffer slots"; - static constexpr char NumPendingReadsName[] = "Num pending reads"; - - ReadSplitter::ReadSplitter(u64 maxReadSize, u32 memoryAlignment, u32 sizeAlignment, size_t bufferSize, - bool adjustOffset, bool splitAlignedRequests) - : StreamStackEntry("Read splitter") - , m_buffer(nullptr) - , m_bufferSize(bufferSize) - , m_maxReadSize(maxReadSize) - , m_memoryAlignment(memoryAlignment) - , m_sizeAlignment(sizeAlignment) - , m_adjustOffset(adjustOffset) - , m_splitAlignedRequests(splitAlignedRequests) + auto stackEntry = AZStd::make_shared( + splitSize, + aznumeric_caster(hardware.m_maxPhysicalSectorSize), + aznumeric_caster(hardware.m_maxLogicalSectorSize), + bufferSize, m_adjustOffset, m_splitAlignedRequests); + stackEntry->SetNext(AZStd::move(parent)); + return stackEntry; + } + + void ReadSplitterConfig::Reflect(AZ::ReflectContext* context) + { + if (auto serializeContext = azrtti_cast(context); serializeContext != nullptr) { - AZ_Assert(IStreamerTypes::IsPowerOf2(memoryAlignment), "Memory alignment needs to be a power of 2"); - AZ_Assert(IStreamerTypes::IsPowerOf2(sizeAlignment), "Size alignment needs to be a power of 2"); - AZ_Assert(IStreamerTypes::IsAlignedTo(maxReadSize, sizeAlignment), - "Maximum read size isn't aligned to a multiple of the size alignment."); - - size_t numBufferSlots = bufferSize / maxReadSize; - // Don't divide the reads up in more sub-reads than there are dependencies available. - numBufferSlots = AZStd::min(numBufferSlots, FileRequest::GetMaxNumDependencies()); - m_bufferCopyInformation = AZStd::unique_ptr(new BufferCopyInformation[numBufferSlots]); - m_availableBufferSlots.reserve(numBufferSlots); - for (u32 i = aznumeric_caster(numBufferSlots); i > 0; --i) - { - m_availableBufferSlots.push_back(i - 1); - } + serializeContext->Enum() + ->Version(1) + ->Value("MaxTransfer", SplitSize::MaxTransfer) + ->Value("MemoryAlignment", SplitSize::MemoryAlignment); + + serializeContext->Class() + ->Version(1) + ->Field("BufferSizeMib", &ReadSplitterConfig::m_bufferSizeMib) + ->Field("SplitSize", &ReadSplitterConfig::m_splitSize) + ->Field("AdjustOffset", &ReadSplitterConfig::m_adjustOffset) + ->Field("SplitAlignedRequests", &ReadSplitterConfig::m_splitAlignedRequests); + } + } + + static constexpr char AvgNumSubReadsName[] = "Avg. num sub reads"; + static constexpr char AlignedReadsName[] = "Aligned reads"; + static constexpr char NumAvailableBufferSlotsName[] = "Num available buffer slots"; + static constexpr char NumPendingReadsName[] = "Num pending reads"; + + ReadSplitter::ReadSplitter(u64 maxReadSize, u32 memoryAlignment, u32 sizeAlignment, size_t bufferSize, + bool adjustOffset, bool splitAlignedRequests) + : StreamStackEntry("Read splitter") + , m_buffer(nullptr) + , m_bufferSize(bufferSize) + , m_maxReadSize(maxReadSize) + , m_memoryAlignment(memoryAlignment) + , m_sizeAlignment(sizeAlignment) + , m_adjustOffset(adjustOffset) + , m_splitAlignedRequests(splitAlignedRequests) + { + AZ_Assert(IStreamerTypes::IsPowerOf2(memoryAlignment), "Memory alignment needs to be a power of 2"); + AZ_Assert(IStreamerTypes::IsPowerOf2(sizeAlignment), "Size alignment needs to be a power of 2"); + AZ_Assert(IStreamerTypes::IsAlignedTo(maxReadSize, sizeAlignment), + "Maximum read size isn't aligned to a multiple of the size alignment."); + + size_t numBufferSlots = bufferSize / maxReadSize; + // Don't divide the reads up in more sub-reads than there are dependencies available. + numBufferSlots = AZStd::min(numBufferSlots, FileRequest::GetMaxNumDependencies()); + m_bufferCopyInformation = AZStd::unique_ptr(new BufferCopyInformation[numBufferSlots]); + m_availableBufferSlots.reserve(numBufferSlots); + for (u32 i = aznumeric_caster(numBufferSlots); i > 0; --i) + { + m_availableBufferSlots.push_back(i - 1); } + } - ReadSplitter::~ReadSplitter() + ReadSplitter::~ReadSplitter() + { + if (m_buffer) { - if (m_buffer) - { - AZ::AllocatorInstance::Get().DeAllocate(m_buffer, m_bufferSize, m_memoryAlignment); - } + AZ::AllocatorInstance::Get().DeAllocate(m_buffer, m_bufferSize, m_memoryAlignment); } + } - void ReadSplitter::QueueRequest(FileRequest* request) + void ReadSplitter::QueueRequest(FileRequest* request) + { + AZ_Assert(request, "QueueRequest was provided a null request."); + if (!m_next) { - AZ_Assert(request, "QueueRequest was provided a null request."); - if (!m_next) - { - request->SetStatus(IStreamerTypes::RequestStatus::Failed); - m_context->MarkRequestAsCompleted(request); - return; - } + request->SetStatus(IStreamerTypes::RequestStatus::Failed); + m_context->MarkRequestAsCompleted(request); + return; + } - auto data = AZStd::get_if(&request->GetCommand()); - if (data == nullptr) - { - StreamStackEntry::QueueRequest(request); - return; - } + auto data = AZStd::get_if(&request->GetCommand()); + if (data == nullptr) + { + StreamStackEntry::QueueRequest(request); + return; + } - m_averageNumSubReadsStat.PushSample(aznumeric_cast((data->m_size / m_maxReadSize) + 1)); - Statistic::PlotImmediate(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetMostRecentSample()); + m_averageNumSubReadsStat.PushSample(aznumeric_cast((data->m_size / m_maxReadSize) + 1)); + Statistic::PlotImmediate(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetMostRecentSample()); - bool isAligned = IStreamerTypes::IsAlignedTo(data->m_output, m_memoryAlignment); - if (m_adjustOffset) - { - isAligned = isAligned && IStreamerTypes::IsAlignedTo(data->m_offset, m_sizeAlignment); - } + bool isAligned = IStreamerTypes::IsAlignedTo(data->m_output, m_memoryAlignment); + if (m_adjustOffset) + { + isAligned = isAligned && IStreamerTypes::IsAlignedTo(data->m_offset, m_sizeAlignment); + } - if (isAligned || m_bufferSize == 0) + if (isAligned || m_bufferSize == 0) + { + m_alignedReadsStat.PushSample(isAligned ? 1.0 : 0.0); + if (!m_splitAlignedRequests) { - m_alignedReadsStat.PushSample(isAligned ? 1.0 : 0.0); - if (!m_splitAlignedRequests) - { - StreamStackEntry::QueueRequest(request); - } - else - { - QueueAlignedRead(request); - } + StreamStackEntry::QueueRequest(request); } else { - m_alignedReadsStat.PushSample(0.0); - InitializeBuffer(); - QueueBufferedRead(request); + QueueAlignedRead(request); } } - - void ReadSplitter::QueueAlignedRead(FileRequest* request) + else { - auto data = AZStd::get_if(&request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + m_alignedReadsStat.PushSample(0.0); + InitializeBuffer(); + QueueBufferedRead(request); + } + } - if (data->m_size <= m_maxReadSize) - { - StreamStackEntry::QueueRequest(request); - return; - } + void ReadSplitter::QueueAlignedRead(FileRequest* request) + { + auto data = AZStd::get_if(&request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); - PendingRead pendingRead; - pendingRead.m_request = request; - pendingRead.m_output = reinterpret_cast(data->m_output); - pendingRead.m_outputSize = data->m_outputSize; - pendingRead.m_readSize = data->m_size; - pendingRead.m_offset = data->m_offset; - pendingRead.m_isBuffered = false; + if (data->m_size <= m_maxReadSize) + { + StreamStackEntry::QueueRequest(request); + return; + } - if (!m_pendingReads.empty()) - { - m_pendingReads.push_back(pendingRead); - return; - } + PendingRead pendingRead; + pendingRead.m_request = request; + pendingRead.m_output = reinterpret_cast(data->m_output); + pendingRead.m_outputSize = data->m_outputSize; + pendingRead.m_readSize = data->m_size; + pendingRead.m_offset = data->m_offset; + pendingRead.m_isBuffered = false; - if (!QueueAlignedRead(pendingRead)) - { - m_pendingReads.push_back(pendingRead); - } + if (!m_pendingReads.empty()) + { + m_pendingReads.push_back(pendingRead); + return; } - bool ReadSplitter::QueueAlignedRead(PendingRead& pending) + if (!QueueAlignedRead(pendingRead)) { - auto data = AZStd::get_if(&pending.m_request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + m_pendingReads.push_back(pendingRead); + } + } - while (pending.m_readSize > 0) - { - if (pending.m_request->GetNumDependencies() >= FileRequest::GetMaxNumDependencies()) - { - // Add a wait to make sure the read request isn't completed if all sub-reads completed before - // the ReadSplitter has had a chance to add new sub-reads to complete the read. - if (pending.m_wait == nullptr) - { - pending.m_wait = m_context->GetNewInternalRequest(); - pending.m_wait->CreateWait(pending.m_request); - } - return false; - } + bool ReadSplitter::QueueAlignedRead(PendingRead& pending) + { + auto data = AZStd::get_if(&pending.m_request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); - u64 readSize = m_maxReadSize; - size_t bufferSize = m_maxReadSize; - if (pending.m_readSize < m_maxReadSize) + while (pending.m_readSize > 0) + { + if (pending.m_request->GetNumDependencies() >= FileRequest::GetMaxNumDependencies()) + { + // Add a wait to make sure the read request isn't completed if all sub-reads completed before + // the ReadSplitter has had a chance to add new sub-reads to complete the read. + if (pending.m_wait == nullptr) { - readSize = pending.m_readSize; - // This will be the last read so give the remainder of the output buffer to the final request. - bufferSize = pending.m_outputSize; + pending.m_wait = m_context->GetNewInternalRequest(); + pending.m_wait->CreateWait(pending.m_request); } - - FileRequest* subRequest = m_context->GetNewInternalRequest(); - subRequest->CreateRead(pending.m_request, pending.m_output, bufferSize, data->m_path, pending.m_offset, readSize, data->m_sharedRead); - subRequest->SetCompletionCallback([this](FileRequest&) - { - AZ_PROFILE_FUNCTION(AzCore); - QueuePendingRequest(); - }); - m_next->QueueRequest(subRequest); - - pending.m_offset += readSize; - pending.m_readSize -= readSize; - pending.m_outputSize -= bufferSize; - pending.m_output += readSize; + return false; } - if (pending.m_wait != nullptr) + + u64 readSize = m_maxReadSize; + size_t bufferSize = m_maxReadSize; + if (pending.m_readSize < m_maxReadSize) { - m_context->MarkRequestAsCompleted(pending.m_wait); - pending.m_wait = nullptr; + readSize = pending.m_readSize; + // This will be the last read so give the remainder of the output buffer to the final request. + bufferSize = pending.m_outputSize; } - return true; - } - void ReadSplitter::QueueBufferedRead(FileRequest* request) + FileRequest* subRequest = m_context->GetNewInternalRequest(); + subRequest->CreateRead(pending.m_request, pending.m_output, bufferSize, data->m_path, pending.m_offset, readSize, data->m_sharedRead); + subRequest->SetCompletionCallback([this](FileRequest&) + { + AZ_PROFILE_FUNCTION(AzCore); + QueuePendingRequest(); + }); + m_next->QueueRequest(subRequest); + + pending.m_offset += readSize; + pending.m_readSize -= readSize; + pending.m_outputSize -= bufferSize; + pending.m_output += readSize; + } + if (pending.m_wait != nullptr) { - auto data = AZStd::get_if(&request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); - - PendingRead pendingRead; - pendingRead.m_request = request; - pendingRead.m_output = reinterpret_cast(data->m_output); - pendingRead.m_outputSize = data->m_outputSize; - pendingRead.m_readSize = data->m_size; - pendingRead.m_offset = data->m_offset; - pendingRead.m_isBuffered = true; - - if (!m_pendingReads.empty()) - { - m_pendingReads.push_back(pendingRead); - return; - } + m_context->MarkRequestAsCompleted(pending.m_wait); + pending.m_wait = nullptr; + } + return true; + } - if (!QueueBufferedRead(pendingRead)) - { - m_pendingReads.push_back(pendingRead); - } + void ReadSplitter::QueueBufferedRead(FileRequest* request) + { + auto data = AZStd::get_if(&request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + + PendingRead pendingRead; + pendingRead.m_request = request; + pendingRead.m_output = reinterpret_cast(data->m_output); + pendingRead.m_outputSize = data->m_outputSize; + pendingRead.m_readSize = data->m_size; + pendingRead.m_offset = data->m_offset; + pendingRead.m_isBuffered = true; + + if (!m_pendingReads.empty()) + { + m_pendingReads.push_back(pendingRead); + return; } - bool ReadSplitter::QueueBufferedRead(PendingRead& pending) + if (!QueueBufferedRead(pendingRead)) { - auto data = AZStd::get_if(&pending.m_request->GetCommand()); - AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + m_pendingReads.push_back(pendingRead); + } + } - while (pending.m_readSize > 0) + bool ReadSplitter::QueueBufferedRead(PendingRead& pending) + { + auto data = AZStd::get_if(&pending.m_request->GetCommand()); + AZ_Assert(data != nullptr, "Provided request to queue by the Read Splitter did not contain a read command."); + + while (pending.m_readSize > 0) + { + if (!m_availableBufferSlots.empty()) { - if (!m_availableBufferSlots.empty()) - { - u32 bufferSlot = m_availableBufferSlots.back(); - m_availableBufferSlots.pop_back(); + u32 bufferSlot = m_availableBufferSlots.back(); + m_availableBufferSlots.pop_back(); - u64 readSize; - u64 copySize; - u64 offset; - BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; - copyInfo.m_target = pending.m_output; + u64 readSize; + u64 copySize; + u64 offset; + BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; + copyInfo.m_target = pending.m_output; - if (m_adjustOffset) - { - offset = AZ_SIZE_ALIGN_DOWN(pending.m_offset, aznumeric_cast(m_sizeAlignment)); - size_t bufferOffset = pending.m_offset - offset; - copyInfo.m_bufferOffset = bufferOffset; - readSize = AZStd::min(pending.m_readSize + bufferOffset, m_maxReadSize); - copySize = readSize - bufferOffset; - } - else - { - offset = pending.m_offset; - readSize = AZStd::min(pending.m_readSize, m_maxReadSize); - copySize = readSize; - } - AZ_Assert(readSize <= m_maxReadSize, "Read size %llu in read splitter exceeds the maximum split size of %llu.", - readSize, m_maxReadSize); - copyInfo.m_size = copySize; - - FileRequest* subRequest = m_context->GetNewInternalRequest(); - subRequest->CreateRead(pending.m_request, GetBufferSlot(bufferSlot), m_maxReadSize, data->m_path, - offset, readSize, data->m_sharedRead); - subRequest->SetCompletionCallback([this, bufferSlot]([[maybe_unused]] FileRequest& request) - { - AZ_PROFILE_FUNCTION(AzCore); - - BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; - memcpy(copyInfo.m_target, GetBufferSlot(bufferSlot) + copyInfo.m_bufferOffset, copyInfo.m_size); - m_availableBufferSlots.push_back(bufferSlot); - - QueuePendingRequest(); - }); - m_next->QueueRequest(subRequest); - - pending.m_offset += copySize; - pending.m_readSize -= copySize; - pending.m_outputSize -= copySize; - pending.m_output += copySize; + if (m_adjustOffset) + { + offset = AZ_SIZE_ALIGN_DOWN(pending.m_offset, aznumeric_cast(m_sizeAlignment)); + size_t bufferOffset = pending.m_offset - offset; + copyInfo.m_bufferOffset = bufferOffset; + readSize = AZStd::min(pending.m_readSize + bufferOffset, m_maxReadSize); + copySize = readSize - bufferOffset; } else { - // Add a wait to make sure the read request isn't completed if all sub-reads completed before - // the ReadSplitter has had a chance to add new sub-reads to complete the read. - if (pending.m_wait == nullptr) - { - pending.m_wait = m_context->GetNewInternalRequest(); - pending.m_wait->CreateWait(pending.m_request); - } - return false; + offset = pending.m_offset; + readSize = AZStd::min(pending.m_readSize, m_maxReadSize); + copySize = readSize; } - } - if (pending.m_wait != nullptr) - { - m_context->MarkRequestAsCompleted(pending.m_wait); - pending.m_wait = nullptr; - } - return true; - } + AZ_Assert(readSize <= m_maxReadSize, "Read size %llu in read splitter exceeds the maximum split size of %llu.", + readSize, m_maxReadSize); + copyInfo.m_size = copySize; - void ReadSplitter::QueuePendingRequest() - { - if (!m_pendingReads.empty()) + FileRequest* subRequest = m_context->GetNewInternalRequest(); + subRequest->CreateRead(pending.m_request, GetBufferSlot(bufferSlot), m_maxReadSize, data->m_path, + offset, readSize, data->m_sharedRead); + subRequest->SetCompletionCallback([this, bufferSlot]([[maybe_unused]] FileRequest& request) + { + AZ_PROFILE_FUNCTION(AzCore); + + BufferCopyInformation& copyInfo = m_bufferCopyInformation[bufferSlot]; + memcpy(copyInfo.m_target, GetBufferSlot(bufferSlot) + copyInfo.m_bufferOffset, copyInfo.m_size); + m_availableBufferSlots.push_back(bufferSlot); + + QueuePendingRequest(); + }); + m_next->QueueRequest(subRequest); + + pending.m_offset += copySize; + pending.m_readSize -= copySize; + pending.m_outputSize -= copySize; + pending.m_output += copySize; + } + else { - PendingRead& pendingRead = m_pendingReads.front(); - if (pendingRead.m_isBuffered ? QueueBufferedRead(pendingRead) : QueueAlignedRead(pendingRead)) + // Add a wait to make sure the read request isn't completed if all sub-reads completed before + // the ReadSplitter has had a chance to add new sub-reads to complete the read. + if (pending.m_wait == nullptr) { - m_pendingReads.pop_front(); + pending.m_wait = m_context->GetNewInternalRequest(); + pending.m_wait->CreateWait(pending.m_request); } + return false; } } + if (pending.m_wait != nullptr) + { + m_context->MarkRequestAsCompleted(pending.m_wait); + pending.m_wait = nullptr; + } + return true; + } - void ReadSplitter::UpdateStatus(Status& status) const + void ReadSplitter::QueuePendingRequest() + { + if (!m_pendingReads.empty()) { - StreamStackEntry::UpdateStatus(status); - if (m_bufferSize > 0) + PendingRead& pendingRead = m_pendingReads.front(); + if (pendingRead.m_isBuffered ? QueueBufferedRead(pendingRead) : QueueAlignedRead(pendingRead)) { - s32 numAvailableSlots = aznumeric_cast(m_availableBufferSlots.size()); - status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); - status.m_isIdle = status.m_isIdle && m_pendingReads.empty(); + m_pendingReads.pop_front(); } } + } - void ReadSplitter::CollectStatistics(AZStd::vector& statistics) const + void ReadSplitter::UpdateStatus(Status& status) const + { + StreamStackEntry::UpdateStatus(status); + if (m_bufferSize > 0) { - statistics.push_back(Statistic::CreateFloat(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetAverage())); - statistics.push_back(Statistic::CreatePercentage(m_name, AlignedReadsName, m_alignedReadsStat.GetAverage())); - statistics.push_back(Statistic::CreateInteger(m_name, NumAvailableBufferSlotsName, aznumeric_caster(m_availableBufferSlots.size()))); - statistics.push_back(Statistic::CreateInteger(m_name, NumPendingReadsName, aznumeric_caster(m_pendingReads.size()))); - StreamStackEntry::CollectStatistics(statistics); + s32 numAvailableSlots = aznumeric_cast(m_availableBufferSlots.size()); + status.m_numAvailableSlots = AZStd::min(status.m_numAvailableSlots, numAvailableSlots); + status.m_isIdle = status.m_isIdle && m_pendingReads.empty(); } + } - void ReadSplitter::InitializeBuffer() + void ReadSplitter::CollectStatistics(AZStd::vector& statistics) const + { + statistics.push_back(Statistic::CreateFloat(m_name, AvgNumSubReadsName, m_averageNumSubReadsStat.GetAverage())); + statistics.push_back(Statistic::CreatePercentage(m_name, AlignedReadsName, m_alignedReadsStat.GetAverage())); + statistics.push_back(Statistic::CreateInteger(m_name, NumAvailableBufferSlotsName, aznumeric_caster(m_availableBufferSlots.size()))); + statistics.push_back(Statistic::CreateInteger(m_name, NumPendingReadsName, aznumeric_caster(m_pendingReads.size()))); + StreamStackEntry::CollectStatistics(statistics); + } + + void ReadSplitter::InitializeBuffer() + { + // Lazy initialization to avoid allocating memory if it's not needed. + if (m_bufferSize != 0 && m_buffer == nullptr) { - // Lazy initialization to avoid allocating memory if it's not needed. - if (m_bufferSize != 0 && m_buffer == nullptr) - { - m_buffer = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( - m_bufferSize, m_memoryAlignment, 0, "AZ::IO::Streamer ReadSplitter", __FILE__, __LINE__)); - } + m_buffer = reinterpret_cast(AZ::AllocatorInstance::Get().Allocate( + m_bufferSize, m_memoryAlignment, 0, "AZ::IO::Streamer ReadSplitter", __FILE__, __LINE__)); } + } - u8* ReadSplitter::GetBufferSlot(size_t index) - { - AZ_Assert(m_buffer != nullptr, "A buffer slot was requested by the Read Splitter before the buffer was initialized."); - return m_buffer + (index * m_maxReadSize); - } - } // namespace IO -} // namesapce AZ + u8* ReadSplitter::GetBufferSlot(size_t index) + { + AZ_Assert(m_buffer != nullptr, "A buffer slot was requested by the Read Splitter before the buffer was initialized."); + return m_buffer + (index * m_maxReadSize); + } +} // namespace AZ::IO diff --git a/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp b/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp index af73ab4936..c3fa69a205 100644 --- a/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp +++ b/Code/Framework/AzCore/AzCore/IPC/SharedMemory.cpp @@ -13,23 +13,18 @@ #include -namespace AZ +namespace AZ::Internal { - namespace Internal + struct RingData { - struct RingData - { - AZ::u32 m_readOffset; - AZ::u32 m_writeOffset; - AZ::u32 m_startOffset; - AZ::u32 m_endOffset; - AZ::u32 m_dataToRead; - AZ::u8 m_pad[32 - sizeof(AZStd::spin_mutex)]; - }; - } // namespace Internal -} // namespace AZ - - + AZ::u32 m_readOffset; + AZ::u32 m_writeOffset; + AZ::u32 m_startOffset; + AZ::u32 m_endOffset; + AZ::u32 m_dataToRead; + AZ::u8 m_pad[32 - sizeof(AZStd::spin_mutex)]; + }; +} // namespace AZ::Internal using namespace AZ; diff --git a/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp b/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp index 883fa15991..acf24e8d42 100644 --- a/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Jobs/JobManagerComponent.cpp @@ -57,11 +57,12 @@ namespace AZ int numberOfWorkerThreads = m_numberOfWorkerThreads; if (numberOfWorkerThreads <= 0) // spawn default number of threads { + #if (AZ_TRAIT_THREAD_NUM_JOB_MANAGER_WORKER_THREADS) + numberOfWorkerThreads = AZ_TRAIT_THREAD_NUM_JOB_MANAGER_WORKER_THREADS; + #else uint32_t scaledHardwareThreads = Threading::CalcNumWorkerThreads(cl_jobThreadsConcurrencyRatio, cl_jobThreadsMinNumber, cl_jobThreadsNumReserved); numberOfWorkerThreads = AZ::GetMin(static_cast(desc.m_workerThreads.capacity()), scaledHardwareThreads); - #if (AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS) - numberOfWorkerThreads = AZ::GetMin(numberOfWorkerThreads, AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS); - #endif // (AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS) + #endif // (AZ_TRAIT_THREAD_NUM_JOB_MANAGER_WORKER_THREADS) } threadDesc.m_cpuId = AFFINITY_MASK_USERTHREADS; diff --git a/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp b/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp index 47a7e0a2db..912794a518 100644 --- a/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Geometry2DUtils.cpp @@ -8,138 +8,135 @@ #include -namespace AZ +namespace AZ::Geometry2DUtils { - namespace Geometry2DUtils + float ShortestDistanceSqPointSegment(const Vector2& point, const Vector2& segmentStart, const Vector2& segmentEnd, + float epsilon) { - float ShortestDistanceSqPointSegment(const Vector2& point, const Vector2& segmentStart, const Vector2& segmentEnd, - float epsilon) - { - const AZ::Vector2 segmentVector = segmentEnd - segmentStart; - - // check if the line degenerates to a point - const float segmentLengthSq = segmentVector.GetLengthSq(); - if (segmentLengthSq < epsilon * epsilon) - { - return (point - segmentStart).GetLengthSq(); - } - - // if the point projects on to the line segment then the shortest distance is the perpendicular - const float projection = (point - segmentStart).Dot(segmentVector); - if (projection >= 0.0f && projection <= segmentLengthSq) - { - const Vector2 perpendicular = (point - segmentStart - projection / segmentLengthSq * segmentVector); - return perpendicular.GetLengthSq(); - } + const AZ::Vector2 segmentVector = segmentEnd - segmentStart; - // otherwise the point must be closest to one of the end points of the segment - return GetMin( - (point - segmentStart).GetLengthSq(), - (point - segmentEnd).GetLengthSq()); + // check if the line degenerates to a point + const float segmentLengthSq = segmentVector.GetLengthSq(); + if (segmentLengthSq < epsilon * epsilon) + { + return (point - segmentStart).GetLengthSq(); } - float Signed2DTriangleArea(const Vector2& a, const Vector2& b, const Vector2& c) + // if the point projects on to the line segment then the shortest distance is the perpendicular + const float projection = (point - segmentStart).Dot(segmentVector); + if (projection >= 0.0f && projection <= segmentLengthSq) { - return 0.5f * ((a.GetX() - c.GetX()) * (b.GetY() - c.GetY()) - (a.GetY() - c.GetY()) * (b.GetX() - c.GetX())); + const Vector2 perpendicular = (point - segmentStart - projection / segmentLengthSq * segmentVector); + return perpendicular.GetLengthSq(); } - float ShortestDistanceSqSegmentSegment( - const Vector2& segment1Start, const Vector2& segment1End, - const Vector2& segment2Start, const Vector2& segment2End) + // otherwise the point must be closest to one of the end points of the segment + return GetMin( + (point - segmentStart).GetLengthSq(), + (point - segmentEnd).GetLengthSq()); + } + + float Signed2DTriangleArea(const Vector2& a, const Vector2& b, const Vector2& c) + { + return 0.5f * ((a.GetX() - c.GetX()) * (b.GetY() - c.GetY()) - (a.GetY() - c.GetY()) * (b.GetX() - c.GetX())); + } + + float ShortestDistanceSqSegmentSegment( + const Vector2& segment1Start, const Vector2& segment1End, + const Vector2& segment2Start, const Vector2& segment2End) + { + // if the segments cross, then the distance is zero + + // if the two ends of segment 2 are on different sides of segment 1, then these two triangles will have + // different winding orders (see Real-Time Collision Detection, Christer Ericson, ISBN 978-1558607323, + // Chapter 5.1.9.1) + const float area1 = Signed2DTriangleArea(segment1Start, segment1End, segment2End); + const float area2 = Signed2DTriangleArea(segment1Start, segment1End, segment2Start); + if (area1 * area2 < 0.0f) { - // if the segments cross, then the distance is zero - - // if the two ends of segment 2 are on different sides of segment 1, then these two triangles will have - // different winding orders (see Real-Time Collision Detection, Christer Ericson, ISBN 978-1558607323, - // Chapter 5.1.9.1) - const float area1 = Signed2DTriangleArea(segment1Start, segment1End, segment2End); - const float area2 = Signed2DTriangleArea(segment1Start, segment1End, segment2Start); - if (area1 * area2 < 0.0f) + // similarly we can check if the two ends of segment 1 are on different sides of segment 2 + const float area3 = Signed2DTriangleArea(segment2Start, segment2End, segment1Start); + const float area4 = area3 + area2 - area1; + if (area3 * area4 < 0.0f) { - // similarly we can check if the two ends of segment 1 are on different sides of segment 2 - const float area3 = Signed2DTriangleArea(segment2Start, segment2End, segment1Start); - const float area4 = area3 + area2 - area1; - if (area3 * area4 < 0.0f) - { - return 0.0f; - } + return 0.0f; } - - // otherwise the shortest distance must be between one of the segment end points and the other segment - return GetMin( - GetMin( - ShortestDistanceSqPointSegment(segment1Start, segment2Start, segment2End), - ShortestDistanceSqPointSegment(segment1End, segment2Start, segment2End)), - GetMin( - ShortestDistanceSqPointSegment(segment2Start, segment1Start, segment1End), - ShortestDistanceSqPointSegment(segment2End, segment1Start, segment1End)) - ); } - bool IsSimplePolygon(const AZStd::vector& vertices, float epsilon) - { - // note that this implementation is quadratic in the number of vertices - // if it becomes a bottleneck, there are approaches which are O(n log n), e.g. the Bentley-Ottmann algorithm + // otherwise the shortest distance must be between one of the segment end points and the other segment + return GetMin( + GetMin( + ShortestDistanceSqPointSegment(segment1Start, segment2Start, segment2End), + ShortestDistanceSqPointSegment(segment1End, segment2Start, segment2End)), + GetMin( + ShortestDistanceSqPointSegment(segment2Start, segment1Start, segment1End), + ShortestDistanceSqPointSegment(segment2End, segment1Start, segment1End)) + ); + } + + bool IsSimplePolygon(const AZStd::vector& vertices, float epsilon) + { + // note that this implementation is quadratic in the number of vertices + // if it becomes a bottleneck, there are approaches which are O(n log n), e.g. the Bentley-Ottmann algorithm - const size_t vertexCount = vertices.size(); + const size_t vertexCount = vertices.size(); - if (vertexCount < 3) - { - return false; - } + if (vertexCount < 3) + { + return false; + } - if (vertexCount == 3) - { - return true; - } + if (vertexCount == 3) + { + return true; + } - const float epsilonSq = epsilon * epsilon; + const float epsilonSq = epsilon * epsilon; - for (size_t i = 0; i < vertexCount; ++i) - { - // make it easy to nicely wrap indices - const size_t safeIndex = i + vertexCount; + for (size_t i = 0; i < vertexCount; ++i) + { + // make it easy to nicely wrap indices + const size_t safeIndex = i + vertexCount; - const size_t endIndex = (safeIndex - 1) % vertexCount; - const size_t beginIndex = (safeIndex + 2) % vertexCount; + const size_t endIndex = (safeIndex - 1) % vertexCount; + const size_t beginIndex = (safeIndex + 2) % vertexCount; - for (size_t j = beginIndex; j != endIndex; j = (j + 1) % vertexCount) + for (size_t j = beginIndex; j != endIndex; j = (j + 1) % vertexCount) + { + const float distSq = ShortestDistanceSqSegmentSegment( + vertices[i], + vertices[(i + 1) % vertexCount], + vertices[j], + vertices[(j + 1) % vertexCount] + ); + + if (distSq < epsilonSq) { - const float distSq = ShortestDistanceSqSegmentSegment( - vertices[i], - vertices[(i + 1) % vertexCount], - vertices[j], - vertices[(j + 1) % vertexCount] - ); - - if (distSq < epsilonSq) - { - return false; - } + return false; } } - - return true; } - bool IsConvex(const AZStd::vector& vertices) + return true; + } + + bool IsConvex(const AZStd::vector& vertices) + { + const size_t vertexCount = vertices.size(); + + if (vertexCount < 3) { - const size_t vertexCount = vertices.size(); + return false; + } - if (vertexCount < 3) + for (size_t i = 0; i < vertexCount; ++i) + { + if (Signed2DTriangleArea(vertices[i], vertices[(i + 1) % vertexCount], vertices[(i + 2) % vertexCount]) < 0.0f) { return false; } - - for (size_t i = 0; i < vertexCount; ++i) - { - if (Signed2DTriangleArea(vertices[i], vertices[(i + 1) % vertexCount], vertices[(i + 2) % vertexCount]) < 0.0f) - { - return false; - } - } - - return true; } - } // namespace Geometry2DUtils -} // namespace AZ + + return true; + } +} // namespace AZ::Geometry2DUtils diff --git a/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp b/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp index 66404a9b3f..5f4dc9e5df 100644 --- a/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp +++ b/Code/Framework/AzCore/AzCore/Math/Sfmt.cpp @@ -14,28 +14,26 @@ #include // for memset -namespace AZ +namespace AZ::SfmtInternal { - namespace SfmtInternal - { - static const int N32 = N * 4; - static const int N64 = N * 2; - static const int POS1 = 122; - static const int SL1 = 18; - static const int SR1 = 11; - static const int SL2 = 1; - static const int SR2 = 1; - static const unsigned int MSK1 = 0xdfffffefU; - static const unsigned int MSK2 = 0xddfecb7fU; - static const unsigned int MSK3 = 0xbffaffffU; - static const unsigned int MSK4 = 0xbffffff6U; - static const unsigned int PARITY1 = 0x00000001U; - static const unsigned int PARITY2 = 0x00000000U; - static const unsigned int PARITY3 = 0x00000000U; - static const unsigned int PARITY4 = 0x13c9e684U; - - /** a parity check vector which certificate the period of 2^{MEXP} */ - static unsigned int parity[4] = {PARITY1, PARITY2, PARITY3, PARITY4}; + static const int N32 = N * 4; + static const int N64 = N * 2; + static const int POS1 = 122; + static const int SL1 = 18; + static const int SR1 = 11; + static const int SL2 = 1; + static const int SR2 = 1; + static const unsigned int MSK1 = 0xdfffffefU; + static const unsigned int MSK2 = 0xddfecb7fU; + static const unsigned int MSK3 = 0xbffaffffU; + static const unsigned int MSK4 = 0xbffffff6U; + static const unsigned int PARITY1 = 0x00000001U; + static const unsigned int PARITY2 = 0x00000000U; + static const unsigned int PARITY3 = 0x00000000U; + static const unsigned int PARITY4 = 0x13c9e684U; + + /** a parity check vector which certificate the period of 2^{MEXP} */ + static unsigned int parity[4] = {PARITY1, PARITY2, PARITY3, PARITY4}; #ifdef ONLY64 # define idxof(_i) (_i ^ 1) @@ -45,259 +43,257 @@ namespace AZ #if AZ_TRAIT_USE_PLATFORM_SIMD_SSE - /** - * This function represents the recursion formula. - * @param a a 128-bit part of the internal state array - * @param b a 128-bit part of the internal state array - * @param c a 128-bit part of the internal state array - * @param d a 128-bit part of the internal state array - * @param mask 128-bit mask - * @return output - */ - AZ_FORCE_INLINE static Simd::Vec4::Int32Type simd_recursion(Simd::Vec4::Int32Type* a, Simd::Vec4::Int32Type* b, Simd::Vec4::Int32Type c, Simd::Vec4::Int32Type d, Simd::Vec4::Int32Type mask) + /** + * This function represents the recursion formula. + * @param a a 128-bit part of the internal state array + * @param b a 128-bit part of the internal state array + * @param c a 128-bit part of the internal state array + * @param d a 128-bit part of the internal state array + * @param mask 128-bit mask + * @return output + */ + AZ_FORCE_INLINE static Simd::Vec4::Int32Type simd_recursion(Simd::Vec4::Int32Type* a, Simd::Vec4::Int32Type* b, Simd::Vec4::Int32Type c, Simd::Vec4::Int32Type d, Simd::Vec4::Int32Type mask) + { + Simd::Vec4::Int32Type v, x, y, z; + x = *a; + y = _mm_srli_epi32(*b, SR1); + z = _mm_srli_si128(c, SR2); + v = _mm_slli_epi32(d, SL1); + z = Simd::Vec4::Xor(z, x); + z = Simd::Vec4::Xor(z, v); + x = _mm_slli_si128(x, SL2); + y = Simd::Vec4::And(y, mask); + z = Simd::Vec4::Xor(z, x); + z = Simd::Vec4::Xor(z, y); + return z; + } + + /** + * This function fills the internal state array with pseudorandom + * integers. + */ + inline void gen_rand_all(Sfmt& g) + { + int i; + Simd::Vec4::Int32Type r, r1, r2, mask; + mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); + + r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); + r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); + for (i = 0; i < N - POS1; i++) { - Simd::Vec4::Int32Type v, x, y, z; - x = *a; - y = _mm_srli_epi32(*b, SR1); - z = _mm_srli_si128(c, SR2); - v = _mm_slli_epi32(d, SL1); - z = Simd::Vec4::Xor(z, x); - z = Simd::Vec4::Xor(z, v); - x = _mm_slli_si128(x, SL2); - y = Simd::Vec4::And(y, mask); - z = Simd::Vec4::Xor(z, x); - z = Simd::Vec4::Xor(z, y); - return z; + r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); + r1 = r2; + r2 = r; } - - /** - * This function fills the internal state array with pseudorandom - * integers. - */ - inline void gen_rand_all(Sfmt& g) + for (; i < N; i++) { - int i; - Simd::Vec4::Int32Type r, r1, r2, mask; - mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); - - r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); - r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); - for (i = 0; i < N - POS1; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); - r1 = r2; - r2 = r; - } - for (; i < N; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); - r1 = r2; - r2 = r; - } + r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[i].si, r); + r1 = r2; + r2 = r; } + } - /** - * This function fills the user-specified array with pseudorandom - * integers. - * - * @param array an 128-bit array to be filled by pseudorandom numbers. - * @param size number of 128-bit pesudorandom numbers to be generated. - */ - inline void gen_rand_array(Sfmt& g, w128_t* array, int size) - { - int i, j; - Simd::Vec4::Int32Type r, r1, r2, mask; - mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); + /** + * This function fills the user-specified array with pseudorandom + * integers. + * + * @param array an 128-bit array to be filled by pseudorandom numbers. + * @param size number of 128-bit pesudorandom numbers to be generated. + */ + inline void gen_rand_array(Sfmt& g, w128_t* array, int size) + { + int i, j; + Simd::Vec4::Int32Type r, r1, r2, mask; + mask = Simd::Vec4::LoadImmediate((int32_t)MSK4, (int32_t)MSK3, (int32_t)MSK2, (int32_t)MSK1); - r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); - r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); - for (i = 0; i < N - POS1; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - r1 = r2; - r2 = r; - } - for (; i < N; i++) - { - r = simd_recursion(&g.m_sfmt[i].si, &array[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - r1 = r2; - r2 = r; - } - /* main loop */ - for (; i < size - N; i++) - { - r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - r1 = r2; - r2 = r; - } - for (j = 0; j < 2 * N - size; j++) - { - r = Simd::Vec4::LoadAligned((const int32_t*)&array[j + size - N].si); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j].si, r); - } - for (; i < size; i++) - { - r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); - Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); - Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j++].si, r); - r1 = r2; - r2 = r; - } + r1 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 2].si); + r2 = Simd::Vec4::LoadAligned((const int32_t*)&g.m_sfmt[N - 1].si); + for (i = 0; i < N - POS1; i++) + { + r = simd_recursion(&g.m_sfmt[i].si, &g.m_sfmt[i + POS1].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + r1 = r2; + r2 = r; } -#else - inline void rshift128(w128_t* out, w128_t const* in, int shift) + for (; i < N; i++) { - AZ::u64 th, tl, oh, ol; - #ifdef ONLY64 - th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); - tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); - - oh = th >> (shift * 8); - ol = tl >> (shift * 8); - ol |= th << (64 - shift * 8); - out->u[0] = (AZ::u32)(ol >> 32); - out->u[1] = (AZ::u32)ol; - out->u[2] = (AZ::u32)(oh >> 32); - out->u[3] = (AZ::u32)oh; - #else - th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); - tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); - - oh = th >> (shift * 8); - ol = tl >> (shift * 8); - ol |= th << (64 - shift * 8); - out->u[1] = (AZ::u32)(ol >> 32); - out->u[0] = (AZ::u32)ol; - out->u[3] = (AZ::u32)(oh >> 32); - out->u[2] = (AZ::u32)oh; - #endif + r = simd_recursion(&g.m_sfmt[i].si, &array[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + r1 = r2; + r2 = r; } - - inline void lshift128(w128_t* out, w128_t const* in, int shift) + /* main loop */ + for (; i < size - N; i++) { - AZ::u64 th, tl, oh, ol; - #ifdef ONLY64 - th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); - tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); - - oh = th << (shift * 8); - ol = tl << (shift * 8); - oh |= tl >> (64 - shift * 8); - out->u[0] = (AZ::u32)(ol >> 32); - out->u[1] = (AZ::u32)ol; - out->u[2] = (AZ::u32)(oh >> 32); - out->u[3] = (AZ::u32)oh; - #else - th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); - tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); - - oh = th << (shift * 8); - ol = tl << (shift * 8); - oh |= tl >> (64 - shift * 8); - out->u[1] = (AZ::u32)(ol >> 32); - out->u[0] = (AZ::u32)ol; - out->u[3] = (AZ::u32)(oh >> 32); - out->u[2] = (AZ::u32)oh; - #endif + r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + r1 = r2; + r2 = r; } - - inline void do_recursion(w128_t* r, w128_t* a, w128_t* b, w128_t* c, w128_t* d) + for (j = 0; j < 2 * N - size; j++) { - w128_t x; - w128_t y; - lshift128(&x, a, SL2); - rshift128(&y, c, SR2); - #ifdef ONLY64 - r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK2) ^ y.u[0] ^ (d->u[0] << SL1); - r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK1) ^ y.u[1] ^ (d->u[1] << SL1); - r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK4) ^ y.u[2] ^ (d->u[2] << SL1); - r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK3) ^ y.u[3] ^ (d->u[3] << SL1); - #else - r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK1) ^ y.u[0] ^ (d->u[0] << SL1); - r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK2) ^ y.u[1] ^ (d->u[1] << SL1); - r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK3) ^ y.u[2] ^ (d->u[2] << SL1); - r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK4) ^ y.u[3] ^ (d->u[3] << SL1); - #endif + r = Simd::Vec4::LoadAligned((const int32_t*)&array[j + size - N].si); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j].si, r); } - /** - * This function fills the internal state array with pseudorandom - * integers. - */ - inline void gen_rand_all(Sfmt& g) + for (; i < size; i++) { - int i; - w128_t* r1, * r2; - - r1 = &g.m_sfmt[N - 2]; - r2 = &g.m_sfmt[N - 1]; - for (i = 0; i < N - POS1; i++) - { - do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); - r1 = r2; - r2 = &g.m_sfmt[i]; - } - for (; i < N; i++) - { - do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &g.m_sfmt[i]; - } + r = simd_recursion(&array[i - N].si, &array[i + POS1 - N].si, r1, r2, mask); + Simd::Vec4::StoreAligned((int32_t*)&array[i].si, r); + Simd::Vec4::StoreAligned((int32_t*)&g.m_sfmt[j++].si, r); + r1 = r2; + r2 = r; } + } +#else + inline void rshift128(w128_t* out, w128_t const* in, int shift) + { + AZ::u64 th, tl, oh, ol; + #ifdef ONLY64 + th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); + tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); + + oh = th >> (shift * 8); + ol = tl >> (shift * 8); + ol |= th << (64 - shift * 8); + out->u[0] = (AZ::u32)(ol >> 32); + out->u[1] = (AZ::u32)ol; + out->u[2] = (AZ::u32)(oh >> 32); + out->u[3] = (AZ::u32)oh; +#else + th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); + tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); + + oh = th >> (shift * 8); + ol = tl >> (shift * 8); + ol |= th << (64 - shift * 8); + out->u[1] = (AZ::u32)(ol >> 32); + out->u[0] = (AZ::u32)ol; + out->u[3] = (AZ::u32)(oh >> 32); + out->u[2] = (AZ::u32)oh; +#endif + } - /** - * This function fills the user-specified array with pseudorandom - * integers. - * - * @param array an 128-bit array to be filled by pseudorandom numbers. - * @param size number of 128-bit pseudorandom numbers to be generated. - */ - inline void gen_rand_array(Sfmt& g, w128_t* array, int size) + inline void lshift128(w128_t* out, w128_t const* in, int shift) + { + AZ::u64 th, tl, oh, ol; +#ifdef ONLY64 + th = ((AZ::u64)in->u[2] << 32) | ((AZ::u64)in->u[3]); + tl = ((AZ::u64)in->u[0] << 32) | ((AZ::u64)in->u[1]); + + oh = th << (shift * 8); + ol = tl << (shift * 8); + oh |= tl >> (64 - shift * 8); + out->u[0] = (AZ::u32)(ol >> 32); + out->u[1] = (AZ::u32)ol; + out->u[2] = (AZ::u32)(oh >> 32); + out->u[3] = (AZ::u32)oh; +#else + th = ((AZ::u64)in->u[3] << 32) | ((AZ::u64)in->u[2]); + tl = ((AZ::u64)in->u[1] << 32) | ((AZ::u64)in->u[0]); + + oh = th << (shift * 8); + ol = tl << (shift * 8); + oh |= tl >> (64 - shift * 8); + out->u[1] = (AZ::u32)(ol >> 32); + out->u[0] = (AZ::u32)ol; + out->u[3] = (AZ::u32)(oh >> 32); + out->u[2] = (AZ::u32)oh; +#endif + } + + inline void do_recursion(w128_t* r, w128_t* a, w128_t* b, w128_t* c, w128_t* d) + { + w128_t x; + w128_t y; + lshift128(&x, a, SL2); + rshift128(&y, c, SR2); +#ifdef ONLY64 + r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK2) ^ y.u[0] ^ (d->u[0] << SL1); + r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK1) ^ y.u[1] ^ (d->u[1] << SL1); + r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK4) ^ y.u[2] ^ (d->u[2] << SL1); + r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK3) ^ y.u[3] ^ (d->u[3] << SL1); +#else + r->u[0] = a->u[0] ^ x.u[0] ^ ((b->u[0] >> SR1) & MSK1) ^ y.u[0] ^ (d->u[0] << SL1); + r->u[1] = a->u[1] ^ x.u[1] ^ ((b->u[1] >> SR1) & MSK2) ^ y.u[1] ^ (d->u[1] << SL1); + r->u[2] = a->u[2] ^ x.u[2] ^ ((b->u[2] >> SR1) & MSK3) ^ y.u[2] ^ (d->u[2] << SL1); + r->u[3] = a->u[3] ^ x.u[3] ^ ((b->u[3] >> SR1) & MSK4) ^ y.u[3] ^ (d->u[3] << SL1); +#endif + } + /** + * This function fills the internal state array with pseudorandom + * integers. + */ + inline void gen_rand_all(Sfmt& g) + { + int i; + w128_t* r1, * r2; + + r1 = &g.m_sfmt[N - 2]; + r2 = &g.m_sfmt[N - 1]; + for (i = 0; i < N - POS1; i++) + { + do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); + r1 = r2; + r2 = &g.m_sfmt[i]; + } + for (; i < N; i++) { - int i, j; - w128_t* r1, * r2; + do_recursion(&g.m_sfmt[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &g.m_sfmt[i]; + } + } - r1 = &g.m_sfmt[N - 2]; - r2 = &g.m_sfmt[N - 1]; - for (i = 0; i < N - POS1; i++) - { - do_recursion(&array[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); - r1 = r2; - r2 = &array[i]; - } - for (; i < N; i++) - { - do_recursion(&array[i], &g.m_sfmt[i], &array[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &array[i]; - } - for (; i < size - N; i++) - { - do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &array[i]; - } - for (j = 0; j < 2 * N - size; j++) - { - g.m_sfmt[j] = array[j + size - N]; - } - for (; i < size; i++, j++) - { - do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); - r1 = r2; - r2 = &array[i]; - g.m_sfmt[j] = array[i]; - } + /** + * This function fills the user-specified array with pseudorandom + * integers. + * + * @param array an 128-bit array to be filled by pseudorandom numbers. + * @param size number of 128-bit pseudorandom numbers to be generated. + */ + inline void gen_rand_array(Sfmt& g, w128_t* array, int size) + { + int i, j; + w128_t* r1, * r2; + + r1 = &g.m_sfmt[N - 2]; + r2 = &g.m_sfmt[N - 1]; + for (i = 0; i < N - POS1; i++) + { + do_recursion(&array[i], &g.m_sfmt[i], &g.m_sfmt[i + POS1], r1, r2); + r1 = r2; + r2 = &array[i]; } + for (; i < N; i++) + { + do_recursion(&array[i], &g.m_sfmt[i], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; + } + for (; i < size - N; i++) + { + do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; + } + for (j = 0; j < 2 * N - size; j++) + { + g.m_sfmt[j] = array[j + size - N]; + } + for (; i < size; i++, j++) + { + do_recursion(&array[i], &array[i - N], &array[i + POS1 - N], r1, r2); + r1 = r2; + r2 = &array[i]; + g.m_sfmt[j] = array[i]; + } + } #endif - } // SmftInternal -} // AZ - +} // namespace AZ::SfmtInternal using namespace AZ; diff --git a/Code/Framework/AzCore/AzCore/Math/Uuid.h b/Code/Framework/AzCore/AzCore/Math/Uuid.h index 6b77e7ec3e..eeacb04877 100644 --- a/Code/Framework/AzCore/AzCore/Math/Uuid.h +++ b/Code/Framework/AzCore/AzCore/Math/Uuid.h @@ -45,7 +45,7 @@ namespace AZ static constexpr int ValidUuidStringLength = 32; /// Number of characters (data only, no extra formatting) in a valid UUID string static const size_t MaxStringBuffer = 39; /// 32 Uuid + 4 dashes + 2 brackets + 1 terminate - Uuid() {} + Uuid() = default; Uuid(const char* string, size_t stringLength = 0) { *this = CreateString(string, stringLength); } static Uuid CreateNull(); diff --git a/Code/Framework/AzCore/AzCore/Math/Vector2.h b/Code/Framework/AzCore/AzCore/Math/Vector2.h index 7c37d74135..91eb61d6c8 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector2.h +++ b/Code/Framework/AzCore/AzCore/Math/Vector2.h @@ -30,7 +30,7 @@ namespace AZ Vector2() = default; - Vector2(const Vector2& v); + Vector2(const Vector2& v) = default; //! Constructs vector with all components set to the same specified value. explicit Vector2(float x); diff --git a/Code/Framework/AzCore/AzCore/Math/Vector2.inl b/Code/Framework/AzCore/AzCore/Math/Vector2.inl index 086be2bbc3..9691dd3a5c 100644 --- a/Code/Framework/AzCore/AzCore/Math/Vector2.inl +++ b/Code/Framework/AzCore/AzCore/Math/Vector2.inl @@ -8,13 +8,6 @@ namespace AZ { - AZ_MATH_INLINE Vector2::Vector2(const Vector2& v) - : m_value(v.m_value) - { - ; - } - - AZ_MATH_INLINE Vector2::Vector2(float x) : m_value(Simd::Vec2::Splat(x)) { diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp index 3c09b4cae6..44ce08ebd9 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorManager.cpp @@ -20,44 +20,42 @@ #include #include -using namespace AZ; - #if !defined(RELEASE) && !defined(AZCORE_MEMORY_ENABLE_OVERRIDES) # define AZCORE_MEMORY_ENABLE_OVERRIDES #endif -namespace AZ +namespace AZ::Internal { - namespace Internal + struct AMStringHasher { - struct AMStringHasher + using is_transparent = void; + template + size_t operator()(const ConvertibleToStringView& key) { - using is_transparent = void; - template - size_t operator()(const ConvertibleToStringView& key) - { - return AZStd::hash{}(key); - } - }; - using AMString = AZStd::basic_string, AZStdIAllocator>; - using AllocatorNameMap = AZStd::unordered_map, AZStdIAllocator>; - using AllocatorRemappings = AZStd::unordered_map, AZStdIAllocator>; - - // For allocators that are created before we have an environment, we keep some module-local data for them so that we can register them - // properly once the environment is attached. - struct PreEnvironmentAttachData - { - static const int MAX_UNREGISTERED_ALLOCATORS = 8; - AZStd::mutex m_mutex; - MallocSchema m_mallocSchema; - IAllocator* m_unregisteredAllocators[MAX_UNREGISTERED_ALLOCATORS]; - int m_unregisteredAllocatorCount = 0; - }; + return AZStd::hash{}(key); + } + }; + using AMString = AZStd::basic_string, AZStdIAllocator>; + using AllocatorNameMap = AZStd::unordered_map, AZStdIAllocator>; + using AllocatorRemappings = AZStd::unordered_map, AZStdIAllocator>; + + // For allocators that are created before we have an environment, we keep some module-local data for them so that we can register them + // properly once the environment is attached. + struct PreEnvironmentAttachData + { + static const int MAX_UNREGISTERED_ALLOCATORS = 8; + AZStd::mutex m_mutex; + MallocSchema m_mallocSchema; + IAllocator* m_unregisteredAllocators[MAX_UNREGISTERED_ALLOCATORS]; + int m_unregisteredAllocatorCount = 0; + }; - } } -struct AZ::AllocatorManager::InternalData +namespace AZ +{ + +struct AllocatorManager::InternalData { explicit InternalData(const AZStdIAllocator& alloc) : m_allocatorMap(alloc) @@ -69,13 +67,13 @@ struct AZ::AllocatorManager::InternalData Internal::AllocatorRemappings m_remappingsReverse; }; -static AZ::EnvironmentVariable s_allocManager = nullptr; +static EnvironmentVariable s_allocManager = nullptr; static AllocatorManager* s_allocManagerDebug = nullptr; // For easier viewing in crash dumps /// Returns a module-local instance of data to use for allocators that are created before the environment is attached. -static AZ::Internal::PreEnvironmentAttachData& GetPreEnvironmentAttachData() +static Internal::PreEnvironmentAttachData& GetPreEnvironmentAttachData() { - static AZ::Internal::PreEnvironmentAttachData s_data; + static Internal::PreEnvironmentAttachData s_data; return s_data; } @@ -131,7 +129,7 @@ AllocatorManager& AllocatorManager::Instance() if (!s_allocManager) { AZ_Assert(Environment::IsReady(), "Environment must be ready before calling Instance()"); - s_allocManager = AZ::Environment::CreateVariable(AZ_CRC("AZ::AllocatorManager::s_allocManager", 0x6bdd908c)); + s_allocManager = Environment::CreateVariable(AZ_CRC_CE("AZ::AllocatorManager::s_allocManager")); // Register any allocators that were created in this module before we attached to the environment auto& data = GetPreEnvironmentAttachData(); @@ -156,9 +154,9 @@ AllocatorManager& AllocatorManager::Instance() ////////////////////////////////////////////////////////////////////////// // Create malloc schema using custom AZ_OS_MALLOC allocator. -AZ::MallocSchema* AllocatorManager::CreateMallocSchema() +MallocSchema* AllocatorManager::CreateMallocSchema() { - return static_cast(new(AZ_OS_MALLOC(sizeof(AZ::MallocSchema), alignof(AZ::MallocSchema))) AZ::MallocSchema()); + return static_cast(new(AZ_OS_MALLOC(sizeof(MallocSchema), alignof(MallocSchema))) MallocSchema()); } @@ -168,7 +166,7 @@ AZ::MallocSchema* AllocatorManager::CreateMallocSchema() //========================================================================= AllocatorManager::AllocatorManager() : m_profilingRefcount(0) - , m_mallocSchema(CreateMallocSchema(), [](AZ::MallocSchema* schema) + , m_mallocSchema(CreateMallocSchema(), [](MallocSchema* schema) { if (schema) { @@ -182,7 +180,7 @@ AllocatorManager::AllocatorManager() m_numAllocators = 0; m_isAllocatorLeaking = false; m_configurationFinalized = false; - m_defaultTrackingRecordMode = AZ::Debug::AllocationRecords::RECORD_NO_RECORDS; + m_defaultTrackingRecordMode = Debug::AllocationRecords::RECORD_NO_RECORDS; m_data = new (m_mallocSchema->Allocate(sizeof(InternalData), AZStd::alignment_of::value, 0)) InternalData(AZStdIAllocator(m_mallocSchema.get())); } @@ -411,12 +409,12 @@ AllocatorManager::RemoveOutOfMemoryListener() // [9/16/2011] //========================================================================= void -AllocatorManager::SetTrackingMode(AZ::Debug::AllocationRecords::Mode mode) +AllocatorManager::SetTrackingMode(Debug::AllocationRecords::Mode mode) { AZStd::lock_guard lock(m_allocatorListMutex); for (int i = 0; i < m_numAllocators; ++i) { - AZ::Debug::AllocationRecords* records = m_allocators[i]->GetRecords(); + Debug::AllocationRecords* records = m_allocators[i]->GetRecords(); if (records) { records->SetMode(mode); @@ -595,31 +593,31 @@ void AllocatorManager::GetAllocatorStats(size_t& allocatedBytes, size_t& capacit AZStd::lock_guard lock(m_allocatorListMutex); const int allocatorCount = GetNumAllocators(); - AZStd::unordered_map existingAllocators; - AZStd::unordered_map sourcesToAllocators; + AZStd::unordered_map existingAllocators; + AZStd::unordered_map sourcesToAllocators; // Build a mapping of original allocator sources to their allocators for (int i = 0; i < allocatorCount; ++i) { - AZ::IAllocator* allocator = GetAllocator(i); + IAllocator* allocator = GetAllocator(i); sourcesToAllocators.emplace(allocator->GetOriginalAllocationSource(), allocator); } for (int i = 0; i < allocatorCount; ++i) { - AZ::IAllocator* allocator = GetAllocator(i); - AZ::IAllocatorAllocate* source = allocator->GetAllocationSource(); - AZ::IAllocatorAllocate* originalSource = allocator->GetOriginalAllocationSource(); - AZ::IAllocatorAllocate* schema = allocator->GetSchema(); - AZ::IAllocator* alias = (source != originalSource) ? sourcesToAllocators[source] : nullptr; + IAllocator* allocator = GetAllocator(i); + IAllocatorAllocate* source = allocator->GetAllocationSource(); + IAllocatorAllocate* originalSource = allocator->GetOriginalAllocationSource(); + IAllocatorAllocate* schema = allocator->GetSchema(); + IAllocator* alias = (source != originalSource) ? sourcesToAllocators[source] : nullptr; if (schema && !alias) { // Check to see if this allocator's source maps to another allocator // Need to check both the schema and the allocator itself, as either one might be used as the alias depending on how it's implemented - AZStd::array checkAllocators = { { schema, allocator->GetAllocationSource() } }; + AZStd::array checkAllocators = { { schema, allocator->GetAllocationSource() } }; - for (AZ::IAllocatorAllocate* check : checkAllocators) + for (IAllocatorAllocate* check : checkAllocators) { auto existing = existingAllocators.emplace(check, allocator); @@ -631,7 +629,7 @@ void AllocatorManager::GetAllocatorStats(size_t& allocatedBytes, size_t& capacit } } - static const AZ::IAllocator* OS_ALLOCATOR = &AZ::AllocatorInstance::GetAllocator(); + static const IAllocator* OS_ALLOCATOR = &AllocatorInstance::GetAllocator(); size_t sourceAllocatedBytes = source->NumAllocatedBytes(); size_t sourceCapacityBytes = source->Capacity(); @@ -742,3 +740,5 @@ AllocatorManager::DebugBreak(void* address, const Debug::AllocationInfo& info) } } } + +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp b/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp index 154d59edd3..e4928e83c5 100644 --- a/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/AllocatorOverrideShim.cpp @@ -8,223 +8,220 @@ #include -namespace AZ +namespace AZ::Internal { - namespace Internal + AllocatorOverrideShim* AllocatorOverrideShim::Create(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) { - AllocatorOverrideShim* AllocatorOverrideShim::Create(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) - { - void* memory = shimAllocationSource->Allocate(sizeof(AllocatorOverrideShim), AZStd::alignment_of::value, 0); - auto result = new (memory) AllocatorOverrideShim(owningAllocator, shimAllocationSource); - return result; - } + void* memory = shimAllocationSource->Allocate(sizeof(AllocatorOverrideShim), AZStd::alignment_of::value, 0); + auto result = new (memory) AllocatorOverrideShim(owningAllocator, shimAllocationSource); + return result; + } - void AllocatorOverrideShim::Destroy(AllocatorOverrideShim* source) - { - auto shimAllocationSource = source->m_shimAllocationSource; - source->~AllocatorOverrideShim(); - shimAllocationSource->DeAllocate(source); - } + void AllocatorOverrideShim::Destroy(AllocatorOverrideShim* source) + { + auto shimAllocationSource = source->m_shimAllocationSource; + source->~AllocatorOverrideShim(); + shimAllocationSource->DeAllocate(source); + } - AllocatorOverrideShim::AllocatorOverrideShim(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) - : m_owningAllocator(owningAllocator) - , m_source(owningAllocator->GetOriginalAllocationSource()) - , m_overridingSource(owningAllocator->GetOriginalAllocationSource()) - , m_shimAllocationSource(shimAllocationSource) - , m_records(typename AllocationSet::hasher(), typename AllocationSet::key_eq(), StdAllocationSrc(shimAllocationSource)) - { - } + AllocatorOverrideShim::AllocatorOverrideShim(IAllocator* owningAllocator, IAllocatorAllocate* shimAllocationSource) + : m_owningAllocator(owningAllocator) + , m_source(owningAllocator->GetOriginalAllocationSource()) + , m_overridingSource(owningAllocator->GetOriginalAllocationSource()) + , m_shimAllocationSource(shimAllocationSource) + , m_records(typename AllocationSet::hasher(), typename AllocationSet::key_eq(), StdAllocationSrc(shimAllocationSource)) + { + } - void AllocatorOverrideShim::SetOverride(IAllocatorAllocate* source) - { - m_overridingSource = source; - } + void AllocatorOverrideShim::SetOverride(IAllocatorAllocate* source) + { + m_overridingSource = source; + } - IAllocatorAllocate* AllocatorOverrideShim::GetOverride() const - { - return m_overridingSource; - } + IAllocatorAllocate* AllocatorOverrideShim::GetOverride() const + { + return m_overridingSource; + } - bool AllocatorOverrideShim::IsOverridden() const - { - return m_source != m_overridingSource; - } + bool AllocatorOverrideShim::IsOverridden() const + { + return m_source != m_overridingSource; + } - bool AllocatorOverrideShim::HasOrphanedAllocations() const - { - return !m_records.empty(); - } + bool AllocatorOverrideShim::HasOrphanedAllocations() const + { + return !m_records.empty(); + } - void AllocatorOverrideShim::SetFinalizedConfiguration() - { - m_finalizedConfiguration = true; - } + void AllocatorOverrideShim::SetFinalizedConfiguration() + { + m_finalizedConfiguration = true; + } - typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) + typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) + { + pointer_type ptr = m_overridingSource->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord); + + if (!IsOverridden()) { - pointer_type ptr = m_overridingSource->Allocate(byteSize, alignment, flags, name, fileName, lineNum, suppressStackRecord); + lock_type lock(m_mutex); + m_records.insert(ptr); // Record in case we need to orphan this allocation later + } - if (!IsOverridden()) - { - lock_type lock(m_mutex); - m_records.insert(ptr); // Record in case we need to orphan this allocation later - } + return ptr; + } - return ptr; - } + void AllocatorOverrideShim::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + IAllocatorAllocate* source = m_overridingSource; + bool destroy = false; - void AllocatorOverrideShim::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) { - IAllocatorAllocate* source = m_overridingSource; - bool destroy = false; + lock_type lock(m_mutex); + // Check to see if this came from a prior allocation source + if (m_records.erase(ptr) && IsOverridden()) { - lock_type lock(m_mutex); + source = m_source; - // Check to see if this came from a prior allocation source - if (m_records.erase(ptr) && IsOverridden()) + if (m_records.empty() && m_finalizedConfiguration) { - source = m_source; - - if (m_records.empty() && m_finalizedConfiguration) - { - // All orphaned records are gone; we are no longer needed - m_owningAllocator->SetAllocationSource(m_overridingSource); - destroy = true; // Must destroy outside the lock - } + // All orphaned records are gone; we are no longer needed + m_owningAllocator->SetAllocationSource(m_overridingSource); + destroy = true; // Must destroy outside the lock } } + } - source->DeAllocate(ptr, byteSize, alignment); + source->DeAllocate(ptr, byteSize, alignment); - if (destroy) - { - Destroy(this); - } + if (destroy) + { + Destroy(this); } + } - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Resize(pointer_type ptr, size_type newSize) + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Resize(pointer_type ptr, size_type newSize) + { + IAllocatorAllocate* source = m_overridingSource; + + if (IsOverridden()) { - IAllocatorAllocate* source = m_overridingSource; + // Determine who owns the allocation + lock_type lock(m_mutex); - if (IsOverridden()) + if (m_records.count(ptr)) { - // Determine who owns the allocation - lock_type lock(m_mutex); - - if (m_records.count(ptr)) - { - source = m_source; - } + source = m_source; } + } - size_t result = source->Resize(ptr, newSize); + size_t result = source->Resize(ptr, newSize); - return result; - } + return result; + } - typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + typename AllocatorOverrideShim::pointer_type AllocatorOverrideShim::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + { + pointer_type newPtr = nullptr; + bool useOverride = true; + bool destroy = false; + + if (IsOverridden()) { - pointer_type newPtr = nullptr; - bool useOverride = true; - bool destroy = false; + lock_type lock(m_mutex); - if (IsOverridden()) + if (m_records.erase(ptr)) { - lock_type lock(m_mutex); + // An old allocation needs to be transferred to the new, overriding allocator. + useOverride = false; // We'll do the reallocation here + size_t oldSize = m_source->AllocationSize(ptr); - if (m_records.erase(ptr)) + if (newSize) { - // An old allocation needs to be transferred to the new, overriding allocator. - useOverride = false; // We'll do the reallocation here - size_t oldSize = m_source->AllocationSize(ptr); - - if (newSize) - { - newPtr = m_overridingSource->Allocate(newSize, newAlignment, 0); - memcpy(newPtr, ptr, AZStd::min(newSize, oldSize)); - } - - m_source->DeAllocate(ptr, oldSize); - - if (m_records.empty() && m_finalizedConfiguration) - { - // All orphaned records are gone; we are no longer needed - m_owningAllocator->SetAllocationSource(m_overridingSource); - destroy = true; // Must destroy outside the lock - } + newPtr = m_overridingSource->Allocate(newSize, newAlignment, 0); + memcpy(newPtr, ptr, AZStd::min(newSize, oldSize)); } - } - if (useOverride) - { - // Default behavior, we weren't deleting an old allocation - newPtr = m_overridingSource->ReAllocate(ptr, newSize, newAlignment); + m_source->DeAllocate(ptr, oldSize); - if (!IsOverridden()) + if (m_records.empty() && m_finalizedConfiguration) { - // Still need to do bookkeeping if we haven't been overridden yet - lock_type lock(m_mutex); - m_records.erase(ptr); - m_records.insert(newPtr); + // All orphaned records are gone; we are no longer needed + m_owningAllocator->SetAllocationSource(m_overridingSource); + destroy = true; // Must destroy outside the lock } } - - if (destroy) - { - Destroy(this); - } - - return newPtr; } - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::AllocationSize(pointer_type ptr) + if (useOverride) { - IAllocatorAllocate* source = m_overridingSource; + // Default behavior, we weren't deleting an old allocation + newPtr = m_overridingSource->ReAllocate(ptr, newSize, newAlignment); - if (IsOverridden()) + if (!IsOverridden()) { - // Determine who owns the allocation + // Still need to do bookkeeping if we haven't been overridden yet lock_type lock(m_mutex); - - if (m_records.count(ptr)) - { - source = m_source; - } + m_records.erase(ptr); + m_records.insert(newPtr); } - - return source->AllocationSize(ptr); } - void AllocatorOverrideShim::GarbageCollect() + if (destroy) { - m_source->GarbageCollect(); + Destroy(this); } - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::NumAllocatedBytes() const - { - return m_source->NumAllocatedBytes(); - } + return newPtr; + } - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Capacity() const - { - return m_source->Capacity(); - } + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::AllocationSize(pointer_type ptr) + { + IAllocatorAllocate* source = m_overridingSource; - typename AllocatorOverrideShim::size_type AllocatorOverrideShim::GetMaxAllocationSize() const + if (IsOverridden()) { - return m_source->GetMaxAllocationSize(); - } + // Determine who owns the allocation + lock_type lock(m_mutex); - auto AllocatorOverrideShim::GetMaxContiguousAllocationSize() const -> size_type - { - return m_source->GetMaxContiguousAllocationSize(); + if (m_records.count(ptr)) + { + source = m_source; + } } - IAllocatorAllocate* AllocatorOverrideShim::GetSubAllocator() - { - return m_source->GetSubAllocator(); - } + return source->AllocationSize(ptr); + } + + void AllocatorOverrideShim::GarbageCollect() + { + m_source->GarbageCollect(); + } + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::NumAllocatedBytes() const + { + return m_source->NumAllocatedBytes(); } -} + + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::Capacity() const + { + return m_source->Capacity(); + } + + typename AllocatorOverrideShim::size_type AllocatorOverrideShim::GetMaxAllocationSize() const + { + return m_source->GetMaxAllocationSize(); + } + + auto AllocatorOverrideShim::GetMaxContiguousAllocationSize() const -> size_type + { + return m_source->GetMaxContiguousAllocationSize(); + } + + IAllocatorAllocate* AllocatorOverrideShim::GetSubAllocator() + { + return m_source->GetSubAllocator(); + } + +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp index 6af8f201c2..6e40ccd8cd 100644 --- a/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/HphaSchema.cpp @@ -140,8 +140,8 @@ namespace AZ { class const_iterator; class iterator { - typedef T& reference; - typedef T* pointer; + using reference = T&; + using pointer = T*; friend class const_iterator; T* mPtr; public: @@ -171,8 +171,8 @@ namespace AZ { class const_iterator { - typedef const T& reference; - typedef const T* pointer; + using reference = const T &; + using pointer = const T *; const T* mPtr; public: const_iterator() @@ -327,7 +327,7 @@ namespace AZ { uint64_t mSizeAndFlags; public: - typedef block_header* block_ptr; + using block_ptr = block_header *; size_t size() const { return mSizeAndFlags & ~BL_FLAG_MASK; } block_ptr next() const {return (block_ptr)((char*)mem() + size()); } block_ptr prev() const {return mPrev; } @@ -415,7 +415,7 @@ namespace AZ { void dec_ref() { HPPA_ASSERT(mUseCount > 0); mUseCount--; } bool check_marker(size_t marker) const { return mMarker == (marker ^ ((size_t)this)); } }; - typedef intrusive_list page_list; + using page_list = intrusive_list; class bucket { page_list mPageList; diff --git a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp index 76a71e0f08..9aa31cd8b6 100644 --- a/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/MallocSchema.cpp @@ -11,149 +11,168 @@ #include #include -namespace AZ +namespace AZ::Internal { - namespace Internal + struct Header { - struct Header - { - uint32_t offset; - uint32_t size; - }; - } -} - -//--------------------------------------------------------------------- -// MallocSchema methods -//--------------------------------------------------------------------- + uint32_t offset; + uint32_t size; + }; +} // namespace AZ::Internal -AZ::MallocSchema::MallocSchema(const Descriptor& desc) : - m_bytesAllocated(0) +namespace AZ { - if (desc.m_useAZMalloc) - { - static const int DEFAULT_ALIGNMENT = sizeof(void*) * 2; // Default malloc alignment + //--------------------------------------------------------------------- + // MallocSchema methods + //--------------------------------------------------------------------- - m_mallocFn = [](size_t byteSize) { return AZ_OS_MALLOC(byteSize, DEFAULT_ALIGNMENT); }; - m_freeFn = [](void* ptr) { AZ_OS_FREE(ptr); }; - } - else + MallocSchema::MallocSchema(const Descriptor& desc) + : m_bytesAllocated(0) { - m_mallocFn = &malloc; - m_freeFn = &free; + if (desc.m_useAZMalloc) + { + static const int DEFAULT_ALIGNMENT = sizeof(void*) * 2; // Default malloc alignment + + m_mallocFn = [](size_t byteSize) + { + return AZ_OS_MALLOC(byteSize, DEFAULT_ALIGNMENT); + }; + m_freeFn = [](void* ptr) + { + AZ_OS_FREE(ptr); + }; + } + else + { + m_mallocFn = &malloc; + m_freeFn = &free; + } } -} - -AZ::MallocSchema::~MallocSchema() -{ -} - -AZ::MallocSchema::pointer_type AZ::MallocSchema::Allocate(size_type byteSize, size_type alignment, int flags, const char* name, const char* fileName, int lineNum, unsigned int suppressStackRecord) -{ - (void)flags; - (void)name; - (void)fileName; - (void)lineNum; - (void)suppressStackRecord; - if (!byteSize) + MallocSchema::~MallocSchema() { - return nullptr; } - if (alignment == 0) + MallocSchema::pointer_type MallocSchema::Allocate( + size_type byteSize, + size_type alignment, + int flags, + const char* name, + const char* fileName, + int lineNum, + unsigned int suppressStackRecord) { - alignment = sizeof(void*) * 2; // Default malloc alignment - } + (void)flags; + (void)name; + (void)fileName; + (void)lineNum; + (void)suppressStackRecord; - AZ_Assert(byteSize < 0x100000000ull, "Malloc allocator only allocates up to 4GB"); + if (!byteSize) + { + return nullptr; + } - size_type required = byteSize + sizeof(Internal::Header) + ((alignment > sizeof(double)) ? alignment : 0); // Malloc will align to a minimum boundary for native objects, so we only pad if aligning to a large value - void* data = (*m_mallocFn)(required); - void* result = PointerAlignUp(reinterpret_cast(reinterpret_cast(data) + sizeof(Internal::Header)), alignment); - Internal::Header* header = PointerAlignDown((Internal::Header*)(reinterpret_cast(result) - sizeof(Internal::Header)), AZStd::alignment_of::value); + if (alignment == 0) + { + alignment = sizeof(void*) * 2; // Default malloc alignment + } - header->offset = static_cast(reinterpret_cast(result) - reinterpret_cast(data)); - header->size = static_cast(byteSize); - m_bytesAllocated += byteSize; + AZ_Assert(byteSize < 0x100000000ull, "Malloc allocator only allocates up to 4GB"); - return result; -} + size_type required = byteSize + sizeof(Internal::Header) + + ((alignment > sizeof(double)) + ? alignment + : 0); // Malloc will align to a minimum boundary for native objects, so we only pad if aligning to a large value + void* data = (*m_mallocFn)(required); + void* result = PointerAlignUp(reinterpret_cast(reinterpret_cast(data) + sizeof(Internal::Header)), alignment); + Internal::Header* header = PointerAlignDown( + (Internal::Header*)(reinterpret_cast(result) - sizeof(Internal::Header)), AZStd::alignment_of::value); -void AZ::MallocSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) -{ - (void)byteSize; - (void)alignment; + header->offset = static_cast(reinterpret_cast(result) - reinterpret_cast(data)); + header->size = static_cast(byteSize); + m_bytesAllocated += byteSize; - if (!ptr) - { - return; + return result; } - Internal::Header* header = PointerAlignDown(reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), AZStd::alignment_of::value); - void* freePtr = reinterpret_cast(reinterpret_cast(ptr) - static_cast(header->offset)); + void MallocSchema::DeAllocate(pointer_type ptr, size_type byteSize, size_type alignment) + { + (void)byteSize; + (void)alignment; - m_bytesAllocated -= header->size; - (*m_freeFn)(freePtr); -} + if (!ptr) + { + return; + } -AZ::MallocSchema::pointer_type AZ::MallocSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) -{ - void* newPtr = Allocate(newSize, newAlignment, 0); - size_t oldSize = AllocationSize(ptr); + Internal::Header* header = PointerAlignDown( + reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), + AZStd::alignment_of::value); + void* freePtr = reinterpret_cast(reinterpret_cast(ptr) - static_cast(header->offset)); - memcpy(newPtr, ptr, AZStd::min(oldSize, newSize)); - DeAllocate(ptr, 0, 0); + m_bytesAllocated -= header->size; + (*m_freeFn)(freePtr); + } - return newPtr; -} + MallocSchema::pointer_type MallocSchema::ReAllocate(pointer_type ptr, size_type newSize, size_type newAlignment) + { + void* newPtr = Allocate(newSize, newAlignment, 0); + size_t oldSize = AllocationSize(ptr); -AZ::MallocSchema::size_type AZ::MallocSchema::Resize(pointer_type ptr, size_type newSize) -{ - (void)ptr; - (void)newSize; + memcpy(newPtr, ptr, AZStd::min(oldSize, newSize)); + DeAllocate(ptr, 0, 0); - return 0; -} + return newPtr; + } -AZ::MallocSchema::size_type AZ::MallocSchema::AllocationSize(pointer_type ptr) -{ - size_type result = 0; + MallocSchema::size_type MallocSchema::Resize(pointer_type ptr, size_type newSize) + { + (void)ptr; + (void)newSize; - if (ptr) + return 0; + } + + MallocSchema::size_type MallocSchema::AllocationSize(pointer_type ptr) { - Internal::Header* header = PointerAlignDown(reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), AZStd::alignment_of::value); - result = header->size; + if (!ptr) + { + return 0; + } + Internal::Header* header = PointerAlignDown( + reinterpret_cast(reinterpret_cast(ptr) - sizeof(Internal::Header)), + AZStd::alignment_of::value); + return header->size; } - return result; -} + MallocSchema::size_type MallocSchema::NumAllocatedBytes() const + { + return m_bytesAllocated; + } -AZ::MallocSchema::size_type AZ::MallocSchema::NumAllocatedBytes() const -{ - return m_bytesAllocated; -} + MallocSchema::size_type MallocSchema::Capacity() const + { + return 0; + } -AZ::MallocSchema::size_type AZ::MallocSchema::Capacity() const -{ - return 0; -} + MallocSchema::size_type MallocSchema::GetMaxAllocationSize() const + { + return 0xFFFFFFFFull; + } -AZ::MallocSchema::size_type AZ::MallocSchema::GetMaxAllocationSize() const -{ - return 0xFFFFFFFFull; -} + MallocSchema::size_type MallocSchema::GetMaxContiguousAllocationSize() const + { + return AZ_CORE_MAX_ALLOCATOR_SIZE; + } -AZ::MallocSchema::size_type AZ::MallocSchema::GetMaxContiguousAllocationSize() const -{ - return AZ_CORE_MAX_ALLOCATOR_SIZE; -} + IAllocatorAllocate* MallocSchema::GetSubAllocator() + { + return nullptr; + } -AZ::IAllocatorAllocate* AZ::MallocSchema::GetSubAllocator() -{ - return nullptr; -} + void MallocSchema::GarbageCollect() + { + } -void AZ::MallocSchema::GarbageCollect() -{ -} +} // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp index 2ea25c3397..dc35c6322b 100644 --- a/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/MemoryDriller.cpp @@ -15,280 +15,277 @@ #include #include -namespace AZ +namespace AZ::Debug { - namespace Debug + //========================================================================= + // MemoryDriller + // [2/6/2013] + //========================================================================= + MemoryDriller::MemoryDriller(const Descriptor& desc) { - //========================================================================= - // MemoryDriller - // [2/6/2013] - //========================================================================= - MemoryDriller::MemoryDriller(const Descriptor& desc) - { - (void)desc; - BusConnect(); + (void)desc; + BusConnect(); - AllocatorManager::Instance().EnterProfilingMode(); + AllocatorManager::Instance().EnterProfilingMode(); - { - // Register all allocators that were created before the driller existed - auto allocatorLock = AllocatorManager::Instance().LockAllocators(); + { + // Register all allocators that were created before the driller existed + auto allocatorLock = AllocatorManager::Instance().LockAllocators(); - for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) - { - IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); - RegisterAllocator(allocator); - } + for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) + { + IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); + RegisterAllocator(allocator); } } + } - //========================================================================= - // ~MemoryDriller - // [2/6/2013] - //========================================================================= - MemoryDriller::~MemoryDriller() - { - BusDisconnect(); - AllocatorManager::Instance().ExitProfilingMode(); - } + //========================================================================= + // ~MemoryDriller + // [2/6/2013] + //========================================================================= + MemoryDriller::~MemoryDriller() + { + BusDisconnect(); + AllocatorManager::Instance().ExitProfilingMode(); + } - //========================================================================= - // Start - // [2/6/2013] - //========================================================================= - void MemoryDriller::Start(const Param* params, int numParams) - { - (void)params; - (void)numParams; + //========================================================================= + // Start + // [2/6/2013] + //========================================================================= + void MemoryDriller::Start(const Param* params, int numParams) + { + (void)params; + (void)numParams; - // dump current allocations for all allocators with tracking - auto allocatorLock = AllocatorManager::Instance().LockAllocators(); - for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) + // dump current allocations for all allocators with tracking + auto allocatorLock = AllocatorManager::Instance().LockAllocators(); + for (int i = 0; i < AllocatorManager::Instance().GetNumAllocators(); ++i) + { + IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); + if (auto records = allocator->GetRecords()) { - IAllocator* allocator = AllocatorManager::Instance().GetAllocator(i); - if (auto records = allocator->GetRecords()) + RegisterAllocatorOutput(allocator); + const AllocationRecordsType& allocMap = records->GetMap(); + for (AllocationRecordsType::const_iterator allocIt = allocMap.begin(); allocIt != allocMap.end(); ++allocIt) { - RegisterAllocatorOutput(allocator); - const AllocationRecordsType& allocMap = records->GetMap(); - for (AllocationRecordsType::const_iterator allocIt = allocMap.begin(); allocIt != allocMap.end(); ++allocIt) - { - RegisterAllocationOutput(allocator, allocIt->first, &allocIt->second); - } + RegisterAllocationOutput(allocator, allocIt->first, &allocIt->second); } } } + } + + //========================================================================= + // Stop + // [2/6/2013] + //========================================================================= + void MemoryDriller::Stop() + { + } - //========================================================================= - // Stop - // [2/6/2013] - //========================================================================= - void MemoryDriller::Stop() + //========================================================================= + // RegisterAllocator + // [2/6/2013] + //========================================================================= + void MemoryDriller::RegisterAllocator(IAllocator* allocator) + { + // Ignore if our allocator is already registered + if (allocator->GetRecords() != nullptr) { + return; } - //========================================================================= - // RegisterAllocator - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocator(IAllocator* allocator) + auto debugConfig = allocator->GetDebugConfig(); + + if (!debugConfig.m_excludeFromDebugging) { - // Ignore if our allocator is already registered - if (allocator->GetRecords() != nullptr) - { - return; - } + allocator->SetRecords(aznew Debug::AllocationRecords((unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, allocator->GetName())); - auto debugConfig = allocator->GetDebugConfig(); + m_allAllocatorRecords.push_back(allocator->GetRecords()); - if (!debugConfig.m_excludeFromDebugging) + if (m_output == nullptr) { - allocator->SetRecords(aznew Debug::AllocationRecords((unsigned char)debugConfig.m_stackRecordLevels, debugConfig.m_usesMemoryGuards, debugConfig.m_marksUnallocatedMemory, allocator->GetName())); - - m_allAllocatorRecords.push_back(allocator->GetRecords()); - - if (m_output == nullptr) - { - return; // we have no active output - } - RegisterAllocatorOutput(allocator); + return; // we have no active output } + RegisterAllocatorOutput(allocator); } - //========================================================================= - // RegisterAllocatorOutput - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocatorOutput(IAllocator* allocator) + } + //========================================================================= + // RegisterAllocatorOutput + // [2/6/2013] + //========================================================================= + void MemoryDriller::RegisterAllocatorOutput(IAllocator* allocator) + { + auto records = allocator->GetRecords(); + m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + m_output->BeginTag(AZ_CRC("RegisterAllocator", 0x19f08114)); + m_output->Write(AZ_CRC("Name", 0x5e237e06), allocator->GetName()); + m_output->Write(AZ_CRC("Id", 0xbf396750), allocator); + m_output->Write(AZ_CRC("Capacity", 0xb5e8b174), allocator->GetAllocationSource()->Capacity()); + m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); + if (records) { - auto records = allocator->GetRecords(); - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("RegisterAllocator", 0x19f08114)); - m_output->Write(AZ_CRC("Name", 0x5e237e06), allocator->GetName()); - m_output->Write(AZ_CRC("Id", 0xbf396750), allocator); - m_output->Write(AZ_CRC("Capacity", 0xb5e8b174), allocator->GetAllocationSource()->Capacity()); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - if (records) - { - m_output->Write(AZ_CRC("RecordsMode", 0x764c147a), (char)records->GetMode()); - m_output->Write(AZ_CRC("NumStackLevels", 0xad9cff15), records->GetNumStackLevels()); - } - m_output->EndTag(AZ_CRC("RegisterAllocator", 0x19f08114)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + m_output->Write(AZ_CRC("RecordsMode", 0x764c147a), (char)records->GetMode()); + m_output->Write(AZ_CRC("NumStackLevels", 0xad9cff15), records->GetNumStackLevels()); } + m_output->EndTag(AZ_CRC("RegisterAllocator", 0x19f08114)); + m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + } - //========================================================================= - // UnregisterAllocator - // [2/6/2013] - //========================================================================= - void MemoryDriller::UnregisterAllocator(IAllocator* allocator) + //========================================================================= + // UnregisterAllocator + // [2/6/2013] + //========================================================================= + void MemoryDriller::UnregisterAllocator(IAllocator* allocator) + { + auto allocatorRecords = allocator->GetRecords(); + AZ_Assert(allocatorRecords, "This allocator is not registered with the memory driller!"); + for (auto records : m_allAllocatorRecords) { - auto allocatorRecords = allocator->GetRecords(); - AZ_Assert(allocatorRecords, "This allocator is not registered with the memory driller!"); - for (auto records : m_allAllocatorRecords) + if (records == allocatorRecords) { - if (records == allocatorRecords) - { - m_allAllocatorRecords.remove(records); - break; - } + m_allAllocatorRecords.remove(records); + break; } - delete allocatorRecords; - allocator->SetRecords(nullptr); + } + delete allocatorRecords; + allocator->SetRecords(nullptr); + if (m_output == nullptr) + { + return; // we have no active output + } + m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + m_output->Write(AZ_CRC("UnregisterAllocator", 0xb2b54f93), allocator); + m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + } + + //========================================================================= + // RegisterAllocation + // [2/6/2013] + //========================================================================= + void MemoryDriller::RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) + { + auto records = allocator->GetRecords(); + if (records) + { + const AllocationInfo* info = records->RegisterAllocation(address, byteSize, alignment, name, fileName, lineNum, stackSuppressCount + 1); if (m_output == nullptr) { - return; // we have no active output + return; // we have no active output } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->Write(AZ_CRC("UnregisterAllocator", 0xb2b54f93), allocator); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + RegisterAllocationOutput(allocator, address, info); } + } - //========================================================================= - // RegisterAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, const char* name, const char* fileName, int lineNum, unsigned int stackSuppressCount) + //========================================================================= + // RegisterAllocationOutput + // [2/6/2013] + //========================================================================= + void MemoryDriller::RegisterAllocationOutput(IAllocator* allocator, void* address, const AllocationInfo* info) + { + auto records = allocator->GetRecords(); + m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + m_output->BeginTag(AZ_CRC("RegisterAllocation", 0x992a9780)); + m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); + m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); + if (info) { - auto records = allocator->GetRecords(); - if (records) + if (info->m_name) { - const AllocationInfo* info = records->RegisterAllocation(address, byteSize, alignment, name, fileName, lineNum, stackSuppressCount + 1); - if (m_output == nullptr) - { - return; // we have no active output - } - RegisterAllocationOutput(allocator, address, info); + m_output->Write(AZ_CRC("Name", 0x5e237e06), info->m_name); + } + m_output->Write(AZ_CRC("Alignment", 0x2cce1e5c), info->m_alignment); + m_output->Write(AZ_CRC("Size", 0xf7c0246a), info->m_byteSize); + if (info->m_fileName) + { + m_output->Write(AZ_CRC("FileName", 0x3c0be965), info->m_fileName); + m_output->Write(AZ_CRC("FileLine", 0xb33c2395), info->m_lineNum); + } + // copy the stack frames directly, resolving the stack should happen later as this is a SLOW procedure. + if (info->m_stackFrames) + { + m_output->Write(AZ_CRC("Stack", 0x41a87b6a), info->m_stackFrames, info->m_stackFrames + records->GetNumStackLevels()); } } + m_output->EndTag(AZ_CRC("RegisterAllocation", 0x992a9780)); + m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + } - //========================================================================= - // RegisterAllocationOutput - // [2/6/2013] - //========================================================================= - void MemoryDriller::RegisterAllocationOutput(IAllocator* allocator, void* address, const AllocationInfo* info) + //========================================================================= + // UnRegisterAllocation + // [2/6/2013] + //========================================================================= + void MemoryDriller::UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) + { + auto records = allocator->GetRecords(); + if (records) { - auto records = allocator->GetRecords(); + records->UnregisterAllocation(address, byteSize, alignment, info); + + if (m_output == nullptr) + { + return; // we have no active output + } m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("RegisterAllocation", 0x992a9780)); + m_output->BeginTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - if (info) - { - if (info->m_name) - { - m_output->Write(AZ_CRC("Name", 0x5e237e06), info->m_name); - } - m_output->Write(AZ_CRC("Alignment", 0x2cce1e5c), info->m_alignment); - m_output->Write(AZ_CRC("Size", 0xf7c0246a), info->m_byteSize); - if (info->m_fileName) - { - m_output->Write(AZ_CRC("FileName", 0x3c0be965), info->m_fileName); - m_output->Write(AZ_CRC("FileLine", 0xb33c2395), info->m_lineNum); - } - // copy the stack frames directly, resolving the stack should happen later as this is a SLOW procedure. - if (info->m_stackFrames) - { - m_output->Write(AZ_CRC("Stack", 0x41a87b6a), info->m_stackFrames, info->m_stackFrames + records->GetNumStackLevels()); - } - } - m_output->EndTag(AZ_CRC("RegisterAllocation", 0x992a9780)); + m_output->EndTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); } + } - //========================================================================= - // UnRegisterAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::UnregisterAllocation(IAllocator* allocator, void* address, size_t byteSize, size_t alignment, AllocationInfo* info) - { - auto records = allocator->GetRecords(); - if (records) - { - records->UnregisterAllocation(address, byteSize, alignment, info); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->EndTag(AZ_CRC("UnRegisterAllocation", 0xea5dc4cd)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - } - } + //========================================================================= + // ReallocateAllocation + // [10/1/2018] + //========================================================================= + void MemoryDriller::ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) + { + AllocationInfo info; + UnregisterAllocation(allocator, prevAddress, 0, 0, &info); + RegisterAllocation(allocator, newAddress, newByteSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); + } - //========================================================================= - // ReallocateAllocation - // [10/1/2018] - //========================================================================= - void MemoryDriller::ReallocateAllocation(IAllocator* allocator, void* prevAddress, void* newAddress, size_t newByteSize, size_t newAlignment) + //========================================================================= + // ResizeAllocation + // [2/6/2013] + //========================================================================= + void MemoryDriller::ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) + { + auto records = allocator->GetRecords(); + if (records) { - AllocationInfo info; - UnregisterAllocation(allocator, prevAddress, 0, 0, &info); - RegisterAllocation(allocator, newAddress, newByteSize, newAlignment, info.m_name, info.m_fileName, info.m_lineNum, 0); - } + records->ResizeAllocation(address, newSize); - //========================================================================= - // ResizeAllocation - // [2/6/2013] - //========================================================================= - void MemoryDriller::ResizeAllocation(IAllocator* allocator, void* address, size_t newSize) - { - auto records = allocator->GetRecords(); - if (records) + if (m_output == nullptr) { - records->ResizeAllocation(address, newSize); - - if (m_output == nullptr) - { - return; // we have no active output - } - m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); - m_output->BeginTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); - m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); - m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); - m_output->Write(AZ_CRC("Size", 0xf7c0246a), newSize); - m_output->EndTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); - m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + return; // we have no active output } + m_output->BeginTag(AZ_CRC("MemoryDriller", 0x1b31269d)); + m_output->BeginTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); + m_output->Write(AZ_CRC("RecordsId", 0x7caaca88), records); + m_output->Write(AZ_CRC("Address", 0x0d4e6f81), address); + m_output->Write(AZ_CRC("Size", 0xf7c0246a), newSize); + m_output->EndTag(AZ_CRC("ResizeAllocation", 0x8a9c78dc)); + m_output->EndTag(AZ_CRC("MemoryDriller", 0x1b31269d)); } + } - void MemoryDriller::DumpAllAllocations() - { - // Create a copy so allocations done during the printing dont end up affecting the container - const AZStd::list allocationRecords = m_allAllocatorRecords; + void MemoryDriller::DumpAllAllocations() + { + // Create a copy so allocations done during the printing dont end up affecting the container + const AZStd::list allocationRecords = m_allAllocatorRecords; - for (auto records : allocationRecords) + for (auto records : allocationRecords) + { + // Skip if we have had no allocations made + if (records->RequestedAllocs()) { - // Skip if we have had no allocations made - if (records->RequestedAllocs()) - { - records->EnumerateAllocations(AZ::Debug::PrintAllocationsCB(true, true)); - } + records->EnumerateAllocations(AZ::Debug::PrintAllocationsCB(true, true)); } } + } - }// namespace Debug -} // namespace AZ +} // namespace AZ::Debug diff --git a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp index 0bef6b7d28..9167864450 100644 --- a/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp +++ b/Code/Framework/AzCore/AzCore/Memory/PoolSchema.cpp @@ -35,8 +35,8 @@ namespace AZ public: AZ_CLASS_ALLOCATOR(PoolAllocation, SystemAllocator, 0) - typedef typename Allocator::Page PageType; - typedef typename Allocator::Bucket BucketType; + using PageType = typename Allocator::Page; + using BucketType = typename Allocator::Bucket; PoolAllocation(Allocator* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize); virtual ~PoolAllocation(); @@ -89,7 +89,7 @@ namespace AZ void SetupFreeList(size_t elementSize, size_t pageDataBlockSize); /// We just use a free list of nodes which we cast to the pool type. - typedef AZStd::intrusive_slist > FreeListType; + using FreeListType = AZStd::intrusive_slist>; FreeListType m_freeList; u32 m_bin; @@ -103,7 +103,7 @@ namespace AZ */ struct Bucket { - typedef AZStd::intrusive_list > PageListType; + using PageListType = AZStd::intrusive_list>; PageListType m_pages; }; @@ -162,7 +162,7 @@ namespace AZ return page; } - typedef PoolAllocation AllocatorType; + using AllocatorType = PoolAllocation; IAllocatorAllocate* m_pageAllocator; AllocatorType m_allocator; void* m_staticDataBlock; @@ -199,7 +199,7 @@ namespace AZ void SetupFreeList(size_t elementSize, size_t pageDataBlockSize); /// We just use a free list of nodes which we cast to the pool type. - typedef AZStd::intrusive_slist > FreeListType; + using FreeListType = AZStd::intrusive_slist>; FreeListType m_freeList; AZStd::lock_free_intrusive_stack_node m_lfStack; ///< Lock Free stack node @@ -215,7 +215,7 @@ namespace AZ */ struct Bucket { - typedef AZStd::intrusive_list > PageListType; + using PageListType = AZStd::intrusive_list>; PageListType m_pages; }; @@ -291,7 +291,7 @@ namespace AZ ThreadPoolSchema::SetThreadPoolData m_threadPoolSetter; // Fox X64 we push/pop pages using the m_mutex to sync. Pages are - typedef Bucket::PageListType FreePagesType; + using FreePagesType = Bucket::PageListType; FreePagesType m_freePages; AZStd::vector m_threads; ///< Array with all separate thread data. Used to traverse end free elements. @@ -313,12 +313,12 @@ namespace AZ ThreadPoolData(ThreadPoolSchemaImpl* alloc, size_t pageSize, size_t minAllocationSize, size_t maxAllocationSize); ~ThreadPoolData(); - typedef PoolAllocation AllocatorType; + using AllocatorType = PoolAllocation; /** * Stack with freed elements from other threads. We don't need stamped stack since the ABA problem can not * happen here. We push from many threads and pop from only one (we don't push from it). */ - typedef AZStd::lock_free_intrusive_stack > FreedElementsStack; + using FreedElementsStack = AZStd::lock_free_intrusive_stack>; AllocatorType m_allocator; FreedElementsStack m_freedElements; diff --git a/Code/Framework/AzCore/AzCore/Module/Environment.cpp b/Code/Framework/AzCore/AzCore/Module/Environment.cpp index 71da948a35..790af730bf 100644 --- a/Code/Framework/AzCore/AzCore/Module/Environment.cpp +++ b/Code/Framework/AzCore/AzCore/Module/Environment.cpp @@ -24,10 +24,10 @@ namespace AZ class OSStdAllocator { public: - typedef void* pointer_type; - typedef AZStd::size_t size_type; - typedef AZStd::ptrdiff_t difference_type; - typedef AZStd::false_type allow_memory_leaks; ///< Regular allocators should not leak. + using pointer_type = void *; + using size_type = AZStd::size_t; + using difference_type = AZStd::ptrdiff_t; + using allow_memory_leaks = AZStd::false_type; ///< Regular allocators should not leak. OSStdAllocator(Environment::AllocatorInterface* allocator) : m_name("GlobalEnvironmentAllocator") @@ -122,7 +122,7 @@ namespace AZ : public EnvironmentInterface { public: - typedef AZStd::unordered_map, AZStd::equal_to, OSStdAllocator> MapType; + using MapType = AZStd::unordered_map, AZStd::equal_to, OSStdAllocator>; static EnvironmentInterface* Get(); static void Attach(EnvironmentInstance sourceEnvironment, bool useAsGetFallback); diff --git a/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp b/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp index 10aa9904a3..0797fef93f 100644 --- a/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp +++ b/Code/Framework/AzCore/AzCore/Module/Internal/ModuleManagerSearchPathTool.cpp @@ -10,21 +10,18 @@ #include #include -namespace AZ +namespace AZ::Internal { - namespace Internal + AZ::OSString ModuleManagerSearchPathTool::GetModuleDirectory(const AZ::DynamicModuleDescriptor& moduleDesc) { - AZ::OSString ModuleManagerSearchPathTool::GetModuleDirectory(const AZ::DynamicModuleDescriptor& moduleDesc) + // For each module that is loaded, attempt to set the module's folder as a path for dependent module resolution + AZ::OSString modulePath = moduleDesc.m_dynamicLibraryPath; + AZ::ComponentApplicationBus::Broadcast(&AZ::ComponentApplicationBus::Events::ResolveModulePath, modulePath); + auto lastPathSep = modulePath.find_last_of(AZ_TRAIT_OS_PATH_SEPARATOR); + if (lastPathSep != modulePath.npos) { - // For each module that is loaded, attempt to set the module's folder as a path for dependent module resolution - AZ::OSString modulePath = moduleDesc.m_dynamicLibraryPath; - AZ::ComponentApplicationBus::Broadcast(&AZ::ComponentApplicationBus::Events::ResolveModulePath, modulePath); - auto lastPathSep = modulePath.find_last_of(AZ_TRAIT_OS_PATH_SEPARATOR); - if (lastPathSep != modulePath.npos) - { - modulePath = modulePath.substr(0, lastPathSep); - } - return modulePath; + modulePath = modulePath.substr(0, lastPathSep); } - } // namespace Internal -} // namespace AZ + return modulePath; + } +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp b/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp index 574b0bcc7e..69bead11ac 100644 --- a/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp +++ b/Code/Framework/AzCore/AzCore/Name/Internal/NameData.cpp @@ -9,45 +9,41 @@ #include #include -namespace AZ +namespace AZ::Internal { - namespace Internal - { - NameData::NameData(AZStd::string&& name, Hash hash) - : m_name{AZStd::move(name)} - , m_hash{hash} - {} + NameData::NameData(AZStd::string&& name, Hash hash) + : m_name{AZStd::move(name)} + , m_hash{hash} + {} - AZStd::string_view NameData::GetName() const - { - return m_name; - } + AZStd::string_view NameData::GetName() const + { + return m_name; + } - NameData::Hash NameData::GetHash() const - { - return m_hash; - } + NameData::Hash NameData::GetHash() const + { + return m_hash; + } - void NameData::add_ref() - { - AZ_Assert(m_useCount >= 0, "NameData has been deleted"); - ++m_useCount; - } + void NameData::add_ref() + { + AZ_Assert(m_useCount >= 0, "NameData has been deleted"); + ++m_useCount; + } - void NameData::release() + void NameData::release() + { + // this could be released after we decrement the counter, therefore we will + // base the release on the hash which is stable + Hash hash = m_hash; + AZ_Assert(m_useCount > 0, "m_useCount is already 0!"); + if (m_useCount.fetch_sub(1) == 1) { - // this could be released after we decrement the counter, therefore we will - // base the release on the hash which is stable - Hash hash = m_hash; - AZ_Assert(m_useCount > 0, "m_useCount is already 0!"); - if (m_useCount.fetch_sub(1) == 1) + if (AZ::NameDictionary::IsReady()) { - if (AZ::NameDictionary::IsReady()) - { - AZ::NameDictionary::Instance().TryReleaseName(hash); - } + AZ::NameDictionary::Instance().TryReleaseName(hash); } } } -} - +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp b/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp index 6cba54a17f..1b39eb81bd 100644 --- a/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp +++ b/Code/Framework/AzCore/AzCore/Name/NameDictionary.cpp @@ -32,7 +32,12 @@ namespace AZ if (!s_instance) { - s_instance = AZ::Environment::CreateVariable(NameDictionaryInstanceName); + // Because the NameDictionary allocates memory using the AZ::Allocator and it is created + // in the executable memory space, it's ownership cannot be transferred to other module memory spaces + // Otherwise this could cause the the NameDictionary to be destroyed in static de-init + // after the AZ::Allocators have been destroyed + // Therefore we supply the isTransferOwnership value of false using CreateVariableEx + s_instance = AZ::Environment::CreateVariableEx(NameDictionaryInstanceName, true, false); } } diff --git a/Code/Framework/AzCore/AzCore/Platform.cpp b/Code/Framework/AzCore/AzCore/Platform.cpp index ad345f65e8..0defef826e 100644 --- a/Code/Framework/AzCore/AzCore/Platform.cpp +++ b/Code/Framework/AzCore/AzCore/Platform.cpp @@ -8,19 +8,16 @@ #include -namespace AZ +namespace AZ::Platform { - namespace Platform - { - MachineId s_machineId = MachineId(0); + MachineId s_machineId = MachineId(0); - void SetLocalMachineId(AZ::u32 machineId) + void SetLocalMachineId(AZ::u32 machineId) + { + AZ_Assert(machineId != 0, "0 machine ID is reserved!"); + if (s_machineId != 0) { - AZ_Assert(machineId != 0, "0 machine ID is reserved!"); - if (s_machineId != 0) - { - s_machineId = machineId; - } + s_machineId = machineId; } } -} +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp index 6fb03073b0..5632c258c3 100644 --- a/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp +++ b/Code/Framework/AzCore/AzCore/RTTI/BehaviorContextUtilities.cpp @@ -117,9 +117,9 @@ namespace AZ if (!explicitOverloads.m_overloads.empty()) { - for (auto methodAndClass : explicitOverloads.m_overloads) + for (const auto& methodAndClass : explicitOverloads.m_overloads) { - overloads.push_back({ methodAndClass.first, methodAndClass.second }); + overloads.emplace_back(methodAndClass.first, methodAndClass.second); } } else @@ -128,7 +128,7 @@ namespace AZ do { - overloads.push_back({ overload, behaviorClass }); + overloads.emplace_back(overload, behaviorClass); overload = overload->m_overload; } while (overload); diff --git a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp index 3b2aebdee6..4b71c57682 100644 --- a/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Script/ScriptSystemComponent.cpp @@ -170,61 +170,77 @@ ScriptContext* ScriptSystemComponent::AddContext(ScriptContext* context, int ga ScriptContext* ScriptSystemComponent::AddContextWithId(ScriptContextId id) { AZ_Assert(m_contexts.empty() || id != ScriptContextIds::DefaultScriptContextId, "Default script context ID is reserved! Please provide a Unique context ID for you ScriptContext!"); - if (GetContext(id) == nullptr) + if (GetContext(id) != nullptr) { - m_contexts.emplace_back(); - ContextContainer& cc = m_contexts.back(); - cc.m_context = aznew ScriptContext(id); - cc.m_isOwner = true; - cc.m_garbageCollectorSteps = m_defaultGarbageCollectorSteps; - - cc.m_context->SetRequireHook(AZStd::bind(&ScriptSystemComponent::DefaultRequireHook, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3)); + return nullptr; + } + m_contexts.emplace_back(); + ContextContainer& cc = m_contexts.back(); + cc.m_context = aznew ScriptContext(id); + cc.m_isOwner = true; + cc.m_garbageCollectorSteps = m_defaultGarbageCollectorSteps; + cc.m_context->SetRequireHook( + [this](lua_State* lua, ScriptContext* context, const char* module) -> int + { + return DefaultRequireHook(lua, context, module); + }); - if (id != ScriptContextIds::CryScriptContextId) + if (id != ScriptContextIds::CryScriptContextId) + { + // Reflect script classes + ComponentApplication* app = nullptr; + EBUS_EVENT_RESULT(app, ComponentApplicationBus, GetApplication); + if (app && app->GetDescriptor().m_enableScriptReflection) { - // Reflect script classes - ComponentApplication* app = nullptr; - EBUS_EVENT_RESULT(app, ComponentApplicationBus, GetApplication); - if (app && app->GetDescriptor().m_enableScriptReflection) + if (app->GetBehaviorContext()) { - if (app->GetBehaviorContext()) - { - cc.m_context->BindTo(app->GetBehaviorContext()); - } - else - { - AZ_Error("Script", false, "We are asked to enabled scripting, but the Applicaion has no BehaviorContext! Scripting relies on BehaviorContext!"); - } + cc.m_context->BindTo(app->GetBehaviorContext()); + } + else + { + AZ_Error("Script", false, "We are asked to enabled scripting, but the Applicaion has no BehaviorContext! Scripting relies on BehaviorContext!"); } } - - return cc.m_context; } - return nullptr; + return cc.m_context; } void ScriptSystemComponent::RestoreDefaultRequireHook(ScriptContextId id) { - if (auto context = GetContext(id)) + auto context = GetContext(id); + if (!context) { - for (auto& inMemoryModule : m_inMemoryModules) - { - ClearAssetReferences(inMemoryModule.second->GetId()); - } + return; + } - m_inMemoryModules.clear(); - context->SetRequireHook(AZStd::bind(&ScriptSystemComponent::DefaultRequireHook, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3)); + for (auto& inMemoryModule : m_inMemoryModules) + { + ClearAssetReferences(inMemoryModule.second->GetId()); } + + m_inMemoryModules.clear(); + context->SetRequireHook( + [this](lua_State* lua, ScriptContext* context, const char* module) -> int + { + return DefaultRequireHook(lua, context, module); + }); } void ScriptSystemComponent::UseInMemoryRequireHook(const InMemoryScriptModules& modules, ScriptContextId id) { - if (auto context = GetContext(id)) + auto context = GetContext(id); + if (nullptr == context) { - m_inMemoryModules = modules; - context->SetRequireHook(AZStd::bind(&ScriptSystemComponent::InMemoryRequireHook, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3)); + return; } + + m_inMemoryModules = modules; + context->SetRequireHook( + [this](lua_State* lua, ScriptContext* context, const char* module) -> int + { + return InMemoryRequireHook(lua, context, module); + }); } //========================================================================= diff --git a/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp b/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp index b0d141bba9..d0bea11432 100644 --- a/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp +++ b/Code/Framework/AzCore/AzCore/ScriptCanvas/ScriptCanvasOnDemandNames.cpp @@ -28,133 +28,130 @@ #include #include -namespace AZ +namespace AZ::ScriptCanvasOnDemandReflection { - namespace ScriptCanvasOnDemandReflection + // the use of this might have to come at the end of on demand reflection...instead of instantly + // basically, it required that dependent classes are reflected first, I'm not sure they are yet. + AZStd::string GetPrettyNameForAZTypeId(AZ::BehaviorContext& context, AZ::Uuid typeId) { - // the use of this might have to come at the end of on demand reflection...instead of instantly - // basically, it required that dependent classes are reflected first, I'm not sure they are yet. - AZStd::string GetPrettyNameForAZTypeId(AZ::BehaviorContext& context, AZ::Uuid typeId) + // return capitalized versions of what we need, otherwise just the regular name + // then strip all the stuff + if (typeId == azrtti_typeid()) { - // return capitalized versions of what we need, otherwise just the regular name - // then strip all the stuff - if (typeId == azrtti_typeid()) - { - return "AABB"; - } - else if (typeId == azrtti_typeid()) - { - return "Boolean"; - } - else if (typeId == azrtti_typeid()) - { - return "Color"; - } - else if (typeId == azrtti_typeid()) - { - return "CRC"; - } - else if (typeId == azrtti_typeid()) - { - return "EntityId"; - } - else if (typeId == azrtti_typeid()) - { - return "Matrix3x3"; - } - else if (typeId == azrtti_typeid()) - { - return "Matrix4x4"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s8"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s16"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s32"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:s64"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u8"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u16"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u32"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:u64"; - } - else if (typeId == azrtti_typeid()) - { - return "Number:float"; - } - else if (typeId == azrtti_typeid()) - { - return "Number"; - } - else if (typeId == azrtti_typeid()) - { - return "OBB"; - } - else if (typeId == azrtti_typeid()) - { - return "Plane"; - } - else if (typeId == azrtti_typeid()) - { - return "Quaternion"; - } - else if (typeId == azrtti_typeid() || typeId == azrtti_typeid()) - { - return "String"; - } - else if (typeId == azrtti_typeid()) - { - return "Transform"; - } - else if (typeId == azrtti_typeid()) - { - return "Vector2"; - } - else if (typeId == azrtti_typeid()) - { - return "Vector3"; - } - else if (typeId == azrtti_typeid()) + return "AABB"; + } + else if (typeId == azrtti_typeid()) + { + return "Boolean"; + } + else if (typeId == azrtti_typeid()) + { + return "Color"; + } + else if (typeId == azrtti_typeid()) + { + return "CRC"; + } + else if (typeId == azrtti_typeid()) + { + return "EntityId"; + } + else if (typeId == azrtti_typeid()) + { + return "Matrix3x3"; + } + else if (typeId == azrtti_typeid()) + { + return "Matrix4x4"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s8"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s16"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s32"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:s64"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u8"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u16"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u32"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:u64"; + } + else if (typeId == azrtti_typeid()) + { + return "Number:float"; + } + else if (typeId == azrtti_typeid()) + { + return "Number"; + } + else if (typeId == azrtti_typeid()) + { + return "OBB"; + } + else if (typeId == azrtti_typeid()) + { + return "Plane"; + } + else if (typeId == azrtti_typeid()) + { + return "Quaternion"; + } + else if (typeId == azrtti_typeid() || typeId == azrtti_typeid()) + { + return "String"; + } + else if (typeId == azrtti_typeid()) + { + return "Transform"; + } + else if (typeId == azrtti_typeid()) + { + return "Vector2"; + } + else if (typeId == azrtti_typeid()) + { + return "Vector3"; + } + else if (typeId == azrtti_typeid()) + { + return "Vector4"; + } + else + { + auto bcClassIter = context.m_typeToClassMap.find(typeId); + if (bcClassIter != context.m_typeToClassMap.end()) { - return "Vector4"; + const AZ::BehaviorClass& bcClass = *(bcClassIter->second); + AZStd::string uglyName = bcClass.m_name; + AZ::StringFunc::Replace(uglyName, "AZStd::", "", true); + AZ::StringFunc::Replace(uglyName, "AZ::", "", true); + AZ::StringFunc::Replace(uglyName, "::", ".", true); + return uglyName; } else { - auto bcClassIter = context.m_typeToClassMap.find(typeId); - if (bcClassIter != context.m_typeToClassMap.end()) - { - const AZ::BehaviorClass& bcClass = *(bcClassIter->second); - AZStd::string uglyName = bcClass.m_name; - AZ::StringFunc::Replace(uglyName, "AZStd::", "", true); - AZ::StringFunc::Replace(uglyName, "AZ::", "", true); - AZ::StringFunc::Replace(uglyName, "::", ".", true); - return uglyName; - } - else - { - return "Invalid"; - } + return "Invalid"; } } - } // namespace ScriptCanvasOnDemandReflection -} // namespace AZ + } +} // namespace AZ::ScriptCanvasOnDemandReflection diff --git a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl index bae79a6fe7..a633af22da 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/AZStdContainers.inl @@ -54,12 +54,8 @@ namespace AZStd namespace AZ { - //template - //class ScriptProperty; - namespace Internal { - template void SetupClassElementFromType(SerializeContext::ClassElement& classElement) { @@ -86,15 +82,14 @@ namespace AZ { auto uuid = AzTypeInfo::Uuid(); - using ContainerType = AttributeContainerType; - classElement.m_attributes.emplace_back(AZ_CRC("EnumType", 0xb177e1b5), CreateModuleAttribute(AZStd::move(uuid))); + classElement.m_attributes.emplace_back(AZ_CRC("EnumType", 0xb177e1b5), CreateModuleAttribute(AZStd::move(uuid))); } } template AZStd::enable_if_t::value> InitializeDefaultIfPodType(T& t) { - t = {}; + t = T{}; } template @@ -648,7 +643,6 @@ namespace AZ // Register our key type within an lvalue to rvalue wrapper as an attribute AZ::TypeId uuid = azrtti_typeid(); - using ContainerType = AttributeContainerType; /** * This should technically bind the reference value from the GetCurrentSerializeContextModule() call @@ -658,7 +652,7 @@ namespace AZ */ m_classElement.m_attributes.set_allocator(AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return GetCurrentSerializeContextModule().GetAllocator(); })); - m_classElement.m_attributes.emplace_back(AZ_CRC("KeyType", 0x15bc5303), CreateModuleAttribute(AZStd::move(uuid))); + m_classElement.m_attributes.emplace_back(AZ_CRC("KeyType", 0x15bc5303), CreateModuleAttribute(AZStd::move(uuid))); } // Reflect our wrapped key and value types to serializeContext so that may later be used diff --git a/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp b/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp index 37f4623301..58f86bf831 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/DataOverlayProviderMsgs.cpp @@ -19,8 +19,11 @@ namespace AZ nodeStack.push_back(m_dataContainer); SerializeContext::EnumerateInstanceCallContext callContext( - AZStd::bind(&DataOverlayTarget::ElementBegin, this, &nodeStack, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3), - AZStd::bind(&DataOverlayTarget::ElementEnd, this, &nodeStack), + [this, &nodeStack](void* instancePointer, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* classElement)->bool + { + return ElementBegin(&nodeStack, instancePointer, classData, classElement); + }, + [this, &nodeStack]()->bool { return ElementEnd(&nodeStack); }, m_sc, SerializeContext::ENUM_ACCESS_FOR_READ, m_errorLogger diff --git a/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp b/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp index 6f1635148c..d27a5005b4 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/DataPatch.cpp @@ -36,7 +36,7 @@ namespace AZ class DataNode { public: - typedef AZStd::list ChildDataNodes; + using ChildDataNodes = AZStd::list; DataNode() { @@ -148,25 +148,28 @@ namespace AZ m_root.Reset(); m_currentNode = nullptr; - if (m_context && rootClassPtr) + if (!m_context || !rootClassPtr) { - SerializeContext::EnumerateInstanceCallContext callContext( - AZStd::bind(&DataNodeTree::BeginNode, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3), - AZStd::bind(&DataNodeTree::EndNode, this), - m_context, - SerializeContext::ENUM_ACCESS_FOR_READ, - nullptr - ); - - m_context->EnumerateInstanceConst( - &callContext, - rootClassPtr, - rootClassId, - nullptr, - nullptr - ); + return; } - + SerializeContext::EnumerateInstanceCallContext callContext( + [this](void* instancePointer, const SerializeContext::ClassData* classData, const SerializeContext::ClassElement* classElement)->bool + { + return BeginNode(instancePointer, classData, classElement); + }, + [this]()->bool { return EndNode(); }, + m_context, + SerializeContext::ENUM_ACCESS_FOR_READ, + nullptr + ); + + m_context->EnumerateInstanceConst( + &callContext, + rootClassPtr, + rootClassId, + nullptr, + nullptr + ); m_currentNode = nullptr; } diff --git a/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp b/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp index d0c433df16..8a4688d748 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/EditContext.cpp @@ -34,7 +34,7 @@ namespace AZ } classIt->ClearElements(); } - for (auto enumIt : m_enumData) + for (auto& enumIt : m_enumData) { enumIt.second.ClearAttributes(); } @@ -103,7 +103,7 @@ namespace AZ //========================================================================= void ElementData::ClearAttributes() { - for (auto attrib : m_attributes) + for (auto& attrib : m_attributes) { delete attrib.second; } diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp index a741294544..4e80d9ba69 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonDeserializer.cpp @@ -759,6 +759,7 @@ namespace AZ else { typeIdResult.m_determination = JsonDeserializer::TypeIdDetermination::FailedToDetermine; + typeIdResult.m_typeId = Uuid::CreateNull(); } } else if (input.IsString()) @@ -768,6 +769,7 @@ namespace AZ else { typeIdResult.m_determination = JsonDeserializer::TypeIdDetermination::FailedToDetermine; + typeIdResult.m_typeId = Uuid::CreateNull(); } switch (typeIdResult.m_determination) diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp index 822c1c43d5..16bad5a466 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSerializationResult.cpp @@ -10,265 +10,264 @@ #include #include -namespace AZ +namespace AZ::JsonSerializationResult::Internal { - namespace JsonSerializationResult + template + void AppendToString(AZ::JsonSerializationResult::ResultCode code, + StringType& target, AZStd::string_view path) { - namespace Internal + if (code.GetTask() == static_cast(0)) { - template - void AppendToString(AZ::JsonSerializationResult::ResultCode code, - StringType& target, AZStd::string_view path) - { - if (code.GetTask() == static_cast(0)) - { - target.append("The result code wasn't initialized"); - return; - } - - target.append("The operation "); - switch (code.GetProcessing()) - { - case Processing::Halted: - target.append("has halted during "); - break; - case Processing::Altered: - target.append("has taken an alternative approach for "); - break; - case Processing::PartialAlter: - target.append("has taken a partially alternative approach for "); - break; - case Processing::Completed: - target.append("has completed "); - break; - default: - target.append("has unknown processing status for "); - break; - } - - switch (code.GetTask()) - { - case Tasks::RetrieveInfo: - target.append("a retrieve info operation "); - break; - case Tasks::CreateDefault: - target.append("a create default operation "); - break; - case Tasks::Convert: - target.append("a convert operation "); - break; - case Tasks::ReadField: - target.append("a read field operation "); - break; - case Tasks::WriteValue: - target.append("a write value operation "); - break; - case Tasks::Merge: - target.append("a merge operation "); - break; - case Tasks::CreatePatch: - target.append("a create patch operation "); - break; - case Tasks::Import: - target.append("an import operation"); - break; - default: - target.append("an unknown operation "); - break; - } - - if (!path.empty()) - { - target.append("for '"); - target.append(path.begin(), path.end()); - target.append("' "); - } - - switch (code.GetOutcome()) - { - case Outcomes::Success: - target.append("which resulted in success"); - break; - case Outcomes::DefaultsUsed: - target.append("by using only default values"); - break; - case Outcomes::PartialDefaults: - target.append("by using one or more default values"); - break; - case Outcomes::Skipped: - target.append("because a field or value was skipped"); - break; - case Outcomes::PartialSkip: - target.append("because one or more fields or values were skipped"); - break; - case Outcomes::Unavailable: - target.append("because the target was unavailable"); - break; - case Outcomes::Unsupported: - target.append("because the action was unsupported"); - break; - case Outcomes::TypeMismatch: - target.append("because the source and target are unrelated types"); - break; - case Outcomes::TestFailed: - target.append("because a test against a value failed"); - break; - case Outcomes::Missing: - target.append("because a required field or value was missing"); - break; - case Outcomes::Invalid: - target.append("because a field or element has an invalid value"); - break; - case Outcomes::Unknown: - target.append("because information was missing"); - break; - case Outcomes::Catastrophic: - target.append("because a catastrophic issue was encountered"); - break; - default: - break; - } - } - } // namespace JsonSerializationResultInternal + target.append("The result code wasn't initialized"); + return; + } - ResultCode::ResultCode(Tasks task) - : m_code(0) + target.append("The operation "); + switch (code.GetProcessing()) { - m_options.m_task = task; + case Processing::Halted: + target.append("has halted during "); + break; + case Processing::Altered: + target.append("has taken an alternative approach for "); + break; + case Processing::PartialAlter: + target.append("has taken a partially alternative approach for "); + break; + case Processing::Completed: + target.append("has completed "); + break; + default: + target.append("has unknown processing status for "); + break; } - ResultCode::ResultCode(uint32_t code) - : m_code(code) - {} - - ResultCode::ResultCode(Tasks task, Outcomes outcome) + switch (code.GetTask()) { - m_options.m_task = task; - switch (outcome) - { - case Outcomes::Success: // fall through - case Outcomes::Skipped: // fall through - case Outcomes::PartialSkip: // fall through - case Outcomes::DefaultsUsed: // fall through - case Outcomes::PartialDefaults: - m_options.m_processing = Processing::Completed; - break; - case Outcomes::Unavailable: // fall through - case Outcomes::Unsupported: - m_options.m_processing = Processing::Altered; - break; - case Outcomes::TypeMismatch: // fall through - case Outcomes::TestFailed: // fall through - case Outcomes::Missing: // fall through - case Outcomes::Invalid: // fall through - case Outcomes::Unknown: // fall through - case Outcomes::Catastrophic: // fall through - default: - m_options.m_processing = Processing::Halted; - break; - } - m_options.m_outcome = outcome; + case Tasks::RetrieveInfo: + target.append("a retrieve info operation "); + break; + case Tasks::CreateDefault: + target.append("a create default operation "); + break; + case Tasks::Convert: + target.append("a convert operation "); + break; + case Tasks::ReadField: + target.append("a read field operation "); + break; + case Tasks::WriteValue: + target.append("a write value operation "); + break; + case Tasks::Merge: + target.append("a merge operation "); + break; + case Tasks::CreatePatch: + target.append("a create patch operation "); + break; + case Tasks::Import: + target.append("an import operation"); + break; + default: + target.append("an unknown operation "); + break; } - bool ResultCode::HasDoneWork() const + if (!path.empty()) { - return m_options.m_outcome != static_cast(0); + target.append("for '"); + target.append(path.begin(), path.end()); + target.append("' "); } - ResultCode& ResultCode::Combine(ResultCode other) + switch (code.GetOutcome()) { - *this = Combine(*this, other); - return *this; + case Outcomes::Success: + target.append("which resulted in success"); + break; + case Outcomes::DefaultsUsed: + target.append("by using only default values"); + break; + case Outcomes::PartialDefaults: + target.append("by using one or more default values"); + break; + case Outcomes::Skipped: + target.append("because a field or value was skipped"); + break; + case Outcomes::PartialSkip: + target.append("because one or more fields or values were skipped"); + break; + case Outcomes::Unavailable: + target.append("because the target was unavailable"); + break; + case Outcomes::Unsupported: + target.append("because the action was unsupported"); + break; + case Outcomes::TypeMismatch: + target.append("because the source and target are unrelated types"); + break; + case Outcomes::TestFailed: + target.append("because a test against a value failed"); + break; + case Outcomes::Missing: + target.append("because a required field or value was missing"); + break; + case Outcomes::Invalid: + target.append("because a field or element has an invalid value"); + break; + case Outcomes::Unknown: + target.append("because information was missing"); + break; + case Outcomes::Catastrophic: + target.append("because a catastrophic issue was encountered"); + break; + default: + break; } + } +} // namespace AZ::JsonSerializationResult::Internal + +namespace AZ::JsonSerializationResult +{ + + ResultCode::ResultCode(Tasks task) + : m_code(0) + { + m_options.m_task = task; + } + + ResultCode::ResultCode(uint32_t code) + : m_code(code) + {} - ResultCode& ResultCode::Combine(const Result& other) + ResultCode::ResultCode(Tasks task, Outcomes outcome) + { + m_options.m_task = task; + switch (outcome) { - *this = Combine(*this, other.GetResultCode()); - return *this; + case Outcomes::Success: // fall through + case Outcomes::Skipped: // fall through + case Outcomes::PartialSkip: // fall through + case Outcomes::DefaultsUsed: // fall through + case Outcomes::PartialDefaults: + m_options.m_processing = Processing::Completed; + break; + case Outcomes::Unavailable: // fall through + case Outcomes::Unsupported: + m_options.m_processing = Processing::Altered; + break; + case Outcomes::TypeMismatch: // fall through + case Outcomes::TestFailed: // fall through + case Outcomes::Missing: // fall through + case Outcomes::Invalid: // fall through + case Outcomes::Unknown: // fall through + case Outcomes::Catastrophic: // fall through + default: + m_options.m_processing = Processing::Halted; + break; } + m_options.m_outcome = outcome; + } - ResultCode ResultCode::Combine(ResultCode lhs, ResultCode rhs) - { - ResultCode result = ResultCode(AZStd::max(lhs.m_code, rhs.m_code)); + bool ResultCode::HasDoneWork() const + { + return m_options.m_outcome != static_cast(0); + } - if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::DefaultsUsed) || - (lhs.m_options.m_outcome == Outcomes::DefaultsUsed && rhs.m_options.m_outcome == Outcomes::Success)) - { - result.m_options.m_outcome = Outcomes::PartialDefaults; - } - else if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::Skipped) || - (lhs.m_options.m_outcome == Outcomes::Skipped && rhs.m_options.m_outcome == Outcomes::Success)) - { - result.m_options.m_outcome = Outcomes::PartialSkip; - } + ResultCode& ResultCode::Combine(ResultCode other) + { + *this = Combine(*this, other); + return *this; + } - if ((lhs.m_options.m_processing == Processing::Completed && rhs.m_options.m_processing == Processing::Altered) || - (lhs.m_options.m_processing == Processing::Altered && rhs.m_options.m_processing == Processing::Completed)) - { - result.m_options.m_processing = Processing::PartialAlter; - } + ResultCode& ResultCode::Combine(const Result& other) + { + *this = Combine(*this, other.GetResultCode()); + return *this; + } - return result; - } + ResultCode ResultCode::Combine(ResultCode lhs, ResultCode rhs) + { + ResultCode result = ResultCode(AZStd::max(lhs.m_code, rhs.m_code)); - Tasks ResultCode::GetTask() const + if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::DefaultsUsed) || + (lhs.m_options.m_outcome == Outcomes::DefaultsUsed && rhs.m_options.m_outcome == Outcomes::Success)) { - return m_options.m_task; + result.m_options.m_outcome = Outcomes::PartialDefaults; } - - Processing ResultCode::GetProcessing() const + else if ((lhs.m_options.m_outcome == Outcomes::Success && rhs.m_options.m_outcome == Outcomes::Skipped) || + (lhs.m_options.m_outcome == Outcomes::Skipped && rhs.m_options.m_outcome == Outcomes::Success)) { - return m_options.m_processing == static_cast(0) ? - Processing::Completed : m_options.m_processing; + result.m_options.m_outcome = Outcomes::PartialSkip; } - Outcomes ResultCode::GetOutcome() const + if ((lhs.m_options.m_processing == Processing::Completed && rhs.m_options.m_processing == Processing::Altered) || + (lhs.m_options.m_processing == Processing::Altered && rhs.m_options.m_processing == Processing::Completed)) { - return m_options.m_outcome == static_cast(0) ? - Outcomes::DefaultsUsed : m_options.m_outcome; + result.m_options.m_processing = Processing::PartialAlter; } - void ResultCode::AppendToString(AZ::OSString& target, AZStd::string_view path) const - { - Internal::AppendToString(*this, target, path); - } + return result; + } - void ResultCode::AppendToString(AZStd::string& target, AZStd::string_view path) const - { - Internal::AppendToString(*this, target, path); - } + Tasks ResultCode::GetTask() const + { + return m_options.m_task; + } - AZStd::string ResultCode::ToString(AZStd::string_view path) const - { - AZStd::string result; - AppendToString(result, path); - return result; - } + Processing ResultCode::GetProcessing() const + { + return m_options.m_processing == static_cast(0) ? + Processing::Completed : m_options.m_processing; + } - AZ::OSString ResultCode::ToOSString(AZStd::string_view path) const - { - AZ::OSString result; - AppendToString(result, path); - return result; - } + Outcomes ResultCode::GetOutcome() const + { + return m_options.m_outcome == static_cast(0) ? + Outcomes::DefaultsUsed : m_options.m_outcome; + } + + void ResultCode::AppendToString(AZ::OSString& target, AZStd::string_view path) const + { + Internal::AppendToString(*this, target, path); + } + + void ResultCode::AppendToString(AZStd::string& target, AZStd::string_view path) const + { + Internal::AppendToString(*this, target, path); + } + AZStd::string ResultCode::ToString(AZStd::string_view path) const + { + AZStd::string result; + AppendToString(result, path); + return result; + } - Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, ResultCode result, AZStd::string_view path) - : m_result(callback(message, result, path)) - {} + AZ::OSString ResultCode::ToOSString(AZStd::string_view path) const + { + AZ::OSString result; + AppendToString(result, path); + return result; + } - Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, Tasks task, Outcomes outcome, AZStd::string_view path) - : m_result(callback(message, ResultCode(task, outcome), path)) - {} - Result::operator ResultCode() const - { - return m_result; - } + Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, ResultCode result, AZStd::string_view path) + : m_result(callback(message, result, path)) + {} - ResultCode Result::GetResultCode() const - { - return m_result; - } - } // namespace JsonSerializationResult -} // namespace AZ + Result::Result(const JsonIssueCallback& callback, AZStd::string_view message, Tasks task, Outcomes outcome, AZStd::string_view path) + : m_result(callback(message, ResultCode(task, outcome), path)) + {} + + Result::operator ResultCode() const + { + return m_result; + } + + ResultCode Result::GetResultCode() const + { + return m_result; + } + +} // namespace AZ::JsonSerializationResult diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp index da02e70181..0ba44e4e61 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonSystemComponent.cpp @@ -104,6 +104,8 @@ namespace AZ ->HandlesType(); jsonContext->Serializer() ->HandlesType(); + jsonContext->Serializer() + ->HandlesType(); MathReflect(jsonContext); } diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp index 1a4e7b3e80..6d7edb0716 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/JsonUtils.cpp @@ -24,438 +24,435 @@ #include -namespace AZ +namespace AZ::JsonSerializationUtils { - namespace JsonSerializationUtils + static const char* FileTypeTag = "Type"; + static const char* FileType = "JsonSerialization"; + static const char* VersionTag = "Version"; + static const char* ClassNameTag = "ClassName"; + static const char* ClassDataTag = "ClassData"; + + AZ::Outcome WriteJsonString(const rapidjson::Document& document, AZStd::string& jsonText, WriteJsonSettings settings) { - static const char* FileTypeTag = "Type"; - static const char* FileType = "JsonSerialization"; - static const char* VersionTag = "Version"; - static const char* ClassNameTag = "ClassName"; - static const char* ClassDataTag = "ClassData"; + AZ::IO::ByteContainerStream stream{&jsonText}; + return WriteJsonStream(document, stream, settings); + } - AZ::Outcome WriteJsonString(const rapidjson::Document& document, AZStd::string& jsonText, WriteJsonSettings settings) + AZ::Outcome WriteJsonFile(const rapidjson::Document& document, AZStd::string_view filePath, WriteJsonSettings settings) + { + // Write the json into memory first and then write the file, rather than passing a file stream to rapidjson. + // This should avoid creating a large number of micro-writes to the file. + AZStd::string fileContent; + auto outcome = WriteJsonString(document, fileContent, settings); + if (!outcome.IsSuccess()) { - AZ::IO::ByteContainerStream stream{&jsonText}; - return WriteJsonStream(document, stream, settings); + return outcome; } - AZ::Outcome WriteJsonFile(const rapidjson::Document& document, AZStd::string_view filePath, WriteJsonSettings settings) - { - // Write the json into memory first and then write the file, rather than passing a file stream to rapidjson. - // This should avoid creating a large number of micro-writes to the file. - AZStd::string fileContent; - auto outcome = WriteJsonString(document, fileContent, settings); - if (!outcome.IsSuccess()) - { - return outcome; - } - - return AZ::Utils::WriteFile(fileContent, filePath); - } + return AZ::Utils::WriteFile(fileContent, filePath); + } - AZ::Outcome WriteJsonStream(const rapidjson::Document& document, IO::GenericStream& stream, WriteJsonSettings settings) - { - AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); + AZ::Outcome WriteJsonStream(const rapidjson::Document& document, IO::GenericStream& stream, WriteJsonSettings settings) + { + AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); - rapidjson::PrettyWriter writer(jsonStreamWriter); + rapidjson::PrettyWriter writer(jsonStreamWriter); - if (settings.m_maxDecimalPlaces >= 0) - { - writer.SetMaxDecimalPlaces(settings.m_maxDecimalPlaces); - } + if (settings.m_maxDecimalPlaces >= 0) + { + writer.SetMaxDecimalPlaces(settings.m_maxDecimalPlaces); + } - if (document.Accept(writer)) - { - return AZ::Success(); - } - else - { - return AZ::Failure(AZStd::string{"Json Writer failed"}); - } + if (document.Accept(writer)) + { + return AZ::Success(); + } + else + { + return AZ::Failure(AZStd::string{"Json Writer failed"}); } + } - AZ::Outcome SaveObjectToStreamByType(const void* objectPtr, const Uuid& classId, IO::GenericStream& stream, - const void* defaultObjectPtr, const JsonSerializerSettings* settings) + AZ::Outcome SaveObjectToStreamByType(const void* objectPtr, const Uuid& classId, IO::GenericStream& stream, + const void* defaultObjectPtr, const JsonSerializerSettings* settings) + { + if (!stream.CanWrite()) { - if (!stream.CanWrite()) - { - return AZ::Failure(AZStd::string("The GenericStream can't be written to")); - } + return AZ::Failure(AZStd::string("The GenericStream can't be written to")); + } - JsonSerializerSettings saveSettings; - if (settings) - { - saveSettings = *settings; - } + JsonSerializerSettings saveSettings; + if (settings) + { + saveSettings = *settings; + } - AZ::SerializeContext* serializeContext = saveSettings.m_serializeContext; + AZ::SerializeContext* serializeContext = saveSettings.m_serializeContext; + if (!serializeContext) + { + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); if (!serializeContext) { - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - if (!serializeContext) - { - return AZ::Failure(AZStd::string::format("Need SerializeContext for saving")); - } - saveSettings.m_serializeContext = serializeContext; + return AZ::Failure(AZStd::string::format("Need SerializeContext for saving")); } + saveSettings.m_serializeContext = serializeContext; + } - rapidjson::Document jsonDocument; - jsonDocument.SetObject(); - jsonDocument.AddMember(rapidjson::StringRef(FileTypeTag), rapidjson::StringRef(FileType), jsonDocument.GetAllocator()); - - rapidjson::Value serializedObject; - - JsonSerializationResult::ResultCode jsonResult = JsonSerialization::Store(serializedObject, jsonDocument.GetAllocator(), - objectPtr, defaultObjectPtr, classId, saveSettings); + rapidjson::Document jsonDocument; + jsonDocument.SetObject(); + jsonDocument.AddMember(rapidjson::StringRef(FileTypeTag), rapidjson::StringRef(FileType), jsonDocument.GetAllocator()); - if (jsonResult.GetProcessing() != JsonSerializationResult::Processing::Completed) - { - return AZ::Failure(jsonResult.ToString("")); - } + rapidjson::Value serializedObject; - const SerializeContext::ClassData* classData = serializeContext->FindClassData(classId); + JsonSerializationResult::ResultCode jsonResult = JsonSerialization::Store(serializedObject, jsonDocument.GetAllocator(), + objectPtr, defaultObjectPtr, classId, saveSettings); - jsonDocument.AddMember(rapidjson::StringRef(VersionTag), 1, jsonDocument.GetAllocator()); - jsonDocument.AddMember(rapidjson::StringRef(ClassNameTag), rapidjson::StringRef(classData->m_name), jsonDocument.GetAllocator()); - jsonDocument.AddMember(rapidjson::StringRef(ClassDataTag), AZStd::move(serializedObject), jsonDocument.GetAllocator()); + if (jsonResult.GetProcessing() != JsonSerializationResult::Processing::Completed) + { + return AZ::Failure(jsonResult.ToString("")); + } - AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); - rapidjson::PrettyWriter writer(jsonStreamWriter); - bool jsonWriteResult = jsonDocument.Accept(writer); - if (!jsonWriteResult) - { - return AZ::Failure(AZStd::string::format("Unable to write class %s with json serialization format'", - classId.ToString().data())); - } + const SerializeContext::ClassData* classData = serializeContext->FindClassData(classId); - return AZ::Success(); + jsonDocument.AddMember(rapidjson::StringRef(VersionTag), 1, jsonDocument.GetAllocator()); + jsonDocument.AddMember(rapidjson::StringRef(ClassNameTag), rapidjson::StringRef(classData->m_name), jsonDocument.GetAllocator()); + jsonDocument.AddMember(rapidjson::StringRef(ClassDataTag), AZStd::move(serializedObject), jsonDocument.GetAllocator()); + + AZ::IO::RapidJSONStreamWriter jsonStreamWriter(&stream); + rapidjson::PrettyWriter writer(jsonStreamWriter); + bool jsonWriteResult = jsonDocument.Accept(writer); + if (!jsonWriteResult) + { + return AZ::Failure(AZStd::string::format("Unable to write class %s with json serialization format'", + classId.ToString().data())); } - AZ::Outcome SaveObjectToFileByType(const void* classPtr, const Uuid& classId, const AZStd::string& filePath, - const void* defaultClassPtr, const JsonSerializerSettings* settings) + return AZ::Success(); + } + + AZ::Outcome SaveObjectToFileByType(const void* classPtr, const Uuid& classId, const AZStd::string& filePath, + const void* defaultClassPtr, const JsonSerializerSettings* settings) + { + AZStd::vector buffer; + buffer.reserve(1024); + AZ::IO::ByteContainerStream > byteStream(&buffer); + auto saveResult = SaveObjectToStreamByType(classPtr, classId, byteStream, defaultClassPtr, settings); + if (saveResult.IsSuccess()) { - AZStd::vector buffer; - buffer.reserve(1024); - AZ::IO::ByteContainerStream > byteStream(&buffer); - auto saveResult = SaveObjectToStreamByType(classPtr, classId, byteStream, defaultClassPtr, settings); - if (saveResult.IsSuccess()) + AZ::IO::FileIOStream outputFileStream; + if (!outputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath | AZ::IO::OpenMode::ModeText)) { - AZ::IO::FileIOStream outputFileStream; - if (!outputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeWrite | AZ::IO::OpenMode::ModeCreatePath | AZ::IO::OpenMode::ModeText)) - { - return AZ::Failure(AZStd::string::format("Error opening file '%s' for writing", filePath.c_str())); - } - outputFileStream.Write(buffer.size(), buffer.data()); + return AZ::Failure(AZStd::string::format("Error opening file '%s' for writing", filePath.c_str())); } - return saveResult; + outputFileStream.Write(buffer.size(), buffer.data()); } + return saveResult; + } - // Helper function to check whether the load outcome was success (for loading json serialization file) - bool WasLoadSuccess(JsonSerializationResult::Outcomes outcome) + // Helper function to check whether the load outcome was success (for loading json serialization file) + bool WasLoadSuccess(JsonSerializationResult::Outcomes outcome) + { + return (outcome == JsonSerializationResult::Outcomes::Success + || outcome == JsonSerializationResult::Outcomes::DefaultsUsed + || outcome == JsonSerializationResult::Outcomes::PartialDefaults); + } + + AZ::Outcome PrepareDeserializerSettings(const JsonDeserializerSettings* inputSettings, JsonDeserializerSettings& returnSettings + , AZStd::string& deserializeError) + { + if (inputSettings) { - return (outcome == JsonSerializationResult::Outcomes::Success - || outcome == JsonSerializationResult::Outcomes::DefaultsUsed - || outcome == JsonSerializationResult::Outcomes::PartialDefaults); + returnSettings = *inputSettings; } - - AZ::Outcome PrepareDeserializerSettings(const JsonDeserializerSettings* inputSettings, JsonDeserializerSettings& returnSettings - , AZStd::string& deserializeError) + + if (!returnSettings.m_serializeContext) { - if (inputSettings) + AZ::ComponentApplicationBus::BroadcastResult(returnSettings.m_serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); + if (!returnSettings.m_serializeContext) { - returnSettings = *inputSettings; + return AZ::Failure(AZStd::string("Need SerializeContext for loading")); } + } - if (!returnSettings.m_serializeContext) + // Report unused data field as error by default + auto reporting = returnSettings.m_reporting; + auto issueReportingCallback = [&deserializeError, reporting](AZStd::string_view message, JsonSerializationResult::ResultCode result, AZStd::string_view target) -> JsonSerializationResult::ResultCode + { + using namespace JsonSerializationResult; + + if (!WasLoadSuccess(result.GetOutcome())) { - AZ::ComponentApplicationBus::BroadcastResult(returnSettings.m_serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext); - if (!returnSettings.m_serializeContext) + // This if is a hack around fault in the JSON serialization system + // Jira: LY-106587 + if (message != "No part of the string could be interpreted as a uuid.") { - return AZ::Failure(AZStd::string("Need SerializeContext for loading")); + deserializeError.append(message); + deserializeError.append(AZStd::string::format(" '%s' \n", target.data())); } } - // Report unused data field as error by default - auto reporting = returnSettings.m_reporting; - auto issueReportingCallback = [&deserializeError, reporting](AZStd::string_view message, JsonSerializationResult::ResultCode result, AZStd::string_view target) -> JsonSerializationResult::ResultCode + if (reporting) { - using namespace JsonSerializationResult; + result = reporting(message, result, target); + } - if (!WasLoadSuccess(result.GetOutcome())) - { - // This if is a hack around fault in the JSON serialization system - // Jira: LY-106587 - if (message != "No part of the string could be interpreted as a uuid.") - { - deserializeError.append(message); - deserializeError.append(AZStd::string::format(" '%s' \n", target.data())); - } - } + return result; + }; - if (reporting) - { - result = reporting(message, result, target); - } + returnSettings.m_reporting = issueReportingCallback; - return result; - }; + return AZ::Success(); + } - returnSettings.m_reporting = issueReportingCallback; - return AZ::Success(); + AZ::Outcome ReadJsonString(AZStd::string_view jsonText) + { + if (jsonText.empty()) + { + return AZ::Failure(AZStd::string("Failed to parse JSON: input string is empty.")); } - - AZ::Outcome ReadJsonString(AZStd::string_view jsonText) + rapidjson::Document jsonDocument; + jsonDocument.Parse(jsonText.data(), jsonText.size()); + if (jsonDocument.HasParseError()) { - if (jsonText.empty()) - { - return AZ::Failure(AZStd::string("Failed to parse JSON: input string is empty.")); - } + size_t lineNumber = 1; - rapidjson::Document jsonDocument; - jsonDocument.Parse(jsonText.data(), jsonText.size()); - if (jsonDocument.HasParseError()) + const size_t errorOffset = jsonDocument.GetErrorOffset(); + for (size_t searchOffset = jsonText.find('\n'); + searchOffset < errorOffset && searchOffset < AZStd::string::npos; + searchOffset = jsonText.find('\n', searchOffset + 1)) { - size_t lineNumber = 1; - - const size_t errorOffset = jsonDocument.GetErrorOffset(); - for (size_t searchOffset = jsonText.find('\n'); - searchOffset < errorOffset && searchOffset < AZStd::string::npos; - searchOffset = jsonText.find('\n', searchOffset + 1)) - { - lineNumber++; - } - - return AZ::Failure(AZStd::string::format("JSON parse error at line %zu: %s", lineNumber, rapidjson::GetParseError_En(jsonDocument.GetParseError()))); + lineNumber++; } - else - { - return AZ::Success(AZStd::move(jsonDocument)); - } - } - AZ::Outcome ReadJsonStream(IO::GenericStream& stream) + return AZ::Failure(AZStd::string::format("JSON parse error at line %zu: %s", lineNumber, rapidjson::GetParseError_En(jsonDocument.GetParseError()))); + } + else { - IO::SizeType length = stream.GetLength(); - - AZStd::vector memoryBuffer; - memoryBuffer.resize_no_construct(static_cast::size_type>(static_cast::size_type>(length) + 1)); + return AZ::Success(AZStd::move(jsonDocument)); + } + } - IO::SizeType bytesRead = stream.Read(length, memoryBuffer.data()); - if (bytesRead != length) - { - return AZ::Failure(AZStd::string{"Cannot to read input stream."}); - } + AZ::Outcome ReadJsonStream(IO::GenericStream& stream) + { + IO::SizeType length = stream.GetLength(); - memoryBuffer.back() = 0; + AZStd::vector memoryBuffer; + memoryBuffer.resize_no_construct(static_cast::size_type>(static_cast::size_type>(length) + 1)); - return ReadJsonString(AZStd::string_view{memoryBuffer.data(), memoryBuffer.size()}); + IO::SizeType bytesRead = stream.Read(length, memoryBuffer.data()); + if (bytesRead != length) + { + return AZ::Failure(AZStd::string{"Cannot to read input stream."}); } - AZ::Outcome ReadJsonFile(AZStd::string_view filePath, size_t maxFileSize) + memoryBuffer.back() = 0; + + return ReadJsonString(AZStd::string_view{memoryBuffer.data(), memoryBuffer.size()}); + } + + AZ::Outcome ReadJsonFile(AZStd::string_view filePath, size_t maxFileSize) + { + // Read into memory first and then parse the json, rather than passing a file stream to rapidjson. + // This should avoid creating a large number of micro-reads from the file. + + auto readResult = AZ::Utils::ReadFile(filePath, maxFileSize); + if(!readResult.IsSuccess()) { - // Read into memory first and then parse the json, rather than passing a file stream to rapidjson. - // This should avoid creating a large number of micro-reads from the file. + return AZ::Failure(readResult.GetError()); + } - auto readResult = AZ::Utils::ReadFile(filePath, maxFileSize); - if(!readResult.IsSuccess()) - { - return AZ::Failure(readResult.GetError()); - } + AZStd::string jsonContent = readResult.TakeValue(); - AZStd::string jsonContent = readResult.TakeValue(); + auto result = ReadJsonString(jsonContent); + if (!result.IsSuccess()) + { + return AZ::Failure(AZStd::string::format("Failed to load '%.*s'. %s", AZ_STRING_ARG(filePath), result.GetError().c_str())); + } + else + { + return result; + } + } - auto result = ReadJsonString(jsonContent); - if (!result.IsSuccess()) - { - return AZ::Failure(AZStd::string::format("Failed to load '%.*s'. %s", AZ_STRING_ARG(filePath), result.GetError().c_str())); - } - else - { - return result; - } + // Helper function to validate the JSON is structured with the standard header for a generic class + AZ::Outcome ValidateJsonClassHeader(const rapidjson::Document& jsonDocument) + { + auto typeItr = jsonDocument.FindMember(FileTypeTag); + if (typeItr == jsonDocument.MemberEnd() || !typeItr->value.IsString() || azstricmp(typeItr->value.GetString(), FileType) != 0) + { + return AZ::Failure(AZStd::string::format("Not a valid JsonSerialization file")); } - // Helper function to validate the JSON is structured with the standard header for a generic class - AZ::Outcome ValidateJsonClassHeader(const rapidjson::Document& jsonDocument) + auto nameItr = jsonDocument.FindMember(ClassNameTag); + if (nameItr == jsonDocument.MemberEnd() || !nameItr->value.IsString()) { - auto typeItr = jsonDocument.FindMember(FileTypeTag); - if (typeItr == jsonDocument.MemberEnd() || !typeItr->value.IsString() || azstricmp(typeItr->value.GetString(), FileType) != 0) - { - return AZ::Failure(AZStd::string::format("Not a valid JsonSerialization file")); - } + return AZ::Failure(AZStd::string::format("File should contain ClassName")); + } - auto nameItr = jsonDocument.FindMember(ClassNameTag); - if (nameItr == jsonDocument.MemberEnd() || !nameItr->value.IsString()) - { - return AZ::Failure(AZStd::string::format("File should contain ClassName")); - } + auto dataItr = jsonDocument.FindMember(ClassDataTag); + // data can be empty but it should be an object + if (dataItr != jsonDocument.MemberEnd() && !dataItr->value.IsObject()) + { + return AZ::Failure(AZStd::string::format("ClassData should be an object")); + } - auto dataItr = jsonDocument.FindMember(ClassDataTag); - // data can be empty but it should be an object - if (dataItr != jsonDocument.MemberEnd() && !dataItr->value.IsObject()) - { - return AZ::Failure(AZStd::string::format("ClassData should be an object")); - } + return AZ::Success(); + } - return AZ::Success(); + AZ::Outcome LoadObjectFromStringByType(void* objectToLoad, const Uuid& classId, AZStd::string_view stream, + const JsonDeserializerSettings* settings) + { + JsonDeserializerSettings loadSettings; + AZStd::string deserializeErrors; + auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); + if (!prepare.IsSuccess()) + { + return AZ::Failure(prepare.GetError()); } - AZ::Outcome LoadObjectFromStringByType(void* objectToLoad, const Uuid& classId, AZStd::string_view stream, - const JsonDeserializerSettings* settings) + auto parseResult = ReadJsonString(stream); + if (!parseResult.IsSuccess()) { - JsonDeserializerSettings loadSettings; - AZStd::string deserializeErrors; - auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); - if (!prepare.IsSuccess()) - { - return AZ::Failure(prepare.GetError()); - } + return AZ::Failure(parseResult.GetError()); + } - auto parseResult = ReadJsonString(stream); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } + const rapidjson::Document& jsonDocument = parseResult.GetValue(); - const rapidjson::Document& jsonDocument = parseResult.GetValue(); + auto validateResult = ValidateJsonClassHeader(jsonDocument); + if (!validateResult.IsSuccess()) + { + return AZ::Failure(validateResult.GetError()); + } - auto validateResult = ValidateJsonClassHeader(jsonDocument); - if (!validateResult.IsSuccess()) - { - return AZ::Failure(validateResult.GetError()); - } + const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); - const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); + // validate class name + auto classData = loadSettings.m_serializeContext->FindClassData(classId); + if (!classData) + { + return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); + } - // validate class name - auto classData = loadSettings.m_serializeContext->FindClassData(classId); - if (!classData) - { - return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); - } + if (azstricmp(classData->m_name, className) != 0) + { + return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); + } - if (azstricmp(classData->m_name, className) != 0) - { - return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); - } + JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); - JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); + if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) + { + return AZ::Failure(deserializeErrors); + } - if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) - { - return AZ::Failure(deserializeErrors); - } + return AZ::Success(); + } - return AZ::Success(); + AZ::Outcome LoadObjectFromStreamByType(void* objectToLoad, const Uuid& classId, IO::GenericStream& stream, + const JsonDeserializerSettings* settings) + { + JsonDeserializerSettings loadSettings; + AZStd::string deserializeErrors; + auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); + if (!prepare.IsSuccess()) + { + return AZ::Failure(prepare.GetError()); } - AZ::Outcome LoadObjectFromStreamByType(void* objectToLoad, const Uuid& classId, IO::GenericStream& stream, - const JsonDeserializerSettings* settings) + auto parseResult = ReadJsonStream(stream); + if (!parseResult.IsSuccess()) { - JsonDeserializerSettings loadSettings; - AZStd::string deserializeErrors; - auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); - if (!prepare.IsSuccess()) - { - return AZ::Failure(prepare.GetError()); - } + return AZ::Failure(parseResult.GetError()); + } - auto parseResult = ReadJsonStream(stream); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } + const rapidjson::Document& jsonDocument = parseResult.GetValue(); - const rapidjson::Document& jsonDocument = parseResult.GetValue(); + auto validateResult = ValidateJsonClassHeader(jsonDocument); + if (!validateResult.IsSuccess()) + { + return AZ::Failure(validateResult.GetError()); + } - auto validateResult = ValidateJsonClassHeader(jsonDocument); - if (!validateResult.IsSuccess()) - { - return AZ::Failure(validateResult.GetError()); - } + const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); - const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); + // validate class name + auto classData = loadSettings.m_serializeContext->FindClassData(classId); + if (!classData) + { + return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); + } - // validate class name - auto classData = loadSettings.m_serializeContext->FindClassData(classId); - if (!classData) - { - return AZ::Failure(AZStd::string::format("Try to load class from Id %s", classId.ToString().c_str())); - } + if (azstricmp(classData->m_name, className) != 0) + { + return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); + } - if (azstricmp(classData->m_name, className) != 0) - { - return AZ::Failure(AZStd::string::format("Try to load class %s from class %s data", classData->m_name, className)); - } - - JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); + JsonSerializationResult::ResultCode result = JsonSerialization::Load(objectToLoad, classId, jsonDocument.FindMember(ClassDataTag)->value, loadSettings); - if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) - { - return AZ::Failure(deserializeErrors); - } + if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) + { + return AZ::Failure(deserializeErrors); + } - return AZ::Success(); - } - - AZ::Outcome LoadAnyObjectFromStream(IO::GenericStream& stream, const JsonDeserializerSettings* settings) - { - JsonDeserializerSettings loadSettings; - AZStd::string deserializeErrors; - auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); - if (!prepare.IsSuccess()) - { - return AZ::Failure(prepare.GetError()); - } + return AZ::Success(); + } - auto parseResult = ReadJsonStream(stream); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } + AZ::Outcome LoadAnyObjectFromStream(IO::GenericStream& stream, const JsonDeserializerSettings* settings) + { + JsonDeserializerSettings loadSettings; + AZStd::string deserializeErrors; + auto prepare = PrepareDeserializerSettings(settings, loadSettings, deserializeErrors); + if (!prepare.IsSuccess()) + { + return AZ::Failure(prepare.GetError()); + } - const rapidjson::Document& jsonDocument = parseResult.GetValue(); + auto parseResult = ReadJsonStream(stream); + if (!parseResult.IsSuccess()) + { + return AZ::Failure(parseResult.GetError()); + } - auto validateResult = ValidateJsonClassHeader(jsonDocument); - if (!parseResult.IsSuccess()) - { - return AZ::Failure(parseResult.GetError()); - } + const rapidjson::Document& jsonDocument = parseResult.GetValue(); - const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); - AZStd::vector ids = loadSettings.m_serializeContext->FindClassId(AZ::Crc32(className)); + auto validateResult = ValidateJsonClassHeader(jsonDocument); + if (!parseResult.IsSuccess()) + { + return AZ::Failure(parseResult.GetError()); + } - // Load with first found class id - if (ids.size() >= 1) - { - auto classId = ids[0]; - AZStd::any anyData = loadSettings.m_serializeContext->CreateAny(classId); - auto& objectData = jsonDocument.FindMember(ClassDataTag)->value; - JsonSerializationResult::ResultCode result = JsonSerialization::Load(AZStd::any_cast(&anyData), classId, objectData, loadSettings); + const char* className = jsonDocument.FindMember(ClassNameTag)->value.GetString(); + AZStd::vector ids = loadSettings.m_serializeContext->FindClassId(AZ::Crc32(className)); - if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) - { - return AZ::Failure(deserializeErrors); - } + // Load with first found class id + if (ids.size() >= 1) + { + auto classId = ids[0]; + AZStd::any anyData = loadSettings.m_serializeContext->CreateAny(classId); + auto& objectData = jsonDocument.FindMember(ClassDataTag)->value; + JsonSerializationResult::ResultCode result = JsonSerialization::Load(AZStd::any_cast(&anyData), classId, objectData, loadSettings); - return AZ::Success(anyData); + if (!WasLoadSuccess(result.GetOutcome()) || !deserializeErrors.empty()) + { + return AZ::Failure(deserializeErrors); } - return AZ::Failure(AZStd::string::format("Can't find serialize context for class %s", className)); + return AZ::Success(anyData); } - AZ::Outcome LoadAnyObjectFromFile(const AZStd::string& filePath, const JsonDeserializerSettings* settings) + return AZ::Failure(AZStd::string::format("Can't find serialize context for class %s", className)); + } + + AZ::Outcome LoadAnyObjectFromFile(const AZStd::string& filePath, const JsonDeserializerSettings* settings) + { + AZ::IO::FileIOStream inputFileStream; + if (!inputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeText)) { - AZ::IO::FileIOStream inputFileStream; - if (!inputFileStream.Open(filePath.c_str(), AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeText)) - { - return AZ::Failure(AZStd::string::format("Error opening file '%s' for reading", filePath.c_str())); - } - return LoadAnyObjectFromStream(inputFileStream, settings); + return AZ::Failure(AZStd::string::format("Error opening file '%s' for reading", filePath.c_str())); } + return LoadAnyObjectFromStream(inputFileStream, settings); + } - } // namespace JsonSerializationUtils -} // namespace AZ +} // namespace AZ::JsonSerializationUtils diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp index 2392ff435f..ad1839f974 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.cpp @@ -15,6 +15,7 @@ namespace AZ AZ_CLASS_ALLOCATOR_IMPL(JsonAnySerializer, SystemAllocator, 0); AZ_CLASS_ALLOCATOR_IMPL(JsonVariantSerializer, SystemAllocator, 0); AZ_CLASS_ALLOCATOR_IMPL(JsonOptionalSerializer, SystemAllocator, 0); + AZ_CLASS_ALLOCATOR_IMPL(JsonBitsetSerializer, SystemAllocator, 0); JsonSerializationResult::Result JsonUnsupportedTypesSerializer::Load(void*, const Uuid&, const rapidjson::Value&, JsonDeserializerContext& context) @@ -49,4 +50,10 @@ namespace AZ return "The Json Serialization doesn't support AZStd::optional by design. No JSON format has yet been found that wasn't deemed too " "complex or overly verbose."; } + + AZStd::string_view JsonBitsetSerializer::GetMessage() const + { + return "The Json Serialization doesn't support AZStd::bitset by design. No JSON format has yet been found that is content creator " + "friendly i.e., easy to comprehend the intent."; + } } // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h index d913289d3d..fdcac4c761 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h +++ b/Code/Framework/AzCore/AzCore/Serialization/Json/UnsupportedTypesSerializer.h @@ -65,4 +65,14 @@ namespace AZ protected: AZStd::string_view GetMessage() const override; }; + + class JsonBitsetSerializer : public JsonUnsupportedTypesSerializer + { + public: + AZ_RTTI(JsonBitsetSerializer, "{10CE969D-D69E-4B3F-8593-069736F8F705}", JsonUnsupportedTypesSerializer); + AZ_CLASS_ALLOCATOR_DECL; + + protected: + AZStd::string_view GetMessage() const override; + }; } // namespace AZ diff --git a/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp b/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp index 746c80f3ea..ac44ac150c 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/ObjectStream.cpp @@ -1050,7 +1050,7 @@ namespace AZ } m_xmlNode = next; - Uuid specializedId; + Uuid specializedId = Uuid::CreateNull(); // now parse the node rapidxml::xml_attribute* attr = m_xmlNode->first_attribute(); while (attr) @@ -1643,12 +1643,15 @@ namespace AZ m_writeElementResultStack.push_back(WriteElement(ptr, classData, classElement)); return m_writeElementResultStack.back(); }; - auto closeElementCB = [this, classData]() + auto closeElementCB = [this, classTypeId = classData->m_typeId]() { if (m_writeElementResultStack.empty()) { - AZ_UNUSED(classData); // Prevent unused warning in release builds - AZ_Error("Serialize", false, "CloseElement is attempted to be called without a corresponding WriteElement when writing class %s", classData->m_name); + // ClassData could be dangling pointer if it was unreflected by the ObjectStreamWriteOverrideCB + // So use the classTypeId instead + AZ_UNUSED(classTypeId); + AZ_Error("Serialize", false, "CloseElement is attempted to be called without a corresponding WriteElement when writing class %s", + classTypeId.ToString>().c_str()); return true; } if (m_writeElementResultStack.back()) @@ -1665,16 +1668,14 @@ namespace AZ SerializeContext::ENUM_ACCESS_FOR_READ, &m_errorLogger ); - ObjectStreamWriteOverrideCB writeCB; - if (objectStreamWriteOverrideCB.Read(writeCB)) + if (objectStreamWriteOverrideCB.Invoke(callContext, objectPtr, *classData, classElement)) { - writeCB(callContext, objectPtr, *classData, classElement); return false; } else { auto objectStreamError = AZStd::string::format("Unable to invoke ObjectStream Write Element Override for class element %s of class data %s", - classElement->m_name ? classElement->m_name : "", classData->m_name); + classElement && classElement->m_name ? classElement->m_name : "", classData->m_name); m_errorLogger.ReportError(objectStreamError.c_str()); } } diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp b/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp index 37eacd940e..8439ff8e2c 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializationUtils.cpp @@ -18,502 +18,499 @@ #include -namespace AZ +namespace AZ::Utils { - namespace Utils + bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const SerializeContext::ClassData* objectClassData, void* targetPointer, const FilterDescriptor& filterDesc) { - bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const SerializeContext::ClassData* objectClassData, void* targetPointer, const FilterDescriptor& filterDesc) - { - AZ_PROFILE_FUNCTION(AzCore); + AZ_PROFILE_FUNCTION(AzCore); - AZ_Assert(objectClassData, "Class data is required."); + AZ_Assert(objectClassData, "Class data is required."); - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - AZ_Assert(context, "No serialize context"); - } + if (!context) + { + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + AZ_Assert(context, "No serialize context"); + } - if (!context) - { - return false; - } + if (!context) + { + return false; + } - AZ_Assert(targetPointer, "You must provide a target pointer"); + AZ_Assert(targetPointer, "You must provide a target pointer"); - bool foundSuccess = false; - using CreationCallback = AZStd::function; - auto handler = [&targetPointer, objectClassData, &foundSuccess](void** instance, const SerializeContext::ClassData** classData, const Uuid& classId, SerializeContext* context) + bool foundSuccess = false; + using CreationCallback = AZStd::function; + auto handler = [&targetPointer, objectClassData, &foundSuccess](void** instance, const SerializeContext::ClassData** classData, const Uuid& classId, SerializeContext* context) + { + void* convertibleInstance{}; + if (objectClassData->ConvertFromType(convertibleInstance, classId, targetPointer, *context)) { - void* convertibleInstance{}; - if (objectClassData->ConvertFromType(convertibleInstance, classId, targetPointer, *context)) + foundSuccess = true; + if (instance) { - foundSuccess = true; - if (instance) - { - // The ObjectStream will ask us for the address of the target to load into, so provide it. - *instance = convertibleInstance; - } - if (classData) - { - // The ObjectStream will ask us for the class data of the target being loaded into, so provide it if needed. - // This allows us to load directly into a generic object (templated containers, strings, etc). - *classData = objectClassData; - } + // The ObjectStream will ask us for the address of the target to load into, so provide it. + *instance = convertibleInstance; } - }; - bool readSuccess = ObjectStream::LoadBlocking(&stream, *context, ObjectStream::ClassReadyCB(), filterDesc, CreationCallback(handler, AZ::OSStdAllocator())); + if (classData) + { + // The ObjectStream will ask us for the class data of the target being loaded into, so provide it if needed. + // This allows us to load directly into a generic object (templated containers, strings, etc). + *classData = objectClassData; + } + } + }; + bool readSuccess = ObjectStream::LoadBlocking(&stream, *context, ObjectStream::ClassReadyCB(), filterDesc, CreationCallback(handler, AZ::OSStdAllocator())); - AZ_Warning("Serialization", readSuccess, "LoadObjectFromStreamInPlace: Stream did not deserialize correctly"); - AZ_Warning("Serialization", foundSuccess, "LoadObjectFromStreamInPlace: Did not find the expected type in the stream"); + AZ_Warning("Serialization", readSuccess, "LoadObjectFromStreamInPlace: Stream did not deserialize correctly"); + AZ_Warning("Serialization", foundSuccess, "LoadObjectFromStreamInPlace: Did not find the expected type in the stream"); - return readSuccess && foundSuccess; - } + return readSuccess && foundSuccess; + } - bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid& targetClassId, void* targetPointer, const FilterDescriptor& filterDesc) + bool LoadObjectFromStreamInPlace(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid& targetClassId, void* targetPointer, const FilterDescriptor& filterDesc) + { + AZ_PROFILE_FUNCTION(AzCore); + + if (!context) { - AZ_PROFILE_FUNCTION(AzCore); + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + AZ_Assert(context, "No serialize context"); + } - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - AZ_Assert(context, "No serialize context"); - } + if (!context) + { + return false; + } - if (!context) - { - return false; - } + const SerializeContext::ClassData* classData = context->FindClassData(targetClassId); + if (!classData) + { + AZ_Error("Serialization", false, + "Unable to locate class data for uuid \"%s\". This object cannot be serialized as a root element. " + "Make sure the Uuid is valid, or if this is a generic type, use the override that takes a ClassData pointer instead.", + targetClassId.ToString().c_str()); + return false; + } - const SerializeContext::ClassData* classData = context->FindClassData(targetClassId); - if (!classData) - { - AZ_Error("Serialization", false, - "Unable to locate class data for uuid \"%s\". This object cannot be serialized as a root element. " - "Make sure the Uuid is valid, or if this is a generic type, use the override that takes a ClassData pointer instead.", - targetClassId.ToString().c_str()); - return false; - } + return LoadObjectFromStreamInPlace(stream, context, classData, targetPointer, filterDesc); + } - return LoadObjectFromStreamInPlace(stream, context, classData, targetPointer, filterDesc); + bool LoadObjectFromFileInPlace(const AZStd::string& filePath, const Uuid& targetClassId, void* destination, AZ::SerializeContext* context /*= nullptr*/, const FilterDescriptor& filterDesc /*= FilterDescriptor()*/) + { + AZ::IO::FileIOStream fileStream; + if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) + { + return false; } - bool LoadObjectFromFileInPlace(const AZStd::string& filePath, const Uuid& targetClassId, void* destination, AZ::SerializeContext* context /*= nullptr*/, const FilterDescriptor& filterDesc /*= FilterDescriptor()*/) - { - AZ::IO::FileIOStream fileStream; - if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) - { - return false; - } + return LoadObjectFromStreamInPlace(fileStream, context, targetClassId, destination, filterDesc); + } - return LoadObjectFromStreamInPlace(fileStream, context, targetClassId, destination, filterDesc); - } + void* LoadObjectFromStream(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid* targetClassId, const FilterDescriptor& filterDesc) + { + AZ_PROFILE_FUNCTION(AzCore); - void* LoadObjectFromStream(IO::GenericStream& stream, AZ::SerializeContext* context, const Uuid* targetClassId, const FilterDescriptor& filterDesc) + if (!context) { - AZ_PROFILE_FUNCTION(AzCore); - - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - AZ_Assert(context, "No serialize context"); - } + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + AZ_Assert(context, "No serialize context"); + } - if (!context) - { - return nullptr; - } + if (!context) + { + return nullptr; + } - void* loadedInstance = nullptr; - bool success = ObjectStream::LoadBlocking(&stream, *context, - [&loadedInstance, targetClassId](void* classPtr, const Uuid& classId, const SerializeContext* serializeContext) + void* loadedInstance = nullptr; + bool success = ObjectStream::LoadBlocking(&stream, *context, + [&loadedInstance, targetClassId](void* classPtr, const Uuid& classId, const SerializeContext* serializeContext) + { + if (targetClassId) { - if (targetClassId) - { - void* instance = serializeContext->DownCast(classPtr, classId, *targetClassId); - - // Given a valid object - if (instance) - { - AZ_Assert(!loadedInstance, "loadedInstance must be NULL, otherwise we are being invoked with multiple valid objects"); - loadedInstance = instance; - return; - } - } - else + void* instance = serializeContext->DownCast(classPtr, classId, *targetClassId); + + // Given a valid object + if (instance) { - if (!loadedInstance) - { - loadedInstance = classPtr; - return; - } + AZ_Assert(!loadedInstance, "loadedInstance must be NULL, otherwise we are being invoked with multiple valid objects"); + loadedInstance = instance; + return; } - - auto classData = serializeContext->FindClassData(classId); - if (classData && classData->m_factory) + } + else + { + if (!loadedInstance) { - classData->m_factory->Destroy(classPtr); + loadedInstance = classPtr; + return; } - }, - filterDesc, - ObjectStream::InplaceLoadRootInfoCB() - ); - - if (!success) - { - return nullptr; - } + } - return loadedInstance; - } + auto classData = serializeContext->FindClassData(classId); + if (classData && classData->m_factory) + { + classData->m_factory->Destroy(classPtr); + } + }, + filterDesc, + ObjectStream::InplaceLoadRootInfoCB() + ); - void* LoadObjectFromFile(const AZStd::string& filePath, const Uuid& targetClassId, SerializeContext* context, const FilterDescriptor& filterDesc, int /*platformFlags*/) + if (!success) { - AZ_PROFILE_FUNCTION(AzCore); - - AZ::IO::FileIOStream fileStream; - if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) - { - return nullptr; - } - - void* loadedObject = LoadObjectFromStream(fileStream, context, &targetClassId, filterDesc); - return loadedObject; + return nullptr; } - bool SaveObjectToStream(IO::GenericStream& stream, DataStream::StreamType streamType, const void* classPtr, const Uuid& classId, SerializeContext* context, const SerializeContext::ClassData* classData) - { - AZ_PROFILE_FUNCTION(AzCore); + return loadedInstance; + } - if (!context) - { - EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); + void* LoadObjectFromFile(const AZStd::string& filePath, const Uuid& targetClassId, SerializeContext* context, const FilterDescriptor& filterDesc, int /*platformFlags*/) + { + AZ_PROFILE_FUNCTION(AzCore); - if(!context) - { - AZ_Assert(false, "No serialize context"); - return false; - } - } + AZ::IO::FileIOStream fileStream; + if (!fileStream.Open(filePath.c_str(), IO::OpenMode::ModeRead | IO::OpenMode::ModeBinary)) + { + return nullptr; + } - if (!classPtr) - { - AZ_Assert(false, "SaveObjectToStream: classPtr is null, object cannot be serialized."); - return false; - } + void* loadedObject = LoadObjectFromStream(fileStream, context, &targetClassId, filterDesc); + return loadedObject; + } - AZ::ObjectStream* objectStream = AZ::ObjectStream::Create(&stream, *context, streamType); - if (!objectStream) - { - return false; - } + bool SaveObjectToStream(IO::GenericStream& stream, DataStream::StreamType streamType, const void* classPtr, const Uuid& classId, SerializeContext* context, const SerializeContext::ClassData* classData) + { + AZ_PROFILE_FUNCTION(AzCore); - if (!objectStream->WriteClass(classPtr, classId, classData)) - { - objectStream->Finalize(); - return false; - } + if (!context) + { + EBUS_EVENT_RESULT(context, ComponentApplicationBus, GetSerializeContext); - if (!objectStream->Finalize()) + if(!context) { + AZ_Assert(false, "No serialize context"); return false; } - - return true; } - bool SaveStreamToFile(const AZStd::string& filePath, const AZStd::vector& streamData, int platformFlags) + if (!classPtr) { - AZ::IO::FileIOBase* fileIo = AZ::IO::FileIOBase::GetInstance(); - AZ::IO::FixedMaxPathString resolvedPath; - if (fileIo == nullptr || !fileIo->ResolvePath(filePath.c_str(), resolvedPath.data(), resolvedPath.capacity() + 1)) - { - resolvedPath = filePath; - } - if (AZ::IO::SystemFile fileHandle; fileHandle.Open(resolvedPath.c_str(), - AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY, - platformFlags)) - { - AZ::IO::SizeType bytesWritten = fileHandle.Write(streamData.data(), streamData.size()); - return bytesWritten == streamData.size(); - } - + AZ_Assert(false, "SaveObjectToStream: classPtr is null, object cannot be serialized."); return false; } - bool SaveObjectToFile(const AZStd::string& filePath, DataStream::StreamType fileType, const void* classPtr, const Uuid& classId, SerializeContext* context, int platformFlags) + AZ::ObjectStream* objectStream = AZ::ObjectStream::Create(&stream, *context, streamType); + if (!objectStream) { - AZ_PROFILE_FUNCTION(AzCore); - - // \note This is ok for tools, but we should use the streamer to write objects directly (no memory store) - AZStd::vector dstData; - AZ::IO::ByteContainerStream > dstByteStream(&dstData); - - if (!SaveObjectToStream(dstByteStream, fileType, classPtr, classId, context)) - { - return false; - } - - return SaveStreamToFile(filePath, dstData, platformFlags); + return false; } - /*! - \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue - \param context SerializeContext used for looking up ClassData - \param classElement Top level DataElementNode to begin comparison each the Crc32 queue - \param elementCrcQueue Container of Crc32 values in the order in which DataElementNodes should be matched as the DataElementNode tree is traversed - \return Vector of valid pointers to DataElementNodes which match the entire element Crc32 queue - */ - AZStd::vector FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, - const AZStd::vector& elementCrcQueue) + if (!objectStream->WriteClass(classPtr, classId, classData)) { - AZStd::vector dataElementNodes; - FindDescendantElements(context, classElement, dataElementNodes, elementCrcQueue.begin(), elementCrcQueue.end()); - - return dataElementNodes; + objectStream->Finalize(); + return false; } - /*! - \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue - \param context SerializeContext used for looking up ClassData - \param classElement The current DataElementNode which will be compared against be to current top Crc32 value in the Crc32 queue - \param dataElementNodes[out] Array to populate with a DataElementNode which was found by matching all Crc32 values in the Crc32 queue - \param first The current front of the Crc32 queue - \param last The end of the Crc32 queue - */ - void FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, - AZStd::vector& dataElementNodes, AZStd::vector::const_iterator first, AZStd::vector::const_iterator last) + if (!objectStream->Finalize()) { - if (first == last) - { - return; - } - - for (int i = 0; i < classElement.GetNumSubElements(); ++i) - { - auto& childElement = classElement.GetSubElement(i); - if (*first == AZ::Crc32(childElement.GetName())) - { - if (AZStd::distance(first, last) == 1) - { - dataElementNodes.push_back(&childElement); - } - else - { - FindDescendantElements(context, childElement, dataElementNodes, AZStd::next(first), last); - } - } - } + return false; } - bool IsVectorContainerType(const AZ::Uuid& type) + return true; + } + + bool SaveStreamToFile(const AZStd::string& filePath, const AZStd::vector& streamData, int platformFlags) + { + AZ::IO::FileIOBase* fileIo = AZ::IO::FileIOBase::GetInstance(); + AZ::IO::FixedMaxPathString resolvedPath; + if (fileIo == nullptr || !fileIo->ResolvePath(filePath.c_str(), resolvedPath.data(), resolvedPath.capacity() + 1)) { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + resolvedPath = filePath; + } + if (AZ::IO::SystemFile fileHandle; fileHandle.Open(resolvedPath.c_str(), + AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY, + platformFlags)) + { + AZ::IO::SizeType bytesWritten = fileHandle.Write(streamData.data(), streamData.size()); + return bytesWritten == streamData.size(); + } - if (serializeContext) - { - AZ::TypeId containerTypeId = type; + return false; + } - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - // This type is a container - containerTypeId = classInfo->GetGenericTypeId(); - } + bool SaveObjectToFile(const AZStd::string& filePath, DataStream::StreamType fileType, const void* classPtr, const Uuid& classId, SerializeContext* context, int platformFlags) + { + AZ_PROFILE_FUNCTION(AzCore); - if (containerTypeId == AZ::GetGenericClassInfoVectorTypeId() - || containerTypeId == AZ::GetGenericClassInfoFixedVectorTypeId() - || containerTypeId == AZ::GetGenericClassInfoArrayTypeId() - ) - { - return true; - } - } + // \note This is ok for tools, but we should use the streamer to write objects directly (no memory store) + AZStd::vector dstData; + AZ::IO::ByteContainerStream > dstByteStream(&dstData); + if (!SaveObjectToStream(dstByteStream, fileType, classPtr, classId, context)) + { return false; } - bool IsSetContainerType(const AZ::Uuid& type) + return SaveStreamToFile(filePath, dstData, platformFlags); + } + + /*! + \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue + \param context SerializeContext used for looking up ClassData + \param classElement Top level DataElementNode to begin comparison each the Crc32 queue + \param elementCrcQueue Container of Crc32 values in the order in which DataElementNodes should be matched as the DataElementNode tree is traversed + \return Vector of valid pointers to DataElementNodes which match the entire element Crc32 queue + */ + AZStd::vector FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, + const AZStd::vector& elementCrcQueue) + { + AZStd::vector dataElementNodes; + FindDescendantElements(context, classElement, dataElementNodes, elementCrcQueue.begin(), elementCrcQueue.end()); + + return dataElementNodes; + } + + /*! + \brief Finds any descendant DataElementNodes of the @classElement which match each Crc32 values in the supplied elementCrcQueue + \param context SerializeContext used for looking up ClassData + \param classElement The current DataElementNode which will be compared against be to current top Crc32 value in the Crc32 queue + \param dataElementNodes[out] Array to populate with a DataElementNode which was found by matching all Crc32 values in the Crc32 queue + \param first The current front of the Crc32 queue + \param last The end of the Crc32 queue + */ + void FindDescendantElements(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement, + AZStd::vector& dataElementNodes, AZStd::vector::const_iterator first, AZStd::vector::const_iterator last) + { + if (first == last) { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + return; + } - if (serializeContext) + for (int i = 0; i < classElement.GetNumSubElements(); ++i) + { + auto& childElement = classElement.GetSubElement(i); + if (*first == AZ::Crc32(childElement.GetName())) { - AZ::TypeId containerTypeId = type; - - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + if (AZStd::distance(first, last) == 1) { - // This type is a container - containerTypeId = classInfo->GetGenericTypeId(); + dataElementNodes.push_back(&childElement); } - - if (containerTypeId == AZ::GetGenericClassSetTypeId() - || containerTypeId == AZ::GetGenericClassUnorderedSetTypeId() - ) + else { - return true; + FindDescendantElements(context, childElement, dataElementNodes, AZStd::next(first), last); } } - - return false; } + } + bool IsVectorContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - bool IsMapContainerType(const AZ::Uuid& type) + if (serializeContext) { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ::TypeId containerTypeId = type; - if (serializeContext) + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) { - AZ::Uuid containerTypeId = type; - - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - containerTypeId = classInfo->GetGenericTypeId(); - } - - if (containerTypeId == AZ::GetGenericClassMapTypeId() - || containerTypeId == AZ::GetGenericClassUnorderedMapTypeId() - ) - { - return true; - } + // This type is a container + containerTypeId = classInfo->GetGenericTypeId(); } - return false; + if (containerTypeId == AZ::GetGenericClassInfoVectorTypeId() + || containerTypeId == AZ::GetGenericClassInfoFixedVectorTypeId() + || containerTypeId == AZ::GetGenericClassInfoArrayTypeId() + ) + { + return true; + } } - bool IsContainerType(const AZ::Uuid& type) - { - return IsVectorContainerType(type) || IsSetContainerType(type) || IsMapContainerType(type); - } + return false; + } - AZStd::vector GetContainedTypes(const AZ::Uuid& type) - { - AZStd::vector types; + bool IsSetContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + if (serializeContext) + { + AZ::TypeId containerTypeId = type; - if (serializeContext) + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) { - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - for (int i = 0; i < classInfo->GetNumTemplatedArguments(); ++i) - { - types.push_back(classInfo->GetTemplatedTypeId(i)); - } - } + // This type is a container + containerTypeId = classInfo->GetGenericTypeId(); } - return types; + if (containerTypeId == AZ::GetGenericClassSetTypeId() + || containerTypeId == AZ::GetGenericClassUnorderedSetTypeId() + ) + { + return true; + } } - bool IsOutcomeType(const AZ::Uuid& type) + return false; + } + + + bool IsMapContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ::Uuid containerTypeId = type; - if (serializeContext) + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) { - GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type); - return classInfo && classInfo->GetGenericTypeId() == AZ::GetGenericOutcomeTypeId(); + containerTypeId = classInfo->GetGenericTypeId(); } - return false; + if (containerTypeId == AZ::GetGenericClassMapTypeId() + || containerTypeId == AZ::GetGenericClassUnorderedMapTypeId() + ) + { + return true; + } } - bool IsPairContainerType(const AZ::Uuid& type) - { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + return false; + } - if (serializeContext) - { - AZ::Uuid containerTypeId = type; + bool IsContainerType(const AZ::Uuid& type) + { + return IsVectorContainerType(type) || IsSetContainerType(type) || IsMapContainerType(type); + } - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - containerTypeId = classInfo->GetGenericTypeId(); - } + AZStd::vector GetContainedTypes(const AZ::Uuid& type) + { + AZStd::vector types; + + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - if (containerTypeId == AZ::GetGenericClassPairTypeId()) + if (serializeContext) + { + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + for (int i = 0; i < classInfo->GetNumTemplatedArguments(); ++i) { - return true; + types.push_back(classInfo->GetTemplatedTypeId(i)); } } + } - return false; + return types; + } + + bool IsOutcomeType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) + { + GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type); + return classInfo && classInfo->GetGenericTypeId() == AZ::GetGenericOutcomeTypeId(); } - AZ::TypeId GetGenericContainerType(const AZ::TypeId& type) + return false; + } + + bool IsPairContainerType(const AZ::Uuid& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) { - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ::Uuid containerTypeId = type; - if (serializeContext) + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) { - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - // This type is a container - return classInfo->GetGenericTypeId(); - } + containerTypeId = classInfo->GetGenericTypeId(); } - return azrtti_typeid(); + if (containerTypeId == AZ::GetGenericClassPairTypeId()) + { + return true; + } } - bool IsGenericContainerType(const AZ::TypeId& type) + return false; + } + + AZ::TypeId GetGenericContainerType(const AZ::TypeId& type) + { + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + + if (serializeContext) { - return IsContainerType(type) && GetGenericContainerType(type) == azrtti_typeid(); + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) + { + // This type is a container + return classInfo->GetGenericTypeId(); + } } - AZStd::pair GetOutcomeTypes(const AZ::Uuid& type) - { - AZStd::vector types; + return azrtti_typeid(); + } + + bool IsGenericContainerType(const AZ::TypeId& type) + { + return IsContainerType(type) && GetGenericContainerType(type) == azrtti_typeid(); + } + + AZStd::pair GetOutcomeTypes(const AZ::Uuid& type) + { + AZStd::vector types; - AZ::SerializeContext* serializeContext = nullptr; - AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); + AZ::SerializeContext* serializeContext = nullptr; + AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationRequests::GetSerializeContext); - if (serializeContext) + if (serializeContext) + { + if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) { - if (GenericClassInfo* classInfo = serializeContext->FindGenericClassInfo(type)) - { - AZ_Assert(classInfo->GetNumTemplatedArguments() == 2, "Outcome template arguments must be 2, even if void, void"); - return AZStd::make_pair(classInfo->GetTemplatedTypeId(0), classInfo->GetTemplatedTypeId(1)); - } + AZ_Assert(classInfo->GetNumTemplatedArguments() == 2, "Outcome template arguments must be 2, even if void, void"); + return AZStd::make_pair(classInfo->GetTemplatedTypeId(0), classInfo->GetTemplatedTypeId(1)); } - - return AZStd::make_pair(azrtti_typeid(), azrtti_typeid()); } - void* ResolvePointer(void* ptr, const SerializeContext::ClassElement& classElement, const SerializeContext& context) + return AZStd::make_pair(azrtti_typeid(), azrtti_typeid()); + } + + void* ResolvePointer(void* ptr, const SerializeContext::ClassElement& classElement, const SerializeContext& context) + { + if (classElement.m_flags & SerializeContext::ClassElement::FLG_POINTER) { - if (classElement.m_flags & SerializeContext::ClassElement::FLG_POINTER) - { - // In the case of pointer-to-pointer, we'll deference. - ptr = *(void**)(ptr); + // In the case of pointer-to-pointer, we'll deference. + ptr = *(void**)(ptr); - // Pointer-to-pointer fields may be base class / polymorphic, so cast pointer to actual type, - // safe for passing as 'this' to member functions. - if (ptr && classElement.m_azRtti) + // Pointer-to-pointer fields may be base class / polymorphic, so cast pointer to actual type, + // safe for passing as 'this' to member functions. + if (ptr && classElement.m_azRtti) + { + Uuid actualClassId = classElement.m_azRtti->GetActualUuid(ptr); + if (actualClassId != classElement.m_typeId) { - Uuid actualClassId = classElement.m_azRtti->GetActualUuid(ptr); - if (actualClassId != classElement.m_typeId) + const SerializeContext::ClassData* classData = context.FindClassData(actualClassId); + if (classData) { - const SerializeContext::ClassData* classData = context.FindClassData(actualClassId); - if (classData) - { - ptr = classElement.m_azRtti->Cast(ptr, classData->m_azRtti->GetTypeId()); - } + ptr = classElement.m_azRtti->Cast(ptr, classData->m_azRtti->GetTypeId()); } } } - - return ptr; } - } // namespace Utils -} // namespace AZ + return ptr; + } + +} // namespace AZ::Utils diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp index 81546f4f28..ff0ad571f7 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.cpp @@ -2065,11 +2065,15 @@ namespace AZ } EnumerateInstanceCallContext callContext( - AZStd::bind(&SerializeContext::BeginCloneElement, this, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, &cloneData, &m_errorLogger, &scratchBuffer), - AZStd::bind(&SerializeContext::EndCloneElement, this, &cloneData), - this, - SerializeContext::ENUM_ACCESS_FOR_READ, - &m_errorLogger); + [&](void* ptr, const ClassData* classData, const ClassElement* elementData) -> bool + { + return BeginCloneElement(ptr, classData, elementData, &cloneData, &m_errorLogger, &scratchBuffer); + }, + [&]() -> bool + { + return EndCloneElement(&cloneData); + }, + this, SerializeContext::ENUM_ACCESS_FOR_READ, &m_errorLogger); EnumerateInstance( &callContext @@ -2098,19 +2102,17 @@ namespace AZ if (ptr) { EnumerateInstanceCallContext callContext( - AZStd::bind(&SerializeContext::BeginCloneElementInplace, this, dest, AZStd::placeholders::_1, AZStd::placeholders::_2, AZStd::placeholders::_3, &cloneData, &m_errorLogger, &scratchBuffer), - AZStd::bind(&SerializeContext::EndCloneElement, this, &cloneData), - this, - SerializeContext::ENUM_ACCESS_FOR_READ, - &m_errorLogger); - - EnumerateInstance( - &callContext - , const_cast(ptr) - , classId - , nullptr - , nullptr - ); + [&](void* ptr, const ClassData* classData, const ClassElement* elementData) -> bool + { + return BeginCloneElementInplace(dest, ptr, classData, elementData, &cloneData, &m_errorLogger, &scratchBuffer); + }, + [&]() -> bool + { + return EndCloneElement(&cloneData); + }, + this, SerializeContext::ENUM_ACCESS_FOR_READ, &m_errorLogger); + + EnumerateInstance(&callContext, const_cast(ptr), classId, nullptr, nullptr); } } @@ -2941,14 +2943,10 @@ namespace AZ { m_errorHandler = errorHandler ? errorHandler : &m_defaultErrorHandler; - m_elementCallback = AZStd::bind(static_cast(&SerializeContext::EnumerateInstance) - , m_context - , this - , AZStd::placeholders::_1 - , AZStd::placeholders::_2 - , AZStd::placeholders::_3 - , AZStd::placeholders::_4 - ); + m_elementCallback = [this](void* ptr, const Uuid& classId, const ClassData* classData, const ClassElement* classElement)->bool + { + return m_context->EnumerateInstance(this, ptr, classId, classData, classElement); + }; } //========================================================================= diff --git a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h index a37780029e..bf96bcdb9a 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h +++ b/Code/Framework/AzCore/AzCore/Serialization/SerializeContext.h @@ -90,7 +90,7 @@ namespace AZ using AttributePtr = AZStd::shared_ptr; using AttributeSharedPair = AZStd::pair; - template + template > AttributePtr CreateModuleAttribute(T&& attrValue); /** @@ -540,6 +540,7 @@ namespace AZ */ struct ClassElement { + AZ_TYPE_INFO(ClassElement, "{7D386902-A1D9-4525-8284-F68435FE1D05}"); enum Flags { FLG_POINTER = (1 << 0), ///< Element is stored as pointer (it's not a value). @@ -563,22 +564,22 @@ namespace AZ void ClearAttributes(); Attribute* FindAttribute(AttributeId attributeId) const; - const char* m_name; ///< Used in XML output and debugging purposes - u32 m_nameCrc; ///< CRC32 of m_name - Uuid m_typeId; - size_t m_dataSize; - size_t m_offset; + const char* m_name{ "" }; ///< Used in XML output and debugging purposes + u32 m_nameCrc{}; ///< CRC32 of m_name + Uuid m_typeId = AZ::TypeId::CreateNull(); + size_t m_dataSize{}; + size_t m_offset{}; - IRttiHelper* m_azRtti; ///< Interface used to support RTTI. + IRttiHelper* m_azRtti{}; ///< Interface used to support RTTI. GenericClassInfo* m_genericClassInfo = nullptr; ///< Valid when the generic class is set. So you don't search for the actual type in the class register. - Edit::ElementData* m_editData; ///< Pointer to edit data (generated by EditContext). + Edit::ElementData* m_editData{}; ///< Pointer to edit data (generated by EditContext). AZStd::vector m_attributes{ AZStdFunctorAllocator([]() -> IAllocatorAllocate& { return AZ::AllocatorInstance::Get(); }) }; ///< Attributes attached to ClassElement. Lambda is required here as AZStdFunctorAllocator expects a function pointer ///< that returns an IAllocatorAllocate& and the AZ::AllocatorInstance::Get returns an AZ::SystemAllocator& /// which while it inherits from IAllocatorAllocate, does not work as function pointers do not support covariant return types AttributeOwnership m_attributeOwnership = AttributeOwnership::Parent; - int m_flags; ///< + int m_flags{}; ///< }; typedef AZStd::vector ClassElementArray; @@ -589,6 +590,8 @@ namespace AZ class ClassData { public: + AZ_TYPE_INFO(ClassData, "{20EB8E2E-D807-4039-84E2-CE37D7647CD4}"); + ClassData(); ~ClassData() { ClearAttributes(); } ClassData(ClassData&&) = default; @@ -1040,6 +1043,7 @@ namespace AZ */ struct EnumerateInstanceCallContext { + AZ_TYPE_INFO(EnumerateInstanceCallContext, "{FCC1DB4B-72BD-4D78-9C23-C84B91589D33}"); EnumerateInstanceCallContext(const BeginElemEnumCB& beginElemCB, const EndElemEnumCB& endElemCB, const SerializeContext* context, unsigned int accessflags, ErrorHandler* errorHandler); BeginElemEnumCB m_beginElemCB; ///< Optional callback when entering an element's hierarchy. @@ -2539,7 +2543,7 @@ namespace AZ /// associated with current module /// @param attrValue value to store within the attribute /// @param ContainerType second parameter which is used for function parameter deduction - template + template AttributePtr CreateModuleAttribute(T&& attrValue) { IAllocatorAllocate& moduleAllocator = GetCurrentSerializeContextModule().GetAllocator(); diff --git a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl index 70972bb846..06d4f76c80 100644 --- a/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl +++ b/Code/Framework/AzCore/AzCore/Serialization/std/VariantReflection.inl @@ -433,9 +433,7 @@ namespace AZ m_classData.m_attributes.set_allocator(AZStd::move(dllAllocator)); // Create the ObjectStreamWriteOverrideCB in the current module - using ContainerType = AttributeData>; - m_classData.m_attributes.emplace_back(AZ_CRC("ObjectStreamWriteElementOverride", 0x35eb659f), CreateModuleAttribute(&ObjectStreamWriter)); + m_classData.m_attributes.emplace_back(AZ_CRC("ObjectStreamWriteElementOverride", 0x35eb659f), CreateModuleAttribute(&ObjectStreamWriter)); } SerializeContext::ClassData* GetClassData() override diff --git a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp index cbf25c29d4..43c8a64b93 100644 --- a/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp +++ b/Code/Framework/AzCore/AzCore/Settings/SettingsRegistryImpl.cpp @@ -327,7 +327,7 @@ namespace AZ while (!localNotifierQueue.empty()) { - for (SignalNotifierArgs notifierArgs : localNotifierQueue) + for (const SignalNotifierArgs& notifierArgs : localNotifierQueue) { localNotifierEvent.Signal(notifierArgs.m_jsonPath, notifierArgs.m_type); } diff --git a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp index 0b410369f0..ca89e95162 100644 --- a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.cpp @@ -840,7 +840,7 @@ namespace AZ } SliceComponent::SliceInstance* SliceComponent::SliceReference::CreateInstanceFromExistingEntities(AZStd::vector& entities, - const EntityIdToEntityIdMap assetToLiveIdMap, + const EntityIdToEntityIdMap& assetToLiveIdMap, SliceInstanceId sliceInstanceId) { AZ_PROFILE_FUNCTION(AzCore); diff --git a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h index 7a66167a96..ae4ec155c7 100644 --- a/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h +++ b/Code/Framework/AzCore/AzCore/Slice/SliceComponent.h @@ -443,7 +443,7 @@ namespace AZ * @return A pointer to the newly created slice instance. Returns nullptr on error or if the SliceComponent is not instantiated. */ SliceInstance* CreateInstanceFromExistingEntities(AZStd::vector& entities, - const EntityIdToEntityIdMap assetToLiveIdMap, + const EntityIdToEntityIdMap& assetToLiveIdMap, SliceInstanceId sliceInstanceId = SliceInstanceId::CreateRandom()); /** diff --git a/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp b/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp index f15c288ad8..71c0aeea6d 100644 --- a/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp +++ b/Code/Framework/AzCore/AzCore/Socket/AzSocket.cpp @@ -8,77 +8,74 @@ #include -namespace AZ +namespace AZ::AzSock { - namespace AzSock + AzSocketAddress::AzSocketAddress() { - AzSocketAddress::AzSocketAddress() - { - Reset(); - } + Reset(); + } - AzSocketAddress& AzSocketAddress::operator=(const AZSOCKADDR& addr) - { - m_sockAddr = *reinterpret_cast(&addr); - return *this; - } + AzSocketAddress& AzSocketAddress::operator=(const AZSOCKADDR& addr) + { + m_sockAddr = *reinterpret_cast(&addr); + return *this; + } - bool AzSocketAddress::operator==(const AzSocketAddress& rhs) const - { - return m_sockAddr.sin_family == rhs.m_sockAddr.sin_family - && m_sockAddr.sin_addr.s_addr == rhs.m_sockAddr.sin_addr.s_addr - && m_sockAddr.sin_port == rhs.m_sockAddr.sin_port; - } + bool AzSocketAddress::operator==(const AzSocketAddress& rhs) const + { + return m_sockAddr.sin_family == rhs.m_sockAddr.sin_family + && m_sockAddr.sin_addr.s_addr == rhs.m_sockAddr.sin_addr.s_addr + && m_sockAddr.sin_port == rhs.m_sockAddr.sin_port; + } - const AZSOCKADDR* AzSocketAddress::GetTargetAddress() const - { - return reinterpret_cast(&m_sockAddr); - } + const AZSOCKADDR* AzSocketAddress::GetTargetAddress() const + { + return reinterpret_cast(&m_sockAddr); + } - AZStd::string AzSocketAddress::GetIP() const - { - char ip[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); - return AZStd::string(ip); - } + AZStd::string AzSocketAddress::GetIP() const + { + char ip[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); + return AZStd::string(ip); + } - AZStd::string AzSocketAddress::GetAddress() const - { - char ip[INET_ADDRSTRLEN]; - inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); - return AZStd::string::format("%s:%d", ip, AZ::AzSock::NetToHostShort(m_sockAddr.sin_port)); - } + AZStd::string AzSocketAddress::GetAddress() const + { + char ip[INET_ADDRSTRLEN]; + inet_ntop(AF_INET, const_cast(&m_sockAddr.sin_addr), ip, AZ_ARRAY_SIZE(ip)); + return AZStd::string::format("%s:%d", ip, AZ::AzSock::NetToHostShort(m_sockAddr.sin_port)); + } - AZ::u16 AzSocketAddress::GetAddrPort() const - { - return AZ::AzSock::NetToHostShort(m_sockAddr.sin_port); - } + AZ::u16 AzSocketAddress::GetAddrPort() const + { + return AZ::AzSock::NetToHostShort(m_sockAddr.sin_port); + } - void AzSocketAddress::SetAddrPort(AZ::u16 port) - { - m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); - } + void AzSocketAddress::SetAddrPort(AZ::u16 port) + { + m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); + } - bool AzSocketAddress::SetAddress(const AZStd::string& ip, AZ::u16 port) - { - AZ_Assert(!ip.empty(), "Invalid address string!"); - Reset(); - return AZ::AzSock::ResolveAddress(ip, port, m_sockAddr); - } + bool AzSocketAddress::SetAddress(const AZStd::string& ip, AZ::u16 port) + { + AZ_Assert(!ip.empty(), "Invalid address string!"); + Reset(); + return AZ::AzSock::ResolveAddress(ip, port, m_sockAddr); + } - bool AzSocketAddress::SetAddress(AZ::u32 ip, AZ::u16 port) - { - Reset(); - m_sockAddr.sin_addr.s_addr = AZ::AzSock::HostToNetLong(ip); - m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); - return true; - } + bool AzSocketAddress::SetAddress(AZ::u32 ip, AZ::u16 port) + { + Reset(); + m_sockAddr.sin_addr.s_addr = AZ::AzSock::HostToNetLong(ip); + m_sockAddr.sin_port = AZ::AzSock::HostToNetShort(port); + return true; + } - void AzSocketAddress::Reset() - { - memset(&m_sockAddr, 0, sizeof(m_sockAddr)); - m_sockAddr.sin_family = AF_INET; - m_sockAddr.sin_addr.s_addr = INADDR_ANY; - } + void AzSocketAddress::Reset() + { + memset(&m_sockAddr, 0, sizeof(m_sockAddr)); + m_sockAddr.sin_family = AF_INET; + m_sockAddr.sin_addr.s_addr = INADDR_ANY; } -} +} // namespace AZ::AzSock diff --git a/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp b/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp index 47f85c8309..3093d38a10 100644 --- a/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp +++ b/Code/Framework/AzCore/AzCore/Statistics/RunningStatistic.cpp @@ -10,66 +10,63 @@ #include "RunningStatistic.h" -namespace AZ +namespace AZ::Statistics { - namespace Statistics + void RunningStatistic::Reset() { - void RunningStatistic::Reset() + m_numSamples = 0; + m_mostRecentSample = 0.0; + m_minimum = 0.0; + m_maximum = 0.0; + m_sum = 0.0; + m_average = 0.0; + m_varianceTracking = 0.0; + } + + void RunningStatistic::PushSample(double value) + { + m_numSamples++; + m_mostRecentSample = value; + m_sum += value; + + if (m_numSamples == 1) { - m_numSamples = 0; - m_mostRecentSample = 0.0; - m_minimum = 0.0; - m_maximum = 0.0; - m_sum = 0.0; - m_average = 0.0; - m_varianceTracking = 0.0; + m_minimum = value; + m_maximum = value; + m_average = value; + return; } - void RunningStatistic::PushSample(double value) + if (value < m_minimum) { - m_numSamples++; - m_mostRecentSample = value; - m_sum += value; - - if (m_numSamples == 1) - { - m_minimum = value; - m_maximum = value; - m_average = value; - return; - } - - if (value < m_minimum) - { - m_minimum = value; - } - else if (value > m_maximum) - { - m_maximum = value; - } - - //See header notes and references to understand this way of calculating - //running average & variance. - const double newAverage = m_average + (value - m_average) / m_numSamples; - m_varianceTracking = m_varianceTracking + (value - m_average)*(value - newAverage); - - m_average = newAverage; + m_minimum = value; } - - double RunningStatistic::GetVariance(VarianceType varianceType) const + else if (value > m_maximum) { - if (m_numSamples > 1) - { - const AZ::u64 varianceDivisor = (varianceType == VarianceType::S) ? m_numSamples - 1 : m_numSamples; - return m_varianceTracking / varianceDivisor; - } - return 0.0; + m_maximum = value; } - double RunningStatistic::GetStdev(VarianceType varianceType) const + //See header notes and references to understand this way of calculating + //running average & variance. + const double newAverage = m_average + (value - m_average) / m_numSamples; + m_varianceTracking = m_varianceTracking + (value - m_average)*(value - newAverage); + + m_average = newAverage; + } + + double RunningStatistic::GetVariance(VarianceType varianceType) const + { + if (m_numSamples > 1) { - return sqrt(GetVariance(varianceType)); + const AZ::u64 varianceDivisor = (varianceType == VarianceType::S) ? m_numSamples - 1 : m_numSamples; + return m_varianceTracking / varianceDivisor; } - - }//namespace Statistics -}//namespace AZ + return 0.0; + } + + double RunningStatistic::GetStdev(VarianceType varianceType) const + { + return sqrt(GetVariance(varianceType)); + } + +} // namespace AZ::Statistics diff --git a/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp b/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp index 00bb97b745..ef87307624 100644 --- a/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Statistics/StatisticalProfilerProxySystemComponent.cpp @@ -12,55 +12,52 @@ #include "StatisticalProfilerProxySystemComponent.h" //////////////////////////////////////////////////////////////////////////////////////////////////// -namespace AZ +namespace AZ::Statistics { - namespace Statistics - { - StatisticalProfilerProxy* StatisticalProfilerProxy::TimedScope::m_profilerProxy = nullptr; + StatisticalProfilerProxy* StatisticalProfilerProxy::TimedScope::m_profilerProxy = nullptr; - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::Reflect(AZ::ReflectContext* context) + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::Reflect(AZ::ReflectContext* context) + { + if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1); - } + serializeContext->Class() + ->Version(1); } + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) - { - provided.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); - } + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided) + { + provided.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) - { - incompatible.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); - } + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible) + { + incompatible.push_back(AZ_CRC("StatisticalProfilerService", 0x20066f73)); + } - //////////////////////////////////////////////////////////////////////////////////////////////// - StatisticalProfilerProxySystemComponent::StatisticalProfilerProxySystemComponent() - : m_StatisticalProfilerProxy(nullptr) - { - } + //////////////////////////////////////////////////////////////////////////////////////////////// + StatisticalProfilerProxySystemComponent::StatisticalProfilerProxySystemComponent() + : m_StatisticalProfilerProxy(nullptr) + { + } - //////////////////////////////////////////////////////////////////////////////////////////////// - StatisticalProfilerProxySystemComponent::~StatisticalProfilerProxySystemComponent() - { - } + //////////////////////////////////////////////////////////////////////////////////////////////// + StatisticalProfilerProxySystemComponent::~StatisticalProfilerProxySystemComponent() + { + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::Activate() - { - m_StatisticalProfilerProxy = new StatisticalProfilerProxy; - } + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::Activate() + { + m_StatisticalProfilerProxy = new StatisticalProfilerProxy; + } - //////////////////////////////////////////////////////////////////////////////////////////////// - void StatisticalProfilerProxySystemComponent::Deactivate() - { - delete m_StatisticalProfilerProxy; - } - } //namespace Statistics -} // namespace AZ + //////////////////////////////////////////////////////////////////////////////////////////////// + void StatisticalProfilerProxySystemComponent::Deactivate() + { + delete m_StatisticalProfilerProxy; + } +} // namespace AZ::Statistics diff --git a/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp b/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp index a953d53c33..8405424f7d 100644 --- a/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp +++ b/Code/Framework/AzCore/AzCore/StringFunc/StringFunc.cpp @@ -416,2157 +416,2155 @@ namespace AZ::StringFunc::Internal } -namespace AZ +namespace AZ::StringFunc { - namespace StringFunc + AZStd::string_view LStrip(AZStd::string_view in, AZStd::string_view stripCharacters) { - AZStd::string_view LStrip(AZStd::string_view in, AZStd::string_view stripCharacters) + if (size_t pos = in.find_first_not_of(stripCharacters); pos != AZStd::string_view::npos) { - if (size_t pos = in.find_first_not_of(stripCharacters); pos != AZStd::string_view::npos) - { - return in.substr(pos); - } + return in.substr(pos); + } - return {}; - }; + return {}; + }; - AZStd::string_view RStrip(AZStd::string_view in, AZStd::string_view stripCharacters) + AZStd::string_view RStrip(AZStd::string_view in, AZStd::string_view stripCharacters) + { + if (size_t pos = in.find_last_not_of(stripCharacters); pos != AZStd::string_view::npos) { - if (size_t pos = in.find_last_not_of(stripCharacters); pos != AZStd::string_view::npos) - { - return in.substr(0, pos < in.size() ? pos + 1 : pos); - } + return in.substr(0, pos < in.size() ? pos + 1 : pos); + } - return {}; - }; + return {}; + }; + + AZStd::string_view StripEnds(AZStd::string_view in, AZStd::string_view stripCharacters) + { + return LStrip(RStrip(in, stripCharacters), stripCharacters); + }; - AZStd::string_view StripEnds(AZStd::string_view in, AZStd::string_view stripCharacters) + bool Equal(const char* inA, const char* inB, bool bCaseSensitive /*= false*/, size_t n /*= 0*/) + { + if (!inA || !inB) { - return LStrip(RStrip(in, stripCharacters), stripCharacters); - }; + return false; + } + + if (inA == inB) + { + return true; + } - bool Equal(const char* inA, const char* inB, bool bCaseSensitive /*= false*/, size_t n /*= 0*/) + if (bCaseSensitive) { - if (!inA || !inB) + if (n) { - return false; + return !strncmp(inA, inB, n); } - - if (inA == inB) + else { - return true; + return !strcmp(inA, inB); } - - if (bCaseSensitive) + } + else + { + if (n) { - if (n) - { - return !strncmp(inA, inB, n); - } - else - { - return !strcmp(inA, inB); - } + return !azstrnicmp(inA, inB, n); } else { - if (n) - { - return !azstrnicmp(inA, inB, n); - } - else - { - return !azstricmp(inA, inB); - } + return !azstricmp(inA, inB); } } - bool Equal(AZStd::string_view inA, AZStd::string_view inB, bool bCaseSensitive) - { - const size_t maxCharsToCompare = inA.size(); + } + bool Equal(AZStd::string_view inA, AZStd::string_view inB, bool bCaseSensitive) + { + const size_t maxCharsToCompare = inA.size(); + + return inA.size() == inB.size() && (bCaseSensitive + ? strncmp(inA.data(), inB.data(), maxCharsToCompare) == 0 + : azstrnicmp(inA.data(), inB.data(), maxCharsToCompare) == 0); + } + + bool StartsWith(AZStd::string_view sourceValue, AZStd::string_view prefixValue, bool bCaseSensitive) + { + return sourceValue.size() >= prefixValue.size() + && Equal(sourceValue.data(), prefixValue.data(), bCaseSensitive, prefixValue.size()); + } + + bool EndsWith(AZStd::string_view sourceValue, AZStd::string_view suffixValue, bool bCaseSensitive) + { + return sourceValue.size() >= suffixValue.size() + && Equal(sourceValue.substr(sourceValue.size() - suffixValue.size(), AZStd::string_view::npos).data(), suffixValue.data(), bCaseSensitive, suffixValue.size()); + } + + bool Contains(AZStd::string_view in, char ch, bool bCaseSensitive) + { + return Find(in, ch, 0, false, bCaseSensitive) != AZStd::string_view::npos; + } + bool Contains(AZStd::string_view in, AZStd::string_view sv, bool bCaseSensitive) + { + return Find(in, sv, 0, false, bCaseSensitive) != AZStd::string_view::npos; + } - return inA.size() == inB.size() && (bCaseSensitive - ? strncmp(inA.data(), inB.data(), maxCharsToCompare) == 0 - : azstrnicmp(inA.data(), inB.data(), maxCharsToCompare) == 0); + size_t Find(AZStd::string_view in, char c, size_t pos /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) + { + if (in.empty()) + { + return AZStd::string::npos; } - bool StartsWith(AZStd::string_view sourceValue, AZStd::string_view prefixValue, bool bCaseSensitive) + if (pos == AZStd::string::npos) { - return sourceValue.size() >= prefixValue.size() - && Equal(sourceValue.data(), prefixValue.data(), bCaseSensitive, prefixValue.size()); + pos = 0; } - bool EndsWith(AZStd::string_view sourceValue, AZStd::string_view suffixValue, bool bCaseSensitive) + size_t inLen = in.size(); + if (inLen < pos) { - return sourceValue.size() >= suffixValue.size() - && Equal(sourceValue.substr(sourceValue.size() - suffixValue.size(), AZStd::string_view::npos).data(), suffixValue.data(), bCaseSensitive, suffixValue.size()); + return AZStd::string::npos; } - bool Contains(AZStd::string_view in, char ch, bool bCaseSensitive) + if (!bCaseSensitive) { - return Find(in, ch, 0, false, bCaseSensitive) != AZStd::string_view::npos; + c = (char)tolower(c); } - bool Contains(AZStd::string_view in, AZStd::string_view sv, bool bCaseSensitive) + + if (bReverse) { - return Find(in, sv, 0, false, bCaseSensitive) != AZStd::string_view::npos; + pos = inLen - pos - 1; } - size_t Find(AZStd::string_view in, char c, size_t pos /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) + char character; + + do { - if (in.empty()) + if (!bCaseSensitive) { - return AZStd::string::npos; + character = (char)tolower(in[pos]); } - - if (pos == AZStd::string::npos) + else { - pos = 0; + character = in[pos]; } - size_t inLen = in.size(); - if (inLen < pos) + if (character == c) { - return AZStd::string::npos; + return pos; } - if (!bCaseSensitive) + if (bReverse) { - c = (char)tolower(c); + pos = pos > 0 ? pos-1 : pos; } - - if (bReverse) + else { - pos = inLen - pos - 1; + pos++; } + } while (bReverse ? pos : character != '\0'); - char character; + return AZStd::string::npos; + } - do - { - if (!bCaseSensitive) - { - character = (char)tolower(in[pos]); - } - else - { - character = in[pos]; - } + size_t Find(AZStd::string_view in, AZStd::string_view s, size_t offset /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) + { + // Formally an empty string matches at the offset if it is <= to the size of the input string + if (s.empty() && offset <= in.size()) + { + return offset; + } - if (character == c) - { - return pos; - } + if (in.empty()) + { + return AZStd::string::npos; + } - if (bReverse) - { - pos = pos > 0 ? pos-1 : pos; - } - else - { - pos++; - } - } while (bReverse ? pos : character != '\0'); + const size_t inlen = in.size(); + const size_t slen = s.size(); - return AZStd::string::npos; + if (offset == AZStd::string::npos) + { + offset = 0; } - size_t Find(AZStd::string_view in, AZStd::string_view s, size_t offset /*= 0*/, bool bReverse /*= false*/, bool bCaseSensitive /*= false*/) + if (offset + slen > inlen) { - // Formally an empty string matches at the offset if it is <= to the size of the input string - if (s.empty() && offset <= in.size()) - { - return offset; - } + return AZStd::string::npos; + } - if (in.empty()) - { - return AZStd::string::npos; - } + const char* pCur; - const size_t inlen = in.size(); - const size_t slen = s.size(); + if (bReverse) + { + // Start at the end (- pos) + pCur = in.data() + inlen - slen - offset; + } + else + { + // Start at the beginning (+ pos) + pCur = in.data() + offset; + } - if (offset == AZStd::string::npos) + do + { + if (bCaseSensitive) { - offset = 0; + if (!strncmp(pCur, s.data(), slen)) + { + return static_cast(pCur - in.data()); + } } - - if (offset + slen > inlen) + else { - return AZStd::string::npos; + if (!azstrnicmp(pCur, s.data(), slen)) + { + return static_cast(pCur - in.data()); + } } - const char* pCur; - if (bReverse) { - // Start at the end (- pos) - pCur = in.data() + inlen - slen - offset; + pCur--; } else { - // Start at the beginning (+ pos) - pCur = in.data() + offset; + pCur++; } + } while (bReverse ? pCur >= in.data() : pCur - in.data() <= static_cast(inlen)); - do - { - if (bCaseSensitive) - { - if (!strncmp(pCur, s.data(), slen)) - { - return static_cast(pCur - in.data()); - } - } - else - { - if (!azstrnicmp(pCur, s.data(), slen)) - { - return static_cast(pCur - in.data()); - } - } + return AZStd::string::npos; + } - if (bReverse) - { - pCur--; - } - else - { - pCur++; - } - } while (bReverse ? pCur >= in.data() : pCur - in.data() <= static_cast(inlen)); + char FirstCharacter(const char* in) + { + if (!in) + { + return '\0'; + } + if (in[0] == '\n') + { + return '\0'; + } + return in[0]; + } - return AZStd::string::npos; + char LastCharacter(const char* in) + { + if (!in) + { + return '\0'; + } + size_t len = strlen(in); + if (!len) + { + return '\0'; } + return in[len - 1]; + } + + AZStd::string& Append(AZStd::string& inout, const char s) + { + return inout.append(1, s); + } - char FirstCharacter(const char* in) + AZStd::string& Append(AZStd::string& inout, const char* str) + { + if (!str) { - if (!in) - { - return '\0'; - } - if (in[0] == '\n') - { - return '\0'; - } - return in[0]; + return inout; } + return inout.append(str); + } - char LastCharacter(const char* in) + AZStd::string& Prepend(AZStd::string& inout, const char s) + { + return inout.insert((size_t)0, 1, s); + } + + AZStd::string& Prepend(AZStd::string& inout, const char* str) + { + if (!str) { - if (!in) + return inout; + } + return inout.insert(0, str); + } + + AZStd::string& LChop(AZStd::string& inout, size_t num) + { + return Internal::LChop(inout, num); + } + + AZStd::string_view LChop(AZStd::string_view in, size_t num) + { + return Internal::LChop(in, num); + } + + AZStd::string& RChop(AZStd::string& inout, size_t num) + { + return Internal::RChop(inout, num); + } + + AZStd::string_view RChop(AZStd::string_view in, size_t num) + { + return Internal::RChop(in, num); + } + + AZStd::string& LKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) + { + return Internal::LKeep(inout, pos, bKeepPosCharacter); + } + + AZStd::string& RKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) + { + return Internal::RKeep(inout, pos, bKeepPosCharacter); + } + + bool Replace(AZStd::string& inout, const char replaceA, const char withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) + { + return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); + } + + bool Replace(AZStd::string& inout, const char* replaceA, const char* withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) + { + return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); + } + + bool Strip(AZStd::string& inout, const char stripCharacter, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) + { + return Internal::Strip(inout, stripCharacter, bCaseSensitive, bStripBeginning, bStripEnding); + } + + bool Strip(AZStd::string& inout, const char* stripCharacters, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) + { + return Internal::Strip(inout, stripCharacters, bCaseSensitive, bStripBeginning, bStripEnding); + } + + AZStd::string& TrimWhiteSpace(AZStd::string& value, bool leading, bool trailing) + { + static const char* trimmable = " \t\r\n"; + if (value.length() > 0) + { + if (leading) { - return '\0'; + value.erase(0, value.find_first_not_of(trimmable)); } - size_t len = strlen(in); - if (!len) + if (trailing) { - return '\0'; + value.erase(value.find_last_not_of(trimmable) + 1); } - return in[len - 1]; } + return value; + } + + void Tokenize(AZStd::string_view in, AZStd::vector& tokens, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + { + return Tokenize(in, tokens, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + } + + void Tokenize(AZStd::string_view in, AZStd::vector& tokens, AZStd::string_view delimiters, bool keepEmptyStrings, bool keepSpaceStrings) + { + auto insertVisitor = [&tokens](AZStd::string_view token) + { + tokens.push_back(token); + }; + return TokenizeVisitor(in, insertVisitor, delimiters, keepEmptyStrings, keepSpaceStrings); + } + + void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + { + return TokenizeVisitor(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + } - AZStd::string& Append(AZStd::string& inout, const char s) + void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, + bool keepEmptyStrings, bool keepSpaceStrings) + { + if (delimiters.empty() || in.empty()) { - return inout.append(1, s); + return; } - AZStd::string& Append(AZStd::string& inout, const char* str) + while (AZStd::optional nextToken = TokenizeNext(in, delimiters)) { - if (!str) + bool bIsEmpty = nextToken->empty(); + bool bIsSpaces = false; + if (!bIsEmpty) + { + AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); + bIsSpaces = strippedNextToken.empty(); + } + + if ((bIsEmpty && keepEmptyStrings) || + (bIsSpaces && keepSpaceStrings) || + (!bIsSpaces && !bIsEmpty)) { - return inout; + tokenVisitor(*nextToken); } - return inout.append(str); } + } + + void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + { + return TokenizeVisitorReverse(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + } - AZStd::string& Prepend(AZStd::string& inout, const char s) + void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, + bool keepEmptyStrings, bool keepSpaceStrings) + { + if (delimiters.empty() || in.empty()) { - return inout.insert((size_t)0, 1, s); + return; } - AZStd::string& Prepend(AZStd::string& inout, const char* str) + while (AZStd::optional nextToken = TokenizeLast(in, delimiters)) { - if (!str) + bool bIsEmpty = nextToken->empty(); + bool bIsSpaces = false; + if (!bIsEmpty) { - return inout; + AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); + bIsSpaces = strippedNextToken.empty(); } - return inout.insert(0, str); - } - AZStd::string& LChop(AZStd::string& inout, size_t num) - { - return Internal::LChop(inout, num); + if ((bIsEmpty && keepEmptyStrings) || + (bIsSpaces && keepSpaceStrings) || + (!bIsSpaces && !bIsEmpty)) + { + tokenVisitor(*nextToken); + } } + } - AZStd::string_view LChop(AZStd::string_view in, size_t num) + AZStd::optional TokenizeNext(AZStd::string_view& inout, const char delimiter) + { + return TokenizeNext(inout, { &delimiter, 1 }); + } + AZStd::optional TokenizeNext(AZStd::string_view& inout, AZStd::string_view delimiters) + { + if (delimiters.empty() || inout.empty()) { - return Internal::LChop(in, num); + return AZStd::nullopt; } - AZStd::string& RChop(AZStd::string& inout, size_t num) + AZStd::string_view resultToken; + if (size_t pos = inout.find_first_of(delimiters); pos == AZStd::string_view::npos) { - return Internal::RChop(inout, num); + // The delimiter has not been found, a new view containing the entire + // string will be returned and the input parameter will be set to empty + resultToken.swap(inout); } - - AZStd::string_view RChop(AZStd::string_view in, size_t num) + else { - return Internal::RChop(in, num); + resultToken = { inout.data(), pos }; + // Strip off all previous characters before the delimiter plus + // the delimiter itself from the input view + inout.remove_prefix(pos + 1); } - AZStd::string& LKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) - { - return Internal::LKeep(inout, pos, bKeepPosCharacter); - } + return resultToken; + } - AZStd::string& RKeep(AZStd::string& inout, size_t pos, bool bKeepPosCharacter) + AZStd::optional TokenizeLast(AZStd::string_view& inout, const char delimiter) + { + return TokenizeLast(inout, { &delimiter, 1 }); + } + AZStd::optional TokenizeLast(AZStd::string_view& inout, AZStd::string_view delimiters) + { + if (delimiters.empty() || inout.empty()) { - return Internal::RKeep(inout, pos, bKeepPosCharacter); + return AZStd::nullopt; } - bool Replace(AZStd::string& inout, const char replaceA, const char withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) + AZStd::string_view resultToken; + if (size_t pos = inout.find_last_of(delimiters); pos == AZStd::string_view::npos) { - return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); + // The delimiter has not been found, a new view containing the entire + // string will be returned and the input parameter will be set to empty + resultToken.swap(inout); } - - bool Replace(AZStd::string& inout, const char* replaceA, const char* withB, bool bCaseSensitive, bool bReplaceFirst, bool bReplaceLast) + else { - return Internal::Replace(inout, replaceA, withB, bCaseSensitive, bReplaceFirst, bReplaceLast); + resultToken = inout.substr(pos + 1); + // Strip off all previous characters before the delimiter plus + // the delimiter itself from the input view + inout = inout.substr(0, pos); } - bool Strip(AZStd::string& inout, const char stripCharacter, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) - { - return Internal::Strip(inout, stripCharacter, bCaseSensitive, bStripBeginning, bStripEnding); - } + return resultToken; + } - bool Strip(AZStd::string& inout, const char* stripCharacters, bool bCaseSensitive, bool bStripBeginning, bool bStripEnding) - { - return Internal::Strip(inout, stripCharacters, bCaseSensitive, bStripBeginning, bStripEnding); - } + bool FindFirstOf(AZStd::string_view inString, size_t offset, const AZStd::vector& searchStrings, uint32_t& outIndex, size_t& outOffset) + { + bool found = false; - AZStd::string& TrimWhiteSpace(AZStd::string& value, bool leading, bool trailing) + outIndex = 0; + outOffset = AZStd::string::npos; + for (int32_t i = 0; i < searchStrings.size(); ++i) { - static const char* trimmable = " \t\r\n"; - if (value.length() > 0) + const AZStd::string& search = searchStrings[i]; + + size_t entry = inString.find(search, offset); + if (entry != AZStd::string::npos) { - if (leading) - { - value.erase(0, value.find_first_not_of(trimmable)); - } - if (trailing) + if (!found || (entry < outOffset)) { - value.erase(value.find_last_not_of(trimmable) + 1); + found = true; + outIndex = i; + outOffset = entry; } } - return value; - } - - void Tokenize(AZStd::string_view in, AZStd::vector& tokens, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) - { - return Tokenize(in, tokens, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); } - void Tokenize(AZStd::string_view in, AZStd::vector& tokens, AZStd::string_view delimiters, bool keepEmptyStrings, bool keepSpaceStrings) - { - auto insertVisitor = [&tokens](AZStd::string_view token) - { - tokens.push_back(token); - }; - return TokenizeVisitor(in, insertVisitor, delimiters, keepEmptyStrings, keepSpaceStrings); - } + return found; + } - void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) + void Tokenize(AZStd::string_view input, AZStd::vector& tokens, const AZStd::vector& delimiters, bool keepEmptyStrings /*= false*/, bool keepSpaceStrings /*= false*/) + { + if (input.empty()) { - return TokenizeVisitor(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + return; } - void TokenizeVisitor(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, - bool keepEmptyStrings, bool keepSpaceStrings) + size_t offset = 0; + for (;;) { - if (delimiters.empty() || in.empty()) + uint32_t nextMatch = 0; + size_t nextOffset = offset; + if (!FindFirstOf(input, offset, delimiters, nextMatch, nextOffset)) { - return; + // No more occurrences of a separator, consume whatever is left and exit + tokens.push_back(input.substr(offset)); + break; } - while (AZStd::optional nextToken = TokenizeNext(in, delimiters)) + // Take the substring, not including the separator, and increment our offset + AZStd::string nextSubstring = input.substr(offset, nextOffset - offset); + if (keepEmptyStrings || keepSpaceStrings || !nextSubstring.empty()) { - bool bIsEmpty = nextToken->empty(); - bool bIsSpaces = false; - if (!bIsEmpty) - { - AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); - bIsSpaces = strippedNextToken.empty(); - } - - if ((bIsEmpty && keepEmptyStrings) || - (bIsSpaces && keepSpaceStrings) || - (!bIsSpaces && !bIsEmpty)) - { - tokenVisitor(*nextToken); - } + tokens.push_back(nextSubstring); } - } - void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, const char delimiter, bool keepEmptyStrings, bool keepSpaceStrings) - { - return TokenizeVisitorReverse(in, tokenVisitor, { &delimiter, 1 }, keepEmptyStrings, keepSpaceStrings); + offset = nextOffset + delimiters[nextMatch].size(); } + } - void TokenizeVisitorReverse(AZStd::string_view in, const TokenVisitor& tokenVisitor, AZStd::string_view delimiters, - bool keepEmptyStrings, bool keepSpaceStrings) + int ToInt(const char* in) + { + if (!in) { - if (delimiters.empty() || in.empty()) - { - return; - } - - while (AZStd::optional nextToken = TokenizeLast(in, delimiters)) - { - bool bIsEmpty = nextToken->empty(); - bool bIsSpaces = false; - if (!bIsEmpty) - { - AZStd::string_view strippedNextToken = StripEnds(*nextToken, " "); - bIsSpaces = strippedNextToken.empty(); - } + return 0; + } + return atoi(in); + } - if ((bIsEmpty && keepEmptyStrings) || - (bIsSpaces && keepSpaceStrings) || - (!bIsSpaces && !bIsEmpty)) - { - tokenVisitor(*nextToken); - } - } + bool LooksLikeInt(const char* in, int* pInt /*=nullptr*/) + { + if (!in) + { + return false; } - AZStd::optional TokenizeNext(AZStd::string_view& inout, const char delimiter) + //if pos is past then end of the string false + size_t len = strlen(in); + if (!len)//must at least 1 characters to work with "1" { - return TokenizeNext(inout, { &delimiter, 1 }); + return false; } - AZStd::optional TokenizeNext(AZStd::string_view& inout, AZStd::string_view delimiters) + + const char* pStr = in; + + size_t countNeg = 0; + while (*pStr != '\0' && + (isdigit(*pStr) || + *pStr == '-')) { - if (delimiters.empty() || inout.empty()) + if (*pStr == '-') { - return AZStd::nullopt; + countNeg++; } + pStr++; + } - AZStd::string_view resultToken; - if (size_t pos = inout.find_first_of(delimiters); pos == AZStd::string_view::npos) - { - // The delimiter has not been found, a new view containing the entire - // string will be returned and the input parameter will be set to empty - resultToken.swap(inout); - } - else + if (*pStr == '\0' && + countNeg < 2) + { + if (pInt) { - resultToken = { inout.data(), pos }; - // Strip off all previous characters before the delimiter plus - // the delimiter itself from the input view - inout.remove_prefix(pos + 1); + *pInt = ToInt(in); } - return resultToken; + return true; + } + return false; + } + + double ToDouble(const char* in) + { + if (!in) + { + return 0.; + } + return atof(in); + } + + bool LooksLikeDouble(const char* in, double* pDouble) + { + if (!in) + { + return false; } - AZStd::optional TokenizeLast(AZStd::string_view& inout, const char delimiter) + size_t len = strlen(in); + if (len < 2)//must have at least 2 characters to work with "1." { - return TokenizeLast(inout, { &delimiter, 1 }); + return false; } - AZStd::optional TokenizeLast(AZStd::string_view& inout, AZStd::string_view delimiters) + + const char* pStr = in; + + size_t countDot = 0; + size_t countNeg = 0; + while (*pStr != '\0' && + (isdigit(*pStr) || + (*pStr == '-' || + *pStr == '.'))) { - if (delimiters.empty() || inout.empty()) + if (*pStr == '.') { - return AZStd::nullopt; + countDot++; } - - AZStd::string_view resultToken; - if (size_t pos = inout.find_last_of(delimiters); pos == AZStd::string_view::npos) + if (*pStr == '-') { - // The delimiter has not been found, a new view containing the entire - // string will be returned and the input parameter will be set to empty - resultToken.swap(inout); + countNeg++; } - else + pStr++; + } + + if (*pStr == '\0' && + countDot == 1 && + countNeg < 2) + { + if (pDouble) { - resultToken = inout.substr(pos + 1); - // Strip off all previous characters before the delimiter plus - // the delimiter itself from the input view - inout = inout.substr(0, pos); + *pDouble = ToDouble(in); } - return resultToken; + return true; } - bool FindFirstOf(AZStd::string_view inString, size_t offset, const AZStd::vector& searchStrings, uint32_t& outIndex, size_t& outOffset) + return false; + } + + float ToFloat(const char* in) + { + if (!in) { - bool found = false; + return 0.f; + } + return (float)atof(in); + } - outIndex = 0; - outOffset = AZStd::string::npos; - for (int32_t i = 0; i < searchStrings.size(); ++i) - { - const AZStd::string& search = searchStrings[i]; + bool LooksLikeFloat(const char* in, float* pFloat /* = nullptr */) + { + bool result = false; - size_t entry = inString.find(search, offset); - if (entry != AZStd::string::npos) - { - if (!found || (entry < outOffset)) - { - found = true; - outIndex = i; - outOffset = entry; - } - } - } + if (pFloat) + { + double doubleValue = 0.0; + result = LooksLikeDouble(in, &doubleValue); - return found; + (*pFloat) = aznumeric_cast(doubleValue); } - - void Tokenize(AZStd::string_view input, AZStd::vector& tokens, const AZStd::vector& delimiters, bool keepEmptyStrings /*= false*/, bool keepSpaceStrings /*= false*/) + else { - if (input.empty()) - { - return; - } + result = LooksLikeDouble(in); + } - size_t offset = 0; - for (;;) - { - uint32_t nextMatch = 0; - size_t nextOffset = offset; - if (!FindFirstOf(input, offset, delimiters, nextMatch, nextOffset)) - { - // No more occurrences of a separator, consume whatever is left and exit - tokens.push_back(input.substr(offset)); - break; - } + return result; + } - // Take the substring, not including the separator, and increment our offset - AZStd::string nextSubstring = input.substr(offset, nextOffset - offset); - if (keepEmptyStrings || keepSpaceStrings || !nextSubstring.empty()) - { - tokens.push_back(nextSubstring); - } + bool ToBool(const char* in) + { + bool boolValue = false; + if (LooksLikeBool(in, &boolValue)) + { + return boolValue; + } + return false; + } - offset = nextOffset + delimiters[nextMatch].size(); - } + bool LooksLikeBool(const char* in, bool* pBool /* = nullptr */) + { + if (!in) + { + return false; } - int ToInt(const char* in) + if (!azstricmp(in, "true") || !azstricmp(in, "1")) { - if (!in) + if (pBool) { - return 0; + *pBool = true; } - return atoi(in); + return true; } - bool LooksLikeInt(const char* in, int* pInt /*=nullptr*/) + if (!azstricmp(in, "false") || !azstricmp(in, "0")) { - if (!in) + if (pBool) { - return false; + *pBool = false; } + return true; + } - //if pos is past then end of the string false - size_t len = strlen(in); - if (!len)//must at least 1 characters to work with "1" - { - return false; - } + return false; + } - const char* pStr = in; + template + bool LooksLikeVectorHelper(const char* in, VECTOR_TYPE* outVector) + { + AZStd::vector tokens; + Tokenize(in, tokens, ',', false, true); + if (tokens.size() == ELEMENT_COUNT) + { + float vectorValues[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; - size_t countNeg = 0; - while (*pStr != '\0' && - (isdigit(*pStr) || - *pStr == '-')) + for (uint32_t element = 0; element < ELEMENT_COUNT; ++element) { - if (*pStr == '-') + if (!LooksLikeFloat(tokens[element].c_str(), outVector ? &vectorValues[element] : nullptr)) { - countNeg++; + return false; } - pStr++; } - if (*pStr == '\0' && - countNeg < 2) + if (outVector) { - if (pInt) + for (uint32_t element = 0; element < ELEMENT_COUNT; ++element) { - *pInt = ToInt(in); + outVector->SetElement(element, vectorValues[element]); } - - return true; } - return false; - } - double ToDouble(const char* in) - { - if (!in) - { - return 0.; - } - return atof(in); + return true; } - bool LooksLikeDouble(const char* in, double* pDouble) - { - if (!in) - { - return false; - } + return false; + } - size_t len = strlen(in); - if (len < 2)//must have at least 2 characters to work with "1." - { - return false; - } + bool LooksLikeVector2(const char* in, AZ::Vector2* outVector) + { + return LooksLikeVectorHelper(in, outVector); + } + + AZ::Vector2 ToVector2(const char* in) + { + AZ::Vector2 vector; + LooksLikeVector2(in, &vector); + return vector; + } + + bool LooksLikeVector3(const char* in, AZ::Vector3* outVector) + { + return LooksLikeVectorHelper(in, outVector); + } + + AZ::Vector3 ToVector3(const char* in) + { + AZ::Vector3 vector; + LooksLikeVector3(in, &vector); + return vector; + } - const char* pStr = in; + bool LooksLikeVector4(const char* in, AZ::Vector4* outVector) + { + return LooksLikeVectorHelper(in, outVector); + } + + AZ::Vector4 ToVector4(const char* in) + { + AZ::Vector4 vector; + LooksLikeVector4(in, &vector); + return vector; + } - size_t countDot = 0; - size_t countNeg = 0; - while (*pStr != '\0' && - (isdigit(*pStr) || - (*pStr == '-' || - *pStr == '.'))) + bool ToHexDump(const char* in, AZStd::string& out) + { + struct TInline + { + static void ByteToHex(char* pszHex, unsigned char bValue) { - if (*pStr == '.') + pszHex[0] = bValue / 16; + + if (pszHex[0] < 10) { - countDot++; + pszHex[0] += '0'; } - if (*pStr == '-') + else { - countNeg++; + pszHex[0] -= 10; + pszHex[0] += 'A'; } - pStr++; - } - if (*pStr == '\0' && - countDot == 1 && - countNeg < 2) - { - if (pDouble) + pszHex[1] = bValue % 16; + + if (pszHex[1] < 10) { - *pDouble = ToDouble(in); + pszHex[1] += '0'; + } + else + { + pszHex[1] -= 10; + pszHex[1] += 'A'; } - - return true; } + }; - return false; - } - - float ToFloat(const char* in) + size_t len = strlen(in); + if (len < 1) //must be at least 1 character to work with { - if (!in) - { - return 0.f; - } - return (float)atof(in); + return false; } - bool LooksLikeFloat(const char* in, float* pFloat /* = nullptr */) - { - bool result = false; - - if (pFloat) - { - double doubleValue = 0.0; - result = LooksLikeDouble(in, &doubleValue); - - (*pFloat) = aznumeric_cast(doubleValue); - } - else - { - result = LooksLikeDouble(in); - } + size_t nBytes = len; - return result; - } + char* pszData = reinterpret_cast(azmalloc((nBytes * 2) + 1)); - bool ToBool(const char* in) + for (size_t ii = 0; ii < nBytes; ++ii) { - bool boolValue = false; - if (LooksLikeBool(in, &boolValue)) - { - return boolValue; - } - return false; + TInline::ByteToHex(&pszData[ii * 2], in[ii]); } - bool LooksLikeBool(const char* in, bool* pBool /* = nullptr */) + pszData[nBytes * 2] = 0x00; + out = pszData; + azfree(pszData); + + return true; + } + + bool FromHexDump(const char* in, AZStd::string& out) + { + struct TInline { - if (!in) + static unsigned char HexToByte(const char* pszHex) { - return false; - } + unsigned char bHigh = 0; + unsigned char bLow = 0; - if (!azstricmp(in, "true") || !azstricmp(in, "1")) - { - if (pBool) + if ((pszHex[0] >= '0') && (pszHex[0] <= '9')) { - *pBool = true; + bHigh = pszHex[0] - '0'; } - return true; - } - - if (!azstricmp(in, "false") || !azstricmp(in, "0")) - { - if (pBool) + else if ((pszHex[0] >= 'A') && (pszHex[0] <= 'F')) { - *pBool = false; + bHigh = (pszHex[0] - 'A') + 10; } - return true; - } - return false; - } - - template - bool LooksLikeVectorHelper(const char* in, VECTOR_TYPE* outVector) - { - AZStd::vector tokens; - Tokenize(in, tokens, ',', false, true); - if (tokens.size() == ELEMENT_COUNT) - { - float vectorValues[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; + bHigh = bHigh << 4; - for (uint32_t element = 0; element < ELEMENT_COUNT; ++element) + if ((pszHex[1] >= '0') && (pszHex[1] <= '9')) { - if (!LooksLikeFloat(tokens[element].c_str(), outVector ? &vectorValues[element] : nullptr)) - { - return false; - } + bLow = pszHex[1] - '0'; } - - if (outVector) + else if ((pszHex[1] >= 'A') && (pszHex[1] <= 'F')) { - for (uint32_t element = 0; element < ELEMENT_COUNT; ++element) - { - outVector->SetElement(element, vectorValues[element]); - } + bLow = (pszHex[1] - 'A') + 10; } - return true; + return bHigh | bLow; } + }; + size_t len = strlen(in); + if (len < 2) //must be at least 2 characters to work with + { return false; } - bool LooksLikeVector2(const char* in, AZ::Vector2* outVector) - { - return LooksLikeVectorHelper(in, outVector); - } + size_t nBytes = len / 2; + char* pszData = reinterpret_cast(azmalloc(nBytes + 1)); - AZ::Vector2 ToVector2(const char* in) + for (size_t ii = 0; ii < nBytes; ++ii) { - AZ::Vector2 vector; - LooksLikeVector2(in, &vector); - return vector; + pszData[ii] = TInline::HexToByte(&in[ii * 2]); } - bool LooksLikeVector3(const char* in, AZ::Vector3* outVector) - { - return LooksLikeVectorHelper(in, outVector); - } + pszData[nBytes] = 0x00; + out = pszData; + azfree(pszData); - AZ::Vector3 ToVector3(const char* in) - { - AZ::Vector3 vector; - LooksLikeVector3(in, &vector); - return vector; - } + return true; + } - bool LooksLikeVector4(const char* in, AZ::Vector4* outVector) + namespace NumberFormatting + { + int GroupDigits(char* buffer, size_t bufferSize, size_t decimalPosHint, char digitSeparator, char decimalSeparator, int groupingSize, int firstGroupingSize) { - return LooksLikeVectorHelper(in, outVector); - } + static const int MAX_SEPARATORS = 16; - AZ::Vector4 ToVector4(const char* in) - { - AZ::Vector4 vector; - LooksLikeVector4(in, &vector); - return vector; - } + AZ_Assert(buffer, "Null string buffer"); + AZ_Assert(bufferSize > decimalPosHint, "Decimal position %lu cannot be located beyond bufferSize %lu", decimalPosHint, bufferSize); + AZ_Assert(groupingSize > 0, "Grouping size must be a positive integer"); - bool ToHexDump(const char* in, AZStd::string& out) - { - struct TInline + int numberEndPos = 0; + int stringEndPos = 0; + + if (decimalPosHint > 0 && decimalPosHint < (bufferSize - 1) && buffer[decimalPosHint] == decimalSeparator) { - static void ByteToHex(char* pszHex, unsigned char bValue) + // Assume the number ends at the supplied location + numberEndPos = (int)decimalPosHint; + stringEndPos = numberEndPos + (int)strnlen(buffer + numberEndPos, bufferSize - numberEndPos); + } + else + { + // Search for the final digit or separator while obtaining the string length + int lastDigitSeenPos = 0; + + while (stringEndPos < bufferSize) { - pszHex[0] = bValue / 16; + char c = buffer[stringEndPos]; - if (pszHex[0] < 10) + if (!c) { - pszHex[0] += '0'; + break; } - else + else if (c == decimalSeparator) + { + // End the number if there's a decimal + numberEndPos = stringEndPos; + } + else if (numberEndPos <= 0 && c >= '0' && c <= '9') { - pszHex[0] -= 10; - pszHex[0] += 'A'; + // Otherwise keep track of where the last digit we've seen is + lastDigitSeenPos = stringEndPos; } - pszHex[1] = bValue % 16; + stringEndPos++; + } - if (pszHex[1] < 10) + if (numberEndPos <= 0) + { + if (lastDigitSeenPos > 0) { - pszHex[1] += '0'; + // No decimal, so use the last seen digit as the end of the number + numberEndPos = lastDigitSeenPos + 1; } else { - pszHex[1] -= 10; - pszHex[1] += 'A'; + // No digits, no decimals, therefore no change in the string + return stringEndPos; } } - }; - - size_t len = strlen(in); - if (len < 1) //must be at least 1 character to work with - { - return false; } - size_t nBytes = len; - - char* pszData = reinterpret_cast(azmalloc((nBytes * 2) + 1)); - - for (size_t ii = 0; ii < nBytes; ++ii) + if (firstGroupingSize <= 0) { - TInline::ByteToHex(&pszData[ii * 2], in[ii]); + firstGroupingSize = groupingSize; } - pszData[nBytes * 2] = 0x00; - out = pszData; - azfree(pszData); - - return true; - } + // Determine where to place the separators + int groupingSizes[] = { firstGroupingSize + 1, groupingSize }; // First group gets +1 since we begin all subsequent groups at the second digit + int groupingOffsetsToNext[] = { 1, 0 }; // We will offset from the first entry to the second, then stay at the second for remaining iterations + const int* currentGroupingSize = groupingSizes; + const int* currentGroupingOffsetToNext = groupingOffsetsToNext; + AZStd::fixed_vector separatorLocations; + int groupCounter = 0; + int digitPosition = numberEndPos - 1; - bool FromHexDump(const char* in, AZStd::string& out) - { - struct TInline + while (digitPosition >= 0) { - static unsigned char HexToByte(const char* pszHex) - { - unsigned char bHigh = 0; - unsigned char bLow = 0; + // Walk backwards in the string from the least significant digit to the most significant, demarcating consecutive groups of digits + char c = buffer[digitPosition]; - if ((pszHex[0] >= '0') && (pszHex[0] <= '9')) - { - bHigh = pszHex[0] - '0'; - } - else if ((pszHex[0] >= 'A') && (pszHex[0] <= 'F')) - { - bHigh = (pszHex[0] - 'A') + 10; - } - - bHigh = bHigh << 4; - - if ((pszHex[1] >= '0') && (pszHex[1] <= '9')) - { - bLow = pszHex[1] - '0'; - } - else if ((pszHex[1] >= 'A') && (pszHex[1] <= 'F')) + if (c >= '0' && c <= '9') + { + if (++groupCounter == *currentGroupingSize) { - bLow = (pszHex[1] - 'A') + 10; + // Demarcate a new group of digits at this location + separatorLocations.push_back(buffer + digitPosition); + currentGroupingSize += *currentGroupingOffsetToNext; + currentGroupingOffsetToNext += *currentGroupingOffsetToNext; + groupCounter = 0; } - return bHigh | bLow; + digitPosition--; + } + else + { + break; } - }; + } - size_t len = strlen(in); - if (len < 2) //must be at least 2 characters to work with + if (stringEndPos + separatorLocations.size() >= bufferSize) { - return false; + // Won't fit into buffer, so return unchanged + return stringEndPos; } - size_t nBytes = len / 2; - char* pszData = reinterpret_cast(azmalloc(nBytes + 1)); + // Insert the separators by shifting characters forward in the string, starting at the end and working backwards + const char* src = buffer + stringEndPos; + char* dest = buffer + stringEndPos + separatorLocations.size(); + auto separatorItr = separatorLocations.begin(); - for (size_t ii = 0; ii < nBytes; ++ii) + while (separatorItr != separatorLocations.end()) { - pszData[ii] = TInline::HexToByte(&in[ii * 2]); - } + while (src > *separatorItr) + { + *dest-- = *src--; + } - pszData[nBytes] = 0x00; - out = pszData; - azfree(pszData); + // Insert the separator and reduce the distance between our destination and source by one + *dest-- = digitSeparator; + ++separatorItr; + } - return true; + return (int)(stringEndPos + separatorLocations.size()); } + } - namespace NumberFormatting + namespace AssetPath + { + namespace Internal { - int GroupDigits(char* buffer, size_t bufferSize, size_t decimalPosHint, char digitSeparator, char decimalSeparator, int groupingSize, int firstGroupingSize) + AZ::u32 CalculateBranchTokenHash(AZStd::string_view engineRootPath) { - static const int MAX_SEPARATORS = 16; - - AZ_Assert(buffer, "Null string buffer"); - AZ_Assert(bufferSize > decimalPosHint, "Decimal position %lu cannot be located beyond bufferSize %lu", decimalPosHint, bufferSize); - AZ_Assert(groupingSize > 0, "Grouping size must be a positive integer"); - - int numberEndPos = 0; - int stringEndPos = 0; - - if (decimalPosHint > 0 && decimalPosHint < (bufferSize - 1) && buffer[decimalPosHint] == decimalSeparator) + // Normalize the token to prepare for CRC32 calculation + auto NormalizeEnginePath = [](const char element) -> char { - // Assume the number ends at the supplied location - numberEndPos = (int)decimalPosHint; - stringEndPos = numberEndPos + (int)strnlen(buffer + numberEndPos, bufferSize - numberEndPos); - } - else - { - // Search for the final digit or separator while obtaining the string length - int lastDigitSeenPos = 0; + // Substitute path separators with '_' and lower case + return element == AZ::IO::WindowsPathSeparator || element == AZ::IO::PosixPathSeparator + ? '_' + : static_cast(std::tolower(element)); + }; - while (stringEndPos < bufferSize) - { - char c = buffer[stringEndPos]; + // Trim off trailing path separators + engineRootPath = RStrip(engineRootPath, AZ_CORRECT_AND_WRONG_FILESYSTEM_SEPARATOR); + AZ::IO::FixedMaxPathString enginePath; + AZStd::transform( + engineRootPath.begin(), engineRootPath.end(), AZStd::back_inserter(enginePath), AZStd::move(NormalizeEnginePath)); - if (!c) - { - break; - } - else if (c == decimalSeparator) - { - // End the number if there's a decimal - numberEndPos = stringEndPos; - } - else if (numberEndPos <= 0 && c >= '0' && c <= '9') - { - // Otherwise keep track of where the last digit we've seen is - lastDigitSeenPos = stringEndPos; - } - - stringEndPos++; - } - - if (numberEndPos <= 0) - { - if (lastDigitSeenPos > 0) - { - // No decimal, so use the last seen digit as the end of the number - numberEndPos = lastDigitSeenPos + 1; - } - else - { - // No digits, no decimals, therefore no change in the string - return stringEndPos; - } - } - } - - if (firstGroupingSize <= 0) - { - firstGroupingSize = groupingSize; - } - - // Determine where to place the separators - int groupingSizes[] = { firstGroupingSize + 1, groupingSize }; // First group gets +1 since we begin all subsequent groups at the second digit - int groupingOffsetsToNext[] = { 1, 0 }; // We will offset from the first entry to the second, then stay at the second for remaining iterations - const int* currentGroupingSize = groupingSizes; - const int* currentGroupingOffsetToNext = groupingOffsetsToNext; - AZStd::fixed_vector separatorLocations; - int groupCounter = 0; - int digitPosition = numberEndPos - 1; - - while (digitPosition >= 0) - { - // Walk backwards in the string from the least significant digit to the most significant, demarcating consecutive groups of digits - char c = buffer[digitPosition]; - - if (c >= '0' && c <= '9') - { - if (++groupCounter == *currentGroupingSize) - { - // Demarcate a new group of digits at this location - separatorLocations.push_back(buffer + digitPosition); - currentGroupingSize += *currentGroupingOffsetToNext; - currentGroupingOffsetToNext += *currentGroupingOffsetToNext; - groupCounter = 0; - } - - digitPosition--; - } - else - { - break; - } - } - - if (stringEndPos + separatorLocations.size() >= bufferSize) - { - // Won't fit into buffer, so return unchanged - return stringEndPos; - } - - // Insert the separators by shifting characters forward in the string, starting at the end and working backwards - const char* src = buffer + stringEndPos; - char* dest = buffer + stringEndPos + separatorLocations.size(); - auto separatorItr = separatorLocations.begin(); - - while (separatorItr != separatorLocations.end()) - { - while (src > *separatorItr) - { - *dest-- = *src--; - } - - // Insert the separator and reduce the distance between our destination and source by one - *dest-- = digitSeparator; - ++separatorItr; - } + // Perform the CRC32 calculation + constexpr bool forceLowercase = true; + return static_cast(AZ::Crc32(enginePath.c_str(), enginePath.size(), forceLowercase)); + } + } // namespace Internal + void CalculateBranchToken(AZStd::string_view engineRootPath, AZStd::string& token) + { + token = AZStd::string::format("0x%08X", Internal::CalculateBranchTokenHash(engineRootPath)); + } + void CalculateBranchToken(AZStd::string_view engineRootPath, AZ::IO::FixedMaxPathString& token) + { + token = AZ::IO::FixedMaxPathString::format("0x%08X", Internal::CalculateBranchTokenHash(engineRootPath)); + } + } // namespace AssetPath - return (int)(stringEndPos + separatorLocations.size()); + namespace AssetDatabasePath + { + bool Normalize(AZStd::string& inout) + { + // Asset Paths uses the forward slash for the database separator + AZ::IO::Path path(AZStd::move(inout), AZ_CORRECT_DATABASE_SEPARATOR); + bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_DATABASE_SEPARATOR) || path.Native().ends_with(AZ_WRONG_DATABASE_SEPARATOR)) + && path.HasRelativePath(); + inout = AZStd::move(path.LexicallyNormal().Native()); + if (appendTrailingSlash) + { + inout.push_back(AZ_CORRECT_DATABASE_SEPARATOR); } + return IsValid(inout.c_str()); } - namespace AssetPath + bool IsValid(const char* in) { - namespace Internal + if (!in) { - AZ::u32 CalculateBranchTokenHash(AZStd::string_view engineRootPath) - { - // Normalize the token to prepare for CRC32 calculation - auto NormalizeEnginePath = [](const char element) -> char - { - // Substitute path separators with '_' and lower case - return element == AZ::IO::WindowsPathSeparator || element == AZ::IO::PosixPathSeparator - ? '_' : static_cast(std::tolower(element)); - }; - - // Trim off trailing path separators - engineRootPath = RStrip(engineRootPath, AZ_CORRECT_AND_WRONG_FILESYSTEM_SEPARATOR); - AZ::IO::FixedMaxPathString enginePath; - AZStd::transform(engineRootPath.begin(), engineRootPath.end(), - AZStd::back_inserter(enginePath), AZStd::move(NormalizeEnginePath)); - - // Perform the CRC32 calculation - constexpr bool forceLowercase = true; - return static_cast(AZ::Crc32(enginePath.c_str(), enginePath.size(), forceLowercase)); - } + return false; } - void CalculateBranchToken(AZStd::string_view engineRootPath, AZStd::string& token) + + if (!strlen(in)) { - token = AZStd::string::format("0x%08X", Internal::CalculateBranchTokenHash(engineRootPath)); + return false; } - void CalculateBranchToken(AZStd::string_view engineRootPath, AZ::IO::FixedMaxPathString& token) + + if (Find(in, AZ_DATABASE_INVALID_CHARACTERS) != AZStd::string::npos) { - token = AZ::IO::FixedMaxPathString::format("0x%08X", Internal::CalculateBranchTokenHash(engineRootPath)); + return false; } - } - namespace AssetDatabasePath - { - bool Normalize(AZStd::string& inout) + if (Find(in, AZ_WRONG_DATABASE_SEPARATOR) != AZStd::string::npos) { - // Asset Paths uses the forward slash for the database separator - AZ::IO::Path path(AZStd::move(inout), AZ_CORRECT_DATABASE_SEPARATOR); - bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_DATABASE_SEPARATOR) || path.Native().ends_with(AZ_WRONG_DATABASE_SEPARATOR)) - && path.HasRelativePath(); - inout = AZStd::move(path.LexicallyNormal().Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_DATABASE_SEPARATOR); - } - return IsValid(inout.c_str()); + return false; } - bool IsValid(const char* in) +#ifndef AZ_FILENAME_ALLOW_SPACES + if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) { - if (!in) - { - return false; - } + return false; + } +#endif // AZ_FILENAME_ALLOW_SPACES - if (!strlen(in)) - { - return false; - } + if (LastCharacter(in) == AZ_CORRECT_DATABASE_SEPARATOR) + { + return false; + } - if (Find(in, AZ_DATABASE_INVALID_CHARACTERS) != AZStd::string::npos) - { - return false; - } + return true; + } - if (Find(in, AZ_WRONG_DATABASE_SEPARATOR) != AZStd::string::npos) + bool Split(const char* in, [[maybe_unused]] AZStd::string* pDstProjectRootOut, AZStd::string* pDstDatabaseRootOut, + AZStd::string* pDstDatabasePathOut , AZStd::string* pDstFileOut, AZStd::string* pDstFileExtensionOut) + { + AZStd::string_view path{ in }; + if (path.empty()) + { + return false; + } + + AZ::IO::PathView pathView(path, AZ_CORRECT_DATABASE_SEPARATOR); + if (pDstDatabaseRootOut) + { + AZStd::string_view rootNameView = pathView.RootName().Native(); + if (rootNameView.size() > pDstDatabaseRootOut->max_size()) { return false; } - -#ifndef AZ_FILENAME_ALLOW_SPACES - if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) + *pDstDatabaseRootOut = rootNameView; + } + if (pDstDatabasePathOut) + { + AZStd::string_view rootPathView = pathView.RootPath().Native(); + AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); + if (rootPathView.size() + relPathParentView.size() > pDstDatabasePathOut->max_size()) { return false; } -#endif // AZ_FILENAME_ALLOW_SPACES - - if (LastCharacter(in) == AZ_CORRECT_DATABASE_SEPARATOR) + // Append the root directory if there is one + *pDstDatabasePathOut = rootPathView; + // Append the relative path portion of the split path excluding the filename + *pDstDatabasePathOut += relPathParentView; + } + if (pDstFileOut) + { + AZStd::string_view stemView = pathView.Stem().Native(); + if (stemView.size() > pDstFileOut->max_size()) { return false; } - - return true; + *pDstFileOut = stemView; } - - bool Split(const char* in, [[maybe_unused]] AZStd::string* pDstProjectRootOut, AZStd::string* pDstDatabaseRootOut, - AZStd::string* pDstDatabasePathOut , AZStd::string* pDstFileOut, AZStd::string* pDstFileExtensionOut) + if (pDstFileExtensionOut) { - AZStd::string_view path{ in }; - if (path.empty()) + AZStd::string_view extensionView = pathView.Extension().Native(); + if (extensionView.size() > pDstFileExtensionOut->max_size()) { return false; } + *pDstFileExtensionOut = extensionView; + } - AZ::IO::PathView pathView(path, AZ_CORRECT_DATABASE_SEPARATOR); - if (pDstDatabaseRootOut) - { - AZStd::string_view rootNameView = pathView.RootName().Native(); - if (rootNameView.size() > pDstDatabaseRootOut->max_size()) - { - return false; - } - *pDstDatabaseRootOut = rootNameView; - } - if (pDstDatabasePathOut) - { - AZStd::string_view rootPathView = pathView.RootPath().Native(); - AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); - if (rootPathView.size() + relPathParentView.size() > pDstDatabasePathOut->max_size()) - { - return false; - } - // Append the root directory if there is one - *pDstDatabasePathOut = rootPathView; - // Append the relative path portion of the split path excluding the filename - *pDstDatabasePathOut += relPathParentView; - } - if (pDstFileOut) - { - AZStd::string_view stemView = pathView.Stem().Native(); - if (stemView.size() > pDstFileOut->max_size()) - { - return false; - } - *pDstFileOut = stemView; - } - if (pDstFileExtensionOut) - { - AZStd::string_view extensionView = pathView.Extension().Native(); - if (extensionView.size() > pDstFileExtensionOut->max_size()) - { - return false; - } - *pDstFileExtensionOut = extensionView; - } + return true; + } - return true; + bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive /*= true*/, bool bNormalize /*= true*/) + { + // both paths cannot be empty + if (!pFirstPart || !pSecondPart) + { + return false; } - bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive /*= true*/, bool bNormalize /*= true*/) - { - // both paths cannot be empty - if (!pFirstPart || !pSecondPart) - { - return false; - } + AZ::IO::PathView secondPath(pSecondPart); + AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," + " this will replace the first part of the path resulting in an output of just the second part", + pSecondPart); - AZ::IO::PathView secondPath(pSecondPart); - AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," - " this will replace the first part of the path resulting in an output of just the second part", - pSecondPart); + AZ::IO::Path resultPath(pFirstPart, AZ_CORRECT_DATABASE_SEPARATOR); + resultPath /= secondPath; + out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); + return true; + } + } //namespace AssetDatabasePath - AZ::IO::Path resultPath(pFirstPart, AZ_CORRECT_DATABASE_SEPARATOR); - resultPath /= secondPath; - out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); - return true; + namespace Root + { + bool Normalize(AZStd::string& inout) + { + AZ::IO::Path path(AZStd::move(inout)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path + bool appendTrailingSlash = path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) + { + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append a trailing separator for Root path normalization } - } //namespace AssetDatabasePath + return IsValid(inout.c_str()); + } - namespace Root + bool IsValid(const char* in) { - bool Normalize(AZStd::string& inout) + if (!in) { - AZ::IO::Path path(AZStd::move(inout)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path - bool appendTrailingSlash = path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append a trailing separator for Root path normalization - } - return IsValid(inout.c_str()); + return false; } - bool IsValid(const char* in) + if (!strlen(in)) { - if (!in) - { - return false; - } + return false; + } - if (!strlen(in)) - { - return false; - } + if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) + { + return false; + } - if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) - { - return false; - } + if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) + { + return false; + } - if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) - { - return false; - } +#ifndef AZ_FILENAME_ALLOW_SPACES + if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) + { + return false; + } +#endif // AZ_FILENAME_ALLOW_SPACES - #ifndef AZ_FILENAME_ALLOW_SPACES - if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) - { - return false; - } - #endif // AZ_FILENAME_ALLOW_SPACES + AZ::IO::PathView pathView(in); + if (!pathView.HasRootPath()) + { + return false; + } - AZ::IO::PathView pathView(in); - if (!pathView.HasRootPath()) - { - return false; - } + if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) + { + return false; + } - if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) - { - return false; - } + return true; + } + }//namespace Root - return true; + namespace RelativePath + { + bool Normalize(AZStd::string& inout) + { + AZ::IO::Path path(AZStd::move(inout)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path + bool appendTrailingSlash = path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) + { + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append trailing separator for Relative path normalization if it it is not empty } - }//namespace Root + return IsValid(inout.c_str()); + } - namespace RelativePath + bool IsValid(const char* in) { - bool Normalize(AZStd::string& inout) + if (!in) { - AZ::IO::Path path(AZStd::move(inout)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path - bool appendTrailingSlash = path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); // Append trailing separator for Relative path normalization if it it is not empty - } - return IsValid(inout.c_str()); + return false; } - bool IsValid(const char* in) + if (!strlen(in)) { - if (!in) - { - return false; - } + return true; + } - if (!strlen(in)) - { - return true; - } + if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) + { + return false; + } - if (Find(in, AZ_FILESYSTEM_INVALID_CHARACTERS) != AZStd::string::npos) - { - return false; - } + if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) + { + return false; + } - if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) - { - return false; - } +#ifndef AZ_FILENAME_ALLOW_SPACES + if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) + { + return false; + } +#endif // AZ_FILENAME_ALLOW_SPACES - #ifndef AZ_FILENAME_ALLOW_SPACES - if (Find(in, AZ_SPACE_CHARACTERS) != AZStd::string::npos) - { - return false; - } - #endif // AZ_FILENAME_ALLOW_SPACES + if (Path::HasDrive(in)) + { + return false; + } - if (Path::HasDrive(in)) - { - return false; - } + if (FirstCharacter(in) == AZ_CORRECT_FILESYSTEM_SEPARATOR) + { + return false; + } - if (FirstCharacter(in) == AZ_CORRECT_FILESYSTEM_SEPARATOR) - { - return false; - } + if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) + { + return false; + } - if (LastCharacter(in) != AZ_CORRECT_FILESYSTEM_SEPARATOR) - { - return false; - } + return true; + } + }//namespace RelativePath - return true; + namespace Path + { + bool Normalize(AZStd::string& inout) + { + AZ::IO::Path path(AZStd::move(inout)); + bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path and addition to ending with a path separator before + appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) + { + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); } - }//namespace RelativePath + return IsValid(inout.c_str()); + } - namespace Path + bool Normalize(FixedString& inout) { - bool Normalize(AZStd::string& inout) + AZ::IO::FixedMaxPath path(AZStd::move(inout)); + bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); + path = path.LexicallyNormal(); + // After normalization check if the path contains a relative path and addition to ending with a path separator before + appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); + inout = AZStd::move(path.Native()); + if (appendTrailingSlash) { - AZ::IO::Path path(AZStd::move(inout)); - bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path and addition to ending with a path separator before - appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - return IsValid(inout.c_str()); + inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); } + return IsValid(inout.c_str()); + } - bool Normalize(FixedString& inout) + bool IsValid(const char* in, bool bHasDrive /*= false*/, bool bHasExtension /*= false*/, AZStd::string* errors /*= nullptr*/) + { + //if they gave us a error reporting string empty it. + if (errors) { - AZ::IO::FixedMaxPath path(AZStd::move(inout)); - bool appendTrailingSlash = (path.Native().ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR) || path.Native().ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)); - path = path.LexicallyNormal(); - // After normalization check if the path contains a relative path and addition to ending with a path separator before - appendTrailingSlash = appendTrailingSlash && path.HasRelativePath(); - inout = AZStd::move(path.Native()); - if (appendTrailingSlash) - { - inout.push_back(AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - return IsValid(inout.c_str()); + errors->clear(); } - bool IsValid(const char* in, bool bHasDrive /*= false*/, bool bHasExtension /*= false*/, AZStd::string* errors /*= nullptr*/) + //empty is not a valid path + if (!in) { - //if they gave us a error reporting string empty it. if (errors) { - errors->clear(); + *errors += "The path is Empty."; } + return false; + } - //empty is not a valid path - if (!in) + //empty is not a valid path + size_t length = strlen(in); + if (!length) + { + if (errors) { - if (errors) - { - *errors += "The path is Empty."; - } - return false; + *errors += "The path is Empty."; } + return false; + } - //empty is not a valid path - size_t length = strlen(in); - if (!length) + //invalid characters + const char* inEnd = in + length; + const char* invalidCharactersBegin = AZ_FILESYSTEM_INVALID_CHARACTERS; + const char* invalidCharactersEnd = invalidCharactersBegin + AZ_ARRAY_SIZE(AZ_FILESYSTEM_INVALID_CHARACTERS); + if (AZStd::find_first_of(in, inEnd, invalidCharactersBegin, invalidCharactersEnd) != inEnd) + { + if (errors) { - if (errors) - { - *errors += "The path is Empty."; - } - return false; + *errors += "The path has invalid characters."; } + return false; + } - //invalid characters - const char* inEnd = in + length; - const char* invalidCharactersBegin = AZ_FILESYSTEM_INVALID_CHARACTERS; - const char* invalidCharactersEnd = invalidCharactersBegin + AZ_ARRAY_SIZE(AZ_FILESYSTEM_INVALID_CHARACTERS); - if (AZStd::find_first_of(in, inEnd, invalidCharactersBegin, invalidCharactersEnd) != inEnd) + //invalid characters + if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) + { + if (errors) { - if (errors) - { - *errors += "The path has invalid characters."; - } - return false; + *errors += "The path has wrong separator."; } + return false; + } - //invalid characters - if (Find(in, AZ_WRONG_FILESYSTEM_SEPARATOR) != AZStd::string::npos) +#ifndef AZ_FILENAME_ALLOW_SPACES + const char* spaceCharactersBegin = AZ_SPACE_CHARACTERS; + const char* spaceCharactersEnd = spaceCharactersBegin + AZ_ARRAY_SIZE(AZ_SPACE_CHARACTERS); + if (AZStd::find_first_of(in, inEnd, spaceCharactersBegin, spaceCharactersEnd) != inEnd) + { + if (errors) { - if (errors) - { - *errors += "The path has wrong separator."; - } - return false; + *errors += "The path has space characters."; } + return false; + } +#endif // AZ_FILENAME_ALLOW_SPACES - #ifndef AZ_FILENAME_ALLOW_SPACES - const char* spaceCharactersBegin = AZ_SPACE_CHARACTERS; - const char* spaceCharactersEnd = spaceCharactersBegin + AZ_ARRAY_SIZE(AZ_SPACE_CHARACTERS); - if (AZStd::find_first_of(in, inEnd, spaceCharactersBegin, spaceCharactersEnd) != inEnd) + //does it have a drive if specified + if (bHasDrive && !HasDrive(in)) + { + if (errors) { - if (errors) - { - *errors += "The path has space characters."; - } - return false; + *errors += "The path should have a drive. The path ["; + *errors += in; + *errors += "] is invalid."; } - #endif // AZ_FILENAME_ALLOW_SPACES + return false; + } - //does it have a drive if specified - if (bHasDrive && !HasDrive(in)) + //does it have and extension if specified + if (bHasExtension && !HasExtension(in)) + { + if (errors) { - if (errors) - { - *errors += "The path should have a drive. The path ["; - *errors += in; - *errors += "] is invalid."; - } - return false; + *errors += "The path should have the a file extension. The path ["; + *errors += in; + *errors += "] is invalid."; } + return false; + } - //does it have and extension if specified - if (bHasExtension && !HasExtension(in)) + //start at the beginning and walk down the characters of the path + const char* elementStart = in; + const char* walk = elementStart; + while (*walk) + { + if (*walk == AZ_CORRECT_FILESYSTEM_SEPARATOR) //is this the correct separator { - if (errors) - { - *errors += "The path should have the a file extension. The path ["; - *errors += in; - *errors += "] is invalid."; - } - return false; + elementStart = walk; } - - //start at the beginning and walk down the characters of the path - const char* elementStart = in; - const char* walk = elementStart; - while (*walk) +#if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS + else if (*walk == AZ_FILESYSTEM_DRIVE_SEPARATOR) //is this the drive separator { - if (*walk == AZ_CORRECT_FILESYSTEM_SEPARATOR) //is this the correct separator - { - elementStart = walk; - } - #if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS - else if (*walk == AZ_FILESYSTEM_DRIVE_SEPARATOR) //is this the drive separator - { - //A AZ_FILESYSTEM_DRIVE_SEPARATOR character con only occur in the first - //component of a valid path. If the elementStart is not GetBufferPtr() - //then we have past the first component - if (elementStart != in) - { - if (errors) - { - *errors += "There is a stray AZ_FILESYSTEM_DRIVE_SEPARATOR = "; - *errors += AZ_FILESYSTEM_DRIVE_SEPARATOR; - *errors += " found after the first component. The path ["; - *errors += in; - *errors += "] is invalid."; - } - return false; - } - } - #endif - #ifndef AZ_FILENAME_ALLOW_SPACES - else if (*walk == ' ') //is this a space + //A AZ_FILESYSTEM_DRIVE_SEPARATOR character con only occur in the first + //component of a valid path. If the elementStart is not GetBufferPtr() + //then we have past the first component + if (elementStart != in) { if (errors) { - *errors += "The component ["; - for (const char* c = elementStart + 1; c != walk; ++c) - { - *errors += *c; - } - *errors += "] has a SPACE character. The path ["; + *errors += "There is a stray AZ_FILESYSTEM_DRIVE_SEPARATOR = "; + *errors += AZ_FILESYSTEM_DRIVE_SEPARATOR; + *errors += " found after the first component. The path ["; *errors += in; *errors += "] is invalid."; } return false; } - #endif - - ++walk; } - - #if !AZ_TRAIT_OS_ALLOW_UNLIMITED_PATH_COMPONENT_LENGTH - //is this full path longer than AZ::IO::MaxPathLength (The longest a path with all components can possibly be)? - if (walk - in > AZ::IO::MaxPathLength) +#endif +#ifndef AZ_FILENAME_ALLOW_SPACES + else if (*walk == ' ') //is this a space { - if (errors != 0) + if (errors) { - *errors += "The path ["; + *errors += "The component ["; + for (const char* c = elementStart + 1; c != walk; ++c) + { + *errors += *c; + } + *errors += "] has a SPACE character. The path ["; *errors += in; - *errors += "] is over the AZ::IO::MaxPathLength = "; - char buf[64]; - _itoa_s(AZ::IO::MaxPathLength, buf, 10); - *errors += buf; - *errors += " characters total length limit."; + *errors += "] is invalid."; } return false; } - #endif +#endif - return true; + ++walk; } - bool ConstructFull(const char* pRootPath, const char* pFileName, AZStd::string& out, bool bNormalize /* = false*/) +#if !AZ_TRAIT_OS_ALLOW_UNLIMITED_PATH_COMPONENT_LENGTH + //is this full path longer than AZ::IO::MaxPathLength (The longest a path with all components can possibly be)? + if (walk - in > AZ::IO::MaxPathLength) { - if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() - || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) + if (errors != 0) { - return false; + *errors += "The path ["; + *errors += in; + *errors += "] is over the AZ::IO::MaxPathLength = "; + char buf[64]; + _itoa_s(AZ::IO::MaxPathLength, buf, 10); + *errors += buf; + *errors += " characters total length limit."; } - AZ::IO::Path path(pRootPath); - path /= pFileName; - if (bNormalize) - { - out = AZStd::move(path.LexicallyNormal().Native()); - } - else - { - out = AZStd::move(path.Native()); - } - return IsValid(out.c_str()); + return false; } +#endif + + return true; + } - bool ConstructFull(const char* pRootPath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) + bool ConstructFull(const char* pRootPath, const char* pFileName, AZStd::string& out, bool bNormalize /* = false*/) + { + if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() + || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) { - if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() - || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) - { - return false; - } - AZ::IO::Path path(pRootPath); - path /= pFileName; - if (pFileExtension) - { - path.ReplaceExtension(pFileExtension); - } - if (bNormalize) - { - out = AZStd::move(path.LexicallyNormal().Native()); - } - else - { - out = AZStd::move(path.Native()); - } - return IsValid(out.c_str()); + return false; + } + AZ::IO::Path path(pRootPath); + path /= pFileName; + if (bNormalize) + { + out = AZStd::move(path.LexicallyNormal().Native()); + } + else + { + out = AZStd::move(path.Native()); + } + return IsValid(out.c_str()); + } + + bool ConstructFull(const char* pRootPath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) + { + if (!pRootPath || AZ::IO::PathView(pRootPath).IsRelative() + || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) + { + return false; + } + AZ::IO::Path path(pRootPath); + path /= pFileName; + if (pFileExtension) + { + path.ReplaceExtension(pFileExtension); + } + if (bNormalize) + { + out = AZStd::move(path.LexicallyNormal().Native()); + } + else + { + out = AZStd::move(path.Native()); + } + return IsValid(out.c_str()); + } + + bool ConstructFull(const char* pRoot, const char* pRelativePath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) + { + if (!pRoot || AZ::IO::PathView(pRoot).IsRelative() + || !pRelativePath || AZ::IO::PathView(pRelativePath).IsAbsolute() + || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) + { + return false; + } + AZ::IO::Path path(pRoot); + path /= pRelativePath; + path /= pFileName; + if (pFileExtension) + { + path.ReplaceExtension(pFileExtension); + } + if (bNormalize) + { + out = AZStd::move(path.LexicallyNormal().Native()); + } + else + { + out = AZStd::move(path.Native()); } + return IsValid(out.c_str()); + } - bool ConstructFull(const char* pRoot, const char* pRelativePath, const char* pFileName, const char* pFileExtension, AZStd::string& out, bool bNormalize /* = false*/) + bool Split(const char* in, AZStd::string* pDstDrive, AZStd::string* pDstPath, AZStd::string* pDstName, AZStd::string* pDstExtension) + { + AZStd::string_view path{ in }; + if (path.empty()) { - if (!pRoot || AZ::IO::PathView(pRoot).IsRelative() - || !pRelativePath || AZ::IO::PathView(pRelativePath).IsAbsolute() - || !pFileName || AZ::IO::PathView(pFileName).IsAbsolute()) + return false; + } + + AZ::IO::PathView pathView(path); + if (pDstDrive) + { + AZStd::string_view rootNameView = pathView.RootName().Native(); + if (rootNameView.size() > pDstDrive->max_size()) { return false; } - AZ::IO::Path path(pRoot); - path /= pRelativePath; - path /= pFileName; - if (pFileExtension) - { - path.ReplaceExtension(pFileExtension); - } - if (bNormalize) + *pDstDrive = rootNameView; + } + if (pDstPath) + { + AZStd::string_view rootDirectoryView = pathView.RootDirectory().Native(); + AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); + if (rootDirectoryView.size() + relPathParentView.size() > pDstPath->max_size()) { - out = AZStd::move(path.LexicallyNormal().Native()); + return false; } - else + // Append the root directory if there is one + *pDstPath = rootDirectoryView; + // Append the relative path portion of the split path excluding the filename + *pDstPath += relPathParentView; + } + if (pDstName) + { + AZStd::string_view stemView = pathView.Stem().Native(); + if (stemView.size() > pDstName->max_size()) { - out = AZStd::move(path.Native()); + return false; } - return IsValid(out.c_str()); + *pDstName = stemView; } - - bool Split(const char* in, AZStd::string* pDstDrive, AZStd::string* pDstPath, AZStd::string* pDstName, AZStd::string* pDstExtension) + if (pDstExtension) { - AZStd::string_view path{ in }; - if (path.empty()) + AZStd::string_view extensionView = pathView.Extension().Native(); + if (extensionView.size() > pDstExtension->max_size()) { return false; } + *pDstExtension = extensionView; + } - AZ::IO::PathView pathView(path); - if (pDstDrive) - { - AZStd::string_view rootNameView = pathView.RootName().Native(); - if (rootNameView.size() > pDstDrive->max_size()) - { - return false; - } - *pDstDrive = rootNameView; - } - if (pDstPath) - { - AZStd::string_view rootDirectoryView = pathView.RootDirectory().Native(); - AZStd::string_view relPathParentView = pathView.ParentPath().RelativePath().Native(); - if (rootDirectoryView.size() + relPathParentView.size() > pDstPath->max_size()) - { - return false; - } - // Append the root directory if there is one - *pDstPath = rootDirectoryView; - // Append the relative path portion of the split path excluding the filename - *pDstPath += relPathParentView; - } - if (pDstName) - { - AZStd::string_view stemView = pathView.Stem().Native(); - if (stemView.size() > pDstName->max_size()) - { - return false; - } - *pDstName = stemView; - } - if (pDstExtension) - { - AZStd::string_view extensionView = pathView.Extension().Native(); - if (extensionView.size() > pDstExtension->max_size()) - { - return false; - } - *pDstExtension = extensionView; - } + return true; + } - return true; + bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) + { + if (!pFirstPart || !pSecondPart) + { + return false; } - bool Join(const char* pFirstPart, const char* pSecondPart, AZStd::string& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) + AZ::IO::PathView secondPath(pSecondPart); + AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," + " this will replace the first part of the path resulting in an output of just the second part", + pSecondPart); + + AZ::IO::Path resultPath(pFirstPart); + resultPath /= secondPath; + out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); + return true; + } + + bool Join(const char* pFirstPart, const char* pSecondPart, FixedString& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) + { + if (!pFirstPart || !pSecondPart) { - if (!pFirstPart || !pSecondPart) - { - return false; - } + return false; + } - AZ::IO::PathView secondPath(pSecondPart); - AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," - " this will replace the first part of the path resulting in an output of just the second part", - pSecondPart); + AZ::IO::PathView secondPath(pSecondPart); + AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," + " this will replace the first part of the path resulting in an output of just the second part", + pSecondPart); - AZ::IO::Path resultPath(pFirstPart); - resultPath /= secondPath; - out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); - return true; + AZ::IO::FixedMaxPath resultPath(pFirstPart); + resultPath /= secondPath; + out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); + return true; + } + + bool HasDrive(const char* in, bool bCheckAllFileSystemFormats /*= false*/) + { + // no drive if empty + if (!in || in[0] == '\0') + { + return false; } + AZ::IO::PathView pathView(in); + return pathView.HasRootName() || (bCheckAllFileSystemFormats && pathView.HasRootDirectory()); + } - bool Join(const char* pFirstPart, const char* pSecondPart, FixedString& out, [[maybe_unused]] bool bCaseInsensitive, bool bNormalize) + bool HasExtension(const char* in) + { + //it doesn't have an extension if it's empty + if (!in || in[0] == '\0') { - if (!pFirstPart || !pSecondPart) - { - return false; - } + return false; + } + + return AZ::IO::PathView(in).HasExtension(); + } + + bool IsExtension(const char* in, const char* pExtension, bool bCaseInsenitive /*= false*/) + { + //it doesn't have an extension if it's empty + if (!in || in[0] == '\0' || !pExtension || pExtension[0] == '\0') + { + return false; + } + + AZStd::string_view pathExtension = AZ::IO::PathView(in).Extension().Native(); + if (pathExtension.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) + { + pathExtension.remove_prefix(1); + } + AZStd::string_view extensionView(pExtension); + if (extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) + { + extensionView.remove_prefix(1); + } + + return AZStd::equal(pathExtension.begin(), pathExtension.end(), extensionView.begin(), extensionView.end(), + [bCaseInsenitive](const char lhs, const char rhs) + { + return !bCaseInsenitive ? lhs == rhs : tolower(lhs) == tolower(rhs); + }); + } + + bool IsRelative(const char* in) + { + //not relative if empty + if (!in || in[0] == '\0') + { + return false; + } + + return AZ::IO::PathView(in).IsRelative(); + } + + bool StripDrive(AZStd::string& inout) + { + AZ::IO::PathView pathView(inout); + AZ::IO::PathView rootNameView(pathView.RootName()); + if (!rootNameView.empty()) + { + inout.replace(0, rootNameView.Native().size(), ""); + return true; + } + return false; + } - AZ::IO::PathView secondPath(pSecondPart); - AZ_Warning("StringFunc", secondPath.IsRelative(), "The second join parameter %s is an absolute path," - " this will replace the first part of the path resulting in an output of just the second part", - pSecondPart); + void StripPath(AZStd::string& inout) + { + inout = AZ::IO::PathView(inout).Filename().Native(); + } - AZ::IO::FixedMaxPath resultPath(pFirstPart); - resultPath /= secondPath; - out = bNormalize ? AZStd::move(resultPath.LexicallyNormal().Native()) : AZStd::move(resultPath.Native()); - return true; - } + void StripFullName(AZStd::string& inout) + { + inout = AZ::IO::Path(AZStd::move(inout)).RemoveFilename().Native(); + } + + void StripExtension(AZStd::string& inout) + { + AZ::IO::Path path(AZStd::move(inout)); + path.ReplaceExtension(); + inout = AZStd::move(path.Native()); + } - bool HasDrive(const char* in, bool bCheckAllFileSystemFormats /*= false*/) + bool StripComponent(AZStd::string& inout, bool bLastComponent /* = false*/) + { + AZ::IO::PathView pathView(inout); + auto pathBeginIter = pathView.begin(); + auto pathEndIter = pathView.end(); + if (pathBeginIter == pathEndIter) { - // no drive if empty - if (!in || in[0] == '\0') - { - return false; - } - AZ::IO::PathView pathView(in); - return pathView.HasRootName() || (bCheckAllFileSystemFormats && pathView.HasRootDirectory()); + return false; } - - bool HasExtension(const char* in) + AZ::IO::Path resultPath; + if (!bLastComponent) { - //it doesn't have an extension if it's empty - if (!in || in[0] == '\0') - { - return false; - } - - return AZ::IO::PathView(in).HasExtension(); + // Removing leading path component + AZStd::advance(pathBeginIter, 1); } - - bool IsExtension(const char* in, const char* pExtension, bool bCaseInsenitive /*= false*/) + else { - //it doesn't have an extension if it's empty - if (!in || in[0] == '\0' || !pExtension || pExtension[0] == '\0') - { - return false; - } - - AZStd::string_view pathExtension = AZ::IO::PathView(in).Extension().Native(); - if (pathExtension.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) - { - pathExtension.remove_prefix(1); - } - AZStd::string_view extensionView(pExtension); - if (extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) - { - extensionView.remove_prefix(1); - } - - return AZStd::equal(pathExtension.begin(), pathExtension.end(), extensionView.begin(), extensionView.end(), - [bCaseInsenitive](const char lhs, const char rhs) - { - return !bCaseInsenitive ? lhs == rhs : tolower(lhs) == tolower(rhs); - }); + // Remove trailing path component + AZStd::advance(pathEndIter, -1); } - - bool IsRelative(const char* in) + for (; pathBeginIter != pathEndIter; ++pathBeginIter) { - //not relative if empty - if (!in || in[0] == '\0') - { - return false; - } - - return AZ::IO::PathView(in).IsRelative(); + resultPath /= *pathBeginIter; } - - bool StripDrive(AZStd::string& inout) + if (resultPath.empty()) { - AZ::IO::PathView pathView(inout); - AZ::IO::PathView rootNameView(pathView.RootName()); - if (!rootNameView.empty()) - { - inout.replace(0, rootNameView.Native().size(), ""); - return true; - } return false; } + inout = AZStd::move(resultPath.Native()); + return true; + } - void StripPath(AZStd::string& inout) + bool GetDrive(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') { - inout = AZ::IO::PathView(inout).Filename().Native(); + return false; } - void StripFullName(AZStd::string& inout) + out = AZ::IO::PathView(in).RootName().Native(); + return !out.empty(); + } + + AZStd::optional GetParentDir(AZStd::string_view path) + { + if (path.empty()) { - inout = AZ::IO::Path(AZStd::move(inout)).RemoveFilename().Native(); + return {}; } - void StripExtension(AZStd::string& inout) + AZStd::string_view parentDir = AZ::IO::PathView(path).ParentPath().Native(); + return !parentDir.empty() ? AZStd::make_optional(parentDir) : AZStd::nullopt; + } + + bool GetFullPath(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') { - AZ::IO::Path path(AZStd::move(inout)); - path.ReplaceExtension(); - inout = AZStd::move(path.Native()); + return false; } - bool StripComponent(AZStd::string& inout, bool bLastComponent /* = false*/) + out = AZ::IO::PathView(in).ParentPath().Native(); + return !out.empty(); + } + + bool GetFolderPath(const char* in, AZStd::string& out) + { + return GetFullPath(in, out); + } + + bool GetFolder(const char* in, AZStd::string& out, bool bFirst /* = false*/) + { + if (!in || in[0] == '\0') { - AZ::IO::PathView pathView(inout); - auto pathBeginIter = pathView.begin(); - auto pathEndIter = pathView.end(); - if (pathBeginIter == pathEndIter) - { - return false; - } - AZ::IO::Path resultPath; - if (!bLastComponent) - { - // Removing leading path component - AZStd::advance(pathBeginIter, 1); - } - else - { - // Remove trailing path component - AZStd::advance(pathEndIter, -1); - } - for (; pathBeginIter != pathEndIter; ++pathBeginIter) - { - resultPath /= *pathBeginIter; - } - if (resultPath.empty()) - { - return false; - } - inout = AZStd::move(resultPath.Native()); - return true; + return false; } - bool GetDrive(const char* in, AZStd::string& out) + if (!bFirst) { - if (!in || in[0] == '\0') - { - return false; - } - - out = AZ::IO::PathView(in).RootName().Native(); + out = AZ::IO::PathView(in).ParentPath().Filename().Native(); return !out.empty(); } - - AZStd::optional GetParentDir(AZStd::string_view path) + else { - if (path.empty()) - { - return {}; - } - - AZStd::string_view parentDir = AZ::IO::PathView(path).ParentPath().Native(); - return !parentDir.empty() ? AZStd::make_optional(parentDir) : AZStd::nullopt; + AZStd::string_view relativePath = AZ::IO::PathView(in).RelativePath().Native(); + size_t nextSeparator = relativePath.find_first_of(AZ_CORRECT_FILESYSTEM_SEPARATOR); + out = nextSeparator != AZStd::string_view::npos ? relativePath.substr(0, nextSeparator) : relativePath; + return !out.empty(); } + } - bool GetFullPath(const char* in, AZStd::string& out) + bool GetFullFileName(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') { - if (!in || in[0] == '\0') - { - return false; - } - - out = AZ::IO::PathView(in).ParentPath().Native(); - return !out.empty(); + return false; } - bool GetFolderPath(const char* in, AZStd::string& out) + out = AZ::IO::PathView(in).Filename().Native(); + return !out.empty(); + } + + bool GetFileName(const char* in, AZStd::string& out) + { + if (!in || in[0] == '\0') { - return GetFullPath(in, out); + return false; } - bool GetFolder(const char* in, AZStd::string& out, bool bFirst /* = false*/) - { - if (!in || in[0] == '\0') - { - return false; - } + out = AZ::IO::PathView(in).Stem().Native(); + return !out.empty(); + } - if (!bFirst) - { - out = AZ::IO::PathView(in).ParentPath().Filename().Native(); - return !out.empty(); - } - else - { - AZStd::string_view relativePath = AZ::IO::PathView(in).RelativePath().Native(); - size_t nextSeparator = relativePath.find_first_of(AZ_CORRECT_FILESYSTEM_SEPARATOR); - out = nextSeparator != AZStd::string_view::npos ? relativePath.substr(0, nextSeparator) : relativePath; - return !out.empty(); - } + bool GetExtension(const char* in, AZStd::string& out, bool includeDot) + { + if (!in || in[0] == '\0') + { + return false; } - bool GetFullFileName(const char* in, AZStd::string& out) + AZStd::string_view extensionView = AZ::IO::PathView(in).Extension().Native(); + // PathView returns extensions with the character, so remove the + // if it is not included + if (!includeDot && extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) { - if (!in || in[0] == '\0') - { - return false; - } - - out = AZ::IO::PathView(in).Filename().Native(); - return !out.empty(); + extensionView.remove_prefix(1); } + out = extensionView; + return !out.empty(); + } - bool GetFileName(const char* in, AZStd::string& out) + void ReplaceFullName(AZStd::string& inout, const char* pFileName /* = nullptr*/, const char* pFileExtension /* = nullptr*/) + { + //strip the full file name if it has one + AZ::IO::Path path(AZStd::move(inout)); + path.RemoveFilename(); + if (pFileName) { - if (!in || in[0] == '\0') - { - return false; - } - - out = AZ::IO::PathView(in).Stem().Native(); - return !out.empty(); + path /= pFileName; } - - bool GetExtension(const char* in, AZStd::string& out, bool includeDot) + if (pFileExtension) { - if (!in || in[0] == '\0') - { - return false; - } - - AZStd::string_view extensionView = AZ::IO::PathView(in).Extension().Native(); - // PathView returns extensions with the character, so remove the - // if it is not included - if (!includeDot && extensionView.starts_with(AZ_FILESYSTEM_EXTENSION_SEPARATOR)) - { - extensionView.remove_prefix(1); - } - out = extensionView; - return !out.empty(); + path.ReplaceExtension(pFileExtension); } + inout = AZStd::move(path.Native()); + } - void ReplaceFullName(AZStd::string& inout, const char* pFileName /* = nullptr*/, const char* pFileExtension /* = nullptr*/) + void ReplaceExtension(AZStd::string& inout, const char* newExtension /* = nullptr*/) + { + //treat this as a strip + if (!newExtension || newExtension[0] == '\0') { - //strip the full file name if it has one - AZ::IO::Path path(AZStd::move(inout)); - path.RemoveFilename(); - if (pFileName) - { - path /= pFileName; - } - if (pFileExtension) - { - path.ReplaceExtension(pFileExtension); - } - inout = AZStd::move(path.Native()); + return; } + AZ::IO::Path path(AZStd::move(inout)); + path.ReplaceExtension(newExtension); + inout = AZStd::move(path.Native()); + } - void ReplaceExtension(AZStd::string& inout, const char* newExtension /* = nullptr*/) + AZStd::string& AppendSeparator(AZStd::string& inout) + { + if (inout.ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)) { - //treat this as a strip - if (!newExtension || newExtension[0] == '\0') - { - return; - } - AZ::IO::Path path(AZStd::move(inout)); - path.ReplaceExtension(newExtension); - inout = AZStd::move(path.Native()); + inout.replace(inout.end() - 1, inout.end(), 1, AZ_CORRECT_FILESYSTEM_SEPARATOR); } - - AZStd::string& AppendSeparator(AZStd::string& inout) + else if (!inout.ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR)) { - if (inout.ends_with(AZ_WRONG_FILESYSTEM_SEPARATOR)) - { - inout.replace(inout.end() - 1, inout.end(), 1, AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - else if (!inout.ends_with(AZ_CORRECT_FILESYSTEM_SEPARATOR)) - { - inout.append(1, AZ_CORRECT_FILESYSTEM_SEPARATOR); - } - return inout; + inout.append(1, AZ_CORRECT_FILESYSTEM_SEPARATOR); } - } // namespace Path + return inout; + } + } // namespace Path - namespace Json + namespace Json + { + /* + According to http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf: + A string is a sequence of Unicode code points wrapped with quotation marks (U+0022). All characters may be + placed within the quotation marks except for the characters that must be escaped: quotation mark (U+0022), + reverse solidus (U+005C), and the control characters U+0000 to U+001F. + */ + AZStd::string& ToEscapedString(AZStd::string& inout) { - /* - According to http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf: - A string is a sequence of Unicode code points wrapped with quotation marks (U+0022). All characters may be - placed within the quotation marks except for the characters that must be escaped: quotation mark (U+0022), - reverse solidus (U+005C), and the control characters U+0000 to U+001F. - */ - AZStd::string& ToEscapedString(AZStd::string& inout) + size_t strSize = inout.size(); + + for (size_t i = 0; i < strSize; ++i) { - size_t strSize = inout.size(); + char character = inout[i]; - for (size_t i = 0; i < strSize; ++i) + // defaults to 1 if it hits any cases except default + size_t jumpChar = 1; + switch (character) { - char character = inout[i]; - - // defaults to 1 if it hits any cases except default - size_t jumpChar = 1; - switch (character) - { - case '"': - inout.insert(i, "\\"); - break; + case '"': + inout.insert(i, "\\"); + break; - case '\\': - inout.insert(i, "\\"); - break; + case '\\': + inout.insert(i, "\\"); + break; - case '/': - inout.insert(i, "\\"); - break; + case '/': + inout.insert(i, "\\"); + break; - case '\b': - inout.replace(i, i + 1, "\\b"); - break; + case '\b': + inout.replace(i, i + 1, "\\b"); + break; - case '\f': - inout.replace(i, i + 1, "\\f"); - break; + case '\f': + inout.replace(i, i + 1, "\\f"); + break; - case '\n': - inout.replace(i, i + 1, "\\n"); - break; + case '\n': + inout.replace(i, i + 1, "\\n"); + break; - case '\r': - inout.replace(i, i + 1, "\\r"); - break; + case '\r': + inout.replace(i, i + 1, "\\r"); + break; - case '\t': - inout.replace(i, i + 1, "\\t"); - break; + case '\t': + inout.replace(i, i + 1, "\\t"); + break; - default: - /* - Control characters U+0000 to U+001F may be represented as a six - character sequence : a reverse solidus, - followed by the lowercase letter u, followed by four hexadecimal digits that encode the code point. - */ - if (character >= '\x0000' && character <= '\x001f') - { - // jumping "\uXXXX" characters - jumpChar = 6; + default: + /* + Control characters U+0000 to U+001F may be represented as a six - character sequence : a reverse solidus, + followed by the lowercase letter u, followed by four hexadecimal digits that encode the code point. + */ + if (character >= '\x0000' && character <= '\x001f') + { + // jumping "\uXXXX" characters + jumpChar = 6; - AZStd::string hexStr = AZStd::string::format("\\u%04x", static_cast(character)); - inout.replace(i, i + 1, hexStr); - } - else - { - jumpChar = 0; - } + AZStd::string hexStr = AZStd::string::format("\\u%04x", static_cast(character)); + inout.replace(i, i + 1, hexStr); + } + else + { + jumpChar = 0; } - - i += jumpChar; - strSize += jumpChar; } - return inout; + i += jumpChar; + strSize += jumpChar; } - } // namespace Json - namespace Base64 + return inout; + } + } // namespace Json + + namespace Base64 + { + static const char base64pad = '='; + + static const char c_base64Table[] = { - static const char base64pad = '='; + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "abcdefghijklmnopqrstuvwxyz" + "0123456789+/" + }; - static const char c_base64Table[] = - { - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/" - }; + static const AZ::u8 c_inverseBase64Table[] = + { + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, + 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, + 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff + }; - static const AZ::u8 c_inverseBase64Table[] = - { - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x3e, 0xff, 0xff, 0xff, 0x3f, - 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, - 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 0x28, - 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, 0x30, 0x31, 0x32, 0x33, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, - 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff - }; + bool IsValidEncodedChar(const char encodedChar) + { + return c_inverseBase64Table[static_cast(encodedChar)] != 0xff; + } - bool IsValidEncodedChar(const char encodedChar) - { - return c_inverseBase64Table[static_cast(encodedChar)] != 0xff; - } + AZStd::string Encode(const AZ::u8* in, const size_t size) + { + /* + figure retrieved from the Base encoding rfc https://tools.ietf.org/html/rfc4648 + +--first octet--+-second octet--+--third octet--+ + |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0| + +-----------+---+-------+-------+---+-----------+ + |5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0| + +--1.index--+--2.index--+--3.index--+--4.index--+ + */ + AZStd::string result; - AZStd::string Encode(const AZ::u8* in, const size_t size) + const size_t remainder = size % 3; + const size_t alignEndSize = size - remainder; + const AZ::u8* encodeBuf = in; + size_t encodeIndex = 0; + for (; encodeIndex < alignEndSize; encodeIndex += 3) { - /* - figure retrieved from the Base encoding rfc https://tools.ietf.org/html/rfc4648 - +--first octet--+-second octet--+--third octet--+ - |7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0|7 6 5 4 3 2 1 0| - +-----------+---+-------+-------+---+-----------+ - |5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0|5 4 3 2 1 0| - +--1.index--+--2.index--+--3.index--+--4.index--+ - */ - AZStd::string result; + encodeBuf = &in[encodeIndex]; - const size_t remainder = size % 3; - const size_t alignEndSize = size - remainder; - const AZ::u8* encodeBuf = in; - size_t encodeIndex = 0; - for (; encodeIndex < alignEndSize; encodeIndex += 3) - { - encodeBuf = &in[encodeIndex]; + result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); + result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); + result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2) | ((encodeBuf[2] & 0xc0) >> 6)]); + result.push_back(c_base64Table[encodeBuf[2] & 0x3f]); + } - result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); - result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); - result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2) | ((encodeBuf[2] & 0xc0) >> 6)]); - result.push_back(c_base64Table[encodeBuf[2] & 0x3f]); - } + encodeBuf = &in[encodeIndex]; + if (remainder == 2) + { + result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); + result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); + result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2)]); + result.push_back(base64pad); + } + else if (remainder == 1) + { + result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); + result.push_back(c_base64Table[(encodeBuf[0] & 0x03) << 4]); + result.push_back(base64pad); + result.push_back(base64pad); + } - encodeBuf = &in[encodeIndex]; - if (remainder == 2) - { - result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); - result.push_back(c_base64Table[((encodeBuf[0] & 0x03) << 4) | ((encodeBuf[1] & 0xf0) >> 4)]); - result.push_back(c_base64Table[((encodeBuf[1] & 0x0f) << 2)]); - result.push_back(base64pad); - } - else if (remainder == 1) - { - result.push_back(c_base64Table[(encodeBuf[0] & 0xfc) >> 2]); - result.push_back(c_base64Table[(encodeBuf[0] & 0x03) << 4]); - result.push_back(base64pad); - result.push_back(base64pad); - } + return result; + } - return result; + bool Decode(AZStd::vector& out, const char* in, const size_t size) + { + if (size % 4 != 0) + { + AZ_Warning("StringFunc", size % 4 == 0, "Base 64 encoded data length must be multiple of 4"); + return false; } - bool Decode(AZStd::vector& out, const char* in, const size_t size) + AZStd::vector result; + result.reserve(size * 3 / 4); + const char* decodeBuf = in; + size_t decodeIndex = 0; + for (; decodeIndex < size; decodeIndex += 4) { - if (size % 4 != 0) + decodeBuf = &in[decodeIndex]; + //Check if each character is a valid Base64 encoded character { - AZ_Warning("StringFunc", size % 4 == 0, "Base 64 encoded data length must be multiple of 4"); - return false; + // First Octet + if (!IsValidEncodedChar(decodeBuf[0])) + { + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[0])); + return false; + } + if (!IsValidEncodedChar(decodeBuf[1])) + { + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[1])); + return false; + } + + result.push_back((c_inverseBase64Table[static_cast(decodeBuf[0])] << 2) | ((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x30) >> 4)); } - AZStd::vector result; - result.reserve(size * 3 / 4); - const char* decodeBuf = in; - size_t decodeIndex = 0; - for (; decodeIndex < size; decodeIndex += 4) { - decodeBuf = &in[decodeIndex]; - //Check if each character is a valid Base64 encoded character + // Second Octet + if (decodeBuf[2] == base64pad) { - // First Octet - if (!IsValidEncodedChar(decodeBuf[0])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[0])); - return false; - } - if (!IsValidEncodedChar(decodeBuf[1])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[1])); - return false; - } - - result.push_back((c_inverseBase64Table[static_cast(decodeBuf[0])] << 2) | ((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x30) >> 4)); + break; } + if (!IsValidEncodedChar(decodeBuf[2])) { - // Second Octet - if (decodeBuf[2] == base64pad) - { - break; - } + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[2])); + return false; + } - if (!IsValidEncodedChar(decodeBuf[2])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[2])); - return false; - } + result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x0f) << 4) | ((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x3c) >> 2)); + } - result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[1])] & 0x0f) << 4) | ((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x3c) >> 2)); + { + // Third Octet + if (decodeBuf[3] == base64pad) + { + break; } + if (!IsValidEncodedChar(decodeBuf[3])) { - // Third Octet - if (decodeBuf[3] == base64pad) - { - break; - } - - if (!IsValidEncodedChar(decodeBuf[3])) - { - AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[3])); - return false; - } - - result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x03) << 6) | (c_inverseBase64Table[static_cast(decodeBuf[3])] & 0x3f)); + AZ_Warning("StringFunc", false, "Invalid Base64 encoded text at offset %tu", AZStd::distance(in, &decodeBuf[3])); + return false; } - } - out = AZStd::move(result); - return true; + result.push_back(((c_inverseBase64Table[static_cast(decodeBuf[2])] & 0x03) << 6) | (c_inverseBase64Table[static_cast(decodeBuf[3])] & 0x3f)); + } } + + out = AZStd::move(result); + return true; } + } - namespace Utf8 + namespace Utf8 + { + bool CheckNonAsciiChar(const AZStd::string& in) { - bool CheckNonAsciiChar(const AZStd::string& in) + for (int i = 0; i < in.length(); ++i) { - for (int i = 0; i < in.length(); ++i) + char byte = in[i]; + if (byte & 0x80) { - char byte = in[i]; - if (byte & 0x80) - { - return true; - } + return true; } - return false; } + return false; } - } // namespace StringFunc -} // namespace AZ + } +} // namespace AZ::StringFunc diff --git a/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp b/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp index 56b56e96a1..1cacef7ff3 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp +++ b/Code/Framework/AzCore/AzCore/Task/TaskGraphSystemComponent.cpp @@ -30,8 +30,13 @@ namespace AZ if (Interface::Get() == nullptr) { + #if (AZ_TRAIT_THREAD_NUM_TASK_GRAPH_WORKER_THREADS) + const uint32_t numberOfWorkerThreads = AZ_TRAIT_THREAD_NUM_TASK_GRAPH_WORKER_THREADS; + #else + const uint32_t numberOfWorkerThreads = Threading::CalcNumWorkerThreads(cl_taskGraphThreadsConcurrencyRatio, cl_taskGraphThreadsMinNumber, cl_taskGraphThreadsNumReserved); + #endif // (AZ_TRAIT_THREAD_NUM_TASK_GRAPH_WORKER_THREADS) Interface::Register(this); // small window that another thread can try to use taskgraph between this line and the set instance. - m_taskExecutor = aznew TaskExecutor(Threading::CalcNumWorkerThreads(cl_taskGraphThreadsConcurrencyRatio, cl_taskGraphThreadsMinNumber, cl_taskGraphThreadsNumReserved)); + m_taskExecutor = aznew TaskExecutor(numberOfWorkerThreads); TaskExecutor::SetInstance(m_taskExecutor); } } diff --git a/Code/Framework/AzCore/AzCore/Time/ITime.h b/Code/Framework/AzCore/AzCore/Time/ITime.h index a3dcca09ea..a61b629f35 100644 --- a/Code/Framework/AzCore/AzCore/Time/ITime.h +++ b/Code/Framework/AzCore/AzCore/Time/ITime.h @@ -137,11 +137,18 @@ namespace AZ return AZ::Interface::Get()->GetElapsedTimeUs(); } + //! This is a simple convenience wrapper inline TimeMs GetRealElapsedTimeMs() { return AZ::Interface::Get()->GetRealElapsedTimeMs(); } + //! This is a simple convenience wrapper + inline TimeUs GetRealElapsedTimeUs() + { + return AZ::Interface::Get()->GetRealElapsedTimeUs(); + } + //! This is a simple convenience wrapper inline TimeUs GetSimulationTickDeltaTimeUs() { diff --git a/Code/Framework/AzCore/AzCore/Time/TimeSystem.cpp b/Code/Framework/AzCore/AzCore/Time/TimeSystem.cpp index cd0170749f..a5e0908ac4 100644 --- a/Code/Framework/AzCore/AzCore/Time/TimeSystem.cpp +++ b/Code/Framework/AzCore/AzCore/Time/TimeSystem.cpp @@ -124,14 +124,13 @@ namespace AZ const TimeUs currentTimeUs = static_cast(AZStd::GetTimeNowMicroSecond()); //real time - m_realTickDeltaTimeUs = currentTimeUs - m_lastRealTickTimeUs; - m_lastRealTickTimeUs = currentTimeUs; + m_realTickDeltaTimeUs = currentTimeUs - m_lastSimulationTickTimeUs; //game time if (m_simulationTickDeltaOverride > AZ::Time::ZeroTimeUs) { m_simulationTickDeltaTimeUs = m_simulationTickDeltaOverride; - m_lastSimulationTickTimeUs = m_simulationTickDeltaTimeUs; + m_lastSimulationTickTimeUs = currentTimeUs; return m_simulationTickDeltaTimeUs; } diff --git a/Code/Framework/AzCore/AzCore/Time/TimeSystem.h b/Code/Framework/AzCore/AzCore/Time/TimeSystem.h index d2587c76d8..ded70c9be5 100644 --- a/Code/Framework/AzCore/AzCore/Time/TimeSystem.h +++ b/Code/Framework/AzCore/AzCore/Time/TimeSystem.h @@ -74,8 +74,7 @@ namespace AZ //! Updated in AdvanceTickDeltaTimes(). TimeUs m_realTickDeltaTimeUs = AZ::Time::ZeroTimeUs; - TimeUs m_lastSimulationTickTimeUs = AZ::Time::ZeroTimeUs; //!< Used to determine the game tick delta time (affected by cvars). - TimeUs m_lastRealTickTimeUs = AZ::Time::ZeroTimeUs; //!< Used to determine the real game tick delta time (not affected by cvars). + TimeUs m_lastSimulationTickTimeUs = AZ::Time::ZeroTimeUs; //!< Used to determine the game tick delta time. TimeUs m_simulationTickDeltaOverride = AZ::Time::ZeroTimeUs; // -namespace AZStd +namespace AZStd::MemoryToASCII { - namespace MemoryToASCII + AZStd::string ToString(const void* memoryAddrs, AZStd::size_t dataSize, AZStd::size_t maxShowSize, AZStd::size_t dataWidth/*=16*/, Options format/*=Options::Default*/) { - AZStd::string ToString(const void* memoryAddrs, AZStd::size_t dataSize, AZStd::size_t maxShowSize, AZStd::size_t dataWidth/*=16*/, Options format/*=Options::Default*/) + AZStd::string output; + + if ((memoryAddrs != nullptr) && (dataSize > 0)) { - AZStd::string output; + const AZ::u8 *data = reinterpret_cast(memoryAddrs); - if ((memoryAddrs != nullptr) && (dataSize > 0)) + if (static_cast(format) != 0) { - const AZ::u8 *data = reinterpret_cast(memoryAddrs); + output.reserve(8162); + + bool showHeader = static_cast(format) & static_cast(Options::Header) ? true : false; + bool showOffset = static_cast(format) & static_cast(Options::Offset) ? true : false; + bool showBinary = static_cast(format) & static_cast(Options::Binary) ? true : false; + bool showASCII = static_cast(format) & static_cast(Options::ASCII) ? true : false; + bool showInfo = static_cast(format) & static_cast(Options::Info) ? true : false; - if (static_cast(format) != 0) + // Because of the auto formatting for the headers, the min width is 3 + if (dataWidth < 3) { - output.reserve(8162); + dataWidth = 3; + } - bool showHeader = static_cast(format) & static_cast(Options::Header) ? true : false; - bool showOffset = static_cast(format) & static_cast(Options::Offset) ? true : false; - bool showBinary = static_cast(format) & static_cast(Options::Binary) ? true : false; - bool showASCII = static_cast(format) & static_cast(Options::ASCII) ? true : false; - bool showInfo = static_cast(format) & static_cast(Options::Info) ? true : false; + if (showHeader) + { + AZStd::string line1; + AZStd::string line2; + line1.reserve(1024); + line2.reserve(1024); - // Because of the auto formatting for the headers, the min width is 3 - if (dataWidth < 3) + if (showOffset) { - dataWidth = 3; + line1 += "Offset"; + line2 += "------"; + + if (showBinary || showASCII) + { + line1 += " "; + line2 += " "; + } } - if (showHeader) + if (showBinary) { - AZStd::string line1; - AZStd::string line2; - line1.reserve(1024); - line2.reserve(1024); + static const char *kHeaderName = "Data"; + static AZStd::size_t kHeaderNameSize = 4; - if (showOffset) - { - line1 += "Offset"; - line2 += "------"; + AZStd::size_t lineLength = (dataWidth * 3) - 1; + AZStd::size_t numPreSpaces = (lineLength - kHeaderNameSize) / 2; + AZStd::size_t numPostSpaces = lineLength - numPreSpaces - kHeaderNameSize; - if (showBinary || showASCII) + line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); + //line2 += AZStd::string(lineLength, '-'); + for(size_t i=0; i 0) { - line1 += " "; - line2 += " "; + line2 += "-"; } + + line2 += AZStd::string::format("%02zx", i); } - if (showBinary) + if (showASCII) { - static const char *kHeaderName = "Data"; - static AZStd::size_t kHeaderNameSize = 4; + line1 += " "; + line2 += " "; + } + } - AZStd::size_t lineLength = (dataWidth * 3) - 1; - AZStd::size_t numPreSpaces = (lineLength - kHeaderNameSize) / 2; - AZStd::size_t numPostSpaces = lineLength - numPreSpaces - kHeaderNameSize; + if (showASCII) + { + static const char *kHeaderName = "ASCII"; + static AZStd::size_t kHeaderNameSize = 5; - line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); - //line2 += AZStd::string(lineLength, '-'); - for(size_t i=0; i 0) - { - line2 += "-"; - } + AZStd::size_t numPreSpaces = (dataWidth - kHeaderNameSize) / 2; + AZStd::size_t numPostSpaces = dataWidth - numPreSpaces - kHeaderNameSize; - line2 += AZStd::string::format("%02zx", i); - } + line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); + line2 += AZStd::string(dataWidth, '-'); + } - if (showASCII) - { - line1 += " "; - line2 += " "; - } - } + if (showInfo) + { + output += AZStd::string::format("Address: 0x%p Data Size:%zu Max Size:%zu\n", data, dataSize, maxShowSize); + } - if (showASCII) - { - static const char *kHeaderName = "ASCII"; - static AZStd::size_t kHeaderNameSize = 5; + output += line1 + "\n"; + output += line2 + "\n"; + } - AZStd::size_t numPreSpaces = (dataWidth - kHeaderNameSize) / 2; - AZStd::size_t numPostSpaces = dataWidth - numPreSpaces - kHeaderNameSize; + AZStd::size_t offset = 0; + AZStd::size_t maxSize = dataSize > maxShowSize ? maxShowSize : dataSize; - line1 += AZStd::string(numPreSpaces, ' ') + kHeaderName + AZStd::string(numPostSpaces, ' '); - line2 += AZStd::string(dataWidth, '-'); - } + while (offset < maxSize) + { + if (showOffset) + { + output += AZStd::string::format("%06zx", offset); - if (showInfo) + if (showBinary || showASCII) { - output += AZStd::string::format("Address: 0x%p Data Size:%zu Max Size:%zu\n", data, dataSize, maxShowSize); + output += " "; } - - output += line1 + "\n"; - output += line2 + "\n"; } - AZStd::size_t offset = 0; - AZStd::size_t maxSize = dataSize > maxShowSize ? maxShowSize : dataSize; - - while (offset < maxSize) + if (showBinary) { - if (showOffset) - { - output += AZStd::string::format("%06zx", offset); + AZStd::string binLine; + binLine.reserve((dataWidth * 3) * 2); - if (showBinary || showASCII) + for (AZStd::size_t index = 0; index < dataWidth; index++) + { + if (!binLine.empty()) { - output += " "; + binLine += " "; } - } - - if (showBinary) - { - AZStd::string binLine; - binLine.reserve((dataWidth * 3) * 2); - for (AZStd::size_t index = 0; index < dataWidth; index++) + if ((offset + index) < maxSize) { - if (!binLine.empty()) - { - binLine += " "; - } - - if ((offset + index) < maxSize) - { - binLine += AZStd::string::format("%02x", data[offset + index]); - } - else - { - binLine += " "; - } + binLine += AZStd::string::format("%02x", data[offset + index]); } - - output += binLine; - - if (showASCII) + else { - output += " "; + binLine += " "; } } + output += binLine; + if (showASCII) { - AZStd::string asciiLine; - asciiLine.reserve(dataWidth * 2); + output += " "; + } + } - for (AZStd::size_t index = 0; index < dataWidth; index++) + if (showASCII) + { + AZStd::string asciiLine; + asciiLine.reserve(dataWidth * 2); + + for (AZStd::size_t index = 0; index < dataWidth; index++) + { + if ((offset + index) > maxSize) { - if ((offset + index) > maxSize) - { - break; - } - else - { - char value = static_cast(data[offset + index]); - - if ((value < 32) || (value > 127)) - value = ' '; - - asciiLine += value; - } + break; } + else + { + char value = static_cast(data[offset + index]); + + if ((value < 32) || (value > 127)) + value = ' '; - output += asciiLine; + asciiLine += value; + } } - output += "\n"; - offset += dataWidth; + output += asciiLine; } + + output += "\n"; + offset += dataWidth; } } - - return output; } - } // namespace MemoryToASCII -} // namespace AZStd + + return output; + } +} // namespace AZStd::MemoryToASCII diff --git a/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h b/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h index 495c8d5f2c..e05e000a4e 100644 --- a/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h +++ b/Code/Framework/AzCore/Platform/Android/AzCore/AzCore_Traits_Android.h @@ -75,7 +75,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 0 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp index f4d7db802b..92a80b0d9a 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Debug/Trace_UnixLike.cpp @@ -13,73 +13,67 @@ #include #include -namespace AZ +namespace AZ::Debug::Platform { - namespace Debug +#if defined(AZ_ENABLE_DEBUG_TOOLS) + bool performDebuggerDetection() { - namespace Platform + AZ::IO::SystemFile processStatusFile; + if (!processStatusFile.Open("/proc/self/status", AZ::IO::SystemFile::SF_OPEN_READ_ONLY)) { -#if defined(AZ_ENABLE_DEBUG_TOOLS) - bool performDebuggerDetection() - { - AZ::IO::SystemFile processStatusFile; - if (!processStatusFile.Open("/proc/self/status", AZ::IO::SystemFile::SF_OPEN_READ_ONLY)) - { - return false; - } - - char buffer[4096]; - AZ::IO::SystemFile::SizeType numRead = processStatusFile.Read(sizeof(buffer), buffer); + return false; + } - const AZStd::string_view processStatusView(buffer, buffer + numRead); - constexpr AZStd::string_view tracerPidString = "TracerPid:"; - const size_t tracerPidOffset = processStatusView.find(tracerPidString); - if (tracerPidOffset == AZStd::string_view::npos) - { - return false; - } - for (size_t i = tracerPidOffset + tracerPidString.length(); i < numRead; ++i) - { - if (!::isspace(processStatusView[i])) - { - return processStatusView[i] != '0'; - } - } - return false; - } + char buffer[4096]; + AZ::IO::SystemFile::SizeType numRead = processStatusFile.Read(sizeof(buffer), buffer); - bool IsDebuggerPresent() + const AZStd::string_view processStatusView(buffer, buffer + numRead); + constexpr AZStd::string_view tracerPidString = "TracerPid:"; + const size_t tracerPidOffset = processStatusView.find(tracerPidString); + if (tracerPidOffset == AZStd::string_view::npos) + { + return false; + } + for (size_t i = tracerPidOffset + tracerPidString.length(); i < numRead; ++i) + { + if (!::isspace(processStatusView[i])) { - static bool s_detectionPerformed = false; - static bool s_debuggerDetected = false; - if (!s_detectionPerformed) - { - s_debuggerDetected = performDebuggerDetection(); - s_detectionPerformed = true; - } - return s_debuggerDetected; + return processStatusView[i] != '0'; } + } + return false; + } - bool AttachDebugger() - { - // Not supported yet - AZ_Assert(false, "AttachDebugger() is not supported for Unix platform yet"); - return false; - } + bool IsDebuggerPresent() + { + static bool s_detectionPerformed = false; + static bool s_debuggerDetected = false; + if (!s_detectionPerformed) + { + s_debuggerDetected = performDebuggerDetection(); + s_detectionPerformed = true; + } + return s_debuggerDetected; + } - void HandleExceptions(bool) - {} + bool AttachDebugger() + { + // Not supported yet + AZ_Assert(false, "AttachDebugger() is not supported for Unix platform yet"); + return false; + } - void DebugBreak() - { - raise(SIGINT); - } + void HandleExceptions(bool) + {} + + void DebugBreak() + { + raise(SIGINT); + } #endif // AZ_ENABLE_DEBUG_TOOLS - void Terminate(int exitCode) - { - _exit(exitCode); - } - } + void Terminate(int exitCode) + { + _exit(exitCode); } -} +} // namespace AZ::Debug::Platform diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp index 07614ad56b..4c605f6154 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/IO/Internal/SystemFileUtils_UnixLike.cpp @@ -8,82 +8,76 @@ #include "SystemFileUtils_UnixLike.h" -namespace AZ +namespace AZ::IO::Internal { - namespace IO + bool FormatAndPeelOffWildCardExtension(const char* sourcePath, char* filePath, size_t filePathSize, char* extensionPath, size_t extensionSize, bool keepWildcard) { - namespace Internal + if (sourcePath == nullptr || filePath == nullptr || extensionPath == nullptr || filePathSize == 0 || extensionSize == 0) { - bool FormatAndPeelOffWildCardExtension(const char* sourcePath, char* filePath, size_t filePathSize, char* extensionPath, size_t extensionSize, bool keepWildcard) + AZ_Error("AZ::IO::Internal", false, "FormatAndPeelOffWildCardExtension: One or more parameters was invalid."); + return false; + } + const char* pSrcPath = sourcePath; + char* pDestPath = filePath; + size_t destinationSize = filePathSize; + unsigned numFileChars = 0; + unsigned numExtensionChars = 0; + unsigned* pNumDestChars = &numFileChars; + bool bIsWildcardExtension = false; + while (*pSrcPath) + { + char srcChar = *pSrcPath++; + + // Skip '*' and '.' + if ((!bIsWildcardExtension && srcChar != '*') || (bIsWildcardExtension && srcChar != '.' && (keepWildcard || srcChar != '*'))) { - if (sourcePath == nullptr || filePath == nullptr || extensionPath == nullptr || filePathSize == 0 || extensionSize == 0) + unsigned numChars = *pNumDestChars; + pDestPath[numChars++] = srcChar; + *pNumDestChars = numChars; + + --destinationSize; + if (destinationSize == 0) { - AZ_Error("AZ::IO::Internal", false, "FormatAndPeelOffWildCardExtension: One or more parameters was invalid."); + AZ_Error( + "AZ::IO::Internal", + false, + "Error splitting sourcePath '%s' into filePath and extension, %s length is larger than storage size %d.", + sourcePath, + bIsWildcardExtension ? "extensionPath" : "filePath", + bIsWildcardExtension ? extensionSize : filePathSize); return false; } - const char* pSrcPath = sourcePath; - char* pDestPath = filePath; - size_t destinationSize = filePathSize; - unsigned numFileChars = 0; - unsigned numExtensionChars = 0; - unsigned* pNumDestChars = &numFileChars; - bool bIsWildcardExtension = false; - while (*pSrcPath) + } + // Wild-card extension is separate + if (srcChar == '*') + { + bIsWildcardExtension = true; + pDestPath = extensionPath; + destinationSize = extensionSize; + pNumDestChars = &numExtensionChars; + if (keepWildcard) { - char srcChar = *pSrcPath++; + unsigned numChars = *pNumDestChars; + pDestPath[numChars++] = srcChar; + *pNumDestChars = numChars; - // Skip '*' and '.' - if ((!bIsWildcardExtension && srcChar != '*') || (bIsWildcardExtension && srcChar != '.' && (keepWildcard || srcChar != '*'))) + --destinationSize; + if (destinationSize == 0) { - unsigned numChars = *pNumDestChars; - pDestPath[numChars++] = srcChar; - *pNumDestChars = numChars; - - --destinationSize; - if (destinationSize == 0) - { - AZ_Error( - "AZ::IO::Internal", - false, - "Error splitting sourcePath '%s' into filePath and extension, %s length is larger than storage size %d.", - sourcePath, - bIsWildcardExtension ? "extensionPath" : "filePath", - bIsWildcardExtension ? extensionSize : filePathSize); - return false; - } - } - // Wild-card extension is separate - if (srcChar == '*') - { - bIsWildcardExtension = true; - pDestPath = extensionPath; - destinationSize = extensionSize; - pNumDestChars = &numExtensionChars; - if (keepWildcard) - { - unsigned numChars = *pNumDestChars; - pDestPath[numChars++] = srcChar; - *pNumDestChars = numChars; - - --destinationSize; - if (destinationSize == 0) - { - AZ_Error( - "AZ::IO::Internal", - false, - "Error splitting sourcePath '%s' into filePath and extension, extensionPath length is larger than storage size %d.", - sourcePath, - extensionSize); - return false; - } - } + AZ_Error( + "AZ::IO::Internal", + false, + "Error splitting sourcePath '%s' into filePath and extension, extensionPath length is larger than storage size %d.", + sourcePath, + extensionSize); + return false; } } - // Close strings - filePath[numFileChars] = 0; - extensionPath[numExtensionChars] = 0; - return true; } } + // Close strings + filePath[numFileChars] = 0; + extensionPath[numExtensionChars] = 0; + return true; } -} +} // namespace AZ::IO::Internal diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp index bdc2e753be..4a316bcde6 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Platform_UnixLike.cpp @@ -14,31 +14,28 @@ #include #include -namespace AZ +namespace AZ::Platform { - namespace Platform + ProcessId GetCurrentProcessId() { - ProcessId GetCurrentProcessId() - { - return static_cast(::getpid()); - } + return static_cast(::getpid()); + } - MachineId GetLocalMachineId() + MachineId GetLocalMachineId() + { + if (s_machineId == 0) { + // In specialized server situations, SetLocalMachineId() should be used, with whatever criteria works best in that environment + // A proper implementation for each supported system will be needed instead of this temporary measure to avoid collision in the small scale. + // On a larger scale, the odds of two people getting in here at the same millisecond will go up drastically, and we'll have the same issue again, + // though far less reproducible, for duplicated EntityId's across a network. + s_machineId = static_cast(AZStd::GetTimeUTCMilliSecond() & 0xffffffff); if (s_machineId == 0) { - // In specialized server situations, SetLocalMachineId() should be used, with whatever criteria works best in that environment - // A proper implementation for each supported system will be needed instead of this temporary measure to avoid collision in the small scale. - // On a larger scale, the odds of two people getting in here at the same millisecond will go up drastically, and we'll have the same issue again, - // though far less reproducible, for duplicated EntityId's across a network. - s_machineId = static_cast(AZStd::GetTimeUTCMilliSecond() & 0xffffffff); - if (s_machineId == 0) - { - s_machineId = 1; - AZ_Warning("System", false, "0 machine ID is reserved!"); - } + s_machineId = 1; + AZ_Warning("System", false, "0 machine ID is reserved!"); } - return s_machineId; } - } // namespace Platform -} + return s_machineId; + } +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp index 5b35b13d8b..555d70f1e6 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Socket/AzSocket_UnixLike.cpp @@ -18,365 +18,362 @@ #define INVALID_SOCKET (-1) #define closesocket(_s) close(_s) #define GetInternalSocketError errno -typedef int SOCKET; -typedef AZ::u32 AZSOCKLEN; +using SOCKET = int; +using AZSOCKLEN = AZ::u32; -namespace AZ +namespace AZ::AzSock { - namespace AzSock + AZ::s32 TranslateOSError(AZ::s32 oserror) { - AZ::s32 TranslateOSError(AZ::s32 oserror) - { - AZ::s32 error; + AZ::s32 error; #define TRANSLATE(_from, _to) case (_from): error = static_cast(_to); break; - switch (oserror) - { - TRANSLATE(0, AzSockError::eASE_NO_ERROR); - TRANSLATE(EACCES, AzSockError::eASE_EACCES); - TRANSLATE(EADDRINUSE, AzSockError::eASE_EADDRINUSE); - TRANSLATE(EADDRNOTAVAIL, AzSockError::eASE_EADDRNOTAVAIL); - TRANSLATE(EAFNOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); - TRANSLATE(EALREADY, AzSockError::eASE_EALREADY); - TRANSLATE(EBADF, AzSockError::eASE_EBADF); - TRANSLATE(ECONNABORTED, AzSockError::eASE_ECONNABORTED); - TRANSLATE(ECONNREFUSED, AzSockError::eASE_ECONNREFUSED); - TRANSLATE(ECONNRESET, AzSockError::eASE_ECONNRESET); - TRANSLATE(EFAULT, AzSockError::eASE_EFAULT); - TRANSLATE(EHOSTDOWN, AzSockError::eASE_EHOSTDOWN); - TRANSLATE(EINPROGRESS, AzSockError::eASE_EINPROGRESS); - TRANSLATE(EINTR, AzSockError::eASE_EINTR); - TRANSLATE(EINVAL, AzSockError::eASE_EINVAL); - TRANSLATE(EISCONN, AzSockError::eASE_EISCONN); - TRANSLATE(EMFILE, AzSockError::eASE_EMFILE); - TRANSLATE(EMSGSIZE, AzSockError::eASE_EMSGSIZE); - TRANSLATE(ENETUNREACH, AzSockError::eASE_ENETUNREACH); - TRANSLATE(ENOBUFS, AzSockError::eASE_ENOBUFS); - TRANSLATE(ENOPROTOOPT, AzSockError::eASE_ENOPROTOOPT); - TRANSLATE(ENOTCONN, AzSockError::eASE_ENOTCONN); - TRANSLATE(EOPNOTSUPP, AzSockError::eASE_EOPNOTSUPP); - TRANSLATE(EPROTONOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); - TRANSLATE(ETIMEDOUT, AzSockError::eASE_ETIMEDOUT); - TRANSLATE(ETOOMANYREFS, AzSockError::eASE_ETOOMANYREFS); - TRANSLATE(EWOULDBLOCK, AzSockError::eASE_EWOULDBLOCK); - - default: - AZ_TracePrintf("AzSock", "AzSocket could not translate OS error code %x, treating as miscellaneous.\n", oserror); - error = static_cast(AzSockError::eASE_MISC_ERROR); - break; - } + switch (oserror) + { + TRANSLATE(0, AzSockError::eASE_NO_ERROR); + TRANSLATE(EACCES, AzSockError::eASE_EACCES); + TRANSLATE(EADDRINUSE, AzSockError::eASE_EADDRINUSE); + TRANSLATE(EADDRNOTAVAIL, AzSockError::eASE_EADDRNOTAVAIL); + TRANSLATE(EAFNOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); + TRANSLATE(EALREADY, AzSockError::eASE_EALREADY); + TRANSLATE(EBADF, AzSockError::eASE_EBADF); + TRANSLATE(ECONNABORTED, AzSockError::eASE_ECONNABORTED); + TRANSLATE(ECONNREFUSED, AzSockError::eASE_ECONNREFUSED); + TRANSLATE(ECONNRESET, AzSockError::eASE_ECONNRESET); + TRANSLATE(EFAULT, AzSockError::eASE_EFAULT); + TRANSLATE(EHOSTDOWN, AzSockError::eASE_EHOSTDOWN); + TRANSLATE(EINPROGRESS, AzSockError::eASE_EINPROGRESS); + TRANSLATE(EINTR, AzSockError::eASE_EINTR); + TRANSLATE(EINVAL, AzSockError::eASE_EINVAL); + TRANSLATE(EISCONN, AzSockError::eASE_EISCONN); + TRANSLATE(EMFILE, AzSockError::eASE_EMFILE); + TRANSLATE(EMSGSIZE, AzSockError::eASE_EMSGSIZE); + TRANSLATE(ENETUNREACH, AzSockError::eASE_ENETUNREACH); + TRANSLATE(ENOBUFS, AzSockError::eASE_ENOBUFS); + TRANSLATE(ENOPROTOOPT, AzSockError::eASE_ENOPROTOOPT); + TRANSLATE(ENOTCONN, AzSockError::eASE_ENOTCONN); + TRANSLATE(EOPNOTSUPP, AzSockError::eASE_EOPNOTSUPP); + TRANSLATE(EPROTONOSUPPORT, AzSockError::eASE_EAFNOSUPPORT); + TRANSLATE(ETIMEDOUT, AzSockError::eASE_ETIMEDOUT); + TRANSLATE(ETOOMANYREFS, AzSockError::eASE_ETOOMANYREFS); + TRANSLATE(EWOULDBLOCK, AzSockError::eASE_EWOULDBLOCK); + + default: + AZ_TracePrintf("AzSock", "AzSocket could not translate OS error code %x, treating as miscellaneous.\n", oserror); + error = static_cast(AzSockError::eASE_MISC_ERROR); + break; + } #undef TRANSLATE - return error; - } + return error; + } - AZ::s32 TranslateSocketOption(AzSocketOption opt) - { - AZ::s32 value; + AZ::s32 TranslateSocketOption(AzSocketOption opt) + { + AZ::s32 value; #define TRANSLATE(_from, _to) case (_from): value = (_to); break; - switch (opt) - { - TRANSLATE(AzSocketOption::REUSEADDR, SO_REUSEADDR); - TRANSLATE(AzSocketOption::KEEPALIVE, SO_KEEPALIVE); - TRANSLATE(AzSocketOption::LINGER, SO_LINGER); - - default: - AZ_TracePrintf("AzSock", "AzSocket option %x not yet supported", opt); - value = 0; - break; - } + switch (opt) + { + TRANSLATE(AzSocketOption::REUSEADDR, SO_REUSEADDR); + TRANSLATE(AzSocketOption::KEEPALIVE, SO_KEEPALIVE); + TRANSLATE(AzSocketOption::LINGER, SO_LINGER); + + default: + AZ_TracePrintf("AzSock", "AzSocket option %x not yet supported", opt); + value = 0; + break; + } #undef TRANSLATE - return value; - } + return value; + } - AZSOCKET HandleInvalidSocket(SOCKET sock) + AZSOCKET HandleInvalidSocket(SOCKET sock) + { + AZSOCKET azsock = static_cast(sock); + if (sock == INVALID_SOCKET) { - AZSOCKET azsock = static_cast(sock); - if (sock == INVALID_SOCKET) - { - azsock = TranslateOSError(GetInternalSocketError); - } - return azsock; + azsock = TranslateOSError(GetInternalSocketError); } + return azsock; + } - AZ::s32 HandleSocketError(AZ::s32 socketError) + AZ::s32 HandleSocketError(AZ::s32 socketError) + { + if (socketError == SOCKET_ERROR) { - if (socketError == SOCKET_ERROR) - { - socketError = TranslateOSError(GetInternalSocketError); - } - return socketError; + socketError = TranslateOSError(GetInternalSocketError); } + return socketError; + } - const char* GetStringForError(AZ::s32 errorNumber) - { - AzSockError errorCode = AzSockError(errorNumber); + const char* GetStringForError(AZ::s32 errorNumber) + { + AzSockError errorCode = AzSockError(errorNumber); #define CASE_RETSTRING(errorEnum) case errorEnum: { return #errorEnum; } - switch (errorCode) - { - CASE_RETSTRING(AzSockError::eASE_NO_ERROR); - CASE_RETSTRING(AzSockError::eASE_SOCKET_INVALID); - CASE_RETSTRING(AzSockError::eASE_EACCES); - CASE_RETSTRING(AzSockError::eASE_EADDRINUSE); - CASE_RETSTRING(AzSockError::eASE_EADDRNOTAVAIL); - CASE_RETSTRING(AzSockError::eASE_EAFNOSUPPORT); - CASE_RETSTRING(AzSockError::eASE_EALREADY); - CASE_RETSTRING(AzSockError::eASE_EBADF); - CASE_RETSTRING(AzSockError::eASE_ECONNABORTED); - CASE_RETSTRING(AzSockError::eASE_ECONNREFUSED); - CASE_RETSTRING(AzSockError::eASE_ECONNRESET); - CASE_RETSTRING(AzSockError::eASE_EFAULT); - CASE_RETSTRING(AzSockError::eASE_EHOSTDOWN); - CASE_RETSTRING(AzSockError::eASE_EINPROGRESS); - CASE_RETSTRING(AzSockError::eASE_EINTR); - CASE_RETSTRING(AzSockError::eASE_EINVAL); - CASE_RETSTRING(AzSockError::eASE_EISCONN); - CASE_RETSTRING(AzSockError::eASE_EMFILE); - CASE_RETSTRING(AzSockError::eASE_EMSGSIZE); - CASE_RETSTRING(AzSockError::eASE_ENETUNREACH); - CASE_RETSTRING(AzSockError::eASE_ENOBUFS); - CASE_RETSTRING(AzSockError::eASE_ENOPROTOOPT); - CASE_RETSTRING(AzSockError::eASE_ENOTCONN); - CASE_RETSTRING(AzSockError::eASE_ENOTINITIALISED); - CASE_RETSTRING(AzSockError::eASE_EOPNOTSUPP); - CASE_RETSTRING(AzSockError::eASE_EPIPE); - CASE_RETSTRING(AzSockError::eASE_EPROTONOSUPPORT); - CASE_RETSTRING(AzSockError::eASE_ETIMEDOUT); - CASE_RETSTRING(AzSockError::eASE_ETOOMANYREFS); - CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK); - CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK_CONN); - CASE_RETSTRING(AzSockError::eASE_MISC_ERROR); - } + switch (errorCode) + { + CASE_RETSTRING(AzSockError::eASE_NO_ERROR); + CASE_RETSTRING(AzSockError::eASE_SOCKET_INVALID); + CASE_RETSTRING(AzSockError::eASE_EACCES); + CASE_RETSTRING(AzSockError::eASE_EADDRINUSE); + CASE_RETSTRING(AzSockError::eASE_EADDRNOTAVAIL); + CASE_RETSTRING(AzSockError::eASE_EAFNOSUPPORT); + CASE_RETSTRING(AzSockError::eASE_EALREADY); + CASE_RETSTRING(AzSockError::eASE_EBADF); + CASE_RETSTRING(AzSockError::eASE_ECONNABORTED); + CASE_RETSTRING(AzSockError::eASE_ECONNREFUSED); + CASE_RETSTRING(AzSockError::eASE_ECONNRESET); + CASE_RETSTRING(AzSockError::eASE_EFAULT); + CASE_RETSTRING(AzSockError::eASE_EHOSTDOWN); + CASE_RETSTRING(AzSockError::eASE_EINPROGRESS); + CASE_RETSTRING(AzSockError::eASE_EINTR); + CASE_RETSTRING(AzSockError::eASE_EINVAL); + CASE_RETSTRING(AzSockError::eASE_EISCONN); + CASE_RETSTRING(AzSockError::eASE_EMFILE); + CASE_RETSTRING(AzSockError::eASE_EMSGSIZE); + CASE_RETSTRING(AzSockError::eASE_ENETUNREACH); + CASE_RETSTRING(AzSockError::eASE_ENOBUFS); + CASE_RETSTRING(AzSockError::eASE_ENOPROTOOPT); + CASE_RETSTRING(AzSockError::eASE_ENOTCONN); + CASE_RETSTRING(AzSockError::eASE_ENOTINITIALISED); + CASE_RETSTRING(AzSockError::eASE_EOPNOTSUPP); + CASE_RETSTRING(AzSockError::eASE_EPIPE); + CASE_RETSTRING(AzSockError::eASE_EPROTONOSUPPORT); + CASE_RETSTRING(AzSockError::eASE_ETIMEDOUT); + CASE_RETSTRING(AzSockError::eASE_ETOOMANYREFS); + CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK); + CASE_RETSTRING(AzSockError::eASE_EWOULDBLOCK_CONN); + CASE_RETSTRING(AzSockError::eASE_MISC_ERROR); + } #undef CASE_RETSTRING - return "(invalid)"; - } + return "(invalid)"; + } - AZ::u32 HostToNetLong(AZ::u32 hstLong) - { - return htonl(hstLong); - } + AZ::u32 HostToNetLong(AZ::u32 hstLong) + { + return htonl(hstLong); + } - AZ::u32 NetToHostLong(AZ::u32 netLong) - { - return ntohl(netLong); - } + AZ::u32 NetToHostLong(AZ::u32 netLong) + { + return ntohl(netLong); + } - AZ::u16 HostToNetShort(AZ::u16 hstShort) - { - return htons(hstShort); - } + AZ::u16 HostToNetShort(AZ::u16 hstShort) + { + return htons(hstShort); + } - AZ::u16 NetToHostShort(AZ::u16 netShort) - { - return ntohs(netShort); - } + AZ::u16 NetToHostShort(AZ::u16 netShort) + { + return ntohs(netShort); + } - AZ::s32 GetHostName(AZStd::string& hostname) + AZ::s32 GetHostName(AZStd::string& hostname) + { + AZ::s32 result = 0; + hostname.clear(); + char name[256]; + result = HandleSocketError(gethostname(name, AZ_ARRAY_SIZE(name))); + if (result == static_cast(AzSockError::eASE_NO_ERROR)) { - AZ::s32 result = 0; - hostname.clear(); - char name[256]; - result = HandleSocketError(gethostname(name, AZ_ARRAY_SIZE(name))); - if (result == static_cast(AzSockError::eASE_NO_ERROR)) - { - hostname = name; - } - return result; + hostname = name; } + return result; + } - AZSOCKET Socket() - { - return Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); - } + AZSOCKET Socket() + { + return Socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); + } - AZSOCKET Socket(AZ::s32 af, AZ::s32 type, AZ::s32 protocol) - { - return HandleInvalidSocket(socket(af, type, protocol)); - } + AZSOCKET Socket(AZ::s32 af, AZ::s32 type, AZ::s32 protocol) + { + return HandleInvalidSocket(socket(af, type, protocol)); + } - AZ::s32 SetSockOpt(AZSOCKET sock, AZ::s32 level, AZ::s32 optname, const char* optval, AZ::s32 optlen) - { - AZSOCKLEN length(optlen); - return HandleSocketError(setsockopt(sock, level, optname, optval, length)); - } + AZ::s32 SetSockOpt(AZSOCKET sock, AZ::s32 level, AZ::s32 optname, const char* optval, AZ::s32 optlen) + { + AZSOCKLEN length(optlen); + return HandleSocketError(setsockopt(sock, level, optname, optval, length)); + } - AZ::s32 SetSocketOption(AZSOCKET sock, AzSocketOption opt, bool enable) - { - AZ::u32 val = enable ? 1 : 0; - return SetSockOpt(sock, SOL_SOCKET, TranslateSocketOption(opt), reinterpret_cast(&val), sizeof(val)); - } + AZ::s32 SetSocketOption(AZSOCKET sock, AzSocketOption opt, bool enable) + { + AZ::u32 val = enable ? 1 : 0; + return SetSockOpt(sock, SOL_SOCKET, TranslateSocketOption(opt), reinterpret_cast(&val), sizeof(val)); + } - AZ::s32 EnableTCPNoDelay(AZSOCKET sock, bool enable) - { - AZ::u32 val = enable ? 1 : 0; - return SetSockOpt(sock, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast(&val), sizeof(val)); - } + AZ::s32 EnableTCPNoDelay(AZSOCKET sock, bool enable) + { + AZ::u32 val = enable ? 1 : 0; + return SetSockOpt(sock, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast(&val), sizeof(val)); + } - AZ::s32 SetSocketBlockingMode(AZSOCKET sock, bool blocking) - { - AZ::s32 flags = ::fcntl(sock, F_GETFL); - flags &= ~O_NONBLOCK; - flags |= (blocking ? 0 : O_NONBLOCK); - return ::fcntl(sock, F_SETFL, flags); - } + AZ::s32 SetSocketBlockingMode(AZSOCKET sock, bool blocking) + { + AZ::s32 flags = ::fcntl(sock, F_GETFL); + flags &= ~O_NONBLOCK; + flags |= (blocking ? 0 : O_NONBLOCK); + return ::fcntl(sock, F_SETFL, flags); + } - AZ::s32 CloseSocket(AZSOCKET sock) - { - return HandleSocketError(closesocket(sock)); - } + AZ::s32 CloseSocket(AZSOCKET sock) + { + return HandleSocketError(closesocket(sock)); + } - AZ::s32 Shutdown(AZSOCKET sock, AZ::s32 how) - { - return HandleSocketError(shutdown(sock, how)); - } + AZ::s32 Shutdown(AZSOCKET sock, AZ::s32 how) + { + return HandleSocketError(shutdown(sock, how)); + } - AZ::s32 GetSockName(AZSOCKET sock, AzSocketAddress& addr) - { - AZSOCKADDR sAddr; - AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); - memset(&sAddr, 0, sAddrLen); - AZ::s32 result = HandleSocketError(getsockname(sock, &sAddr, &sAddrLen)); - addr = sAddr; - return result; - } + AZ::s32 GetSockName(AZSOCKET sock, AzSocketAddress& addr) + { + AZSOCKADDR sAddr; + AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); + memset(&sAddr, 0, sAddrLen); + AZ::s32 result = HandleSocketError(getsockname(sock, &sAddr, &sAddrLen)); + addr = sAddr; + return result; + } - AZ::s32 Connect(AZSOCKET sock, const AzSocketAddress& addr) + AZ::s32 Connect(AZSOCKET sock, const AzSocketAddress& addr) + { + AZ::s32 err = HandleSocketError(connect(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); + if (err == static_cast(AzSockError::eASE_EINPROGRESS)) { - AZ::s32 err = HandleSocketError(connect(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); - if (err == static_cast(AzSockError::eASE_EINPROGRESS)) - { - err = static_cast(AzSockError::eASE_EWOULDBLOCK_CONN); - } - return err; + err = static_cast(AzSockError::eASE_EWOULDBLOCK_CONN); } + return err; + } - AZ::s32 Listen(AZSOCKET sock, AZ::s32 backlog) - { - return HandleSocketError(listen(sock, backlog)); - } + AZ::s32 Listen(AZSOCKET sock, AZ::s32 backlog) + { + return HandleSocketError(listen(sock, backlog)); + } - AZSOCKET Accept(AZSOCKET sock, AzSocketAddress& addr) - { - AZSOCKADDR sAddr; - AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); - memset(&sAddr, 0, sAddrLen); - AZSOCKET outSock = HandleInvalidSocket(accept(sock, &sAddr, &sAddrLen)); - addr = sAddr; - return outSock; - } + AZSOCKET Accept(AZSOCKET sock, AzSocketAddress& addr) + { + AZSOCKADDR sAddr; + AZSOCKLEN sAddrLen = sizeof(AZSOCKADDR); + memset(&sAddr, 0, sAddrLen); + AZSOCKET outSock = HandleInvalidSocket(accept(sock, &sAddr, &sAddrLen)); + addr = sAddr; + return outSock; + } - AZ::s32 Send(AZSOCKET sock, const char* buf, AZ::s32 len, AZ::s32 flags) - { - AZ::s32 msgNoSignal = MSG_NOSIGNAL; - return HandleSocketError(send(sock, buf, len, flags | msgNoSignal)); - } + AZ::s32 Send(AZSOCKET sock, const char* buf, AZ::s32 len, AZ::s32 flags) + { + AZ::s32 msgNoSignal = MSG_NOSIGNAL; + return HandleSocketError(send(sock, buf, len, flags | msgNoSignal)); + } - AZ::s32 Recv(AZSOCKET sock, char* buf, AZ::s32 len, AZ::s32 flags) - { - return HandleSocketError(recv(sock, buf, len, flags)); - } + AZ::s32 Recv(AZSOCKET sock, char* buf, AZ::s32 len, AZ::s32 flags) + { + return HandleSocketError(recv(sock, buf, len, flags)); + } - AZ::s32 Bind(AZSOCKET sock, const AzSocketAddress& addr) - { - return HandleSocketError(bind(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); - } + AZ::s32 Bind(AZSOCKET sock, const AzSocketAddress& addr) + { + return HandleSocketError(bind(sock, addr.GetTargetAddress(), sizeof(AZSOCKADDR_IN))); + } - AZ::s32 Select(AZSOCKET sock, AZFD_SET* readfdsock, AZFD_SET* writefdsock, AZFD_SET* exceptfdsock, AZTIMEVAL* timeout) - { - return HandleSocketError(::select(sock + 1, readfdsock, writefdsock, exceptfdsock, timeout)); - } + AZ::s32 Select(AZSOCKET sock, AZFD_SET* readfdsock, AZFD_SET* writefdsock, AZFD_SET* exceptfdsock, AZTIMEVAL* timeout) + { + return HandleSocketError(::select(sock + 1, readfdsock, writefdsock, exceptfdsock, timeout)); + } - AZ::s32 IsRecvPending(AZSOCKET sock, AZTIMEVAL* timeout) - { - AZFD_SET readSet; - FD_ZERO(&readSet); - FD_SET(sock, &readSet); + AZ::s32 IsRecvPending(AZSOCKET sock, AZTIMEVAL* timeout) + { + AZFD_SET readSet; + FD_ZERO(&readSet); + FD_SET(sock, &readSet); - AZ::s32 ret = Select(sock, &readSet, nullptr, nullptr, timeout); - if (ret >= 0) + AZ::s32 ret = Select(sock, &readSet, nullptr, nullptr, timeout); + if (ret >= 0) + { + ret = FD_ISSET(sock, &readSet); + if (ret != 0) { - ret = FD_ISSET(sock, &readSet); - if (ret != 0) - { - ret = 1; - } + ret = 1; } - - return ret; } - AZ::s32 WaitForWritableSocket(AZSOCKET sock, AZTIMEVAL* timeout) - { - AZFD_SET writeSet; - FD_ZERO(&writeSet); - FD_SET(sock, &writeSet); + return ret; + } - AZ::s32 ret = Select(sock, nullptr, &writeSet, nullptr, timeout); - if (ret >= 0) + AZ::s32 WaitForWritableSocket(AZSOCKET sock, AZTIMEVAL* timeout) + { + AZFD_SET writeSet; + FD_ZERO(&writeSet); + FD_SET(sock, &writeSet); + + AZ::s32 ret = Select(sock, nullptr, &writeSet, nullptr, timeout); + if (ret >= 0) + { + ret = FD_ISSET(sock, &writeSet); + if (ret != 0) { - ret = FD_ISSET(sock, &writeSet); - if (ret != 0) - { - ret = 1; - } + ret = 1; } - - return ret; } - AZ::s32 Startup() - { - return static_cast(AzSockError::eASE_NO_ERROR); - } + return ret; + } + + AZ::s32 Startup() + { + return static_cast(AzSockError::eASE_NO_ERROR); + } + + AZ::s32 Cleanup() + { + return static_cast(AzSockError::eASE_NO_ERROR); + } - AZ::s32 Cleanup() + bool ResolveAddress(const AZStd::string& ip, AZ::u16 port, AZSOCKADDR_IN& socketAddress) + { + bool foundAddr = false; + addrinfo hints; + memset(&hints, 0, sizeof(addrinfo)); + addrinfo* addrInfo; + hints.ai_family = AF_INET; + hints.ai_flags = AI_CANONNAME; + char strPort[8]; + azsnprintf(strPort, AZ_ARRAY_SIZE(strPort), "%d", port); + + const char* address = ip.c_str(); + if (address && strlen(address) == 0) // getaddrinfo doesn't accept empty string { - return static_cast(AzSockError::eASE_NO_ERROR); + address = nullptr; } - bool ResolveAddress(const AZStd::string& ip, AZ::u16 port, AZSOCKADDR_IN& socketAddress) + AZ::s32 err = HandleSocketError(getaddrinfo(address, strPort, &hints, &addrInfo)); + if (err == 0) // eASE_NO_ERROR { - bool foundAddr = false; - addrinfo hints; - memset(&hints, 0, sizeof(addrinfo)); - addrinfo* addrInfo; - hints.ai_family = AF_INET; - hints.ai_flags = AI_CANONNAME; - char strPort[8]; - azsnprintf(strPort, AZ_ARRAY_SIZE(strPort), "%d", port); - - const char* address = ip.c_str(); - if (address && strlen(address) == 0) // getaddrinfo doesn't accept empty string + if (addrInfo->ai_family == AF_INET) { - address = nullptr; + socketAddress = *reinterpret_cast(addrInfo->ai_addr); + foundAddr = true; } - AZ::s32 err = HandleSocketError(getaddrinfo(address, strPort, &hints, &addrInfo)); - if (err == 0) // eASE_NO_ERROR - { - if (addrInfo->ai_family == AF_INET) - { - socketAddress = *reinterpret_cast(addrInfo->ai_addr); - foundAddr = true; - } - - freeaddrinfo(addrInfo); - } - else - { - AZ_Assert(false, "AzSocketAddress could not resolve address %s with port %d. (reason - %s)", ip.c_str(), port, GetStringForError(err)); - } - return foundAddr; + freeaddrinfo(addrInfo); + } + else + { + AZ_Assert(false, "AzSocketAddress could not resolve address %s with port %d. (reason - %s)", ip.c_str(), port, GetStringForError(err)); } + return foundAddr; } -} +} // namespace AZ::AzSock diff --git a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp index 7327c8f152..8a93f88ac2 100644 --- a/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp +++ b/Code/Framework/AzCore/Platform/Common/UnixLike/AzCore/Utils/Utils_UnixLike.cpp @@ -11,68 +11,65 @@ #include #include -namespace AZ +namespace AZ::Utils { - namespace Utils + void RequestAbnormalTermination() { - void RequestAbnormalTermination() - { - abort(); - } + abort(); + } - void NativeErrorMessageBox(const char*, const char*) {} + void NativeErrorMessageBox(const char*, const char*) {} - AZ::IO::FixedMaxPathString GetHomeDirectory() + AZ::IO::FixedMaxPathString GetHomeDirectory() + { + constexpr AZStd::string_view overrideHomeDirKey = "/Amazon/Settings/override_home_dir"; + AZ::IO::FixedMaxPathString overrideHomeDir; + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) { - constexpr AZStd::string_view overrideHomeDirKey = "/Amazon/Settings/override_home_dir"; - AZ::IO::FixedMaxPathString overrideHomeDir; - if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + if (settingsRegistry->Get(overrideHomeDir, overrideHomeDirKey)) { - if (settingsRegistry->Get(overrideHomeDir, overrideHomeDirKey)) - { - AZ::IO::FixedMaxPath path{overrideHomeDir}; - return path.Native(); - } - } - - if (const char* homePath = std::getenv("HOME"); homePath != nullptr) - { - AZ::IO::FixedMaxPath path{homePath}; - return path.Native(); - } - - struct passwd* pass = getpwuid(getuid()); - if (pass) - { - AZ::IO::FixedMaxPath path{pass->pw_dir}; + AZ::IO::FixedMaxPath path{overrideHomeDir}; return path.Native(); } + } - return {}; + if (const char* homePath = std::getenv("HOME"); homePath != nullptr) + { + AZ::IO::FixedMaxPath path{homePath}; + return path.Native(); } - bool ConvertToAbsolutePath(const char* path, char* absolutePath, AZ::u64 maxLength) + struct passwd* pass = getpwuid(getuid()); + if (pass) { + AZ::IO::FixedMaxPath path{pass->pw_dir}; + return path.Native(); + } + + return {}; + } + + bool ConvertToAbsolutePath(const char* path, char* absolutePath, AZ::u64 maxLength) + { #ifdef PATH_MAX - static constexpr size_t UnixMaxPathLength = PATH_MAX; + static constexpr size_t UnixMaxPathLength = PATH_MAX; #else - // Fallback to 4096 if the PATH_MAX macro isn't defined on the Unix System - static constexpr size_t UnixMaxPathLength = 4096; + // Fallback to 4096 if the PATH_MAX macro isn't defined on the Unix System + static constexpr size_t UnixMaxPathLength = 4096; #endif - if (!AZ::IO::PathView(path).IsAbsolute()) + if (!AZ::IO::PathView(path).IsAbsolute()) + { + // note that realpath fails if the path does not exist and actually changes the return value + // to be the actual place that FAILED, which we don't want. + // if we fail, we'd prefer to fall through and at least use the original path. + char absolutePathBuffer[UnixMaxPathLength]; + if (const char* result = realpath(path, absolutePathBuffer); result != nullptr) { - // note that realpath fails if the path does not exist and actually changes the return value - // to be the actual place that FAILED, which we don't want. - // if we fail, we'd prefer to fall through and at least use the original path. - char absolutePathBuffer[UnixMaxPathLength]; - if (const char* result = realpath(path, absolutePathBuffer); result != nullptr) - { - azstrcpy(absolutePath, maxLength, absolutePathBuffer); - return true; - } + azstrcpy(absolutePath, maxLength, absolutePathBuffer); + return true; } - azstrcpy(absolutePath, maxLength, path); - return AZ::IO::PathView(absolutePath).IsAbsolute(); } - } // namespace Utils -} // namespace AZ + azstrcpy(absolutePath, maxLength, path); + return AZ::IO::PathView(absolutePath).IsAbsolute(); + } +} // namespace AZ::Utils diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h b/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h index 6ba369e86d..2c0d554078 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/AzCore_Traits_Linux.h @@ -75,7 +75,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp index 1ca06fcf7f..e4cd0d0db4 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Debug/Trace_Linux.cpp @@ -9,16 +9,10 @@ #include #include -namespace AZ +namespace AZ::Debug::Platform { - namespace Debug + void OutputToDebugger([[maybe_unused]] const char* title, [[maybe_unused]] const char* message) { - namespace Platform - { - void OutputToDebugger([[maybe_unused]] const char* title, [[maybe_unused]] const char* message) - { - // std::cout << title << ": " << message; - } - } + // std::cout << title << ": " << message; } -} +} // namespace AZ::Debug::Platform diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp index e28832cf61..d9defd5acc 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Memory/HeapSchema_Linux.cpp @@ -8,13 +8,10 @@ #include -namespace AZ +namespace AZ::Platform { - namespace Platform + size_t GetHeapCapacity() { - size_t GetHeapCapacity() - { - return 0; - } + return 0; } -} +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp index 62718c2d46..aee2bdb622 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/DynamicModuleHandle_Linux.cpp @@ -10,28 +10,25 @@ #include #include -namespace AZ +namespace AZ::Platform { - namespace Platform + AZ::IO::FixedMaxPath GetModulePath() { - AZ::IO::FixedMaxPath GetModulePath() - { - return AZ::Utils::GetExecutableDirectory(); - } + return AZ::Utils::GetExecutableDirectory(); + } - void* OpenModule(const AZ::OSString& fileName, bool& alreadyOpen) + void* OpenModule(const AZ::OSString& fileName, bool& alreadyOpen) + { + void* handle = dlopen(fileName.c_str(), RTLD_NOLOAD); + alreadyOpen = (handle != nullptr); + if (!alreadyOpen) { - void* handle = dlopen(fileName.c_str(), RTLD_NOLOAD); - alreadyOpen = (handle != nullptr); - if (!alreadyOpen) - { - handle = dlopen(fileName.c_str(), RTLD_NOW); - } - return handle; + handle = dlopen(fileName.c_str(), RTLD_NOW); } + return handle; + } - void ConstructModuleFullFileName(AZ::IO::FixedMaxPath&) - { - } + void ConstructModuleFullFileName(AZ::IO::FixedMaxPath&) + { } -} +} // namespace AZ::Platform diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp index 39b4cbd4ea..9dfa08e554 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Module/Internal/ModuleManagerSearchPathTool_Linux.cpp @@ -8,20 +8,17 @@ #include -namespace AZ +namespace AZ::Internal { - namespace Internal + ModuleManagerSearchPathTool::ModuleManagerSearchPathTool() { - ModuleManagerSearchPathTool::ModuleManagerSearchPathTool() - { - } + } - ModuleManagerSearchPathTool::~ModuleManagerSearchPathTool() - { - } + ModuleManagerSearchPathTool::~ModuleManagerSearchPathTool() + { + } - void ModuleManagerSearchPathTool::SetModuleSearchPath(const AZ::DynamicModuleDescriptor&) - { - } - } // namespace Internal -} // namespace AZ + void ModuleManagerSearchPathTool::SetModuleSearchPath(const AZ::DynamicModuleDescriptor&) + { + } +} // namespace AZ::Internal diff --git a/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp b/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp index d75eab0139..ed4e2674c5 100644 --- a/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp +++ b/Code/Framework/AzCore/Platform/Linux/AzCore/Utils/Utils_Linux.cpp @@ -13,42 +13,39 @@ #include -namespace AZ +namespace AZ::Utils { - namespace Utils + GetExecutablePathReturnType GetExecutablePath(char* exeStorageBuffer, size_t exeStorageSize) { - GetExecutablePathReturnType GetExecutablePath(char* exeStorageBuffer, size_t exeStorageSize) - { - GetExecutablePathReturnType result; - result.m_pathIncludesFilename = true; - - // http://man7.org/linux/man-pages/man5/proc.5.html - const ssize_t bytesWritten = readlink("/proc/self/exe", exeStorageBuffer, exeStorageSize); - if (bytesWritten == -1) - { - result.m_pathStored = ExecutablePathResult::GeneralError; - } - else if (bytesWritten == exeStorageSize) - { - result.m_pathStored = ExecutablePathResult::BufferSizeNotLargeEnough; - } - else - { - // readlink doesn't null terminate - exeStorageBuffer[bytesWritten] = '\0'; - } + GetExecutablePathReturnType result; + result.m_pathIncludesFilename = true; - return result; + // http://man7.org/linux/man-pages/man5/proc.5.html + const ssize_t bytesWritten = readlink("/proc/self/exe", exeStorageBuffer, exeStorageSize); + if (bytesWritten == -1) + { + result.m_pathStored = ExecutablePathResult::GeneralError; } - - AZStd::optional GetDefaultAppRootPath() + else if (bytesWritten == exeStorageSize) { - return AZStd::nullopt; + result.m_pathStored = ExecutablePathResult::BufferSizeNotLargeEnough; } - - AZStd::optional GetDevWriteStoragePath() + else { - return AZStd::nullopt; + // readlink doesn't null terminate + exeStorageBuffer[bytesWritten] = '\0'; } + + return result; + } + + AZStd::optional GetDefaultAppRootPath() + { + return AZStd::nullopt; + } + + AZStd::optional GetDevWriteStoragePath() + { + return AZStd::nullopt; } -} +} // namespace AZ::Utils diff --git a/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h b/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h index a41b5c6baa..816a28b728 100644 --- a/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h +++ b/Code/Framework/AzCore/Platform/Mac/AzCore/AzCore_Traits_Mac.h @@ -75,7 +75,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h b/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h index 2f9fcefdbd..83cff9b54f 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/AzCore_Traits_Windows.h @@ -75,7 +75,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 1 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 1 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h b/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h index d53f4b057e..b0832c54f6 100644 --- a/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h +++ b/Code/Framework/AzCore/Platform/iOS/AzCore/AzCore_Traits_iOS.h @@ -76,7 +76,6 @@ #define AZ_TRAIT_HEAPSCHEMA_COMPILE_MALLINFO 1 #define AZ_TRAIT_IS_ABS_PATH_IF_COLON_FOUND_ANYWHERE 0 #define AZ_TRAIT_JSON_CLANG_IGNORE_UNKNOWN_WARNING 0 -#define AZ_TRAIT_MAX_JOB_MANAGER_WORKER_THREADS 0 #define AZ_TRAIT_PERF_MEMORYBENCHMARK_IS_AVAILABLE 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING 0 #define AZ_TRAIT_PUMP_SYSTEM_EVENTS_WHILE_LOADING_INTERVAL_MS 0 diff --git a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp index 3f2d9491a7..fe38451101 100644 --- a/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp +++ b/Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp @@ -608,24 +608,9 @@ namespace UnitTest AZ::Data::AssetData::AssetStatus expected_base_status = AZ::Data::AssetData::AssetStatus::Ready; EXPECT_EQ(baseStatus, expected_base_status); } - - struct DebugListener : AZ::Interface::Registrar - { - void AssetStatusUpdate(AZ::Data::AssetId id, AZ::Data::AssetData::AssetStatus status) override - { - AZ::Debug::Trace::Output( - "", AZStd::string::format("Status %s - %d\n", id.ToString().c_str(), static_cast(status)).c_str()); - } - void ReleaseAsset(AZ::Data::AssetId id) override - { - AZ::Debug::Trace::Output( - "", AZStd::string::format("Release %s\n", id.ToString().c_str()).c_str()); - } - }; - + TEST_F(AssetJobsFloodTest, RapidAcquireAndRelease) { - DebugListener listener; auto assetUuids = { MyAsset1Id, MyAsset2Id, @@ -2297,6 +2282,45 @@ namespace UnitTest AssetManager::Destroy(); } + struct MockAssetContainer : AssetContainer + { + MockAssetContainer(Asset assetData, const AssetLoadParameters& loadParams) + { + // Copying the code in the original constructor, we can't call that constructor because it will not invoke our virtual method + m_rootAsset = AssetInternal::WeakAsset(assetData); + m_containerAssetId = m_rootAsset.GetId(); + + AddDependentAssets(assetData, loadParams); + } + + protected: + AZStd::vector>> CreateAndQueueDependentAssets( + const AZStd::vector& dependencyInfoList, const AssetLoadParameters& loadParamsCopyWithNoLoadingFilter) override + { + auto result = AssetContainer::CreateAndQueueDependentAssets(dependencyInfoList, loadParamsCopyWithNoLoadingFilter); + + // Sleep for a long enough time to allow asset loads to complete and start triggering AssetReady events + // This forces the race condition to occur + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(500)); + + return result; + } + }; + + struct MockAssetManager : AssetManager + { + explicit MockAssetManager(const Descriptor& desc) + : AssetManager(desc) + { + } + + protected: + AZStd::shared_ptr CreateAssetContainer(Asset asset, const AssetLoadParameters& loadParams) const override + { + return AZStd::shared_ptr(aznew MockAssetContainer(asset, loadParams)); + } + }; + void ParallelDeepAssetReferences() { SerializeContext context; @@ -2304,7 +2328,7 @@ namespace UnitTest AssetWithAssetReference::Reflect(context); AssetManager::Descriptor desc; - AssetManager::Create(desc); + AssetManager::SetInstance(aznew MockAssetManager(desc)); auto& db = AssetManager::Instance(); @@ -2327,17 +2351,17 @@ namespace UnitTest // AssetC is MYASSETC AssetWithAssetReference c; - c.m_asset = AssetManager::Instance().CreateAsset(AssetId(MyAssetDId)); // point at D + c.m_asset = db.CreateAsset(AssetId(MyAssetDId)); // point at D EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset3.txt", AZ::DataStream::ST_XML, &c, &context)); // AssetB is MYASSETB AssetWithAssetReference b; - b.m_asset = AssetManager::Instance().CreateAsset(AssetId(MyAssetCId)); // point at C + b.m_asset = db.CreateAsset(AssetId(MyAssetCId)); // point at C EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset2.txt", AZ::DataStream::ST_XML, &b, &context)); // AssetA will be written to disk as MYASSETA AssetWithAssetReference a; - a.m_asset = AssetManager::Instance().CreateAsset(AssetId(MyAssetBId)); // point at B + a.m_asset = db.CreateAsset(AssetId(MyAssetBId)); // point at B EXPECT_TRUE(AZ::Utils::SaveObjectToFile(GetTestFolderPath() + "TestAsset1.txt", AZ::DataStream::ST_XML, &a, &context)); } @@ -2546,7 +2570,7 @@ namespace UnitTest TEST_F(AssetJobsMultithreadedTest, DISABLED_ParallelDeepAssetReferences) #else // temporarily disabled until sporadic failures can be root caused - TEST_F(AssetJobsMultithreadedTest, DISABLED_ParallelDeepAssetReferences) + TEST_F(AssetJobsMultithreadedTest, ParallelDeepAssetReferences) #endif // AZ_TRAIT_DISABLE_FAILED_ASSET_MANAGER_TESTS { ParallelDeepAssetReferences(); diff --git a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp index 4dbd3c0e1e..c6fa296cbc 100644 --- a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp +++ b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.cpp @@ -67,7 +67,10 @@ namespace UnitTest { SerializeContextFixture::SetUp(); + SuppressTraceOutput(false); + AZ::JobManagerDesc jobDesc; + AZ::JobManagerThreadDesc threadDesc; for (size_t threadCount = 0; threadCount < GetNumJobManagerThreads(); threadCount++) { @@ -111,9 +114,21 @@ namespace UnitTest delete m_jobContext; delete m_jobManager; + // Reset back to default suppression settings to avoid affecting other tests + SuppressTraceOutput(true); + SerializeContextFixture::TearDown(); } + void BaseAssetManagerTest::SuppressTraceOutput(bool suppress) + { + UnitTest::TestRunner::Instance().m_suppressAsserts = suppress; + UnitTest::TestRunner::Instance().m_suppressErrors = suppress; + UnitTest::TestRunner::Instance().m_suppressWarnings = suppress; + UnitTest::TestRunner::Instance().m_suppressPrintf = suppress; + UnitTest::TestRunner::Instance().m_suppressOutput = suppress; + } + void BaseAssetManagerTest::WriteAssetToDisk(const AZStd::string& assetName, [[maybe_unused]] const AZStd::string& assetIdGuid) { AZStd::string assetFileName = GetTestFolderPath() + assetName; diff --git a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h index 757edb3713..29c2c124cd 100644 --- a/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h +++ b/Code/Framework/AzCore/Tests/Asset/BaseAssetManagerTest.h @@ -63,6 +63,8 @@ namespace UnitTest void SetUp() override; void TearDown() override; + static void SuppressTraceOutput(bool suppress); + // Helper methods to create and destroy actual assets on the disk for true end-to-end asset loading. void WriteAssetToDisk(const AZStd::string& assetName, const AZStd::string& assetIdGuid); void DeleteAssetFromDisk(const AZStd::string& assetName); diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp index c1c5775958..a60a657d87 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include #include @@ -43,8 +42,10 @@ namespace AZ::IO { - AZ_CVAR(int, sys_PakPriority, aznumeric_cast(ArchiveVars{}.nPriority), nullptr, AZ::ConsoleFunctorFlags::Null, - "If set to 1, tells Archive to try to open the file in pak first, then go to file system"); + AZ_CVAR(int, sys_PakPriority, aznumeric_cast(ArchiveVars{}.m_fileSearchPriority), nullptr, AZ::ConsoleFunctorFlags::Null, + "If set to 0, tells Archive to try to open the file on the file system first othewise check mounted paks.\n" + "If set to 1, tells Archive to try to open the file in pak first, then go to file system.\n" + "If set to 2, tells the Archive to only open files from the pak"); AZ_CVAR(int, sys_PakMessageInvalidFileAccess, ArchiveVars{}.nMessageInvalidFileAccess, nullptr, AZ::ConsoleFunctorFlags::Null, "Message Box synchronous file access when in game"); @@ -437,9 +438,9 @@ namespace AZ::IO ////////////////////////////////////////////////////////////////////////// - bool Archive::IsFileExist(AZStd::string_view sFilename, EFileSearchLocation fileLocation) + bool Archive::IsFileExist(AZStd::string_view sFilename, FileSearchLocation fileLocation) { - const AZ::IO::ArchiveLocationPriority nVarPakPriority = GetPakPriority(); + const AZ::IO::FileSearchPriority nVarPakPriority = GetPakPriority(); auto szFullPath = AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(sFilename); if (!szFullPath) @@ -450,25 +451,25 @@ namespace AZ::IO switch(fileLocation) { - case IArchive::eFileLocation_Any: + case FileSearchLocation::Any: // Search for file based on pak priority switch (nVarPakPriority) { - case ArchiveLocationPriority::ePakPriorityFileFirst: + case FileSearchPriority::FileFirst: return FileIOBase::GetDirectInstance()->Exists(szFullPath->c_str()) || FindPakFileEntry(szFullPath->Native()); - case ArchiveLocationPriority::ePakPriorityPakFirst: + case FileSearchPriority::PakFirst: return FindPakFileEntry(szFullPath->Native()) || IO::FileIOBase::GetDirectInstance()->Exists(szFullPath->c_str()); - case ArchiveLocationPriority::ePakPriorityPakOnly: + case FileSearchPriority::PakOnly: return FindPakFileEntry(szFullPath->Native()); default: - AZ_Assert(false, "PakPriority %d doesn't match a value in the ArchiveLocationPriority enum", + AZ_Assert(false, "PakPriority %d doesn't match a value in the FileSearchPriority enum", aznumeric_cast(nVarPakPriority)); } break; - case IArchive::eFileLocation_InPak: + case FileSearchLocation::InPak: return FindPakFileEntry(szFullPath->Native()); - case IArchive::eFileLocation_OnDisk: - if (nVarPakPriority != ArchiveLocationPriority::ePakPriorityPakOnly) + case FileSearchLocation::OnDisk: + if (nVarPakPriority != FileSearchPriority::PakOnly) { return FileIOBase::GetDirectInstance()->Exists(szFullPath->c_str()); } @@ -485,7 +486,7 @@ namespace AZ::IO ////////////////////////////////////////////////////////////////////////// bool Archive::IsFolder(AZStd::string_view sPath) { - AZStd::fixed_string filePath{ sPath }; + AZ::IO::FixedMaxPath filePath{ sPath }; return AZ::IO::FileIOBase::GetDirectInstance()->IsDirectory(filePath.c_str()); } @@ -515,7 +516,7 @@ namespace AZ::IO // get the priority into local variable to avoid it changing in the course of // this function execution (?) - const ArchiveLocationPriority nVarPakPriority = GetPakPriority(); + const FileSearchPriority nVarPakPriority = GetPakPriority(); AZ::IO::OpenMode nOSFlags = AZ::IO::GetOpenModeFromStringMode(szMode); @@ -628,17 +629,17 @@ namespace AZ::IO switch (nVarPakPriority) { - case ArchiveLocationPriority::ePakPriorityFileFirst: + case FileSearchPriority::FileFirst: { AZ::IO::HandleType fileHandle = OpenFromFileSystem(); return fileHandle != AZ::IO::InvalidHandle ? fileHandle : OpenFromArchive(); } - case ArchiveLocationPriority::ePakPriorityPakFirst: + case FileSearchPriority::PakFirst: { AZ::IO::HandleType fileHandle = OpenFromArchive(); return fileHandle != AZ::IO::InvalidHandle ? fileHandle : OpenFromFileSystem(); } - case ArchiveLocationPriority::ePakPriorityPakOnly: + case FileSearchPriority::PakOnly: { return OpenFromArchive(); } @@ -810,7 +811,7 @@ namespace AZ::IO return 0; } - if (GetPakPriority() == ArchiveLocationPriority::ePakPriorityFileFirst) // if the file system files have priority now.. + if (GetPakPriority() == FileSearchPriority::FileFirst) // if the file system files have priority now.. { IArchive::SignedFileSize nFileSize = GetFileSizeOnDisk(fullPath->Native()); if (nFileSize != IArchive::FILE_NOT_PRESENT) @@ -825,7 +826,7 @@ namespace AZ::IO return pFileEntry->desc.lSizeUncompressed; } - if (bAllowUseFileSystem || GetPakPriority() == ArchiveLocationPriority::ePakPriorityPakFirst) // if the archive files had more priority, we didn't attempt fopen before- try it now + if (bAllowUseFileSystem || GetPakPriority() == FileSearchPriority::PakFirst) // if the archive files had more priority, we didn't attempt fopen before- try it now { IArchive::SignedFileSize nFileSize = GetFileSizeOnDisk(fullPath->Native()); if (nFileSize != IArchive::FILE_NOT_PRESENT) @@ -1023,7 +1024,7 @@ namespace AZ::IO ////////////////////////////////////////////////////////////////////////// - AZ::IO::ArchiveFileIterator Archive::FindFirst(AZStd::string_view pDir, EFileSearchType searchType) + AZ::IO::ArchiveFileIterator Archive::FindFirst(AZStd::string_view pDir, FileSearchLocation searchType) { auto szFullPath = AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(pDir); if (!szFullPath) @@ -1036,18 +1037,21 @@ namespace AZ::IO bool bAllowUseFileSystem{}; switch (searchType) { - case IArchive::eFileSearchType_AllowInZipsOnly: - bAllowUseFileSystem = false; - bScanZips = true; - break; - case IArchive::eFileSearchType_AllowOnDiskAndInZips: - bAllowUseFileSystem = true; - bScanZips = true; - break; - case IArchive::eFileSearchType_AllowOnDiskOnly: - bAllowUseFileSystem = true; - bScanZips = false; - break; + case FileSearchLocation::InPak: + bAllowUseFileSystem = false; + bScanZips = true; + break; + case FileSearchLocation::Any: + bAllowUseFileSystem = true; + bScanZips = true; + break; + case FileSearchLocation::OnDisk: + bAllowUseFileSystem = true; + bScanZips = false; + break; + default: + AZ_Assert(false, "Invalid search location value supplied"); + break; } AZStd::intrusive_ptr pFindData = aznew AZ::IO::FindData(); @@ -1218,7 +1222,7 @@ namespace AZ::IO else { // [LYN-2376] Remove once legacy slice support is removed - AZStd::vector levelDirs; + AZStd::vector levelDirs; if (addLevels) { @@ -1241,6 +1245,10 @@ namespace AZ::IO m_arrZips.insert(revItZip.base(), desc); + // This lock is for m_arrZips. + // Unlock it now because the modification is complete, and events responding to this signal + // will attempt to lock the same mutex, causing the application to lock up. + lock.unlock(); m_levelOpenEvent.Signal(levelDirs); } @@ -1376,7 +1384,7 @@ namespace AZ::IO return true; } - if (AZ::IO::ArchiveFileIterator fileIterator = FindFirst(pWildcardIn, IArchive::eFileSearchType_AllowOnDiskOnly); fileIterator) + if (AZ::IO::ArchiveFileIterator fileIterator = FindFirst(pWildcardIn, FileSearchLocation::OnDisk); fileIterator) { AZStd::vector files; do @@ -1951,15 +1959,15 @@ namespace AZ::IO } // gets the current archive priority - ArchiveLocationPriority Archive::GetPakPriority() const + FileSearchPriority Archive::GetPakPriority() const { - int pakPriority = aznumeric_cast(ArchiveVars{}.nPriority); + FileSearchPriority pakPriority = ArchiveVars{}.m_fileSearchPriority; if (auto console = AZ::Interface::Get(); console != nullptr) { - [[maybe_unused]] AZ::GetValueResult getCvarResult = console->GetCvarValue("sys_PakPriority", pakPriority); + [[maybe_unused]] AZ::GetValueResult getCvarResult = console->GetCvarValue("sys_PakPriority", reinterpret_cast(pakPriority)); AZ_Error("Archive", getCvarResult == AZ::GetValueResult::Success, "Lookup of 'sys_PakPriority console variable failed with error %s", AZ::GetEnumString(getCvarResult)); } - return static_cast(pakPriority); + return pakPriority; } ////////////////////////////////////////////////////////////////////////// @@ -2026,13 +2034,13 @@ namespace AZ::IO switch (GetPakPriority()) { - case ArchiveLocationPriority::ePakPriorityFileFirst: + case FileSearchPriority::FileFirst: info.m_conflictResolution = AZ::IO::ConflictResolution::PreferFile; break; - case ArchiveLocationPriority::ePakPriorityPakFirst: + case FileSearchPriority::PakFirst: info.m_conflictResolution = AZ::IO::ConflictResolution::PreferArchive; break; - case ArchiveLocationPriority::ePakPriorityPakOnly: + case FileSearchPriority::PakOnly: info.m_conflictResolution = AZ::IO::ConflictResolution::UseArchiveOnly; break; } @@ -2143,13 +2151,13 @@ namespace AZ::IO return manifestInfo; } - AZStd::vector Archive::ScanForLevels(ZipDir::CachePtr pZip) + AZStd::vector Archive::ScanForLevels(ZipDir::CachePtr pZip) { - AZStd::queue scanDirs; - AZStd::vector levelDirs; - AZStd::string currentDir = "levels"; - AZStd::string currentDirPattern; - AZStd::string currentFilePattern; + AZStd::queue scanDirs; + AZStd::vector levelDirs; + AZ::IO::Path currentDir = "levels"; + AZ::IO::Path currentDirPattern; + AZ::IO::Path currentFilePattern; ZipDir::FindDir findDir(pZip); findDir.FindFirst(currentDir.c_str()); @@ -2167,11 +2175,10 @@ namespace AZ::IO scanDirs.pop(); } - currentDirPattern = currentDir + AZ_FILESYSTEM_SEPARATOR_WILDCARD; - currentFilePattern = currentDir + AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING + "level.pak"; + currentDirPattern = currentDir / "*"; + currentFilePattern = currentDir / "level.pak"; - ZipDir::FileEntry* fileEntry = findFile.FindExact(currentFilePattern.c_str()); - if (fileEntry) + if (ZipDir::FileEntry* fileEntry = findFile.FindExact(currentFilePattern); fileEntry) { levelDirs.emplace_back(currentDir); continue; @@ -2179,9 +2186,7 @@ namespace AZ::IO for (findDir.FindFirst(currentDirPattern.c_str()); findDir.GetDirEntry(); findDir.FindNext()) { - AZStd::string_view dirName = findDir.GetDirName(); - AZStd::string dirToAdd = AZStd::string::format("%s/%.*s", currentDir.data(), aznumeric_cast(dirName.size()), dirName.data()); - scanDirs.push(dirToAdd); + scanDirs.push(currentDir / findDir.GetDirName()); } } while (!scanDirs.empty()); diff --git a/Code/Framework/AzFramework/AzFramework/Archive/Archive.h b/Code/Framework/AzFramework/AzFramework/Archive/Archive.h index 279702b433..d429aa8f17 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/Archive.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/Archive.h @@ -207,7 +207,7 @@ namespace AZ::IO uint64_t FTell(AZ::IO::HandleType handle) override; int FFlush(AZ::IO::HandleType handle) override; int FClose(AZ::IO::HandleType handle) override; - AZ::IO::ArchiveFileIterator FindFirst(AZStd::string_view pDir, EFileSearchType searchType = eFileSearchType_AllowInZipsOnly) override; + AZ::IO::ArchiveFileIterator FindFirst(AZStd::string_view pDir, FileSearchLocation searchType = FileSearchLocation::InPak) override; AZ::IO::ArchiveFileIterator FindNext(AZ::IO::ArchiveFileIterator fileIterator) override; bool FindClose(AZ::IO::ArchiveFileIterator fileIterator) override; int FEof(AZ::IO::HandleType handle) override; @@ -219,7 +219,7 @@ namespace AZ::IO bool RemoveDir(AZStd::string_view pName) override; // remove directory from FS (if supported) bool IsAbsPath(AZStd::string_view pPath) override; - bool IsFileExist(AZStd::string_view sFilename, EFileSearchLocation fileLocation = eFileLocation_Any) override; + bool IsFileExist(AZStd::string_view sFilename, FileSearchLocation fileLocation = FileSearchLocation::Any) override; bool IsFolder(AZStd::string_view sPath) override; IArchive::SignedFileSize GetFileSizeOnDisk(AZStd::string_view filename) override; @@ -255,7 +255,7 @@ namespace AZ::IO bool DisableRuntimeFileAccess(bool status, AZStd::thread_id threadId) override; // gets the current archive priority - ArchiveLocationPriority GetPakPriority() const override; + FileSearchPriority GetPakPriority() const override; uint64_t GetFileOffsetOnMedia(AZStd::string_view szName) const override; @@ -305,7 +305,7 @@ namespace AZ::IO AZStd::shared_ptr GetBundleCatalog(ZipDir::CachePtr pZip, const AZStd::string& catalogName); // [LYN-2376] Remove once legacy slice support is removed - AZStd::vector ScanForLevels(ZipDir::CachePtr pZip); + AZStd::vector ScanForLevels(ZipDir::CachePtr pZip); mutable AZStd::shared_mutex m_csOpenFiles; ZipPseudoFileArray m_arrOpenFiles; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp index 9e6e1034ea..8cc2b9dfb4 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFileIO.cpp @@ -169,7 +169,7 @@ namespace AZ::IO size = m_archive->FGetSize(filePath, true); if (!size) { - return m_archive->IsFileExist(filePath, IArchive::eFileLocation_Any) ? IO::ResultCode::Success : IO::ResultCode::Error; + return m_archive->IsFileExist(filePath, FileSearchLocation::Any) ? IO::ResultCode::Success : IO::ResultCode::Error; } return IO::ResultCode::Success; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp index 7b483dc5de..9e4290131e 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveFindData.cpp @@ -78,9 +78,9 @@ namespace AZ::IO { // get the priority into local variable to avoid it changing in the course of // this function execution - ArchiveLocationPriority nVarPakPriority = archive->GetPakPriority(); + FileSearchPriority nVarPakPriority = archive->GetPakPriority(); - if (nVarPakPriority == ArchiveLocationPriority::ePakPriorityFileFirst) + if (nVarPakPriority == FileSearchPriority::FileFirst) { // first, find the file system files ScanFS(archive, szDir); @@ -96,7 +96,7 @@ namespace AZ::IO { ScanZips(archive, szDir); } - if (bAllowUseFS || nVarPakPriority != ArchiveLocationPriority::ePakPriorityPakOnly) + if (bAllowUseFS || nVarPakPriority != FileSearchPriority::PakOnly) { ScanFS(archive, szDir); } diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.cpp b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.cpp new file mode 100644 index 0000000000..0098d97b8d --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.cpp @@ -0,0 +1,24 @@ +/* + * 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 + +namespace AZ::IO +{ + FileSearchPriority GetDefaultFileSearchPriority() + { +#if defined(LY_ARCHIVE_FILE_SEARCH_MODE) + return FileSearchPriority{ LY_ARCHIVE_FILE_SEARCH_MODE }; +#else + return FileSearchPriority{ !ArchiveVars::IsReleaseConfig + ? FileSearchPriority::FileFirst + : FileSearchPriority::PakOnly }; +#endif + } +} diff --git a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h index 931b07fa71..253e3b0c5b 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/ArchiveVars.h @@ -13,13 +13,24 @@ namespace AZ::IO { - enum class ArchiveLocationPriority + enum class FileSearchPriority { - ePakPriorityFileFirst = 0, - ePakPriorityPakFirst = 1, - ePakPriorityPakOnly = 2 + FileFirst, + PakFirst, + PakOnly }; + + //file location enum used in isFileExist to control where the archive system looks for the file. + enum class FileSearchLocation + { + Any, + OnDisk, + InPak + }; + + FileSearchPriority GetDefaultFileSearchPriority(); + // variables that control behavior of the Archive subsystem struct ArchiveVars { @@ -28,8 +39,6 @@ namespace AZ::IO #else inline static constexpr bool IsReleaseConfig{}; #endif - - public: int nReadSlice{}; int nSaveTotalResourceList{}; int nSaveFastloadResourceList{}; @@ -42,9 +51,7 @@ namespace AZ::IO int nLoadCache{}; int nLoadModePaks{}; int nStreamCache{ STREAM_CACHE_DEFAULT }; - ArchiveLocationPriority nPriority{ IsReleaseConfig - ? ArchiveLocationPriority::ePakPriorityPakOnly - : ArchiveLocationPriority::ePakPriorityFileFirst }; // Which file location to favor (loose vs. pak files) + FileSearchPriority m_fileSearchPriority{ GetDefaultFileSearchPriority()}; int nMessageInvalidFileAccess{}; int nLogInvalidFileAccess{ IsReleaseConfig ? 0 : 1 }; int nDisableNonLevelRelatedPaks{ 1 }; diff --git a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h index bd9615110a..d7eaee6e24 100644 --- a/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h +++ b/Code/Framework/AzFramework/AzFramework/Archive/IArchive.h @@ -18,13 +18,13 @@ #include #include - +#include enum EStreamSourceMediaType : int32_t; namespace AZ::IO { - enum class ArchiveLocationPriority; + enum class FileSearchPriority; struct IResourceList; struct INestedArchive; struct IArchive; @@ -114,14 +114,6 @@ namespace AZ::IO RFOM_NextLevel // used for level2level loading }; - //file location enum used in isFileExist to control where the archive system looks for the file. - enum EFileSearchLocation - { - eFileLocation_Any = 0, - eFileLocation_OnDisk, - eFileLocation_InPak, - }; - enum EInMemoryArchiveLocation { eInMemoryPakLocale_Unload = 0, @@ -130,12 +122,6 @@ namespace AZ::IO eInMemoryPakLocale_PAK, }; - enum EFileSearchType - { - eFileSearchType_AllowInZipsOnly = 0, - eFileSearchType_AllowOnDiskAndInZips, - eFileSearchType_AllowOnDiskOnly - }; using SignedFileSize = int64_t; @@ -213,7 +199,7 @@ namespace AZ::IO virtual AZStd::intrusive_ptr PoolAllocMemoryBlock(size_t nSize, const char* sUsage, size_t nAlign = 1) = 0; // Arguments: - virtual ArchiveFileIterator FindFirst(AZStd::string_view pDir, EFileSearchType searchType = eFileSearchType_AllowInZipsOnly) = 0; + virtual ArchiveFileIterator FindFirst(AZStd::string_view pDir, FileSearchLocation searchType = FileSearchLocation::InPak) = 0; virtual ArchiveFileIterator FindNext(AZ::IO::ArchiveFileIterator handle) = 0; virtual bool FindClose(AZ::IO::ArchiveFileIterator handle) = 0; //returns file modification time @@ -221,7 +207,7 @@ namespace AZ::IO // Description: // Checks if specified file exist in filesystem. - virtual bool IsFileExist(AZStd::string_view sFilename, EFileSearchLocation = eFileLocation_Any) = 0; + virtual bool IsFileExist(AZStd::string_view sFilename, FileSearchLocation = FileSearchLocation::Any) = 0; // Checks if path is a folder virtual bool IsFolder(AZStd::string_view sPath) = 0; @@ -283,7 +269,7 @@ namespace AZ::IO virtual bool DisableRuntimeFileAccess(bool status, AZStd::thread_id threadId) = 0; // gets the current pak priority - virtual ArchiveLocationPriority GetPakPriority() const = 0; + virtual FileSearchPriority GetPakPriority() const = 0; // Summary: // Return offset in archive file (ideally has to return offset on DVD) for streaming requests sorting @@ -295,7 +281,7 @@ namespace AZ::IO // Event sent when a archive file is opened that contains a level.pak // @param const AZStd::vector& - Array of directories containing level.pak files - using LevelPackOpenEvent = AZ::Event&>; + using LevelPackOpenEvent = AZ::Event&>; virtual auto GetLevelPackOpenEvent()->LevelPackOpenEvent* = 0; // Event sent when a archive contains a level.pak is closed // @param const AZStd::string_view - Name of the pak file that was closed diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp index 43a5e8fdb3..b4da5745be 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.cpp @@ -7,23 +7,153 @@ */ #include +#include +#include #include namespace AzFramework { - - const int AssetBundleManifest::CurrentBundleVersion = 2; + // Redirects writing of the AssetBundleManifest to an older version if the bundle version + // is not set to the current version + static void OldBundleManifestWriter(AZ::SerializeContext::EnumerateInstanceCallContext& callContext, const void* bundleManifestPointer, + const AZ::SerializeContext::ClassData&, const AZ::SerializeContext::ClassElement* assetBundleManifestClassElement); + + static bool BundleManifestVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootElement); + + const int AssetBundleManifest::CurrentBundleVersion = 3; const char AssetBundleManifest::s_manifestFileName[] = "manifest.xml"; + + AssetBundleManifest::AssetBundleManifest() = default; + AssetBundleManifest::~AssetBundleManifest() = default; + void AssetBundleManifest::ReflectSerialize(AZ::SerializeContext* serializeContext) { if (serializeContext) { serializeContext->Class() - ->Version(2) + ->Version(CurrentBundleVersion, &BundleManifestVersionConverter) + ->Attribute(AZ::SerializeContextAttributes::ObjectStreamWriteElementOverride, &OldBundleManifestWriter) ->Field("BundleVersion", &AssetBundleManifest::m_bundleVersion) ->Field("CatalogName", &AssetBundleManifest::m_catalogName) - ->Field("DependentBundleNames", &AssetBundleManifest::m_depedendentBundleNames) + ->Field("DependentBundleNames", &AssetBundleManifest::m_dependentBundleNames) ->Field("LevelNames", &AssetBundleManifest::m_levelDirs); + + // Make sure the AZStd::vector type is reflected so that it can be read + // using DataElement::GetChildData + serializeContext->RegisterGenericType>(); + } + } + + bool BundleManifestVersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& rootElement) + { + if (rootElement.GetVersion() < 3) + { + static constexpr AZ::u32 levelNamesCrc = AZ_CRC_CE("LevelNames"); + AZStd::vector newLevelDirs; + if (AZStd::vector oldLevelNames; rootElement.GetChildData(levelNamesCrc, oldLevelNames)) + { + newLevelDirs.insert(newLevelDirs.end(), + AZStd::make_move_iterator(oldLevelNames.begin()), AZStd::make_move_iterator(oldLevelNames.end())); + } + else + { + AZ_Error("AssetBundleManifest", false, R"(Unable to read "levelNames" from AssetBundleManifest version %u )", + rootElement.GetVersion()); + } + + rootElement.RemoveElementByName(levelNamesCrc); + rootElement.AddElementWithData(context, "LevelNames", newLevelDirs); + } + return true; + } + + void OldBundleManifestWriter(AZ::SerializeContext::EnumerateInstanceCallContext& callContext, const void* bundleManifestPointer, + const AZ::SerializeContext::ClassData&, const AZ::SerializeContext::ClassElement* assetBundleManifestClassElement) + { + // Copy the AssetBundleManifest current version instance to the AssetBundleManifest V2 instance + auto assetBundleManifestCurrent = reinterpret_cast(bundleManifestPointer); + if (assetBundleManifestCurrent->GetBundleVersion() <= 2) + { + auto serializeContext = const_cast(callContext.m_context); + + struct AssetBundleManifestV2 + { + // Use the same ClassName and typeid as the AssetBundleManifest + AZ_TYPE_INFO(AssetBundleManifest, azrtti_typeid()); + AZStd::string m_catalogName; + AZStd::vector m_dependentBundleNames; + AZStd::vector m_levelDirs; + int m_bundleVersion{}; + }; + auto ReflectAssetBundleManifestV2 = [](AZ::SerializeContext* serializeContext) + { + serializeContext->Class() + ->Version(2) + ->Field("BundleVersion", &AssetBundleManifestV2::m_bundleVersion) + ->Field("CatalogName", &AssetBundleManifestV2::m_catalogName) + ->Field("DependentBundleNames", &AssetBundleManifestV2::m_dependentBundleNames) + ->Field("LevelNames", &AssetBundleManifestV2::m_levelDirs); + }; + + // Unreflect the AssetBundleManifest class at the version since it shares the same typeid + // as the older version and Reflect the V2 AssetBundlerManifest + serializeContext->EnableRemoveReflection(); + AssetBundleManifest::ReflectSerialize(serializeContext); + serializeContext->DisableRemoveReflection(); + ReflectAssetBundleManifestV2(serializeContext); + + // Use the Current AssetBundleManifest instance to make a Version 2 AssetBundleManifest + AssetBundleManifestV2 assetBundleManifestV2; + assetBundleManifestV2.m_catalogName = assetBundleManifestCurrent->GetCatalogName(); + assetBundleManifestV2.m_dependentBundleNames = assetBundleManifestCurrent->GetDependentBundleNames(); + assetBundleManifestV2.m_bundleVersion = assetBundleManifestCurrent->GetBundleVersion(); + for (const AZ::IO::Path& levelDir : assetBundleManifestCurrent->GetLevelDirectories()) + { + assetBundleManifestV2.m_levelDirs.emplace_back(levelDir.Native()); + } + + const AZ::TypeId& assetBundlerManifestTypeId = azrtti_typeid(); + const auto assetBundleManifestV2ClassData = serializeContext->FindClassData(assetBundlerManifestTypeId); + + // Create an AssetBundleManifest Version 2 Class Eleemnt + // It will copy over the name and nameCrc values of the current AssetBundleManifestelemnt + auto CreateAssetBundleManifestV2ClassElement = [&assetBundlerManifestTypeId]( + const AZ::SerializeContext::ClassElement* currentVersionElement) -> AZ::SerializeContext::ClassElement + { + AZ::SerializeContext::ClassElement v2ClassElement; + // Copy over the name of he current + if (currentVersionElement) + { + v2ClassElement.m_name = currentVersionElement->m_name; + v2ClassElement.m_nameCrc = currentVersionElement->m_nameCrc; + } + v2ClassElement.m_dataSize = sizeof(AssetBundleManifest); + v2ClassElement.m_azRtti = AZ::GetRttiHelper(); + v2ClassElement.m_genericClassInfo = nullptr; + v2ClassElement.m_typeId = assetBundlerManifestTypeId; + v2ClassElement.m_editData = nullptr; + v2ClassElement.m_attributeOwnership = AZ::SerializeContext::ClassElement::AttributeOwnership::Self; + return v2ClassElement; + }; + const auto assetBundleManifestV2ClassElement = CreateAssetBundleManifestV2ClassElement(assetBundleManifestClassElement); + + serializeContext->EnumerateInstanceConst(&callContext, &assetBundleManifestV2, assetBundlerManifestTypeId, + assetBundleManifestV2ClassData, assetBundleManifestClassElement ? &assetBundleManifestV2ClassElement : nullptr); + + // Unreflect the V2 AssetBundleManifest and Re-reflect the AssetBundleManifest class at the current version + serializeContext->EnableRemoveReflection(); + ReflectAssetBundleManifestV2(serializeContext); + serializeContext->DisableRemoveReflection(); + AssetBundleManifest::ReflectSerialize(serializeContext); } } + + const AZStd::vector& AssetBundleManifest::GetLevelDirectories() const + { + return m_levelDirs; + } + void AssetBundleManifest::SetLevelsDirectory(const AZStd::vector& levelDirs) + { + m_levelDirs = levelDirs; + } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h index 9760482231..eb0390a8c0 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetBundleManifest.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include #include @@ -27,7 +28,8 @@ namespace AzFramework AZ_TYPE_INFO(AssetBundleManifest, "{8628A669-7B19-4C48-A7CB-F670CC9586FD}"); AZ_CLASS_ALLOCATOR(AssetBundleManifest, AZ::SystemAllocator, 0); - AssetBundleManifest() = default; + AssetBundleManifest(); + ~AssetBundleManifest(); static void ReflectSerialize(AZ::SerializeContext* serializeContext); @@ -35,21 +37,21 @@ namespace AzFramework // of files within the AssetBundle in order to update the Asset Registry at runtime when // loading the bundle const AZStd::string& GetCatalogName() const { return m_catalogName; } - AZStd::vector GetDependentBundleNames() const { return m_depedendentBundleNames; } - AZStd::vector GetLevelDirectories() const { return m_levelDirs; } + AZStd::vector GetDependentBundleNames() const { return m_dependentBundleNames; } + const AZStd::vector& GetLevelDirectories() const; int GetBundleVersion() const { return m_bundleVersion; } void SetCatalogName(const AZStd::string& catalogName) { m_catalogName = catalogName; } void SetBundleVersion(int bundleVersion) { m_bundleVersion = bundleVersion; } - void SetDependentBundleNames(const AZStd::vector& dependentBundleNames) { m_depedendentBundleNames = dependentBundleNames; } - void SetLevelsDirectory(const AZStd::vector& levelDirs) { m_levelDirs = levelDirs; } + void SetDependentBundleNames(const AZStd::vector& dependentBundleNames) { m_dependentBundleNames = dependentBundleNames; } + void SetLevelsDirectory(const AZStd::vector& levelDirs); static const char s_manifestFileName[]; static const int CurrentBundleVersion; - private: + private: AZStd::string m_catalogName; - AZStd::vector m_depedendentBundleNames; - AZStd::vector m_levelDirs; + AZStd::vector m_dependentBundleNames; + AZStd::vector m_levelDirs; int m_bundleVersion = CurrentBundleVersion; }; diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp index 3d76bcefc4..0c6b195434 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.cpp @@ -1186,7 +1186,7 @@ namespace AzFramework } - bool AssetCatalog::CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) + bool AssetCatalog::CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) { if (bundleVersion > AzFramework::AssetBundleManifest::CurrentBundleVersion || bundleVersion < 0) { diff --git a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h index 64f3c2e3d2..20f1355e7f 100644 --- a/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h +++ b/Code/Framework/AzFramework/AzFramework/Asset/AssetCatalog.h @@ -67,7 +67,7 @@ namespace AzFramework bool InsertDeltaCatalogBefore(AZStd::shared_ptr deltaCatalog, AZStd::shared_ptr afterDeltaCatalog) override; bool RemoveDeltaCatalog(AZStd::shared_ptr deltaCatalog) override; static bool SaveAssetBundleManifest(const char* assetBundleManifestFile, AzFramework::AssetBundleManifest* bundleManifest); - bool CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) override; + bool CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) override; bool CreateDeltaCatalog(const AZStd::vector& files, const AZStd::string& filePath) override; void AddExtension(const char* extension) override; diff --git a/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h b/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h index 49506364f4..b81a0ab7f0 100644 --- a/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h +++ b/Code/Framework/AzFramework/AzFramework/Entity/EntityDebugDisplayBus.h @@ -76,9 +76,12 @@ namespace AzFramework virtual void DrawSolidCone(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius, float height, bool drawShaded = true) { (void)pos; (void)dir; (void)radius; (void)height; (void)drawShaded; } virtual void DrawWireCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) { (void)center; (void)axis; (void)radius; (void)height; } virtual void DrawSolidCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded = true) { (void)center; (void)axis; (void)radius; (void)height; (void)drawShaded; } + virtual void DrawWireCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) { (void)center; (void)axis; (void)radius; (void)height; } + virtual void DrawSolidCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded = true) { (void)center; (void)axis; (void)radius; (void)height; (void)drawShaded; } virtual void DrawWireCapsule(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float heightStraightSection) { (void)center; (void)axis; (void)radius; (void)heightStraightSection; } virtual void DrawWireSphere(const AZ::Vector3& pos, float radius) { (void)pos; (void)radius; } virtual void DrawWireSphere(const AZ::Vector3& pos, const AZ::Vector3 radius) { (void)pos; (void)radius; } + virtual void DrawWireHemisphere(const AZ::Vector3& pos, const AZ::Vector3& axis, float radius) { (void)pos; (void)axis; (void)radius; } virtual void DrawWireDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) { (void)pos; (void)dir; (void)radius; } virtual void DrawBall(const AZ::Vector3& pos, float radius, bool drawShaded = true) { (void)pos; (void)radius; (void)drawShaded; } virtual void DrawDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) { (void)pos; (void)dir; (void)radius; } diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp index 26c9db64aa..771884ac6a 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.cpp @@ -94,27 +94,27 @@ namespace AzFramework float y; float z; - // 2.4 Factor as RzRyRx - if (orientation.GetElement(2, 0) < 1.0f) + // 2.5 Factor as RzRxRy + if (orientation.GetElement(2, 1) < 1.0f) { - if (orientation.GetElement(2, 0) > -1.0f) + if (orientation.GetElement(2, 1) > -1.0f) { - x = AZStd::atan2(orientation.GetElement(2, 1), orientation.GetElement(2, 2)); - y = AZStd::asin(-orientation.GetElement(2, 0)); - z = AZStd::atan2(orientation.GetElement(1, 0), orientation.GetElement(0, 0)); + x = AZStd::asin(orientation.GetElement(2, 1)); + y = AZStd::atan2(-orientation.GetElement(2, 0), orientation.GetElement(2, 2)); + z = AZStd::atan2(-orientation.GetElement(0, 1), orientation.GetElement(1, 1)); } else { - x = 0.0f; - y = AZ::Constants::Pi * 0.5f; - z = -AZStd::atan2(-orientation.GetElement(2, 1), orientation.GetElement(1, 1)); + x = -AZ::Constants::Pi * 0.5f; + y = 0.0f; + z = -AZStd::atan2(orientation.GetElement(0, 2), orientation.GetElement(0, 0)); } } else { - x = 0.0f; - y = -AZ::Constants::Pi * 0.5f; - z = AZStd::atan2(-orientation.GetElement(1, 2), orientation.GetElement(1, 1)); + x = AZ::Constants::Pi * 0.5f; + y = 0.0f; + z = AZStd::atan2(orientation.GetElement(0, 2), orientation.GetElement(0, 0)); } return { x, y, z }; @@ -122,14 +122,36 @@ namespace AzFramework void UpdateCameraFromTransform(Camera& camera, const AZ::Transform& transform) { - const auto eulerAngles = AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromTransform(transform)); + UpdateCameraFromTranslationAndRotation( + camera, transform.GetTranslation(), AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromTransform(transform))); + } + void UpdateCameraFromTranslationAndRotation(Camera& camera, const AZ::Vector3& translation, const AZ::Vector3& eulerAngles) + { camera.m_pitch = eulerAngles.GetX(); camera.m_yaw = eulerAngles.GetZ(); - camera.m_pivot = transform.GetTranslation(); + camera.m_pivot = translation; camera.m_offset = AZ::Vector3::CreateZero(); } + float SmoothValueTime(const float smoothness, float deltaTime) + { + // note: the math for the lerp smoothing implementation for camera rotation and translation was inspired by this excellent + // article by Scott Lembcke: https://www.gamasutra.com/blogs/ScottLembcke/20180404/316046/Improved_Lerp_Smoothing.php + const float rate = AZStd::exp2(smoothness); + return AZStd::exp2(-rate * deltaTime); + } + + float SmoothValue(const float target, const float current, const float time) + { + return AZ::Lerp(target, current, time); + } + + float SmoothValue(const float target, const float current, const float smoothness, const float deltaTime) + { + return SmoothValue(target, current, SmoothValueTime(smoothness, deltaTime)); + } + bool CameraSystem::HandleEvents(const InputEvent& event) { if (const auto& cursor = AZStd::get_if(&event)) @@ -291,6 +313,11 @@ namespace AzFramework { return false; }; + + m_constrainPitch = []() constexpr + { + return true; + }; } bool RotateCameraInput::HandleEvents(const InputEvent& event, const ScreenVector& cursorDelta, [[maybe_unused]] const float scrollDelta) @@ -312,7 +339,10 @@ namespace AzFramework nextCamera.m_yaw -= float(cursorDelta.m_x) * rotateSpeed * Invert(m_invertYawFn()); nextCamera.m_yaw = WrapYawRotation(nextCamera.m_yaw); - nextCamera.m_pitch = ClampPitchRotation(nextCamera.m_pitch); + if (m_constrainPitch()) + { + nextCamera.m_pitch = ClampPitchRotation(nextCamera.m_pitch); + } return nextCamera; } @@ -726,14 +756,14 @@ namespace AzFramework Camera SmoothCamera(const Camera& currentCamera, const Camera& targetCamera, const CameraProps& cameraProps, const float deltaTime) { - const auto clamp_rotation = [](const float angle) + const auto clampRotation = [](const float angle) { return AZStd::fmod(angle + AZ::Constants::TwoPi, AZ::Constants::TwoPi); }; // keep yaw in 0 - 360 range - float targetYaw = clamp_rotation(targetCamera.m_yaw); - const float currentYaw = clamp_rotation(currentCamera.m_yaw); + float targetYaw = clampRotation(targetCamera.m_yaw); + const float currentYaw = clampRotation(currentCamera.m_yaw); // return the sign of the float input (-1, 0, 1) const auto sign = [](const float value) @@ -742,21 +772,17 @@ namespace AzFramework }; // ensure smooth transition when moving across 0 - 360 boundary - const float yawDelta = targetYaw - currentYaw; - if (AZStd::abs(yawDelta) >= AZ::Constants::Pi) + if (const float yawDelta = targetYaw - currentYaw; AZStd::abs(yawDelta) >= AZ::Constants::Pi) { targetYaw -= AZ::Constants::TwoPi * sign(yawDelta); } Camera camera; - // note: the math for the lerp smoothing implementation for camera rotation and translation was inspired by this excellent - // article by Scott Lembcke: https://www.gamasutra.com/blogs/ScottLembcke/20180404/316046/Improved_Lerp_Smoothing.php if (cameraProps.m_rotateSmoothingEnabledFn()) { - const float lookRate = AZStd::exp2(cameraProps.m_rotateSmoothnessFn()); - const float lookTime = AZStd::exp2(-lookRate * deltaTime); - camera.m_pitch = AZ::Lerp(targetCamera.m_pitch, currentCamera.m_pitch, lookTime); - camera.m_yaw = AZ::Lerp(targetYaw, currentYaw, lookTime); + const float lookTime = SmoothValueTime(cameraProps.m_rotateSmoothnessFn(), deltaTime); + camera.m_pitch = SmoothValue(targetCamera.m_pitch, currentCamera.m_pitch, lookTime); + camera.m_yaw = SmoothValue(targetYaw, currentYaw, lookTime); } else { @@ -766,8 +792,7 @@ namespace AzFramework if (cameraProps.m_translateSmoothingEnabledFn()) { - const float moveRate = AZStd::exp2(cameraProps.m_translateSmoothnessFn()); - const float moveTime = AZStd::exp2(-moveRate * deltaTime); + const float moveTime = SmoothValueTime(cameraProps.m_rotateSmoothnessFn(), deltaTime); camera.m_pivot = targetCamera.m_pivot.Lerp(currentCamera.m_pivot, moveTime); camera.m_offset = targetCamera.m_offset.Lerp(currentCamera.m_offset, moveTime); } diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h index 2d02bb0b6d..4eea94cbe7 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraInput.h @@ -85,6 +85,19 @@ namespace AzFramework //! Extracts Euler angles (orientation) and translation from the transform and writes the values to the camera. void UpdateCameraFromTransform(Camera& camera, const AZ::Transform& transform); + //! Writes the translation value and Euler angles to the camera. + void UpdateCameraFromTranslationAndRotation(Camera& camera, const AZ::Vector3& translation, const AZ::Vector3& eulerAngles); + + //! Returns the time ('t') input value to use with SmoothValue. + //! Useful if it is to be reused for multiple calls to SmoothValue. + float SmoothValueTime(float smoothness, float deltaTime); + + // Smoothly interpolate a value from current to target according to a smoothing parameter. + float SmoothValue(float target, float current, float smoothness, float deltaTime); + + // Overload of SmoothValue that takes time ('t') value directly. + float SmoothValue(float target, float current, float time); + //! Generic motion type. template struct MotionEvent @@ -334,6 +347,7 @@ namespace AzFramework AZStd::function m_rotateSpeedFn; AZStd::function m_invertPitchFn; AZStd::function m_invertYawFn; + AZStd::function m_constrainPitch; private: InputChannelId m_rotateChannelId; //!< Input channel to begin the rotate camera input. diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp index 00cbda7b34..40fb82ca97 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.cpp @@ -8,18 +8,18 @@ #include "CameraState.h" -#include #include #include +#include namespace AzFramework { void SetCameraClippingVolume( - AzFramework::CameraState& cameraState, const float nearPlane, const float farPlane, const float fovRad) + AzFramework::CameraState& cameraState, const float nearPlane, const float farPlane, const float verticalFovRad) { cameraState.m_nearClip = nearPlane; cameraState.m_farClip = farPlane; - cameraState.m_fovOrZoom = fovRad; + cameraState.m_fovOrZoom = verticalFovRad; } void SetCameraTransform(CameraState& cameraState, const AZ::Transform& transform) @@ -35,20 +35,34 @@ namespace AzFramework SetCameraClippingVolume(cameraState, 0.1f, 1000.0f, AZ::DegToRad(60.0f)); } - AzFramework::CameraState CreateDefaultCamera( - const AZ::Transform& transform, const AZ::Vector2& viewportSize) + CameraState CreateCamera( + const AZ::Transform& transform, + const float nearPlane, + const float farPlane, + const float verticalFovRad, + const AZ::Vector2& viewportSize) { AzFramework::CameraState cameraState; - SetDefaultCameraClippingVolume(cameraState); SetCameraTransform(cameraState, transform); + SetCameraClippingVolume(cameraState, nearPlane, farPlane, verticalFovRad); + cameraState.m_viewportSize = viewportSize; + + return cameraState; + } + + AzFramework::CameraState CreateDefaultCamera(const AZ::Transform& transform, const AZ::Vector2& viewportSize) + { + AzFramework::CameraState cameraState; + + SetCameraTransform(cameraState, transform); + SetDefaultCameraClippingVolume(cameraState); cameraState.m_viewportSize = viewportSize; return cameraState; } - AzFramework::CameraState CreateIdentityDefaultCamera( - const AZ::Vector3& position, const AZ::Vector2& viewportSize) + AzFramework::CameraState CreateIdentityDefaultCamera(const AZ::Vector3& position, const AZ::Vector2& viewportSize) { return CreateDefaultCamera(AZ::Transform::CreateTranslation(position), viewportSize); } @@ -89,15 +103,15 @@ namespace AzFramework void CameraState::Reflect(AZ::SerializeContext& serializeContext) { - serializeContext.Class()-> - Field("Position", &CameraState::m_position)-> - Field("Forward", &CameraState::m_forward)-> - Field("Side", &CameraState::m_side)-> - Field("Up", &CameraState::m_up)-> - Field("ViewportSize", &CameraState::m_viewportSize)-> - Field("NearClip", &CameraState::m_nearClip)-> - Field("FarClip", &CameraState::m_farClip)-> - Field("FovZoom", &CameraState::m_fovOrZoom)-> - Field("Ortho", &CameraState::m_orthographic); + serializeContext.Class() + ->Field("Position", &CameraState::m_position) + ->Field("Forward", &CameraState::m_forward) + ->Field("Side", &CameraState::m_side) + ->Field("Up", &CameraState::m_up) + ->Field("ViewportSize", &CameraState::m_viewportSize) + ->Field("NearClip", &CameraState::m_nearClip) + ->Field("FarClip", &CameraState::m_farClip) + ->Field("FovZoom", &CameraState::m_fovOrZoom) + ->Field("Ortho", &CameraState::m_orthographic); } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h index e174771c3b..cefb144ec1 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/CameraState.h @@ -40,10 +40,14 @@ namespace AzFramework AZ::Vector2 m_viewportSize = AZ::Vector2::CreateZero(); //!< Dimensions of the viewport. float m_nearClip = 0.01f; //!< Near clip plane of the camera. float m_farClip = 100.0f; //!< Far clip plane of the camera. - float m_fovOrZoom = 0.0f; //!< Fov or zoom of camera depending on if it is using orthographic projection or not. + float m_fovOrZoom = 0.0f; //!< Vertical fov or zoom of camera depending on if it is using orthographic projection or not. bool m_orthographic = false; //!< Is the camera using orthographic projection or not. }; + //! Create a camera at the given transform, specifying the near and far clip planes as well as the fov with a specific viewport size. + CameraState CreateCamera( + const AZ::Transform& transform, float nearPlane, float farPlane, float verticalFovRad, const AZ::Vector2& viewportSize); + //! Create a camera at the given transform with a specific viewport size. //! @note The near/far clip planes and fov are sensible default values - please //! use SetCameraClippingVolume to override them. @@ -60,7 +64,7 @@ namespace AzFramework CameraState CreateCameraFromWorldFromViewMatrix(const AZ::Matrix4x4& worldFromView, const AZ::Vector2& viewportSize); //! Override the default near/far clipping planes and fov of the camera. - void SetCameraClippingVolume(CameraState& cameraState, float nearPlane, float farPlane, float fovRad); + void SetCameraClippingVolume(CameraState& cameraState, float nearPlane, float farPlane, float verticalFovRad); //! Override the default near/far clipping planes and fov of the camera by inferring them the specified right handed transform into clip space. void SetCameraClippingVolumeFromPerspectiveFovMatrixRH(CameraState& cameraState, const AZ::Matrix4x4& clipFromView); diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp index 1b3645630e..294ff71974 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.cpp @@ -24,11 +24,12 @@ namespace AzFramework ClickDetector::ClickOutcome ClickDetector::DetectClick(const ClickEvent clickEvent, const ScreenVector& cursorDelta) { + m_moveAccumulator += ScreenVectorLength(cursorDelta); + const auto previousDetectionState = m_detectionState; if (previousDetectionState == DetectionState::WaitingForMove) { // only allow the action to begin if the mouse has been moved a small amount - m_moveAccumulator += ScreenVectorLength(cursorDelta); if (m_moveAccumulator > m_deadZone) { m_detectionState = DetectionState::Moved; @@ -43,7 +44,7 @@ namespace AzFramework using FloatingPointSeconds = AZStd::chrono::duration; const auto diff = now - m_tryBeginTime.value(); - if (FloatingPointSeconds(diff).count() < m_doubleClickInterval) + if (FloatingPointSeconds(diff).count() < m_doubleClickInterval && m_moveAccumulator < m_deadZone) { return ClickOutcome::Nil; } diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h index 70bdeb4619..544afe6d69 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ClickDetector.h @@ -15,6 +15,10 @@ namespace AzFramework { + //! Default value to use for detecting if the mouse has moved far enough after a mouse down to no longer + //! register a click when a mouse up occurs. + inline constexpr float DefaultMouseMoveDeadZone = 2.0f; + struct ScreenVector; //! Utility class to help detect different types of mouse click (mouse down and up with @@ -66,7 +70,7 @@ namespace AzFramework }; float m_moveAccumulator = 0.0f; //!< How far the mouse has moved after mouse down. - float m_deadZone = 2.0f; //!< How far to move before a click is cancelled (when Move will fire). + float m_deadZone = DefaultMouseMoveDeadZone; //!< How far to move before a click is cancelled (when Move will fire). float m_doubleClickInterval = 0.4f; //!< Default double click interval, can be overridden. DetectionState m_detectionState; //!< Internal state of ClickDetector. //! Mouse down time (happens each mouse down, helps with double click handling). diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp index e26d7cfa9b..f1c21230c7 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.cpp @@ -24,6 +24,10 @@ namespace AzFramework serializeContext->Class()-> Field("X", &ScreenVector::m_x)-> Field("Y", &ScreenVector::m_y); + + serializeContext->Class()-> + Field("Width", &ScreenSize::m_width)-> + Field("Height", &ScreenSize::m_height); } } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h index 1529d760e5..7a5d7fdc62 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ScreenGeometry.h @@ -26,7 +26,7 @@ namespace AzFramework AZ_TYPE_INFO(ScreenPoint, "{8472B6C2-527F-44FC-87F8-C226B1A57A97}"); ScreenPoint() = default; - ScreenPoint(int x, int y) + constexpr ScreenPoint(int x, int y) : m_x(x) , m_y(y) { @@ -45,7 +45,7 @@ namespace AzFramework AZ_TYPE_INFO(ScreenVector, "{1EAA2C62-8FDB-4A28-9FE3-1FA4F1418894}"); ScreenVector() = default; - ScreenVector(int x, int y) + constexpr ScreenVector(int x, int y) : m_x(x) , m_y(y) { @@ -55,6 +55,22 @@ namespace AzFramework int m_y; //!< Y screen delta. }; + //! A wrapper around a screen width and height. + struct ScreenSize + { + AZ_TYPE_INFO(ScreenSize, "{26D28916-6E8E-44B8-83F9-C44BCDA370E2}"); + ScreenSize() = default; + + constexpr ScreenSize(int width, int height) + : m_width(width) + , m_height(height) + { + } + + int m_width; //!< Screen size width. + int m_height; //!< Screen size height. + }; + void ScreenGeometryReflect(AZ::ReflectContext* context); inline const ScreenVector operator-(const ScreenPoint& lhs, const ScreenPoint& rhs) @@ -138,6 +154,16 @@ namespace AzFramework return !operator==(lhs, rhs); } + inline const bool operator==(const ScreenSize& lhs, const ScreenSize& rhs) + { + return lhs.m_width == rhs.m_width && lhs.m_height == rhs.m_height; + } + + inline const bool operator!=(const ScreenSize& lhs, const ScreenSize& rhs) + { + return !operator==(lhs, rhs); + } + inline ScreenVector& operator*=(ScreenVector& lhs, const float rhs) { lhs.m_x = aznumeric_cast(AZStd::lround(aznumeric_cast(lhs.m_x) * rhs)); @@ -152,6 +178,20 @@ namespace AzFramework return result; } + inline ScreenSize& operator*=(ScreenSize& lhs, const float rhs) + { + lhs.m_width = aznumeric_cast(AZStd::lround(aznumeric_cast(lhs.m_width) * rhs)); + lhs.m_height = aznumeric_cast(AZStd::lround(aznumeric_cast(lhs.m_height) * rhs)); + return lhs; + } + + inline const ScreenSize operator*(const ScreenSize& lhs, const float rhs) + { + ScreenSize result{ lhs }; + result *= rhs; + return result; + } + inline float ScreenVectorLength(const ScreenVector& screenVector) { return aznumeric_cast(AZStd::sqrt(screenVector.m_x * screenVector.m_x + screenVector.m_y * screenVector.m_y)); @@ -168,4 +208,28 @@ namespace AzFramework { return AZ::Vector2(aznumeric_cast(screenVector.m_x), aznumeric_cast(screenVector.m_y)); } + + //! Return an AZ::Vector2 from a ScreenSize. + inline AZ::Vector2 Vector2FromScreenSize(const ScreenSize& screenSize) + { + return AZ::Vector2(aznumeric_cast(screenSize.m_width), aznumeric_cast(screenSize.m_height)); + } + + //! Return a ScreenPoint from an AZ::Vector2. + inline ScreenPoint ScreenPointFromVector2(const AZ::Vector2& vector2) + { + return ScreenPoint(aznumeric_cast(AZStd::lround(vector2.GetX())), aznumeric_cast(AZStd::lround(vector2.GetY()))); + } + + //! Return a ScreenVector from an AZ::Vector2. + inline ScreenVector ScreenVectorFromVector2(const AZ::Vector2& vector2) + { + return ScreenVector(aznumeric_cast(AZStd::lround(vector2.GetX())), aznumeric_cast(AZStd::lround(vector2.GetY()))); + } + + //! Return a ScreenSize from an AZ::Vector2. + inline ScreenSize ScreenSizeFromVector2(const AZ::Vector2& vector2) + { + return ScreenSize(aznumeric_cast(AZStd::lround(vector2.GetX())), aznumeric_cast(AZStd::lround(vector2.GetY()))); + } } // namespace AzFramework diff --git a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp index afd16a6c23..87eee53fbd 100644 --- a/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp +++ b/Code/Framework/AzFramework/AzFramework/Viewport/ViewportScreen.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -112,9 +113,8 @@ namespace AzFramework const AZ::Matrix4x4& cameraProjection, const AZ::Vector2& viewportSize) { - const auto ndcNormalizedPosition = WorldToScreenNdc(worldPosition, cameraView, cameraProjection); // scale ndc position by screen dimensions to return screen position - return ScreenPointFromNdc(AZ::Vector3ToVector2(ndcNormalizedPosition), viewportSize); + return ScreenPointFromNdc(AZ::Vector3ToVector2(WorldToScreenNdc(worldPosition, cameraView, cameraProjection)), viewportSize); } ScreenPoint WorldToScreen(const AZ::Vector3& worldPosition, const CameraState& cameraState) @@ -144,9 +144,7 @@ namespace AzFramework const AZ::Matrix4x4& inverseCameraProjection, const AZ::Vector2& viewportSize) { - const auto normalizedScreenPosition = NdcFromScreenPoint(screenPosition, viewportSize); - - return ScreenNdcToWorld(normalizedScreenPosition, inverseCameraView, inverseCameraProjection); + return ScreenNdcToWorld(NdcFromScreenPoint(screenPosition, viewportSize), inverseCameraView, inverseCameraProjection); } AZ::Vector3 ScreenToWorld(const ScreenPoint& screenPosition, const CameraState& cameraState) diff --git a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake index 16e00349fe..b8d428ab82 100644 --- a/Code/Framework/AzFramework/AzFramework/azframework_files.cmake +++ b/Code/Framework/AzFramework/AzFramework/azframework_files.cmake @@ -21,6 +21,7 @@ set(FILES Archive/ArchiveFindData.cpp Archive/ArchiveFindData.h Archive/ArchiveVars.h + Archive/ArchiveVars.cpp Archive/Codec.h Archive/IArchive.h Archive/INestedArchive.h @@ -78,6 +79,7 @@ set(FILES CommandLine/CommandLine.h CommandLine/CommandRegistrationBus.h Debug/DebugCameraBus.h + feature_options.cmake Viewport/ViewportBus.h Viewport/ViewportBus.cpp Viewport/ViewportColors.h diff --git a/Code/Framework/AzFramework/AzFramework/feature_options.cmake b/Code/Framework/AzFramework/AzFramework/feature_options.cmake new file mode 100644 index 0000000000..e10ddf6ba6 --- /dev/null +++ b/Code/Framework/AzFramework/AzFramework/feature_options.cmake @@ -0,0 +1,13 @@ +# +# 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 +# +# + +set(LY_ARCHIVE_FILE_SEARCH_MODE "" CACHE STRING "Set the default file search mode to locate non-Pak files within the Archive System\n\ + Valid values are:\n\ + 0 = Search FileSystem first, before searching within mounted Paks (default in debug/profile)\n\ + 1 = Search mounted Paks first, before searching FileSystem\n\ + 2 = Search only mounted Paks (default in release)\n") diff --git a/Code/Framework/AzFramework/CMakeLists.txt b/Code/Framework/AzFramework/CMakeLists.txt index c8eeac5c2d..5e9e094a91 100644 --- a/Code/Framework/AzFramework/CMakeLists.txt +++ b/Code/Framework/AzFramework/CMakeLists.txt @@ -6,6 +6,7 @@ # # +include(AzFramework/feature_options.cmake) ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/${PAL_PLATFORM_NAME}) ly_get_list_relative_pal_filename(common_dir ${CMAKE_CURRENT_LIST_DIR}/Platform/Common) @@ -33,6 +34,14 @@ ly_add_target( 3rdParty::lz4 ) +set(LY_SEARCH_MODE_DEFINE $<$:LY_ARCHIVE_FILE_SEARCH_MODE=${LY_ARCHIVE_FILE_SEARCH_MODE}>) + +ly_add_source_properties( + SOURCES + AzFramework/Archive/ArchiveVars.cpp + PROPERTY COMPILE_DEFINITIONS + VALUES ${LY_SEARCH_MODE_DEFINE}) + if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) ly_get_list_relative_pal_filename(pal_dir ${CMAKE_CURRENT_LIST_DIR}/Tests/Platform/${PAL_PLATFORM_NAME}) diff --git a/Code/Framework/AzFramework/Tests/ArchiveTests.cpp b/Code/Framework/AzFramework/Tests/ArchiveTests.cpp index ff0e3ab724..33924d7e0c 100644 --- a/Code/Framework/AzFramework/Tests/ArchiveTests.cpp +++ b/Code/Framework/AzFramework/Tests/ArchiveTests.cpp @@ -273,7 +273,7 @@ namespace UnitTest // Also enable extra verbosity in the AZ::IO::Archive code CVarIntValueScope previousLocationPriority{ *console, "sys_pakPriority" }; CVarIntValueScope oldArchiveVerbosity{ *console, "az_archive_verbosity" }; - console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::ArchiveLocationPriority::ePakPriorityPakOnly)) }); + console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::FileSearchPriority::PakOnly)) }); console->PerformCommand("az_archive_verbosity", { "1" }); // ---- Archive FGetCachedFileDataTests (these leverage Archive CachedFile mechanism for caching data --- @@ -459,7 +459,7 @@ namespace UnitTest // Once the archive has been deleted it should no longer be searched CVarIntValueScope previousLocationPriority{ *console, "sys_pakPriority" }; - console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::ArchiveLocationPriority::ePakPriorityPakOnly)) }); + console->PerformCommand("sys_PakPriority", { AZ::CVarFixedString::format("%d", aznumeric_cast(AZ::IO::FileSearchPriority::PakOnly)) }); handle = archive->FindFirst("levels\\*"); EXPECT_FALSE(static_cast(handle)); @@ -785,7 +785,7 @@ namespace UnitTest EXPECT_TRUE(archive->OpenPack("@usercache@", realNameBuf)); EXPECT_TRUE(archive->IsFileExist("@usercache@/foundit.dat")); - EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); EXPECT_FALSE(archive->IsFileExist("@usercache@/notfoundit.dat")); EXPECT_TRUE(archive->ClosePack(realNameBuf)); @@ -793,7 +793,7 @@ namespace UnitTest EXPECT_TRUE(archive->OpenPack("@products@", realNameBuf)); EXPECT_TRUE(archive->IsFileExist("@products@/foundit.dat")); EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat")); // do not find it in the previous location! - EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); EXPECT_FALSE(archive->IsFileExist("@products@/notfoundit.dat")); EXPECT_TRUE(archive->ClosePack(realNameBuf)); @@ -802,8 +802,8 @@ namespace UnitTest EXPECT_TRUE(archive->IsFileExist("@products@/mystuff/foundit.dat")); EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat")); // do not find it in the previous locations! EXPECT_FALSE(archive->IsFileExist("@usercache@/foundit.dat")); // do not find it in the previous locations! - EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); - EXPECT_FALSE(archive->IsFileExist("@products@/mystuff/foundit.dat", AZ::IO::IArchive::eFileLocation_OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@products@/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); + EXPECT_FALSE(archive->IsFileExist("@products@/mystuff/foundit.dat", AZ::IO::FileSearchLocation::OnDisk)); EXPECT_FALSE(archive->IsFileExist("@products@/notfoundit.dat")); // non-existent file EXPECT_FALSE(archive->IsFileExist("@products@/mystuff/notfoundit.dat")); // non-existent file EXPECT_TRUE(archive->ClosePack(realNameBuf)); diff --git a/Code/Framework/AzFramework/Tests/CameraInputTests.cpp b/Code/Framework/AzFramework/Tests/CameraInputTests.cpp index a89fb0bd84..005623677c 100644 --- a/Code/Framework/AzFramework/Tests/CameraInputTests.cpp +++ b/Code/Framework/AzFramework/Tests/CameraInputTests.cpp @@ -104,9 +104,10 @@ namespace UnitTest AZStd::shared_ptr m_orbitCamera; AZ::Vector3 m_pivot = AZ::Vector3::CreateZero(); - //! This is approximately Pi/2 * 1000 - this can be used to rotate the camera 90 degrees (pitch or yaw based - //! on vertical or horizontal motion) as the rotate speed function is set to be 1/1000. - inline static const int PixelMotionDelta = 1570; + // this is approximately Pi/2 * 1000 - this can be used to rotate the camera 90 degrees (pitch or yaw based + // on vertical or horizontal motion) as the rotate speed function is set to be 1/1000. + inline static const int PixelMotionDelta90Degrees = 1570; + inline static const int PixelMotionDelta135Degrees = 2356; }; TEST_F(CameraInputFixture, BeginAndEndOrbitCameraInputConsumesCorrectEvents) @@ -292,7 +293,7 @@ namespace UnitTest HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ PixelMotionDelta90Degrees }); const float expectedYaw = AzFramework::WrapYawRotation(-AZ::Constants::HalfPi); @@ -310,7 +311,7 @@ namespace UnitTest HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta90Degrees }); const float expectedPitch = AzFramework::ClampPitchRotation(-AZ::Constants::HalfPi); @@ -331,7 +332,7 @@ namespace UnitTest HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Left, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ PixelMotionDelta90Degrees }); const auto expectedCameraEndingPosition = AZ::Vector3(0.0f, -10.0f, 10.0f); const float expectedPitch = AzFramework::ClampPitchRotation(-AZ::Constants::HalfPi); @@ -354,7 +355,7 @@ namespace UnitTest HandleEventAndUpdate(AzFramework::DiscreteInputEvent{ m_orbitChannelId, AzFramework::InputChannel::State::Began }); HandleEventAndUpdate( AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Left, AzFramework::InputChannel::State::Began }); - HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ -PixelMotionDelta }); + HandleEventAndUpdate(AzFramework::HorizontalMotionEvent{ -PixelMotionDelta90Degrees }); const auto expectedCameraEndingPosition = AZ::Vector3(20.0f, -5.0f, 0.0f); const float expectedYaw = AzFramework::WrapYawRotation(AZ::Constants::HalfPi); @@ -366,4 +367,42 @@ namespace UnitTest EXPECT_THAT(m_camera.m_offset, IsClose(AZ::Vector3(5.0f, -10.0f, 0.0f))); EXPECT_THAT(m_camera.Translation(), IsCloseTolerance(expectedCameraEndingPosition, 0.01f)); } + + TEST_F(CameraInputFixture, CameraPitchCanNotBeMovedPastNinetyDegreesWhenConstrained) + { + const auto cameraStartingPosition = AZ::Vector3(15.0f, -20.0f, 0.0f); + m_targetCamera.m_pivot = cameraStartingPosition; + + HandleEventAndUpdate( + AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); + // pitch by 135.0 degrees + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ -PixelMotionDelta135Degrees }); + + // clamped to 90.0 degrees + const float expectedPitch = AZ::DegToRad(90.0f); + + using ::testing::FloatNear; + EXPECT_THAT(m_camera.m_pitch, FloatNear(expectedPitch, 0.001f)); + } + + TEST_F(CameraInputFixture, CameraPitchCanBeMovedPastNinetyDegreesWhenUnconstrained) + { + m_firstPersonRotateCamera->m_constrainPitch = [] + { + return false; + }; + + const auto cameraStartingPosition = AZ::Vector3(15.0f, -20.0f, 0.0f); + m_targetCamera.m_pivot = cameraStartingPosition; + + HandleEventAndUpdate( + AzFramework::DiscreteInputEvent{ AzFramework::InputDeviceMouse::Button::Right, AzFramework::InputChannel::State::Began }); + // pitch by 135.0 degrees + HandleEventAndUpdate(AzFramework::VerticalMotionEvent{ -PixelMotionDelta135Degrees }); + + const float expectedPitch = AZ::DegToRad(135.0f); + + using ::testing::FloatNear; + EXPECT_THAT(m_camera.m_pitch, FloatNear(expectedPitch, 0.001f)); + } } // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/CameraState.cpp b/Code/Framework/AzFramework/Tests/CameraState.cpp index 70fa8be89a..1f35d5a06c 100644 --- a/Code/Framework/AzFramework/Tests/CameraState.cpp +++ b/Code/Framework/AzFramework/Tests/CameraState.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include namespace UnitTest @@ -51,22 +52,6 @@ namespace UnitTest { }; - // Taken from Atom::MatrixUtils for testing purposes, this can be removed if MakePerspectiveFovMatrixRH makes it into AZ - static AZ::Matrix4x4 MakePerspectiveMatrixRH(float fovY, float aspectRatio, float nearClip, float farClip) - { - float sinFov, cosFov; - AZ::SinCos(0.5f * fovY, sinFov, cosFov); - float yScale = cosFov / sinFov; //cot(fovY/2) - float xScale = yScale / aspectRatio; - - AZ::Matrix4x4 out; - out.SetRow(0, xScale, 0.f, 0.f, 0.f ); - out.SetRow(1, 0.f, yScale, 0.f, 0.f ); - out.SetRow(2, 0.f, 0.f, farClip / (nearClip - farClip), nearClip*farClip / (nearClip - farClip) ); - out.SetRow(3, 0.f, 0.f, -1.f, 0.f ); - return out; - } - TEST_P(Translation, Permutation) { // Given a position @@ -176,7 +161,8 @@ namespace UnitTest { auto [fovY, aspectRatio, nearClip, farClip] = GetParam(); - AZ::Matrix4x4 clipFromView = MakePerspectiveMatrixRH(fovY, aspectRatio, nearClip, farClip); + AZ::Matrix4x4 clipFromView; + MakePerspectiveFovMatrixRH(clipFromView, fovY, aspectRatio, nearClip, farClip); AzFramework::SetCameraClippingVolumeFromPerspectiveFovMatrixRH(m_cameraState, clipFromView); diff --git a/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp b/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp index 45bac2770e..62852c9b87 100644 --- a/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp +++ b/Code/Framework/AzFramework/Tests/ClickDetectorTests.cpp @@ -144,12 +144,45 @@ namespace UnitTest { using ::testing::Eq; - const ClickDetector::ClickOutcome downOutcome = - m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); - const ClickDetector::ClickOutcome upOutcome = - m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(50, 50)); + const ClickDetector::ClickOutcome downOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome upOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(50, 50)); EXPECT_THAT(downOutcome, Eq(ClickDetector::ClickOutcome::Nil)); EXPECT_THAT(upOutcome, Eq(ClickDetector::ClickOutcome::Release)); } + + //! note: ClickDetector does not explicitly return double clicks but if one occurs the ClickOutcome will be Nil + TEST_F(ClickDetectorFixture, DoubleClickIsRegisteredIfMouseDeltaHasMovedLessThanDeadzoneInClickInterval) + { + using ::testing::Eq; + + const ClickDetector::ClickOutcome firstDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome firstUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome secondDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome secondUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + + EXPECT_THAT(firstDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(firstUpOutcome, Eq(ClickDetector::ClickOutcome::Click)); + EXPECT_THAT(secondDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(secondUpOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + } + + TEST_F(ClickDetectorFixture, DoubleClickIsNotRegisteredIfMouseDeltaHasMovedMoreThanDeadzoneInClickInterval) + { + using ::testing::Eq; + + const ClickDetector::ClickOutcome firstDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome firstUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + const ClickDetector::ClickOutcome secondDownOutcome = + m_clickDetector.DetectClick(ClickDetector::ClickEvent::Down, ScreenVector(10, 10)); + const ClickDetector::ClickOutcome secondUpOutcome = m_clickDetector.DetectClick(ClickDetector::ClickEvent::Up, ScreenVector(0, 0)); + + EXPECT_THAT(firstDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(firstUpOutcome, Eq(ClickDetector::ClickOutcome::Click)); + EXPECT_THAT(secondDownOutcome, Eq(ClickDetector::ClickOutcome::Nil)); + EXPECT_THAT(secondUpOutcome, Eq(ClickDetector::ClickOutcome::Click)); + } } // namespace UnitTest diff --git a/Code/Framework/AzFramework/Tests/CursorStateTests.cpp b/Code/Framework/AzFramework/Tests/CursorStateTests.cpp index 923cd02a10..fe15580dad 100644 --- a/Code/Framework/AzFramework/Tests/CursorStateTests.cpp +++ b/Code/Framework/AzFramework/Tests/CursorStateTests.cpp @@ -8,12 +8,13 @@ #include #include +#include namespace UnitTest { using AzFramework::CursorState; - using AzFramework::ScreenVector; using AzFramework::ScreenPoint; + using AzFramework::ScreenVector; class CursorStateFixture : public ::testing::Test { diff --git a/Code/Framework/AzFramework/Tests/Utils/Printers.cpp b/Code/Framework/AzFramework/Tests/Utils/Printers.cpp new file mode 100644 index 0000000000..91c9558be7 --- /dev/null +++ b/Code/Framework/AzFramework/Tests/Utils/Printers.cpp @@ -0,0 +1,32 @@ +/* + * 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 "Printers.h" + +#include + +#include +#include + +namespace AzFramework +{ + void PrintTo(const ScreenPoint& screenPoint, std::ostream* os) + { + *os << "(x: " << screenPoint.m_x << ", y: " << screenPoint.m_y << ")"; + } + + void PrintTo(const ScreenVector& screenVector, std::ostream* os) + { + *os << "(x: " << screenVector.m_x << ", y: " << screenVector.m_y << ")"; + } + + void PrintTo(const ScreenSize& screenSize, std::ostream* os) + { + *os << "(width: " << screenSize.m_width << ", height: " << screenSize.m_height << ")"; + } +} // namespace AzFramework diff --git a/Code/Framework/AzFramework/Tests/Utils/Printers.h b/Code/Framework/AzFramework/Tests/Utils/Printers.h new file mode 100644 index 0000000000..fc967eabe9 --- /dev/null +++ b/Code/Framework/AzFramework/Tests/Utils/Printers.h @@ -0,0 +1,20 @@ +/* + * 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 + +namespace AzFramework +{ + struct ScreenPoint; + struct ScreenVector; + struct ScreenSize; + + void PrintTo(const ScreenPoint& screenPoint, std::ostream* os); + void PrintTo(const ScreenVector& screenVector, std::ostream* os); + void PrintTo(const ScreenSize& screenSize, std::ostream* os); +} // namespace AzFramework diff --git a/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake b/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake index 85c00a2e8a..9427738e67 100644 --- a/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake +++ b/Code/Framework/AzFramework/Tests/framework_shared_tests_files.cmake @@ -11,5 +11,7 @@ set(FILES Mocks/MockWindowRequests.h Utils/Utils.h Utils/Utils.cpp + Utils/Printers.h + Utils/Printers.cpp FrameworkApplicationFixture.h ) diff --git a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h index a8ba63500c..3c41b28851 100644 --- a/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h +++ b/Code/Framework/AzManipulatorTestFramework/Include/AzManipulatorTestFramework/ViewportInteraction.h @@ -41,8 +41,8 @@ namespace AzManipulatorTestFramework // ViewportInteractionRequestBus overrides ... AzFramework::CameraState GetCameraState() override; AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) override; - AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) override; - AZStd::optional ViewportScreenToWorldRay( + AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) override; + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) override; float DeviceScalingFactor() override; diff --git a/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp b/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp index 4f1e108a14..6fbf2cb219 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/AzManipulatorTestFrameworkUtils.cpp @@ -95,7 +95,7 @@ namespace AzManipulatorTestFramework AzToolsFramework::ViewportInteraction::MousePick mousePick; mousePick.m_screenCoordinates = screenPoint; - mousePick.m_rayOrigin = cameraState.m_position; + mousePick.m_rayOrigin = nearPlaneWorldPosition; mousePick.m_rayDirection = (nearPlaneWorldPosition - cameraState.m_position).GetNormalized(); return mousePick; diff --git a/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp b/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp index c122a941c4..5bfe63bd99 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/ImmediateModeActionDispatcher.cpp @@ -69,8 +69,6 @@ namespace AzManipulatorTestFramework void ImmediateModeActionDispatcher::CameraStateImpl(const AzFramework::CameraState& cameraState) { m_viewportManipulatorInteraction.GetViewportInteraction().SetCameraState(cameraState); - GetMouseInteractionEvent()->m_mouseInteraction.m_mousePick.m_rayOrigin = cameraState.m_position; - GetMouseInteractionEvent()->m_mouseInteraction.m_mousePick.m_rayDirection = cameraState.m_forward; } void ImmediateModeActionDispatcher::MouseLButtonDownImpl() diff --git a/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp index 730c106301..9bcb8986d5 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/IndirectManipulatorViewportInteraction.cpp @@ -20,7 +20,8 @@ namespace AzManipulatorTestFramework { public: IndirectCallManipulatorManager(ViewportInteractionInterface& viewportInteraction); - // ManipulatorManagerInterface ... + + // ManipulatorManagerInterface overrides ... void ConsumeMouseInteractionEvent(const MouseInteractionEvent& event) override; AzToolsFramework::ManipulatorManagerId GetId() const override; bool ManipulatorBeingInteracted() const override; diff --git a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp index 269baa703d..08cae0c738 100644 --- a/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Source/ViewportInteraction.cpp @@ -140,13 +140,12 @@ namespace AzManipulatorTestFramework return m_viewportId; } - AZStd::optional ViewportInteraction::ViewportScreenToWorld( - [[maybe_unused]] const AzFramework::ScreenPoint& screenPosition, [[maybe_unused]] float depth) + AZ::Vector3 ViewportInteraction::ViewportScreenToWorld([[maybe_unused]] const AzFramework::ScreenPoint& screenPosition) { - return {}; + return AZ::Vector3::CreateZero(); } - AZStd::optional ViewportInteraction::ViewportScreenToWorldRay( + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportInteraction::ViewportScreenToWorldRay( [[maybe_unused]] const AzFramework::ScreenPoint& screenPosition) { return {}; diff --git a/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp b/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp index 211c8d64ef..376c18072e 100644 --- a/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp +++ b/Code/Framework/AzManipulatorTestFramework/Tests/WorldSpaceBuilderTest.cpp @@ -140,8 +140,8 @@ namespace UnitTest // given a left mouse down ray in world space // consume the mouse move event state.m_actionDispatcher->CameraState(m_cameraState) - ->MouseLButtonDown() ->MousePosition(AzManipulatorTestFramework::GetCameraStateViewportCenter(m_cameraState)) + ->MouseLButtonDown() ->ExpectTrue(state.m_linearManipulator->PerformingAction()) ->ExpectManipulatorBeingInteracted() ->MouseLButtonUp() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/PythonLoader.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/PythonLoader.h index 29125667d6..6acc160ddc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/API/PythonLoader.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/PythonLoader.h @@ -19,7 +19,7 @@ namespace AzToolsFramework::EmbeddedPython ~PythonLoader(); private: - void* m_embeddedLibPythonHandle{ nullptr }; + [[maybe_unused]] void* m_embeddedLibPythonHandle{ nullptr }; }; } // namespace AzToolsFramework::EmbeddedPython diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h b/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h index fd4196a296..282898c37d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/API/ToolsApplicationAPI.h @@ -927,6 +927,9 @@ namespace AzToolsFramework /// Notify that the MainWindow has been fully initialized virtual void NotifyMainWindowInitialized(QMainWindow* /*mainWindow*/) {} + /// Notify that the Editor has been fully initialized + virtual void NotifyEditorInitialized() {} + /// Signal that an asset should be highlighted / selected virtual void SelectAsset(const QString& /* assetPath */) {} }; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp index f203251407..0f0bbf2b41 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Application/ToolsApplication.cpp @@ -215,12 +215,17 @@ namespace AzToolsFramework , public AZ::BehaviorEBusHandler { AZ_EBUS_BEHAVIOR_BINDER(EditorEventsBusHandler, "{352F80BB-469A-40B6-B322-FE57AB51E4DA}", AZ::SystemAllocator, - NotifyRegisterViews); + NotifyRegisterViews, NotifyEditorInitialized); void NotifyRegisterViews() override { Call(FN_NotifyRegisterViews); } + + void NotifyEditorInitialized() override + { + Call(FN_NotifyEditorInitialized); + } }; } // Internal @@ -445,6 +450,7 @@ namespace AzToolsFramework ->Attribute(AZ::Script::Attributes::Module, "editor") ->Handler() ->Event("NotifyRegisterViews", &EditorEvents::NotifyRegisterViews) + ->Event("NotifyEditorInitialized", &EditorEvents::NotifyEditorInitialized) ; behaviorContext->EBus("ViewPaneCallbackBus") @@ -1192,14 +1198,25 @@ namespace AzToolsFramework AZ::EntityId ToolsApplication::GetCurrentLevelEntityId() { - AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull(); - AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult(editorEntityContextId, &AzToolsFramework::EditorEntityContextRequestBus::Events::GetEditorEntityContextId); - AZ::SliceComponent* rootSliceComponent = nullptr; - AzFramework::SliceEntityOwnershipServiceRequestBus::EventResult(rootSliceComponent, editorEntityContextId, - &AzFramework::SliceEntityOwnershipServiceRequestBus::Events::GetRootSlice); - if (rootSliceComponent && rootSliceComponent->GetMetadataEntity()) + if (IsPrefabSystemEnabled()) { - return rootSliceComponent->GetMetadataEntity()->GetId(); + if (auto prefabPublicInterface = AZ::Interface::Get()) + { + return prefabPublicInterface->GetLevelInstanceContainerEntityId(); + } + } + else + { + AzFramework::EntityContextId editorEntityContextId = AzFramework::EntityContextId::CreateNull(); + AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult( + editorEntityContextId, &AzToolsFramework::EditorEntityContextRequestBus::Events::GetEditorEntityContextId); + AZ::SliceComponent* rootSliceComponent = nullptr; + AzFramework::SliceEntityOwnershipServiceRequestBus::EventResult( + rootSliceComponent, editorEntityContextId, &AzFramework::SliceEntityOwnershipServiceRequestBus::Events::GetRootSlice); + if (rootSliceComponent && rootSliceComponent->GetMetadataEntity()) + { + return rootSliceComponent->GetMetadataEntity()->GetId(); + } } return AZ::EntityId(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserComponent.cpp index 7da6f794d6..172bd3a29c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetBrowserComponent.cpp @@ -234,11 +234,6 @@ namespace AzToolsFramework return SourceFileDetails("Icons/AssetBrowser/Lua_16.svg"); } - if (AzFramework::StringFunc::Equal(extension.c_str(), ".mtl")) - { - return SourceFileDetails("Icons/AssetBrowser/Material_16.svg"); - } - if (AzFramework::StringFunc::Equal(extension.c_str(), AzToolsFramework::SliceUtilities::GetSliceFileExtension().c_str())) { return SourceFileDetails("Icons/AssetBrowser/Slice_16.svg"); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp index 4ebeb03a71..eae8ec2a1e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBrowser/AssetPicker/AssetPickerDialog.cpp @@ -31,7 +31,10 @@ AZ_POP_DISABLE_WARNING AZ_CVAR( bool, ed_hideAssetPickerPathColumn, true, nullptr, AZ::ConsoleFunctorFlags::Null, "Hide AssetPicker path column for a clearer view."); -AZ_CVAR_EXTERNED(bool, ed_useNewAssetBrowserTableView); + +AZ_CVAR( + bool, ed_useNewAssetPickerView, false, nullptr, AZ::ConsoleFunctorFlags::Null, + "Uses the new Asset Picker View."); namespace AzToolsFramework { @@ -106,7 +109,7 @@ namespace AzToolsFramework m_persistentState = AZ::UserSettings::CreateFind(AZ::Crc32(("AssetBrowserTreeView_Dialog_" + name).toUtf8().data()), AZ::UserSettings::CT_GLOBAL); m_ui->m_assetBrowserTableViewWidget->setVisible(false); - if (ed_useNewAssetBrowserTableView) + if (ed_useNewAssetPickerView) { m_ui->m_assetBrowserTreeViewWidget->setVisible(false); m_ui->m_assetBrowserTableViewWidget->setVisible(true); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp index 8924907e81..ac8e034faf 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.cpp @@ -202,9 +202,9 @@ namespace AzToolsFramework AZ_TracePrintf(logWindowName, "Creating new asset bundle manifest file \"%s\" for source pak \"%s\".\n", AzFramework::AssetBundleManifest::s_manifestFileName, sourcePak.c_str()); bool manifestSaved = false; AZStd::string manifestDirectory; - AZStd::vector levelDirs; AzFramework::StringFunc::Path::GetFullPath(sourcePak.c_str(), manifestDirectory); - AssetCatalogRequestBus::BroadcastResult(manifestSaved, &AssetCatalogRequestBus::Events::CreateBundleManifest, outCatalogPath, AZStd::vector(), manifestDirectory, AzFramework::AssetBundleManifest::CurrentBundleVersion, levelDirs); + AssetCatalogRequestBus::BroadcastResult(manifestSaved, &AssetCatalogRequestBus::Events::CreateBundleManifest, outCatalogPath, + AZStd::vector(), manifestDirectory, AzFramework::AssetBundleManifest::CurrentBundleVersion, AZStd::vector{}); AZStd::string manifestPath; AzFramework::StringFunc::Path::Join(manifestDirectory.c_str(), AzFramework::AssetBundleManifest::s_manifestFileName, manifestPath); @@ -263,7 +263,7 @@ namespace AzToolsFramework AZStd::string tempBundleFilePath = bundleFilePath.Native() + "_temp"; AZStd::vector dependentBundleNames; - AZStd::vector levelDirs; + AZStd::vector levelDirs; AZStd::vector> bundlePathDeltaCatalogPair; bundlePathDeltaCatalogPair.emplace_back(AZStd::make_pair(tempBundleFilePath, DeltaCatalogName)); @@ -515,7 +515,7 @@ namespace AzToolsFramework return true; } - bool AssetBundleComponent::AddManifestFileToBundles(const AZStd::vector>& bundlePathDeltaCatalogPair, const AZStd::vector& dependentBundleNames, const AZStd::string& bundleFolder, const AzToolsFramework::AssetBundleSettings& assetBundleSettings, const AZStd::vector& levelDirs) + bool AssetBundleComponent::AddManifestFileToBundles(const AZStd::vector>& bundlePathDeltaCatalogPair, const AZStd::vector& dependentBundleNames, const AZStd::string& bundleFolder, const AzToolsFramework::AssetBundleSettings& assetBundleSettings, const AZStd::vector& levelDirs) { if (!MakePath(bundleFolder)) { diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h index 17a9dd40f5..a2f7729e4e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetBundle/AssetBundleComponent.h @@ -86,7 +86,7 @@ namespace AzToolsFramework //! Adds the manifest file to all the bundles //! The parent bundle manifest file is special since it will contain information of all dependent bundles names. - bool AddManifestFileToBundles(const AZStd::vector>& bundlePathDeltaCatalogPair, const AZStd::vector& dependentBundleNames, const AZStd::string& bundleFolder, const AzToolsFramework::AssetBundleSettings& assetBundleSettings, const AZStd::vector& levelDirs); + bool AddManifestFileToBundles(const AZStd::vector>& bundlePathDeltaCatalogPair, const AZStd::vector& dependentBundleNames, const AZStd::string& bundleFolder, const AzToolsFramework::AssetBundleSettings& assetBundleSettings, const AZStd::vector& levelDirs); //! Adds the delta catalog and any remaining files to the bundle //! We only create the delta catalog once we are sure about what all the files that will go in it. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.cpp index a0e21ad589..1025d39e18 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.cpp @@ -143,7 +143,7 @@ namespace AzToolsFramework return AssetCatalog::RemoveDeltaCatalog(deltaCatalog); } - bool PlatformAddressedAssetCatalog::CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) + bool PlatformAddressedAssetCatalog::CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) { return AssetCatalog::CreateBundleManifest(deltaCatalogPath, dependentBundleNames, fileDirectory, bundleVersion, levelDirs); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.h b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.h index a7a19d6d2f..2d65c7e7d3 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/AssetCatalog/PlatformAddressedAssetCatalog.h @@ -66,7 +66,7 @@ namespace AzToolsFramework bool InsertDeltaCatalogBefore(AZStd::shared_ptr deltaCatalog, AZStd::shared_ptr afterDeltaCatalog) override; bool RemoveDeltaCatalog(AZStd::shared_ptr deltaCatalog) override; - bool CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) override; + bool CreateBundleManifest(const AZStd::string& deltaCatalogPath, const AZStd::vector& dependentBundleNames, const AZStd::string& fileDirectory, int bundleVersion, const AZStd::vector& levelDirs) override; bool CreateDeltaCatalog(const AZStd::vector& files, const AZStd::string& filePath) override; void AddExtension(const char* extension) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp index 2cca3804ea..20a15643c6 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Component/EditorComponentAPIComponent.cpp @@ -597,11 +597,13 @@ namespace AzToolsFramework pte.SetVisibleEnforcement(true); } + ScopedUndoBatch undo("Modify Entity Property"); PropertyOutcome result = pte.SetProperty(propertyPath, value); if (result.IsSuccess()) { PropertyEditorEntityChangeNotificationBus::Event(componentInstance.GetEntityId(), &PropertyEditorEntityChangeNotifications::OnEntityComponentPropertyChanged, componentInstance.GetComponentId()); } + undo.MarkEntityDirty(componentInstance.GetEntityId()); return result; } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/ComponentModeCollection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/ComponentModeCollection.cpp index 07e025fc60..f07e87fad2 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/ComponentModeCollection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/ComponentModeCollection.cpp @@ -448,7 +448,11 @@ namespace AzToolsFramework ViewportUi::ViewportUiRequestBus::Event( ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, - componentMode.m_componentMode->GetComponentModeName().c_str()); + componentMode.m_componentMode->GetComponentModeName().c_str(), + [] + { + ComponentModeSystemRequestBus::Broadcast(&ComponentModeSystemRequests::EndComponentMode); + }); } RefreshActions(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/EditorBaseComponentMode.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/EditorBaseComponentMode.cpp index f449478306..e780c38822 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/EditorBaseComponentMode.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/EditorBaseComponentMode.cpp @@ -55,8 +55,11 @@ namespace AzToolsFramework GetEntityComponentIdPair(), elementIdsToDisplay); // create the component mode border with the specific name for this component mode ViewportUi::ViewportUiRequestBus::Event( - ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, - GetComponentModeName()); + ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, GetComponentModeName(), + [] + { + ComponentModeSystemRequestBus::Broadcast(&ComponentModeSystemRequests::EndComponentMode); + }); // set the EntityComponentId for this ComponentMode to active in the ComponentModeViewportUi system ComponentModeViewportUiRequestBus::Event( GetComponentType(), &ComponentModeViewportUiRequestBus::Events::SetViewportUiActiveEntityComponentId, diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp index 5b51944a75..744c53ef5a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.cpp @@ -98,7 +98,7 @@ namespace AzToolsFramework::Prefab } // Retrieve parent of currently focused prefab. - InstanceOptionalReference parentInstance = m_instanceFocusHierarchy[hierarchySize - 2]; + InstanceOptionalReference parentInstance = GetReferenceFromContainerEntityId(m_instanceFocusHierarchy[hierarchySize - 2]); // Use container entity of parent Instance for focus operations. AZ::EntityId entityId = parentInstance->get().GetContainerEntityId(); @@ -132,7 +132,7 @@ namespace AzToolsFramework::Prefab return AZ::Failure(AZStd::string("Prefab Focus Handler: Invalid index on FocusOnPathIndex.")); } - InstanceOptionalReference focusedInstance = m_instanceFocusHierarchy[index]; + InstanceOptionalReference focusedInstance = GetReferenceFromContainerEntityId(m_instanceFocusHierarchy[index]); return FocusOnOwningPrefab(focusedInstance->get().GetContainerEntityId()); } @@ -172,7 +172,8 @@ namespace AzToolsFramework::Prefab // Close all container entities in the old path. CloseInstanceContainers(m_instanceFocusHierarchy); - m_focusedInstance = focusedInstance; + // Do not store the container for the root instance, use an invalid EntityId instead. + m_focusedInstanceContainerEntityId = focusedInstance->get().GetParentInstance().has_value() ? focusedInstance->get().GetContainerEntityId() : AZ::EntityId(); m_focusedTemplateId = focusedInstance->get().GetTemplateId(); // Focus on the descendants of the container entity in the Editor, if the interface is initialized. @@ -206,56 +207,55 @@ namespace AzToolsFramework::Prefab InstanceOptionalReference PrefabFocusHandler::GetFocusedPrefabInstance( [[maybe_unused]] AzFramework::EntityContextId entityContextId) const { - return m_focusedInstance; + return GetReferenceFromContainerEntityId(m_focusedInstanceContainerEntityId); } AZ::EntityId PrefabFocusHandler::GetFocusedPrefabContainerEntityId([[maybe_unused]] AzFramework::EntityContextId entityContextId) const { - if (!m_focusedInstance.has_value()) - { - // PrefabFocusHandler has not been initialized yet. - return AZ::EntityId(); - } - - return m_focusedInstance->get().GetContainerEntityId(); + return m_focusedInstanceContainerEntityId; } bool PrefabFocusHandler::IsOwningPrefabBeingFocused(AZ::EntityId entityId) const { - if (!m_focusedInstance.has_value()) + if (!entityId.IsValid()) { - // PrefabFocusHandler has not been initialized yet. return false; } - if (!entityId.IsValid()) + InstanceOptionalReference instance = m_instanceEntityMapperInterface->FindOwningInstance(entityId); + if (!instance.has_value()) { return false; } - InstanceOptionalReference instance = m_instanceEntityMapperInterface->FindOwningInstance(entityId); + // If this is owned by the root instance, that corresponds to an invalid m_focusedInstanceContainerEntityId. + if (!instance->get().GetParentInstance().has_value()) + { + return !m_focusedInstanceContainerEntityId.IsValid(); + } - return instance.has_value() && (&instance->get() == &m_focusedInstance->get()); + return (instance->get().GetContainerEntityId() == m_focusedInstanceContainerEntityId); } bool PrefabFocusHandler::IsOwningPrefabInFocusHierarchy(AZ::EntityId entityId) const { - if (!m_focusedInstance.has_value()) + if (!entityId.IsValid()) { - // PrefabFocusHandler has not been initialized yet. return false; } - if (!entityId.IsValid()) + // If the focus is on the root, m_focusedInstanceContainerEntityId will be the invalid id. + // In those case all entities are in the focus hierarchy and should return true. + if (!m_focusedInstanceContainerEntityId.IsValid()) { - return false; + return true; } InstanceOptionalReference instance = m_instanceEntityMapperInterface->FindOwningInstance(entityId); while (instance.has_value()) { - if (&instance->get() == &m_focusedInstance->get()) + if (instance->get().GetContainerEntityId() == m_focusedInstanceContainerEntityId) { return true; } @@ -290,8 +290,9 @@ namespace AzToolsFramework::Prefab // Determine if the entityId is the container for any of the instances in the vector. auto result = AZStd::find_if( m_instanceFocusHierarchy.begin(), m_instanceFocusHierarchy.end(), - [entityId](const InstanceOptionalReference& instance) + [&, entityId](const AZ::EntityId& containerEntityId) { + InstanceOptionalReference instance = GetReferenceFromContainerEntityId(containerEntityId); return (instance->get().GetContainerEntityId() == entityId); } ); @@ -316,8 +317,9 @@ namespace AzToolsFramework::Prefab // Determine if the templateId matches any of the instances in the vector. auto result = AZStd::find_if( m_instanceFocusHierarchy.begin(), m_instanceFocusHierarchy.end(), - [templateId](const InstanceOptionalReference& instance) + [&, templateId](const AZ::EntityId& containerEntityId) { + InstanceOptionalReference instance = GetReferenceFromContainerEntityId(containerEntityId); return (instance->get().GetTemplateId() == templateId); } ); @@ -336,10 +338,17 @@ namespace AzToolsFramework::Prefab AZStd::list instanceFocusList; - InstanceOptionalReference currentInstance = m_focusedInstance; + InstanceOptionalReference currentInstance = GetReferenceFromContainerEntityId(m_focusedInstanceContainerEntityId); while (currentInstance.has_value()) { - m_instanceFocusHierarchy.emplace_back(currentInstance); + if (currentInstance->get().GetParentInstance().has_value()) + { + m_instanceFocusHierarchy.emplace_back(currentInstance->get().GetContainerEntityId()); + } + else + { + m_instanceFocusHierarchy.emplace_back(AZ::EntityId()); + } currentInstance = currentInstance->get().GetParentInstance(); } @@ -357,42 +366,48 @@ namespace AzToolsFramework::Prefab size_t index = 0; size_t maxIndex = m_instanceFocusHierarchy.size() - 1; - for (const InstanceOptionalReference& instance : m_instanceFocusHierarchy) + for (const AZ::EntityId containerEntityId : m_instanceFocusHierarchy) { - AZStd::string prefabName; - - if (index < maxIndex) - { - // Get the filename without the extension (stem). - prefabName = instance->get().GetTemplateSourcePath().Stem().Native(); - } - else - { - // Get the full filename. - prefabName = instance->get().GetTemplateSourcePath().Filename().Native(); - } - - if (prefabSystemComponentInterface->IsTemplateDirty(instance->get().GetTemplateId())) + InstanceOptionalReference instance = GetReferenceFromContainerEntityId(containerEntityId); + if (instance.has_value()) { - prefabName += "*"; + AZStd::string prefabName; + + if (index < maxIndex) + { + // Get the filename without the extension (stem). + prefabName = instance->get().GetTemplateSourcePath().Stem().Native(); + } + else + { + // Get the full filename. + prefabName = instance->get().GetTemplateSourcePath().Filename().Native(); + } + + if (prefabSystemComponentInterface->IsTemplateDirty(instance->get().GetTemplateId())) + { + prefabName += "*"; + } + + m_instanceFocusPath.Append(prefabName); } - m_instanceFocusPath.Append(prefabName); - ++index; } } - void PrefabFocusHandler::OpenInstanceContainers(const AZStd::vector& instances) const + void PrefabFocusHandler::OpenInstanceContainers(const AZStd::vector& instances) const { // If this is called outside the Editor, this interface won't be initialized. if (!m_containerEntityInterface) { return; } - - for (const InstanceOptionalReference& instance : instances) + + for (const AZ::EntityId containerEntityId : instances) { + InstanceOptionalReference instance = GetReferenceFromContainerEntityId(containerEntityId); + if (instance.has_value()) { m_containerEntityInterface->SetContainerOpen(instance->get().GetContainerEntityId(), true); @@ -400,7 +415,7 @@ namespace AzToolsFramework::Prefab } } - void PrefabFocusHandler::CloseInstanceContainers(const AZStd::vector& instances) const + void PrefabFocusHandler::CloseInstanceContainers(const AZStd::vector& instances) const { // If this is called outside the Editor, this interface won't be initialized. if (!m_containerEntityInterface) @@ -408,8 +423,10 @@ namespace AzToolsFramework::Prefab return; } - for (const InstanceOptionalReference& instance : instances) + for (const AZ::EntityId containerEntityId : instances) { + InstanceOptionalReference instance = GetReferenceFromContainerEntityId(containerEntityId); + if (instance.has_value()) { m_containerEntityInterface->SetContainerOpen(instance->get().GetContainerEntityId(), false); @@ -417,4 +434,22 @@ namespace AzToolsFramework::Prefab } } + InstanceOptionalReference PrefabFocusHandler::GetReferenceFromContainerEntityId(AZ::EntityId containerEntityId) const + { + if (!containerEntityId.IsValid()) + { + PrefabEditorEntityOwnershipInterface* prefabEditorEntityOwnershipInterface = + AZ::Interface::Get(); + + if (!prefabEditorEntityOwnershipInterface) + { + return AZStd::nullopt; + } + + return prefabEditorEntityOwnershipInterface->GetRootPrefabInstance(); + } + + return m_instanceEntityMapperInterface->FindOwningInstance(containerEntityId); + } + } // namespace AzToolsFramework::Prefab diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h index 75b9666389..2e23059a01 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h @@ -73,16 +73,19 @@ namespace AzToolsFramework::Prefab void RefreshInstanceFocusList(); void RefreshInstanceFocusPath(); - void OpenInstanceContainers(const AZStd::vector& instances) const; - void CloseInstanceContainers(const AZStd::vector& instances) const; + void OpenInstanceContainers(const AZStd::vector& instances) const; + void CloseInstanceContainers(const AZStd::vector& instances) const; - //! The instance the editor is currently focusing on. - InstanceOptionalReference m_focusedInstance; + InstanceOptionalReference GetReferenceFromContainerEntityId(AZ::EntityId containerEntityId) const; + + //! The EntityId of the prefab container entity for the instance the editor is currently focusing on. + AZ::EntityId m_focusedInstanceContainerEntityId = AZ::EntityId(); //! The templateId of the focused instance. TemplateId m_focusedTemplateId; - //! The list of instances going from the root (index 0) to the focused instance. - AZStd::vector m_instanceFocusHierarchy; - //! A path containing the names of the containers in the instance focus hierarchy, separated with a /. + //! The list of instances going from the root (index 0) to the focused instance, + //! referenced by their prefab container's EntityId. + AZStd::vector m_instanceFocusHierarchy; + //! A path containing the filenames of the instances in the focus hierarchy, separated with a /. AZ::IO::Path m_instanceFocusPath; ContainerEntityInterface* m_containerEntityInterface = nullptr; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabViewportFocusPathHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabViewportFocusPathHandler.cpp index 920e99665d..c1fc9138d1 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabViewportFocusPathHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/Prefab/PrefabViewportFocusPathHandler.cpp @@ -64,6 +64,9 @@ namespace AzToolsFramework::Prefab ); m_backButton->setToolTip("Up one level (-)"); + + // Currently hide this button until we can correctly disable/enable it based on context. + m_backButton->hide(); } void PrefabViewportFocusPathHandler::OnPrefabFocusChanged() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp index 29bc106eed..9ecbdf5ffc 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/EntityPropertyEditor.cpp @@ -4705,13 +4705,6 @@ namespace AzToolsFramework { if (mimeData->hasFormat(AssetBrowser::AssetBrowserEntry::GetMimeType())) { - // extra special case: MTLs from FBX drags are ignored. are we dragging a FBX file? - bool isDraggingFBXFile = false; - AssetBrowser::AssetBrowserEntry::ForEachEntryInMimeData(mimeData, [&](const AssetBrowser::SourceAssetBrowserEntry* source) - { - isDraggingFBXFile = isDraggingFBXFile || AzFramework::StringFunc::Equal(source->GetExtension().c_str(), ".fbx", false); - }); - // the usual case - we only allow asset browser drops of assets that have actually been associated with a kind of component. AssetBrowser::AssetBrowserEntry::ForEachEntryInMimeData(mimeData, [&](const AssetBrowser::ProductAssetBrowserEntry* product) { @@ -4723,17 +4716,7 @@ namespace AzToolsFramework if (canCreateComponent && !componentTypeId.IsNull()) { - // we have a component type that handles this asset. - // but we disallow it if its a MTL file from a FBX and the FBX itself is being dragged. Its still allowed - // to drag the actual MTL. - EBusFindAssetTypeByName materialAssetTypeResult("Material"); - AZ::AssetTypeInfoBus::BroadcastResult(materialAssetTypeResult, &AZ::AssetTypeInfo::GetAssetType); - AZ::Data::AssetType materialAssetType = materialAssetTypeResult.GetAssetType(); - - if ((!isDraggingFBXFile) || (product->GetAssetType() != materialAssetType)) - { - callbackFunction(product); - } + callbackFunction(product); } }); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp index e97be57470..70e5aafe8a 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.cpp @@ -527,8 +527,8 @@ namespace AzToolsFramework m_errorButton = nullptr; } } - - void PropertyAssetCtrl::UpdateErrorButton(const AZStd::string& errorLog) + + void PropertyAssetCtrl::UpdateErrorButton() { if (m_errorButton) { @@ -543,12 +543,17 @@ namespace AzToolsFramework m_errorButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); m_errorButton->setFixedSize(QSize(16, 16)); m_errorButton->setMouseTracking(true); - m_errorButton->setIcon(QIcon("Icons/PropertyEditor/error_icon.png")); + m_errorButton->setIcon(QIcon(":/PropertyEditor/Resources/error_icon.png")); m_errorButton->setToolTip("Show Errors"); // Insert the error button after the asset label qobject_cast(layout())->insertWidget(1, m_errorButton); } + } + + void PropertyAssetCtrl::UpdateErrorButtonWithLog(const AZStd::string& errorLog) + { + UpdateErrorButton(); // Connect pressed to opening the error dialog // Must capture this for call to QObject::connect @@ -587,6 +592,21 @@ namespace AzToolsFramework logDialog->show(); }); } + + void PropertyAssetCtrl::UpdateErrorButtonWithMessage(const AZStd::string& message) + { + UpdateErrorButton(); + + connect(m_errorButton, &QPushButton::clicked, this, [this, message]() { + QMessageBox::critical(nullptr, "Error", message.c_str()); + + // Without this, the error button would maintain focus after clicking, which left the red error icon in a blue-highlighted state + if (parentWidget()) + { + parentWidget()->setFocus(); + } + }); + } void PropertyAssetCtrl::ClearAssetInternal() { @@ -960,7 +980,6 @@ namespace AzToolsFramework else { const AZ::Data::AssetId assetID = GetCurrentAssetID(); - m_currentAssetHint = ""; AZ::Outcome jobOutcome = AZ::Failure(); AssetSystemJobRequestBus::BroadcastResult(jobOutcome, &AssetSystemJobRequestBus::Events::GetAssetJobsInfoByAssetID, assetID, false, false); @@ -1018,7 +1037,7 @@ namespace AzToolsFramework // In case of failure, render failure icon case AssetSystem::JobStatus::Failed: { - UpdateErrorButton(errorLog); + UpdateErrorButtonWithLog(errorLog); } break; @@ -1043,6 +1062,10 @@ namespace AzToolsFramework m_currentAssetHint = assetPath; } } + else + { + UpdateErrorButtonWithMessage(AZStd::string::format("Asset is missing.\n\nID: %s\nHint:%s", assetID.ToString().c_str(), GetCurrentAssetHint().c_str())); + } } // Get the asset file name diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx index 0b98278bc5..58ddbb967e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UI/PropertyEditor/PropertyAssetCtrl.hxx @@ -168,7 +168,9 @@ namespace AzToolsFramework bool IsCorrectMimeData(const QMimeData* pData, AZ::Data::AssetId* pAssetId = nullptr, AZ::Data::AssetType* pAssetType = nullptr) const; void ClearErrorButton(); - void UpdateErrorButton(const AZStd::string& errorLog); + void UpdateErrorButton(); + void UpdateErrorButtonWithLog(const AZStd::string& errorLog); + void UpdateErrorButtonWithMessage(const AZStd::string& message); virtual const AZStd::string GetFolderSelection() const { return AZStd::string(); } virtual void SetFolderSelection(const AZStd::string& /* folderPath */) {} virtual void ClearAssetInternal(); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h index 4a7039423c..1e29f1dbce 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/UnitTest/AzToolsFrameworkTestHelpers.h @@ -158,7 +158,10 @@ namespace UnitTest { // Create & Start a new ToolsApplication if there's no existing one m_app = CreateTestApplication(); - m_app->Start(AzFramework::Application::Descriptor()); + AZ::ComponentApplication::StartupParameters startupParameters; + startupParameters.m_loadAssetCatalog = false; + + m_app->Start(AzFramework::Application::Descriptor(), startupParameters); } // without this, the user settings component would attempt to save on finalize/shutdown. Since the file is diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp index e3b45aca2b..8f8bd3e3f9 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.cpp @@ -6,6 +6,7 @@ * */ +#include #include namespace AzToolsFramework @@ -62,4 +63,33 @@ namespace AzToolsFramework return circleBoundWidth; } + + AZ::Vector3 FindClosestPickIntersection( + AzFramework::ViewportId viewportId, const AzFramework::ScreenPoint& screenPoint, const float rayLength, const float defaultDistance) + { + using AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus; + AzToolsFramework::ViewportInteraction::ProjectedViewportRay viewportRay{}; + ViewportInteractionRequestBus::EventResult( + viewportRay, viewportId, &ViewportInteractionRequestBus::Events::ViewportScreenToWorldRay, screenPoint); + + AzFramework::RenderGeometry::RayRequest ray; + ray.m_startWorldPosition = viewportRay.origin; + ray.m_endWorldPosition = viewportRay.origin + viewportRay.direction * rayLength; + ray.m_onlyVisible = true; + + AzFramework::RenderGeometry::RayResult renderGeometryIntersectionResult; + AzFramework::RenderGeometry::IntersectorBus::EventResult( + renderGeometryIntersectionResult, AzToolsFramework::GetEntityContextId(), + &AzFramework::RenderGeometry::IntersectorBus::Events::RayIntersect, ray); + + // attempt a ray intersection with any visible mesh and return the intersection position if successful + if (renderGeometryIntersectionResult) + { + return renderGeometryIntersectionResult.m_worldPosition; + } + else + { + return viewportRay.origin + viewportRay.direction * defaultDistance; + } + } } // namespace AzToolsFramework diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h index 8ec772f0da..aa97eb361e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h @@ -162,12 +162,11 @@ namespace AzToolsFramework //! Multiply by DeviceScalingFactor to get the position in viewport pixel space. virtual AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) = 0; //! Transforms a point from Qt widget screen space to world space based on the given clip space depth. - //! Depth specifies a relative camera depth to project in the range of [0.f, 1.f]. //! Returns the world space position if successful. - virtual AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) = 0; + virtual AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) = 0; //! Casts a point in screen space to a ray in world space originating from the viewport camera frustum's near plane. //! Returns a ray containing the ray's origin and a direction normal, if successful. - virtual AZStd::optional ViewportScreenToWorldRay(const AzFramework::ScreenPoint& screenPosition) = 0; + virtual ProjectedViewportRay ViewportScreenToWorldRay(const AzFramework::ScreenPoint& screenPosition) = 0; //! Gets the DPI scaling factor that translates Qt widget space into viewport pixel space. virtual float DeviceScalingFactor() = 0; @@ -229,9 +228,6 @@ namespace AzToolsFramework class MainEditorViewportInteractionRequests { public: - //! Given a point in screen space, return the picked entity (if any). - //! Picked EntityId will be returned, InvalidEntityId will be returned on failure. - virtual AZ::EntityId PickEntity(const AzFramework::ScreenPoint& point) = 0; //! Given a point in screen space, return the terrain position in world space. virtual AZ::Vector3 PickTerrain(const AzFramework::ScreenPoint& point) = 0; //! Return the terrain height given a world position in 2d (xy plane). @@ -266,7 +262,6 @@ namespace AzToolsFramework { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; //! Returns the current state of the keyboard modifier keys. virtual KeyboardModifiers QueryKeyboardModifiers() = 0; @@ -290,7 +285,6 @@ namespace AzToolsFramework { public: static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; - static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; //! Returns the current time in seconds. //! This interface can be overridden for the purposes of testing to simplify viewport input requests. @@ -340,6 +334,12 @@ namespace AzToolsFramework return entityContextId; } + //! Performs an intersection test against meshes in the scene, if there is a hit (the ray intersects + //! a mesh), that position is returned, otherwise a point projected defaultDistance from the + //! origin of the ray will be returned. + AZ::Vector3 FindClosestPickIntersection( + AzFramework::ViewportId viewportId, const AzFramework::ScreenPoint& screenPoint, float rayLength, float defaultDistance); + //! Maps a mouse interaction event to a ClickDetector event. //! @note Function only cares about up or down events, all other events are mapped to Nil (ignored). AzFramework::ClickDetector::ClickEvent ClickDetectorEventFromViewportInteraction( diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp index 0f94b95e5f..ee30b9e29d 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorHelpers.cpp @@ -148,7 +148,6 @@ namespace AzToolsFramework return false; } - EditorHelpers::EditorHelpers(const EditorVisibleEntityDataCache* entityDataCache) : m_entityDataCache(entityDataCache) { @@ -190,7 +189,10 @@ namespace AzToolsFramework if (helpersVisible) { // some components choose to hide their icons (e.g. meshes) - if (!m_entityDataCache->IsVisibleEntityIconHidden(entityCacheIndex)) + // we also do not want to test against icons that may not be showing as they're inside a 'closed' entity container + // (these icons only become visible when it is opened for editing) + if (!m_entityDataCache->IsVisibleEntityIconHidden(entityCacheIndex) && + m_entityDataCache->IsVisibleEntityIndividuallySelectableInViewport(entityCacheIndex)) { const AZ::Vector3& entityPosition = m_entityDataCache->GetVisibleEntityPosition(entityCacheIndex); @@ -235,7 +237,7 @@ namespace AzToolsFramework viewportId, &ViewportInteraction::ViewportMouseCursorRequestBus::Events::SetOverrideCursor, ViewportInteraction::CursorStyleOverride::Forbidden); } - + if (mouseInteraction.m_mouseInteraction.m_mouseButtons.Left() && mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::Down || mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::DoubleClick) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp index a5ef66e7a3..0a7bed6b18 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.cpp @@ -18,9 +18,6 @@ namespace AzToolsFramework { - // default ray length for picking in the viewport - static const float EditorPickRayLength = 1000.0f; - AZ::Vector3 CalculateCenterOffset(const AZ::EntityId entityId, const EditorTransformComponentSelectionRequests::Pivot pivot) { if (Centered(pivot)) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h index d58549b329..5c9f47fdd3 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorSelectionUtil.h @@ -26,6 +26,9 @@ namespace AzFramework namespace AzToolsFramework { + //! Default ray length for picking in the viewport. + inline constexpr float EditorPickRayLength = 1000.0f; + //! Is the pivot at the center of the object (middle of extents) or at the //! exported authored object root position. inline bool Centered(const EditorTransformComponentSelectionRequests::Pivot pivot) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp index c16a458be7..d0318ee181 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.cpp @@ -409,7 +409,7 @@ namespace AzToolsFramework const AzFramework::CameraState cameraState = GetCameraState(viewportId); for (size_t entityCacheIndex = 0; entityCacheIndex < entityDataCache.VisibleEntityDataCount(); ++entityCacheIndex) { - if (!entityDataCache.IsVisibleEntitySelectableInViewport(entityCacheIndex)) + if (!entityDataCache.IsVisibleEntityIndividuallySelectableInViewport(entityCacheIndex)) { continue; } @@ -892,37 +892,34 @@ namespace AzToolsFramework prevModifiers = action.m_modifiers; } - static void HandleAccents( - const bool hasSelectedEntities, - const AZ::EntityId entityIdUnderCursor, - const bool ctrlHeld, - AZ::EntityId& hoveredEntityId, + void HandleAccents( + const AZ::EntityId currentEntityIdUnderCursor, + AZ::EntityId& hoveredEntityIdUnderCursor, + const HandleAccentsContext& handleAccentsContext, const ViewportInteraction::MouseButtons mouseButtons, - const bool usingBoxSelect) + const AZStd::function& setEntityAccentedFn) { - AZ_PROFILE_FUNCTION(AzToolsFramework); - const bool invalidMouseButtonHeld = mouseButtons.Middle() || mouseButtons.Right(); + const bool hasSelectedEntities = handleAccentsContext.m_hasSelectedEntities; + const bool ctrlHeld = handleAccentsContext.m_ctrlHeld; + const bool boxSelect = handleAccentsContext.m_usingBoxSelect; + const bool stickySelect = handleAccentsContext.m_usingStickySelect; + const bool canSelect = stickySelect ? !hasSelectedEntities || ctrlHeld : true; - if ((hoveredEntityId.IsValid() && hoveredEntityId != entityIdUnderCursor) || - (hasSelectedEntities && !ctrlHeld && hoveredEntityId.IsValid()) || invalidMouseButtonHeld) - { - if (hoveredEntityId.IsValid()) - { - ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequests::SetEntityHighlighted, hoveredEntityId, false); + const bool removePreviousAccent = + (currentEntityIdUnderCursor != hoveredEntityIdUnderCursor && hoveredEntityIdUnderCursor.IsValid()) || invalidMouseButtonHeld; + const bool addNextAccent = currentEntityIdUnderCursor.IsValid() && canSelect && !invalidMouseButtonHeld && !boxSelect; - hoveredEntityId.SetInvalid(); - } + if (removePreviousAccent) + { + setEntityAccentedFn(hoveredEntityIdUnderCursor, false); + hoveredEntityIdUnderCursor.SetInvalid(); } - if (!invalidMouseButtonHeld && !usingBoxSelect && (!hasSelectedEntities || ctrlHeld)) + if (addNextAccent) { - if (entityIdUnderCursor.IsValid()) - { - ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequests::SetEntityHighlighted, entityIdUnderCursor, true); - - hoveredEntityId = entityIdUnderCursor; - } + setEntityAccentedFn(currentEntityIdUnderCursor, true); + hoveredEntityIdUnderCursor = currentEntityIdUnderCursor; } } @@ -983,7 +980,7 @@ namespace AzToolsFramework { if (auto entityIndex = entityDataCache.GetVisibleEntityIndexFromId(entityId)) { - if (entityDataCache.IsVisibleEntitySelectableInViewport(*entityIndex)) + if (entityDataCache.IsVisibleEntityIndividuallySelectableInViewport(*entityIndex)) { return *entityIndex; } @@ -1014,6 +1011,15 @@ namespace AzToolsFramework ToolsApplicationNotificationBus::Broadcast(&ToolsApplicationNotificationBus::Events::InvalidatePropertyDisplay, Refresh_Values); } + // leaves focus mode by focusing on the parent of the current perfab in the entity outliner + static void LeaveFocusMode() + { + if (auto prefabFocusPublicInterface = AZ::Interface::Get()) + { + prefabFocusPublicInterface->FocusOnParentOfFocusedPrefab(GetEntityContextId()); + } + } + EditorTransformComponentSelection::EditorTransformComponentSelection(const EditorVisibleEntityDataCache* entityDataCache) : m_entityDataCache(entityDataCache) { @@ -1771,7 +1777,7 @@ namespace AzToolsFramework const AzFramework::CameraState cameraState = GetCameraState(viewportId); const auto cursorEntityIdQuery = m_editorHelpers->FindEntityIdUnderCursor(cameraState, mouseInteraction); - m_cachedEntityIdUnderCursor = cursorEntityIdQuery.ContainerAncestorEntityId(); + m_currentEntityIdUnderCursor = cursorEntityIdQuery.ContainerAncestorEntityId(); const auto selectClickEvent = ClickDetectorEventFromViewportInteraction(mouseInteraction); m_cursorState.SetCurrentPosition(mouseInteraction.m_mouseInteraction.m_mousePick.m_screenCoordinates); @@ -1792,7 +1798,7 @@ namespace AzToolsFramework mouseInteraction.m_mouseInteraction, AZ::Aabb::CreateFromMinMax(boxPosition - scaledSize, boxPosition + scaledSize))) { - m_cachedEntityIdUnderCursor = entityId; + m_currentEntityIdUnderCursor = entityId; } } } @@ -1812,7 +1818,7 @@ namespace AzToolsFramework return true; } - const AZ::EntityId entityIdUnderCursor = m_cachedEntityIdUnderCursor; + const AZ::EntityId entityIdUnderCursor = m_currentEntityIdUnderCursor; if (mouseInteraction.m_mouseEvent == ViewportInteraction::MouseEvent::DoubleClick && mouseInteraction.m_mouseInteraction.m_mouseButtons.Left()) @@ -3331,9 +3337,23 @@ namespace AzToolsFramework m_cursorState.Update(); + bool stickySelect = false; + ViewportInteraction::ViewportSettingsRequestBus::EventResult( + stickySelect, viewportInfo.m_viewportId, &ViewportInteraction::ViewportSettingsRequestBus::Events::StickySelectEnabled); + + HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = keyboardModifiers.Ctrl(); + handleAccentsContext.m_hasSelectedEntities = !m_selectedEntityIds.empty(); + handleAccentsContext.m_usingBoxSelect = m_boxSelect.Active(); + handleAccentsContext.m_usingStickySelect = stickySelect; + HandleAccents( - !m_selectedEntityIds.empty(), m_cachedEntityIdUnderCursor, keyboardModifiers.Ctrl(), m_hoveredEntityId, - ViewportInteraction::BuildMouseButtons(QGuiApplication::mouseButtons()), m_boxSelect.Active()); + m_currentEntityIdUnderCursor, m_hoveredEntityId, handleAccentsContext, + ViewportInteraction::BuildMouseButtons(QGuiApplication::mouseButtons()), + [](const AZ::EntityId entityId, bool highlighted) + { + ToolsApplicationRequestBus::Broadcast(&ToolsApplicationRequests::SetEntityHighlighted, entityId, highlighted); + }); const ReferenceFrame referenceFrame = m_spaceCluster.m_spaceLock.value_or(ReferenceFrameFromModifiers(keyboardModifiers)); @@ -3579,7 +3599,8 @@ namespace AzToolsFramework if (auto prefabFocusPublicInterface = AZ::Interface::Get()) { AzFramework::EntityContextId editorEntityContextId = GetEntityContextId(); - if (AZ::EntityId focusRoot = prefabFocusPublicInterface->GetFocusedPrefabContainerEntityId(editorEntityContextId); focusRoot.IsValid()) + if (AZ::EntityId focusRoot = prefabFocusPublicInterface->GetFocusedPrefabContainerEntityId(editorEntityContextId); + focusRoot.IsValid()) { m_selectedEntityIds.erase(focusRoot); } @@ -3674,7 +3695,8 @@ namespace AzToolsFramework case ViewportEditorMode::Focus: { ViewportUi::ViewportUiRequestBus::Event( - ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode"); + ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode", + LeaveFocusMode); } break; case ViewportEditorMode::Default: @@ -3703,7 +3725,8 @@ namespace AzToolsFramework if (editorModeState.IsModeActive(ViewportEditorMode::Focus)) { ViewportUi::ViewportUiRequestBus::Event( - ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode"); + ViewportUi::DefaultViewportId, &ViewportUi::ViewportUiRequestBus::Events::CreateViewportBorder, "Focus Mode", + LeaveFocusMode); } } break; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h index 1e1cc6d2e1..10f83db739 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorTransformComponentSelection.h @@ -317,7 +317,7 @@ namespace AzToolsFramework void SetAllViewportUiVisible(bool visible); AZ::EntityId m_hoveredEntityId; //!< What EntityId is the mouse currently hovering over (if any). - AZ::EntityId m_cachedEntityIdUnderCursor; //!< Store the EntityId on each mouse move for use in Display. + AZ::EntityId m_currentEntityIdUnderCursor; //!< Store the EntityId on each mouse move for use in Display. AZ::EntityId m_editorCameraComponentEntityId; //!< The EditorCameraComponent EntityId if it is set. EntityIdSet m_selectedEntityIds; //!< Represents the current entities in the selection. @@ -357,6 +357,23 @@ namespace AzToolsFramework bool m_viewportUiVisible = true; //!< Used to hide/show the viewport ui elements. }; + //! Bundles viewport state that impacts how accents are added/removed in HandleAccents. + struct HandleAccentsContext + { + bool m_hasSelectedEntities; + bool m_ctrlHeld; + bool m_usingBoxSelect; + bool m_usingStickySelect; + }; + + //! Updates whether accents (icon highlights) are added/removed for a given entity based on the cursor position. + void HandleAccents( + AZ::EntityId currentEntityIdUnderCursor, + AZ::EntityId& hoveredEntityIdUnderCursor, + const HandleAccentsContext& handleAccentsContext, + ViewportInteraction::MouseButtons mouseButtons, + const AZStd::function& setEntityAccentedFn); + //! The ETCS (EntityTransformComponentSelection) namespace contains functions and data used exclusively by //! the EditorTransformComponentSelection type. Functions in this namespace are exposed to facilitate testing //! and should not be used outside of EditorTransformComponentSelection or EditorTransformComponentSelectionTests. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp index 328cfc3ae5..58c25b944c 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.cpp @@ -293,12 +293,10 @@ namespace AzToolsFramework return m_impl->m_visibleEntityDatas[index].m_iconHidden; } - bool EditorVisibleEntityDataCache::IsVisibleEntitySelectableInViewport(size_t index) const + bool EditorVisibleEntityDataCache::IsVisibleEntityIndividuallySelectableInViewport(const size_t index) const { - return m_impl->m_visibleEntityDatas[index].m_visible - && !m_impl->m_visibleEntityDatas[index].m_locked - && m_impl->m_visibleEntityDatas[index].m_inFocus - && !m_impl->m_visibleEntityDatas[index].m_descendantOfClosedContainer; + return m_impl->m_visibleEntityDatas[index].m_visible && !m_impl->m_visibleEntityDatas[index].m_locked && + m_impl->m_visibleEntityDatas[index].m_inFocus && !m_impl->m_visibleEntityDatas[index].m_descendantOfClosedContainer; } AZStd::optional EditorVisibleEntityDataCache::GetVisibleEntityIndexFromId(const AZ::EntityId entityId) const diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h index 16fa1b6d14..4262d334df 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportSelection/EditorVisibleEntityDataCache.h @@ -55,7 +55,10 @@ namespace AzToolsFramework bool IsVisibleEntityVisible(size_t index) const; bool IsVisibleEntitySelected(size_t index) const; bool IsVisibleEntityIconHidden(size_t index) const; - bool IsVisibleEntitySelectableInViewport(size_t index) const; + //! Returns true if the entity is individually selectable (none of its ancestors are a closed container entity). + //! @note It may still be desirable to be able to 'click' an entity that is a descendant of a closed container + //! to select the container itself, not the individual entity. + bool IsVisibleEntityIndividuallySelectableInViewport(size_t index) const; AZStd::optional GetVisibleEntityIndexFromId(AZ::EntityId entityId) const; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp index bc299f9985..365ba237db 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiCluster.cpp @@ -62,9 +62,6 @@ namespace AzToolsFramework::ViewportUi::Internal return; } - // set hover to true by default - action->setProperty("IconHasHoverEffect", true); - // add the action addAction(action); diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp index b948a18578..c1bddbe3c3 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.cpp @@ -20,7 +20,9 @@ namespace AzToolsFramework::ViewportUi::Internal { const static int HighlightBorderSize = 5; - const static char* HighlightBorderColor = "#4A90E2"; + const static char* const HighlightBorderColor = "#4A90E2"; + const static int HighlightBorderBackButtonIconSize = 20; + const static char* const HighlightBorderBackButtonIconFile = "X_axis.svg"; static void UnparentWidgets(ViewportUiElementIdInfoLookup& viewportUiElementIdInfoLookup) { @@ -62,6 +64,7 @@ namespace AzToolsFramework::ViewportUi::Internal , m_fullScreenLayout(&m_uiOverlay) , m_uiOverlayLayout() , m_viewportBorderText(&m_uiOverlay) + , m_viewportBorderBackButton(&m_uiOverlay) { } @@ -254,7 +257,7 @@ namespace AzToolsFramework::ViewportUi::Internal auto viewportUiMapElement = m_viewportUiElements.find(elementId); if (viewportUiMapElement != m_viewportUiElements.end()) { - viewportUiMapElement->second.m_widget->setVisible(false); + viewportUiMapElement->second.m_widget->hide(); viewportUiMapElement->second.m_widget->setParent(nullptr); m_viewportUiElements.erase(viewportUiMapElement); } @@ -269,7 +272,7 @@ namespace AzToolsFramework::ViewportUi::Internal { if (ViewportUiElementInfo element = GetViewportUiElementInfo(elementId); element.m_widget) { - element.m_widget->setVisible(true); + element.m_widget->show(); } } @@ -277,7 +280,7 @@ namespace AzToolsFramework::ViewportUi::Internal { if (ViewportUiElementInfo element = GetViewportUiElementInfo(elementId); element.m_widget) { - element.m_widget->setVisible(false); + element.m_widget->hide(); } } @@ -291,27 +294,34 @@ namespace AzToolsFramework::ViewportUi::Internal return false; } - void ViewportUiDisplay::CreateViewportBorder(const AZStd::string& borderTitle) + void ViewportUiDisplay::CreateViewportBorder( + const AZStd::string& borderTitle, AZStd::optional backButtonCallback) { - const AZStd::string styleSheet = AZStd::string::format( - "border: %dpx solid %s; border-top: %dpx solid %s;", HighlightBorderSize, HighlightBorderColor, ViewportUiTopBorderSize, - HighlightBorderColor); - m_uiOverlay.setStyleSheet(styleSheet.c_str()); + m_uiOverlay.setStyleSheet(QString("border: %1px solid %2; border-top: %3px solid %4;") + .arg( + QString::number(HighlightBorderSize), HighlightBorderColor, + QString::number(ViewportUiTopBorderSize), HighlightBorderColor)); m_uiOverlayLayout.setContentsMargins( HighlightBorderSize + ViewportUiOverlayMargin, ViewportUiTopBorderSize + ViewportUiOverlayMargin, HighlightBorderSize + ViewportUiOverlayMargin, HighlightBorderSize + ViewportUiOverlayMargin); - m_viewportBorderText.setVisible(true); + m_viewportBorderText.show(); m_viewportBorderText.setText(borderTitle.c_str()); UpdateUiOverlayGeometry(); + + // only display the back button if a callback was provided + m_viewportBorderBackButtonCallback = backButtonCallback; + m_viewportBorderBackButton.setVisible(m_viewportBorderBackButtonCallback.has_value()); } void ViewportUiDisplay::RemoveViewportBorder() { - m_viewportBorderText.setVisible(false); + m_viewportBorderText.hide(); m_uiOverlay.setStyleSheet("border: none;"); m_uiOverlayLayout.setContentsMargins( ViewportUiOverlayMargin, ViewportUiOverlayMargin + ViewportUiOverlayTopMarginPadding, ViewportUiOverlayMargin, ViewportUiOverlayMargin); + m_viewportBorderBackButtonCallback.reset(); + m_viewportBorderBackButton.hide(); } void ViewportUiDisplay::PositionViewportUiElementFromWorldSpace(ViewportUiElementId elementId, const AZ::Vector3& pos) @@ -350,23 +360,46 @@ namespace AzToolsFramework::ViewportUi::Internal { m_uiMainWindow.setObjectName(QString("ViewportUiWindow")); ConfigureWindowForViewportUi(&m_uiMainWindow); - m_uiMainWindow.setVisible(false); + m_uiMainWindow.hide(); m_uiOverlay.setObjectName(QString("ViewportUiOverlay")); m_uiMainWindow.setCentralWidget(&m_uiOverlay); - m_uiOverlay.setVisible(false); + m_uiOverlay.hide(); // remove any spacing and margins from the UI Overlay Layout m_fullScreenLayout.setSpacing(0); m_fullScreenLayout.setContentsMargins(0, 0, 0, 0); m_fullScreenLayout.addLayout(&m_uiOverlayLayout, 0, 0, 1, 1); - // format the label which will appear on top of the highlight border - AZStd::string styleSheet = AZStd::string::format("background-color: %s; border: none;", HighlightBorderColor); - m_viewportBorderText.setStyleSheet(styleSheet.c_str()); + // style the label which will appear on top of the highlight border + m_viewportBorderText.setStyleSheet(QString("background-color: %1; border: none").arg(HighlightBorderColor)); m_viewportBorderText.setFixedHeight(ViewportUiTopBorderSize); - m_viewportBorderText.setVisible(false); + m_viewportBorderText.hide(); m_fullScreenLayout.addWidget(&m_viewportBorderText, 0, 0, Qt::AlignTop | Qt::AlignHCenter); + + m_viewportBorderBackButton.setAutoRaise(true); // hover highlight + m_viewportBorderBackButton.hide(); + + QIcon backButtonIcon(QString(":/stylesheet/img/UI20/toolbar/%1").arg(HighlightBorderBackButtonIconFile)); + m_viewportBorderBackButton.setIcon(backButtonIcon); + m_viewportBorderBackButton.setIconSize(QSize(HighlightBorderBackButtonIconSize, HighlightBorderBackButtonIconSize)); + + // setup the handler for the back button to call the user provided callback (if any) + QObject::connect( + &m_viewportBorderBackButton, &QToolButton::clicked, + [this] + { + if (m_viewportBorderBackButtonCallback.has_value()) + { + // we need to swap out the existing back button callback because it will be reset in RemoveViewportBorder() + // so preserve the lifetime with this temporary callback until after the call to RemoveViewportBorder() + AZStd::optional backButtonCallback; + m_viewportBorderBackButtonCallback.swap(backButtonCallback); + RemoveViewportBorder(); + (*backButtonCallback)(); + } + }); + m_fullScreenLayout.addWidget(&m_viewportBorderBackButton, 0, 0, Qt::AlignTop | Qt::AlignRight); } void ViewportUiDisplay::PrepareWidgetForViewportUi(QPointer widget) @@ -414,16 +447,9 @@ namespace AzToolsFramework::ViewportUi::Internal region += m_uiOverlay.childrenRegion(); // set viewport ui visibility depending on if elements are present - if (region.isEmpty() || !UiDisplayEnabled()) - { - m_uiMainWindow.setVisible(false); - m_uiOverlay.setVisible(false); - } - else - { - m_uiMainWindow.setVisible(true); - m_uiOverlay.setVisible(true); - } + const bool visible = !region.isEmpty() && UiDisplayEnabled(); + m_uiMainWindow.setVisible(visible); + m_uiOverlay.setVisible(visible); m_uiMainWindow.setMask(region); } diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h index 32b746a1ac..dba0f25830 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiDisplay.h @@ -17,6 +17,7 @@ #include #include #include +#include AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") #include @@ -89,7 +90,7 @@ namespace AzToolsFramework::ViewportUi::Internal AZStd::shared_ptr GetViewportUiElement(ViewportUiElementId elementId); bool IsViewportUiElementVisible(ViewportUiElementId elementId); - void CreateViewportBorder(const AZStd::string& borderTitle); + void CreateViewportBorder(const AZStd::string& borderTitle, AZStd::optional backButtonCallback); void RemoveViewportBorder(); private: @@ -113,7 +114,10 @@ namespace AzToolsFramework::ViewportUi::Internal QWidget m_uiOverlay; //!< The UI Overlay which displays Viewport UI Elements. QGridLayout m_fullScreenLayout; //!< The layout which extends across the full screen. ViewportUiDisplayLayout m_uiOverlayLayout; //!< The layout used for optionally anchoring Viewport UI Elements. - QLabel m_viewportBorderText; //!< The text used for the viewport border. + QLabel m_viewportBorderText; //!< The text used for the viewport highlight border. + QToolButton m_viewportBorderBackButton; //!< The button to return from the viewport highlight border (only displayed if callback provided). + //! The optional callback for when the viewport highlight border back button is pressed. + AZStd::optional m_viewportBorderBackButtonCallback; QWidget* m_renderOverlay; QPointer m_fullScreenWidget; //!< Reference to the widget attached to m_fullScreenLayout if any. diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp index 1f14b12b7d..143da34074 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.cpp @@ -240,9 +240,10 @@ namespace AzToolsFramework::ViewportUi } } - void ViewportUiManager::CreateViewportBorder(const AZStd::string& borderTitle) + void ViewportUiManager::CreateViewportBorder( + const AZStd::string& borderTitle, AZStd::optional backButtonCallback) { - m_viewportUi->CreateViewportBorder(borderTitle); + m_viewportUi->CreateViewportBorder(borderTitle, backButtonCallback); } void ViewportUiManager::RemoveViewportBorder() diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h index ce7e5aafe9..54f1eb5a57 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiManager.h @@ -50,7 +50,8 @@ namespace AzToolsFramework::ViewportUi void RegisterTextFieldCallback(TextFieldId textFieldId, AZ::Event::Handler& handler) override; void RemoveTextField(TextFieldId textFieldId) override; void SetTextFieldVisible(TextFieldId textFieldId, bool visible) override; - void CreateViewportBorder(const AZStd::string& borderTitle) override; + void CreateViewportBorder( + const AZStd::string& borderTitle, AZStd::optional backButtonCallback) override; void RemoveViewportBorder() override; void PressButton(ClusterId clusterId, ButtonId buttonId) override; void PressButton(SwitcherId switcherId, ButtonId buttonId) override; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h index 3c6f7094cb..9ac6feb8c8 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiRequestBus.h @@ -22,6 +22,9 @@ namespace AzToolsFramework::ViewportUi using SwitcherId = IdType; using TextFieldId = IdType; + //! Callback function for viewport UI back button. + using ViewportUiBackButtonCallback = AZStd::function; + inline const ViewportUiElementId InvalidViewportUiElementId = ViewportUiElementId(0); inline const ButtonId InvalidButtonId = ButtonId(0); inline const ClusterId InvalidClusterId = ClusterId(0); @@ -95,9 +98,9 @@ namespace AzToolsFramework::ViewportUi virtual void RemoveTextField(TextFieldId textFieldId) = 0; //! Sets the visibility of the text field. virtual void SetTextFieldVisible(TextFieldId textFieldId, bool visible) = 0; - //! Create the highlight border for Component Mode. - virtual void CreateViewportBorder(const AZStd::string& borderTitle) = 0; - //! Remove the highlight border for Component Mode. + //! Create the highlight border with optional back button to exit the given editor mode. + virtual void CreateViewportBorder(const AZStd::string& borderTitle, AZStd::optional backButtonCallback) = 0; + //! Remove the highlight border. virtual void RemoveViewportBorder() = 0; //! Invoke a button press on a cluster. virtual void PressButton(ClusterId clusterId, ButtonId buttonId) = 0; diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp index 6b8b1873f7..c4be11ac66 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ViewportUi/ViewportUiSwitcher.cpp @@ -22,8 +22,6 @@ namespace AzToolsFramework::ViewportUi::Internal // Add am empty active button (is set in the call to SetActiveMode) m_activeButton = new QToolButton(); - // No hover effect for the main button as it's not clickable - m_activeButton->setProperty("IconHasHoverEffect", false); m_activeButton->setCheckable(false); m_activeButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); addWidget(m_activeButton); @@ -56,9 +54,6 @@ namespace AzToolsFramework::ViewportUi::Internal return; } - // set hover to true by default - action->setProperty("IconHasHoverEffect", true); - // add the action addAction(action); diff --git a/Code/Framework/AzToolsFramework/Platform/Linux/AzToolsFramework/API/PythonLoader_Linux.cpp b/Code/Framework/AzToolsFramework/Platform/Linux/AzToolsFramework/API/PythonLoader_Linux.cpp index 76fa36a048..351cf69c15 100644 --- a/Code/Framework/AzToolsFramework/Platform/Linux/AzToolsFramework/API/PythonLoader_Linux.cpp +++ b/Code/Framework/AzToolsFramework/Platform/Linux/AzToolsFramework/API/PythonLoader_Linux.cpp @@ -15,10 +15,10 @@ namespace AzToolsFramework::EmbeddedPython PythonLoader::PythonLoader() { constexpr char libPythonName[] = "libpython3.7m.so.1.0"; - if (m_embeddedLibPythonHandle = dlopen(libPythonName, RTLD_NOW | RTLD_GLOBAL); - m_embeddedLibPythonHandle == nullptr) + m_embeddedLibPythonHandle = dlopen(libPythonName, RTLD_NOW | RTLD_GLOBAL); + if (m_embeddedLibPythonHandle == nullptr) { - char* err = dlerror(); + [[maybe_unused]] const char* err = dlerror(); AZ_Error("PythonLoader", false, "Failed to load %s with error: %s\n", libPythonName, err ? err : "Unknown Error"); } } diff --git a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp index 1aa7b39593..fa5a6b344a 100644 --- a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp +++ b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.cpp @@ -40,6 +40,9 @@ namespace UnitTest { AzFramework::BoundsRequestBus::Handler::BusConnect(GetEntityId()); AzToolsFramework::EditorComponentSelectionRequestsBus::Handler::BusConnect(GetEntityId()); + + // default local bounds to unit cube + m_localBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-0.5f), AZ::Vector3(0.5f)); } void BoundsTestComponent::Deactivate() @@ -57,7 +60,6 @@ namespace UnitTest AZ::Aabb BoundsTestComponent::GetLocalBounds() { - return AZ::Aabb::CreateFromMinMax(AZ::Vector3(-0.5f), AZ::Vector3(0.5f)); + return m_localBounds; } - } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h index 036f9c8798..358a9f810a 100644 --- a/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h +++ b/Code/Framework/AzToolsFramework/Tests/BoundsTestComponent.h @@ -41,5 +41,7 @@ namespace UnitTest // BoundsRequestBus overrides ... AZ::Aabb GetWorldBounds() override; AZ::Aabb GetLocalBounds() override; + + AZ::Aabb m_localBounds; //!< Local bounds that can be modified for certain tests (defaults to unit cube). }; } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp index 81909ac511..f4077e992b 100644 --- a/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EditorTransformComponentSelectionTests.cpp @@ -38,7 +38,7 @@ #include #include -#include +#include namespace AZ { @@ -493,12 +493,8 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Then - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( - selectedEntities, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetSelectedEntities); - - AzToolsFramework::EntityIdList expectedSelectedEntities = { entity4, entity5, entity6 }; - + const AzToolsFramework::EntityIdList selectedEntities = SelectedEntities(); + const AzToolsFramework::EntityIdList expectedSelectedEntities = { entity4, entity5, entity6 }; EXPECT_THAT(selectedEntities, UnorderedElementsAreArray(expectedSelectedEntities)); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } @@ -527,12 +523,8 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Then - AzToolsFramework::EntityIdList selectedEntities; - AzToolsFramework::ToolsApplicationRequestBus::BroadcastResult( - selectedEntities, &AzToolsFramework::ToolsApplicationRequestBus::Events::GetSelectedEntities); - - AzToolsFramework::EntityIdList expectedSelectedEntities = { m_entityId1, entity2, entity3, entity4 }; - + const AzToolsFramework::EntityIdList selectedEntities = SelectedEntities(); + const AzToolsFramework::EntityIdList expectedSelectedEntities = { m_entityId1, entity2, entity3, entity4 }; EXPECT_THAT(selectedEntities, UnorderedElementsAreArray(expectedSelectedEntities)); /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } @@ -946,6 +938,42 @@ namespace UnitTest EXPECT_THAT(selectedEntitiesAfter, UnorderedElementsAre(m_entityId1)); } + TEST_F( + EditorTransformComponentSelectionViewportPickingManipulatorTestFixture, BoundsBetweenCameraAndNearClipPlaneDoesNotIntersectMouseRay) + { + // move camera to 10 units along the y-axis + AzFramework::SetCameraTransform(m_cameraState, AZ::Transform::CreateTranslation(AZ::Vector3::CreateAxisY(10.0f))); + + // send a very narrow bounds for entity1 + AZ::Entity* entity1 = AzToolsFramework::GetEntityById(m_entityId1); + auto* boundTestComponent = entity1->FindComponent(); + boundTestComponent->m_localBounds = + AZ::Aabb::CreateFromMinMax(AZ::Vector3(-0.5f, -0.0025f, -0.5f), AZ::Vector3(0.5f, 0.0025f, 0.5f)); + + // move entity1 in front of the camera between it and the near clip plane + AZ::TransformBus::Event( + m_entityId1, &AZ::TransformBus::Events::SetWorldTM, AZ::Transform::CreateTranslation(AZ::Vector3::CreateAxisY(10.05f))); + // move entity2 behind entity1 + AZ::TransformBus::Event( + m_entityId2, &AZ::TransformBus::Events::SetWorldTM, AZ::Transform::CreateTranslation(AZ::Vector3::CreateAxisY(15.0f))); + + const auto entity2ScreenPosition = AzFramework::WorldToScreen(AzToolsFramework::GetWorldTranslation(m_entityId2), m_cameraState); + + // click the entity in the viewport + m_actionDispatcher->SetStickySelect(true) + ->CameraState(m_cameraState) + ->MousePosition(entity2ScreenPosition) + ->CameraState(m_cameraState) + ->MouseLButtonDown() + ->MouseLButtonUp(); + + // ensure entity1 is not selected as it is before the near clip plane + using ::testing::UnorderedElementsAreArray; + const AzToolsFramework::EntityIdList selectedEntities = SelectedEntities(); + const AzToolsFramework::EntityIdList expectedSelectedEntities = { m_entityId2 }; + EXPECT_THAT(selectedEntities, UnorderedElementsAreArray(expectedSelectedEntities)); + } + class EditorTransformComponentSelectionViewportPickingManipulatorTestFixtureParam : public EditorTransformComponentSelectionViewportPickingManipulatorTestFixture , public ::testing::WithParamInterface @@ -2753,4 +2781,196 @@ namespace UnitTest /////////////////////////////////////////////////////////////////////////////////////////////////////////////// } + TEST(HandleAccents, CurrentValidEntityIdBecomesHoveredWithNoSelectionAndUnstickySelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId; + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = false; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = false; + + bool currentEntityIdAccentAdded = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [¤tEntityIdAccentAdded, currentEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == currentEntityId && accent) + { + currentEntityIdAccentAdded = true; + } + }); + + using ::testing::Eq; + using ::testing::IsTrue; + EXPECT_THAT(currentEntityId, Eq(hoveredEntityEntityId)); + EXPECT_THAT(currentEntityIdAccentAdded, IsTrue()); + } + + TEST(HandleAccents, CurrentValidEntityIdBecomesHoveredWithSelectionAndUnstickySelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId; + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = true; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = false; + + bool currentEntityIdAccentAdded = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [¤tEntityIdAccentAdded, currentEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == currentEntityId && accent) + { + currentEntityIdAccentAdded = true; + } + }); + + using ::testing::Eq; + using ::testing::IsTrue; + EXPECT_THAT(currentEntityId, Eq(hoveredEntityEntityId)); + EXPECT_THAT(currentEntityIdAccentAdded, IsTrue()); + } + + TEST(HandleAccents, CurrentValidEntityIdDoesNotBecomeHoveredWithSelectionUnstickySelectAndInvalidButton) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = false; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = false; + + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::Middle), + [&hoveredEntityIdAccentRemoved, hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(hoveredEntityEntityId.IsValid(), IsFalse()); + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + } + + TEST(HandleAccents, CurrentValidEntityIdDoesNotBecomeHoveredWithSelectionUnstickySelectAndDoingBoxSelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = false; + handleAccentsContext.m_usingBoxSelect = true; + handleAccentsContext.m_usingStickySelect = false; + + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [&hoveredEntityIdAccentRemoved, hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(hoveredEntityEntityId.IsValid(), IsFalse()); + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + } + + // mimics the mouse moving off of hovered entity onto a new entity with sticky select enabled + TEST(HandleAccents, CurrentValidEntityIdDoesNotBecomeHoveredWithSelectionAndStickySelect) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = false; + handleAccentsContext.m_hasSelectedEntities = true; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = true; + + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [&hoveredEntityIdAccentRemoved, hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + EXPECT_THAT(hoveredEntityEntityId.IsValid(), IsFalse()); + } + + TEST(HandleAccents, CurrentValidEntityIdDoesBecomeHoveredWithSelectionAndStickySelectAndCtrl) + { + namespace azvi = AzToolsFramework::ViewportInteraction; + + const AZ::EntityId currentEntityId = AZ::EntityId(12345); + AZ::EntityId hoveredEntityEntityId = AZ::EntityId(54321); + + AzToolsFramework::HandleAccentsContext handleAccentsContext; + handleAccentsContext.m_ctrlHeld = true; + handleAccentsContext.m_hasSelectedEntities = true; + handleAccentsContext.m_usingBoxSelect = false; + handleAccentsContext.m_usingStickySelect = true; + + bool currentEntityIdAccentAdded = false; + bool hoveredEntityIdAccentRemoved = false; + AzToolsFramework::HandleAccents( + currentEntityId, hoveredEntityEntityId, handleAccentsContext, azvi::MouseButtonsFromButton(azvi::MouseButton::None), + [&hoveredEntityIdAccentRemoved, ¤tEntityIdAccentAdded, currentEntityId, + hoveredEntityEntityId](const AZ::EntityId entityId, const bool accent) + { + if (entityId == currentEntityId && accent) + { + currentEntityIdAccentAdded = true; + } + + if (entityId == hoveredEntityEntityId && !accent) + { + hoveredEntityIdAccentRemoved = true; + } + }); + + using ::testing::Eq; + using ::testing::IsFalse; + using ::testing::IsTrue; + EXPECT_THAT(currentEntityIdAccentAdded, IsTrue()); + EXPECT_THAT(hoveredEntityIdAccentRemoved, IsTrue()); + EXPECT_THAT(hoveredEntityEntityId, Eq(AZ::EntityId(12345))); + } } // namespace UnitTest diff --git a/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp b/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp index d08c9646a2..93010aa63d 100644 --- a/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/EditorVertexSelectionTests.cpp @@ -23,6 +23,7 @@ #include #include #include +#include using namespace AzToolsFramework; diff --git a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp index 86c73e72e5..6bf964f038 100644 --- a/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabFocus/PrefabFocusTests.cpp @@ -106,7 +106,9 @@ namespace UnitTest inline static const char* Passenger2EntityName = "Passenger2"; }; - TEST_F(PrefabFocusTests, PrefabFocus_FocusOnOwningPrefab_RootContainer) + // Test was disabled because the implementation of GetFocusedPrefabInstance now relies on the Prefab EOS, + // which is not used by our test environment. This can be restored once Instance handles are implemented. + TEST_F(PrefabFocusTests, DISABLED_PrefabFocus_FocusOnOwningPrefab_RootContainer) { // Verify FocusOnOwningPrefab works when passing the container entity of the root prefab. { @@ -121,7 +123,9 @@ namespace UnitTest } } - TEST_F(PrefabFocusTests, PrefabFocus_FocusOnOwningPrefab_RootEntity) + // Test was disabled because the implementation of GetFocusedPrefabInstance now relies on the Prefab EOS, + // which is not used by our test environment. This can be restored once Instance handles are implemented. + TEST_F(PrefabFocusTests, DISABLED_PrefabFocus_FocusOnOwningPrefab_RootEntity) { // Verify FocusOnOwningPrefab works when passing a nested entity of the root prefab. { diff --git a/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp index e8fce6653f..58c28f8568 100644 --- a/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp +++ b/Code/Framework/AzToolsFramework/Tests/Viewport/ViewportScreenTests.cpp @@ -17,6 +17,7 @@ #include #include #include +#include namespace UnitTest { @@ -35,6 +36,7 @@ namespace UnitTest const auto worldResult = AzFramework::ScreenToWorld(screenPoint, cameraState); return AzFramework::WorldToScreen(worldResult, cameraState); } + //////////////////////////////////////////////////////////////////////////////////////////////////////// // ScreenPoint tests TEST(ViewportScreen, WorldToScreenAndScreenToWorldReturnsTheSameValueIdentityCameraOffsetFromOrigin) @@ -102,8 +104,8 @@ namespace UnitTest } //////////////////////////////////////////////////////////////////////////////////////////////////////// - // NDC tests - TEST(ViewportScreen, WorldToScreenNDCAndScreenNDCToWorldReturnsTheSameValueIdentityCameraOffsetFromOrigin) + // Ndc tests + TEST(ViewportScreen, WorldToScreenNdcAndScreenNdcToWorldReturnsTheSameValueIdentityCameraOffsetFromOrigin) { using NdcPoint = AZ::Vector2; @@ -136,7 +138,7 @@ namespace UnitTest } } - TEST(ViewportScreen, WorldToScreenNDCAndScreenNDCToWorldReturnsTheSameValueOrientatedCamera) + TEST(ViewportScreen, WorldToScreenNdcAndScreenNdcToWorldReturnsTheSameValueOrientatedCamera) { using NdcPoint = AZ::Vector2; @@ -153,7 +155,7 @@ namespace UnitTest // note: nearClip is 0.1 - the world space value returned will be aligned to the near clip // plane of the camera so use that to confirm the mapping to/from is correct - TEST(ViewportScreen, ScreenNDCToWorldReturnsPositionOnNearClipPlaneInWorldSpace) + TEST(ViewportScreen, ScreenNdcToWorldReturnsPositionOnNearClipPlaneInWorldSpace) { using NdcPoint = AZ::Vector2; diff --git a/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp b/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp index b873f30c6d..4e121f149c 100644 --- a/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp +++ b/Code/LauncherUnified/Platform/Common/UnixLike/Launcher_UnixLike.cpp @@ -49,18 +49,17 @@ namespace rlimit limit; if (getrlimit(resource, &limit) != 0) { - AZ_Error("Launcher", false, "[ERROR] Failed to get limit for resource %d. Error: %s", resource, strerror(errno)); - return false; + AZ_Warning("Launcher", false, "[WARNING] Unable to get limit for resource %d. Error: %s", resource, strerror(errno)); } if (updateLimit(limit)) { if (setrlimit(resource, &limit) != 0) { - AZ_Error("Launcher", false, "[ERROR] Failed to update resource limit for resource %d. Error: %s", resource, strerror(errno)); - return false; + AZ_Warning("Launcher", false, "[WARNING] Unable to update resource limit for resource %d. Error: %s", resource, strerror(errno)); } } + return true; } } diff --git a/Code/Legacy/CryCommon/Cry_Vector2.h b/Code/Legacy/CryCommon/Cry_Vector2.h index 81a8c10e49..5bf47d0642 100644 --- a/Code/Legacy/CryCommon/Cry_Vector2.h +++ b/Code/Legacy/CryCommon/Cry_Vector2.h @@ -8,10 +8,6 @@ // Description : Common matrix class - - -#ifndef CRYINCLUDE_CRYCOMMON_CRY_VECTOR2_H -#define CRYINCLUDE_CRYCOMMON_CRY_VECTOR2_H #pragma once #include @@ -68,9 +64,7 @@ struct Vec2_tpl : x((F)v.x) , y((F)v.y) { assert(this->IsValid()); } - ILINE Vec2_tpl& operator=(const Vec2_tpl& src) { x = src.x; y = src.y; return *this; } - //template Vec2_tpl& operator=(const Vec2_tpl& src) { x=F(src.x); y=F(src.y); return *this; } - //template Vec2_tpl& operator=(const Vec3_tpl& src) { x=F(src.x); y=F(src.y); return *this; } + Vec2_tpl& operator=(const Vec2_tpl& src) = default; ILINE int operator!() const { return x == 0 && y == 0; } @@ -372,4 +366,3 @@ namespace AZ { AZ_TYPE_INFO_SPECIALIZE(Vec2, "{844131BA-9565-42F3-8482-6F65A6D5FC59}"); } -#endif // CRYINCLUDE_CRYCOMMON_CRY_VECTOR2_H diff --git a/Code/Legacy/CryCommon/Mocks/ICryPakMock.h b/Code/Legacy/CryCommon/Mocks/ICryPakMock.h index e03038c343..d32f31e5b8 100644 --- a/Code/Legacy/CryCommon/Mocks/ICryPakMock.h +++ b/Code/Legacy/CryCommon/Mocks/ICryPakMock.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -52,11 +53,11 @@ struct CryPakMock MOCK_METHOD1(PoolMalloc, void*(size_t size)); MOCK_METHOD1(PoolFree, void(void* p)); MOCK_METHOD3(PoolAllocMemoryBlock, AZStd::intrusive_ptr (size_t nSize, const char* sUsage, size_t nAlign)); - MOCK_METHOD2(FindFirst, AZ::IO::ArchiveFileIterator(AZStd::string_view pDir, AZ::IO::IArchive::EFileSearchType)); + MOCK_METHOD2(FindFirst, AZ::IO::ArchiveFileIterator(AZStd::string_view pDir, AZ::IO::FileSearchLocation)); MOCK_METHOD1(FindNext, AZ::IO::ArchiveFileIterator(AZ::IO::ArchiveFileIterator handle)); MOCK_METHOD1(FindClose, bool(AZ::IO::ArchiveFileIterator)); MOCK_METHOD1(GetModificationTime, AZ::IO::IArchive::FileTime(AZ::IO::HandleType f)); - MOCK_METHOD2(IsFileExist, bool(AZStd::string_view sFilename, EFileSearchLocation)); + MOCK_METHOD2(IsFileExist, bool(AZStd::string_view sFilename, AZ::IO::FileSearchLocation)); MOCK_METHOD1(IsFolder, bool(AZStd::string_view sPath)); MOCK_METHOD1(GetFileSizeOnDisk, AZ::IO::IArchive::SignedFileSize(AZStd::string_view filename)); MOCK_METHOD4(OpenArchive, AZStd::intrusive_ptr (AZStd::string_view szPath, AZStd::string_view bindRoot, uint32_t nFlags, AZStd::intrusive_ptr pData)); @@ -72,7 +73,7 @@ struct CryPakMock MOCK_METHOD1(UnregisterFileAccessSink, void(AZ::IO::IArchiveFileAccessSink * pSink)); MOCK_METHOD1(DisableRuntimeFileAccess, void(bool status)); MOCK_METHOD2(DisableRuntimeFileAccess, bool(bool status, AZStd::thread_id threadId)); - MOCK_CONST_METHOD0(GetPakPriority, AZ::IO::ArchiveLocationPriority()); + MOCK_CONST_METHOD0(GetPakPriority, AZ::IO::FileSearchPriority()); MOCK_CONST_METHOD1(GetFileOffsetOnMedia, uint64_t(AZStd::string_view szName)); MOCK_CONST_METHOD1(GetFileMediaType, EStreamSourceMediaType(AZStd::string_view szName)); MOCK_METHOD0(GetLevelPackOpenEvent, auto()->LevelPackOpenEvent*); diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp index 7bfe6e2f1d..8945761184 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.cpp @@ -203,24 +203,22 @@ CLevelSystem::CLevelSystem(ISystem* pSystem, const char* levelsFolder) { return; } - auto pPak = gEnv->pCryPak; + auto archive = AZ::Interface::Get(); - if (AZ::IO::IArchive::LevelPackOpenEvent* levelPakOpenEvent = pPak->GetLevelPackOpenEvent()) + if (AZ::IO::IArchive::LevelPackOpenEvent* levelPakOpenEvent = archive->GetLevelPackOpenEvent()) { - m_levelPackOpenHandler = AZ::IO::IArchive::LevelPackOpenEvent::Handler([this](const AZStd::vector& levelDirs) + m_levelPackOpenHandler = AZ::IO::IArchive::LevelPackOpenEvent::Handler([this](const AZStd::vector& levelDirs) { - for (AZStd::string dir : levelDirs) + for (AZ::IO::Path levelDir : levelDirs) { - AZ::StringFunc::Path::StripComponent(dir, true); - AZStd::string searchPattern = dir + AZ_FILESYSTEM_SEPARATOR_WILDCARD; bool modFolder = false; - PopulateLevels(searchPattern, dir, gEnv->pCryPak, modFolder, false); + PopulateLevels((levelDir / "*").Native(), levelDir.Native(), AZ::Interface::Get(), modFolder, false); } }); m_levelPackOpenHandler.Connect(*levelPakOpenEvent); } - if (AZ::IO::IArchive::LevelPackCloseEvent* levelPakCloseEvent = pPak->GetLevelPackCloseEvent()) + if (AZ::IO::IArchive::LevelPackCloseEvent* levelPakCloseEvent = archive->GetLevelPackCloseEvent()) { m_levelPackCloseHandler = AZ::IO::IArchive::LevelPackCloseEvent::Handler([this](AZStd::string_view) { @@ -288,7 +286,7 @@ void CLevelSystem::ScanFolder(const char* subfolder, bool modFolder) AZStd::unordered_set pakList; - AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(search.c_str(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskOnly); + AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(search.c_str(), AZ::IO::FileSearchLocation::OnDisk); if (handle) { @@ -335,86 +333,85 @@ void CLevelSystem::ScanFolder(const char* subfolder, bool modFolder) } void CLevelSystem::PopulateLevels( - AZStd::string searchPattern, AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly) + AZStd::string searchPattern, const AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly) { - { - // allow this find first to actually touch the file system - // (causes small overhead but with minimal amount of levels this should only be around 150ms on actual DVD Emu) - AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(searchPattern.c_str(), AZ::IO::IArchive::eFileSearchType_AllowOnDiskOnly); + // allow this find first to actually touch the file system + // (causes small overhead but with minimal amount of levels this should only be around 150ms on actual DVD Emu) + AZ::IO::ArchiveFileIterator handle = pPak->FindFirst(searchPattern.c_str(), + fromFileSystemOnly ? AZ::IO::FileSearchLocation::OnDisk : AZ::IO::FileSearchLocation::InPak); - if (handle) + if (handle) + { + do { - do + if ((handle.m_fileDesc.nAttrib & AZ::IO::FileDesc::Attribute::Subdirectory) != AZ::IO::FileDesc::Attribute::Subdirectory || + handle.m_filename == "." || handle.m_filename == "..") { - if ((handle.m_fileDesc.nAttrib & AZ::IO::FileDesc::Attribute::Subdirectory) != AZ::IO::FileDesc::Attribute::Subdirectory || - handle.m_filename == "." || handle.m_filename == "..") - { - continue; - } + continue; + } - AZStd::string levelFolder; - if (fromFileSystemOnly) - { - levelFolder = - (folder.empty() ? "" : (folder + "/")) + AZStd::string(handle.m_filename.data(), handle.m_filename.size()); - } - else - { - AZStd::string levelName(AZ::IO::PathView(handle.m_filename).Filename().Native()); - levelFolder = (folder.empty() ? "" : (folder + "/")) + levelName; - } + AZStd::string levelFolder; + if (fromFileSystemOnly) + { + levelFolder = + (folder.empty() ? "" : (folder + "/")) + AZStd::string(handle.m_filename.data(), handle.m_filename.size()); + } + else + { + AZStd::string levelName(AZ::IO::PathView(handle.m_filename).Filename().Native()); + levelFolder = (folder.empty() ? "" : (folder + "/")) + levelName; + } - AZStd::string levelPath; - if (AZ::StringFunc::StartsWith(levelFolder.c_str(), m_levelsFolder.c_str())) - { - levelPath = levelFolder; - } - else - { - levelPath = m_levelsFolder + "/" + levelFolder; - } + AZStd::string levelPath; + if (AZ::StringFunc::StartsWith(levelFolder.c_str(), m_levelsFolder.c_str())) + { + levelPath = levelFolder; + } + else + { + levelPath = m_levelsFolder + "/" + levelFolder; + } - const AZStd::string levelPakName = levelPath + "/" + LevelPakName; - const AZStd::string levelInfoName = levelPath + "/levelinfo.xml"; + const AZStd::string levelPakName = levelPath + "/" + LevelPakName; + const AZStd::string levelInfoName = levelPath + "/levelinfo.xml"; - if (!pPak->IsFileExist( - levelPakName.c_str(), - fromFileSystemOnly ? AZ::IO::IArchive::eFileLocation_OnDisk : AZ::IO::IArchive::eFileLocation_InPak) && - !pPak->IsFileExist( - levelInfoName.c_str(), - fromFileSystemOnly ? AZ::IO::IArchive::eFileLocation_OnDisk : AZ::IO::IArchive::eFileLocation_InPak)) - { - ScanFolder(levelFolder.c_str(), modFolder); - continue; - } + if (!pPak->IsFileExist( + levelPakName.c_str(), + fromFileSystemOnly ? AZ::IO::FileSearchLocation::OnDisk : AZ::IO::FileSearchLocation::InPak) && + !pPak->IsFileExist( + levelInfoName.c_str(), + fromFileSystemOnly ? AZ::IO::FileSearchLocation::OnDisk : AZ::IO::FileSearchLocation::InPak)) + { + ScanFolder(levelFolder.c_str(), modFolder); + continue; + } - // With the level.pak workflow, levelPath and levelName will point to a directory. - // levelPath: levels/mylevel - // levelName: mylevel - CLevelInfo levelInfo; - levelInfo.m_levelPath = levelPath; - levelInfo.m_levelName = levelFolder; - levelInfo.m_isPak = !fromFileSystemOnly; + // With the level.pak workflow, levelPath and levelName will point to a directory. + // levelPath: levels/mylevel + // levelName: mylevel + CLevelInfo levelInfo; + levelInfo.m_levelPath = levelPath; + levelInfo.m_levelName = levelFolder; + levelInfo.m_isPak = !fromFileSystemOnly; - CLevelInfo* pExistingInfo = GetLevelInfoInternal(levelInfo.m_levelName); + CLevelInfo* pExistingInfo = GetLevelInfoInternal(levelInfo.m_levelName); - // Don't add the level if it is already in the list - if (pExistingInfo == NULL) - { - m_levelInfos.push_back(levelInfo); - } - else + // Don't add the level if it is already in the list + if (pExistingInfo == NULL) + { + m_levelInfos.push_back(levelInfo); + } + else + { + // Levels in bundles take priority over levels outside bundles. + if (!pExistingInfo->m_isPak && levelInfo.m_isPak) { - // Levels in bundles take priority over levels outside bundles. - if (!pExistingInfo->m_isPak && levelInfo.m_isPak) - { - *pExistingInfo = levelInfo; - } + *pExistingInfo = levelInfo; } - } while (handle = pPak->FindNext(handle)); + } + } while (handle = pPak->FindNext(handle)); - pPak->FindClose(handle); - } + pPak->FindClose(handle); } } @@ -893,7 +890,7 @@ void CLevelSystem::UnloadLevel() m_bLevelLoaded = false; - const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; + [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; CryLog("UnloadLevel End: %.1f sec", AZ::TimeMsToSeconds(unloadTimeMs)); // Must be sent last. diff --git a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h index b857d20d15..d0a39f30b0 100644 --- a/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h +++ b/Code/Legacy/CrySystem/LevelSystem/LevelSystem.h @@ -116,7 +116,7 @@ private: void ScanFolder(const char* subfolder, bool modFolder); void PopulateLevels( - AZStd::string searchPattern, AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly); + AZStd::string searchPattern, const AZStd::string& folder, AZ::IO::IArchive* pPak, bool& modFolder, bool fromFileSystemOnly); void PrepareNextLevel(const char* levelName); ILevel* LoadLevelInternal(const char* _levelName); diff --git a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp index a965b7f1c9..b91c8f2ca9 100644 --- a/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp +++ b/Code/Legacy/CrySystem/LevelSystem/SpawnableLevelSystem.cpp @@ -566,7 +566,7 @@ namespace LegacyLevelSystem m_bLevelLoaded = false; - const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; + [[maybe_unused]] const AZ::TimeMs unloadTimeMs = AZ::GetRealElapsedTimeMs() - beginTimeMs; AZ_TracePrintf("LevelSystem", "UnloadLevel End: %.1f sec\n", AZ::TimeMsToSeconds(unloadTimeMs)); // Must be sent last. diff --git a/Code/Legacy/CrySystem/SystemInit.cpp b/Code/Legacy/CrySystem/SystemInit.cpp index 5cb60f2cdf..c5039f57e9 100644 --- a/Code/Legacy/CrySystem/SystemInit.cpp +++ b/Code/Legacy/CrySystem/SystemInit.cpp @@ -170,14 +170,6 @@ void CryEngineSignalHandler(int signal) extern HMODULE gDLLHandle; #endif -namespace -{ -#if defined(AZ_PLATFORM_WINDOWS) - // on windows, we lock our cache using a lockfile. On other platforms this is not necessary since devices like ios, android, consoles cannot - // run more than one game process that uses the same folder anyway. - HANDLE g_cacheLock = INVALID_HANDLE_VALUE; -#endif -} //static int g_sysSpecChanged = false; @@ -339,9 +331,6 @@ bool CSystem::InitFileSystem() m_pUserCallback->OnInitProgress("Initializing File System..."); } - // get the DirectInstance FileIOBase which should be the AZ::LocalFileIO - m_env.pFileIO = AZ::IO::FileIOBase::GetDirectInstance(); - m_env.pCryPak = AZ::Interface::Get(); m_env.pFileIO = AZ::IO::FileIOBase::GetInstance(); AZ_Assert(m_env.pCryPak, "CryPak has not been initialized on AZ::Interface"); @@ -365,33 +354,6 @@ bool CSystem::InitFileSystem() void CSystem::ShutdownFileSystem() { -#if defined(AZ_PLATFORM_WINDOWS) - if (g_cacheLock != INVALID_HANDLE_VALUE) - { - CloseHandle(g_cacheLock); - g_cacheLock = INVALID_HANDLE_VALUE; - } -#endif - - using namespace AZ::IO; - - FileIOBase* directInstance = FileIOBase::GetDirectInstance(); - FileIOBase* pakInstance = FileIOBase::GetInstance(); - - if (directInstance == m_env.pFileIO) - { - // we only mess with file io if we own the instance that we installed. - // if we dont' own the instance, then we never configured fileIO and we should not alter it. - delete directInstance; - FileIOBase::SetDirectInstance(nullptr); - - if (pakInstance != directInstance) - { - delete pakInstance; - FileIOBase::SetInstance(nullptr); - } - } - m_env.pFileIO = nullptr; } diff --git a/Code/Tools/AssetBundler/CMakeLists.txt b/Code/Tools/AssetBundler/CMakeLists.txt index dcc62595c9..28245b67ba 100644 --- a/Code/Tools/AssetBundler/CMakeLists.txt +++ b/Code/Tools/AssetBundler/CMakeLists.txt @@ -77,6 +77,10 @@ ly_add_target( ${additional_dependencies} ) +if(LY_DEFAULT_PROJECT_PATH) + set_property(TARGET AssetBundler AssetBundlerBatch APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"") +endif() + # Adds a specialized .setreg to identify gems enabled in the active project. # This associates the AssetBundler target with the .Builders gem variants. ly_set_gem_variant_to_load(TARGETS AssetBundler VARIANTS Builders) diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp index a02eef8b75..b5323dd419 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.cpp @@ -23,6 +23,8 @@ #include ////////////////////////////////////////////////////////////////////////// +#include + namespace AssetBuilderSDK { const char* const ErrorWindow = "Error"; //Use this window name to log error messages. @@ -690,7 +692,6 @@ namespace AssetBuilderSDK static const char* textureExtensions = ".dds"; static const char* staticMeshExtensions = ".cgf"; static const char* skinnedMeshExtensions = ".skin"; - static const char* materialExtensions = ".mtl"; // MIPS static const int c_MaxMipsCount = 11; // 11 is for 8k textures non-compressed. When not compressed it is using one file per mip. @@ -805,11 +806,6 @@ namespace AssetBuilderSDK return textureAssetType; } - if (AzFramework::StringFunc::Find(materialExtensions, extension.c_str()) != AZStd::string::npos) - { - return materialAssetType; - } - if (AzFramework::StringFunc::Find(staticMeshExtensions, extension.c_str()) != AZStd::string::npos) { return meshAssetType; @@ -1605,4 +1601,70 @@ namespace AssetBuilderSDK { return m_errorsOccurred; } + + AZ::u64 GetHashFromIOStream(AZ::IO::GenericStream& readStream, AZ::IO::SizeType* bytesReadOut, int hashMsDelay) + { + constexpr AZ::u64 HashBufferSize = 1024 * 64; + char buffer[HashBufferSize]; + + if(readStream.IsOpen() && readStream.CanRead()) + { + AZ::IO::SizeType bytesRead; + + auto* state = XXH64_createState(); + + if(state == nullptr) + { + AZ_Assert(false, "Failed to create hash state"); + return 0; + } + + if (XXH64_reset(state, 0) == XXH_ERROR) + { + AZ_Assert(false, "Failed to reset hash state"); + return 0; + } + + do + { + // In edge cases where another process is writing to this file while this hashing is occuring and that file wasn't locked, + // the following read check can fail because it performs an end of file check, and asserts and shuts down if the read size + // was smaller than the buffer and the read is not at the end of the file. The logic used to check end of file internal to read + // will be out of date in the edge cases where another process is actively writing to this file while this hash is running. + // The stream's length ends up more accurate in this case, preventing this assert and shut down. + // One area this occurs is the navigation mesh file (mnmnavmission0.bai) that's temporarily created when exporting a level, + // the navigation system can still be writing to this file when hashing begins, causing the EoF marker to change. + AZ::IO::SizeType remainingToRead = AZStd::min(readStream.GetLength() - readStream.GetCurPos(), aznumeric_cast(AZ_ARRAY_SIZE(buffer))); + bytesRead = readStream.Read(remainingToRead, buffer); + + if(bytesReadOut) + { + *bytesReadOut += bytesRead; + } + + XXH64_update(state, buffer, bytesRead); + + // Used by unit tests to force the race condition mentioned above, to verify the crash fix. + if(hashMsDelay > 0) + { + AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(hashMsDelay)); + } + + } while (bytesRead > 0); + + auto hash = XXH64_digest(state); + + XXH64_freeState(state); + + return hash; + } + return 0; + } + + AZ::u64 GetFileHash(const char* filePath, AZ::IO::SizeType* bytesReadOut, int hashMsDelay) + { + constexpr bool ErrorOnReadFailure = true; + AZ::IO::FileIOStream readStream(filePath, AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeBinary, ErrorOnReadFailure); + return GetHashFromIOStream(readStream, bytesReadOut, hashMsDelay); + } } diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h index 5a57fa1e72..f977e15be9 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/AssetBuilderSDK/AssetBuilderSDK.h @@ -911,6 +911,19 @@ namespace AssetBuilderSDK //! There can be multiple builders running at once, so we need to filter out ones coming from other builders AZStd::thread_id m_jobThreadId; }; + + //! Get hash for a whole file + //! @filePath the path for the file + //! @bytesReadOut output the read file size in bytes + //! @hashMsDelay [Do not use except for unit test] add a delay in ms for between each block reading. + AZ::u64 GetFileHash(const char* filePath, AZ::IO::SizeType* bytesReadOut = nullptr, int hashMsDelay = 0); + + //! Get hash for a generic IO stream + //! @readStream the input readable stream + //! @bytesReadOut output the read size in bytes + //! @hashMsDelay [Do not use except for unit test] add a delay in ms for between each block reading. + AZ::u64 GetHashFromIOStream(AZ::IO::GenericStream& readStream, AZ::IO::SizeType* bytesReadOut = nullptr, int hashMsDelay = 0); + } // namespace AssetBuilderSDK namespace AZ diff --git a/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt b/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt index 635cd55f6c..bfbcc35663 100644 --- a/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt +++ b/Code/Tools/AssetProcessor/AssetBuilderSDK/CMakeLists.txt @@ -32,6 +32,7 @@ ly_add_target( PUBLIC AZ::AzFramework AZ::AzToolsFramework + 3rdParty::xxhash ) ly_add_source_properties( SOURCES AssetBuilderSDK/AssetBuilderSDK.cpp diff --git a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp index 2d3e671999..b7f7affd6d 100644 --- a/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp +++ b/Code/Tools/AssetProcessor/Platform/Linux/native/FileWatcher/FileWatcher_linux.cpp @@ -32,7 +32,8 @@ struct FolderRootWatch::PlatformImplementation { if (m_iNotifyHandle < 0) { - m_iNotifyHandle = inotify_init(); + // The CLOEXEC flag prevents the inotify watchers from copying on fork/exec + m_iNotifyHandle = inotify_init1(IN_CLOEXEC); } return (m_iNotifyHandle >= 0); } diff --git a/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake index 0c1347517f..aa1d85d433 100644 --- a/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake +++ b/Code/Tools/AssetProcessor/assetprocessor_static_files.cmake @@ -29,6 +29,9 @@ set(FILES native/AssetManager/SourceFileRelocator.h native/AssetManager/ControlRequestHandler.cpp native/AssetManager/ControlRequestHandler.h + native/AssetManager/ExcludedFolderCache.cpp + native/AssetManager/ExcludedFolderCache.h + native/AssetManager/ExcludedFolderCacheInterface.h native/assetprocessor.h native/connection/connection.cpp native/connection/connection.h @@ -102,6 +105,8 @@ set(FILES native/utilities/PlatformConfiguration.cpp native/utilities/PlatformConfiguration.h native/utilities/PotentialDependencies.h + native/utilities/StatsCapture.cpp + native/utilities/StatsCapture.h native/utilities/SpecializedDependencyScanner.h native/utilities/ThreadHelper.cpp native/utilities/ThreadHelper.h diff --git a/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake b/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake index 6aebc8bc25..3a336ce97b 100644 --- a/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake +++ b/Code/Tools/AssetProcessor/assetprocessor_test_files.cmake @@ -36,6 +36,7 @@ set(FILES native/tests/platformconfiguration/platformconfigurationtests.h native/tests/utilities/JobModelTest.cpp native/tests/utilities/JobModelTest.h + native/tests/utilities/StatsCaptureTest.cpp native/tests/AssetCatalog/AssetCatalogUnitTests.cpp native/tests/assetscanner/AssetScannerTests.h native/tests/assetscanner/AssetScannerTests.cpp diff --git a/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.cpp b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.cpp new file mode 100644 index 0000000000..2c8dc844dd --- /dev/null +++ b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.cpp @@ -0,0 +1,154 @@ +/* + * 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 +#include +#include +#include +#include +#include + +namespace AssetProcessor +{ + ExcludedFolderCache::ExcludedFolderCache(const PlatformConfiguration* platformConfig) : m_platformConfig(platformConfig) + { + AZ::Interface::Register(this); + } + + ExcludedFolderCache::~ExcludedFolderCache() + { + AZ::Interface::Unregister(this); + } + + const AZStd::unordered_set& ExcludedFolderCache::GetExcludedFolders() + { + if (!m_builtCache) + { + for (int i = 0; i < m_platformConfig->GetScanFolderCount(); ++i) + { + const auto& scanFolderInfo = m_platformConfig->GetScanFolderAt(i); + QDir rooted(scanFolderInfo.ScanPath()); + QString absolutePath = rooted.absolutePath(); + AZStd::stack dirs; + dirs.push(absolutePath); + + while (!dirs.empty()) + { + absolutePath = dirs.top(); + dirs.pop(); + + // Scan only folders, do not recurse so we have the chance to ignore a subfolder before going deeper + QDirIterator dirIterator(absolutePath, QDir::Dirs | QDir::NoSymLinks | QDir::NoDotAndDotDot); + + // Loop all the folders in this directory + while (dirIterator.hasNext()) + { + dirIterator.next(); + QString pathMatch = rooted.absoluteFilePath(dirIterator.filePath()); + + if (m_platformConfig->IsFileExcluded(pathMatch)) + { + // Add the folder to the list and do not proceed any deeper + m_excludedFolders.emplace(pathMatch.toUtf8().constData()); + } + else if (scanFolderInfo.RecurseSubFolders()) + { + // Folder is not excluded and recurse is enabled, add to the list of folders to check + dirs.push(pathMatch); + } + } + } + } + + // Add the cache to the list as well + AZStd::string projectCacheRootValue; + AZ::SettingsRegistry::Get()->Get(projectCacheRootValue, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder); + projectCacheRootValue = AssetUtilities::NormalizeFilePath(projectCacheRootValue.c_str()).toUtf8().constData(); + m_excludedFolders.emplace(projectCacheRootValue); + + // Register to be notified about deletes so we can remove old ignored folders + auto fileStateCache = AZ::Interface::Get(); + + if (fileStateCache) + { + m_handler = AZ::Event::Handler([this](FileStateInfo fileInfo) + { + if (fileInfo.m_isDirectory) + { + AZStd::scoped_lock lock(m_pendingNewFolderMutex); + + m_pendingDeletes.emplace(fileInfo.m_absolutePath.toUtf8().constData()); + } + }); + + fileStateCache->RegisterForDeleteEvent(m_handler); + } + else + { + AZ_Error("ExcludedFolderCache", false, "Failed to find IFileStateRequests interface"); + } + + m_builtCache = true; + } + + // Incorporate any pending folders + AZStd::unordered_set pendingAdds; + AZStd::unordered_set pendingDeletes; + + { + AZStd::scoped_lock lock(m_pendingNewFolderMutex); + pendingAdds.swap(m_pendingNewFolders); + pendingDeletes.swap(m_pendingDeletes); + } + + if (!pendingAdds.empty()) + { + m_excludedFolders.insert(pendingAdds.begin(), pendingAdds.end()); + } + + if (!pendingDeletes.empty()) + { + for (const auto& pendingDelete : pendingDeletes) + { + m_excludedFolders.erase(pendingDelete); + } + } + + return m_excludedFolders; + } + + void ExcludedFolderCache::FileAdded(QString path) + { + QString relativePath, scanFolderPath; + + if (!m_platformConfig->ConvertToRelativePath(path, relativePath, scanFolderPath)) + { + AZ_Error("ExcludedFolderCache", false, "Failed to get relative path for newly added file %s", path.toUtf8().constData()); + return; + } + + AZ::IO::Path azPath(relativePath.toUtf8().constData()); + AZ::IO::Path absolutePath(scanFolderPath.toUtf8().constData()); + + for (const auto& pathPart : azPath) + { + absolutePath /= pathPart; + + QString normalized = AssetUtilities::NormalizeFilePath(absolutePath.c_str()); + + if (m_platformConfig->IsFileExcluded(normalized)) + { + // Add the folder to a pending list, since this callback runs on another thread + AZStd::scoped_lock lock(m_pendingNewFolderMutex); + + m_pendingNewFolders.emplace(normalized.toUtf8().constData()); + break; + } + } + } +} diff --git a/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.h b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.h new file mode 100644 index 0000000000..b0c70946b6 --- /dev/null +++ b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCache.h @@ -0,0 +1,39 @@ +/* + * 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 + +#include +#include + +namespace AssetProcessor +{ + class PlatformConfiguration; + + struct ExcludedFolderCache : ExcludedFolderCacheInterface + { + explicit ExcludedFolderCache(const PlatformConfiguration* platformConfig); + ~ExcludedFolderCache() override; + + // Gets a set of absolute paths to folder which have been excluded according to the platform configuration rules + // Note - not thread safe + const AZStd::unordered_set& GetExcludedFolders() override; + + void FileAdded(QString path) override; + + private: + bool m_builtCache = false; + const PlatformConfiguration* m_platformConfig{}; + AZStd::unordered_set m_excludedFolders; + + AZStd::recursive_mutex m_pendingNewFolderMutex; + AZStd::unordered_set m_pendingNewFolders; // Newly ignored folders waiting to be added to m_excludedFolders + AZStd::unordered_set m_pendingDeletes; + AZ::Event::Handler m_handler; + }; +} diff --git a/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCacheInterface.h b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCacheInterface.h new file mode 100644 index 0000000000..1bdc4cc855 --- /dev/null +++ b/Code/Tools/AssetProcessor/native/AssetManager/ExcludedFolderCacheInterface.h @@ -0,0 +1,29 @@ +/* + * 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 + +#include +#include + +namespace AssetProcessor +{ + class PlatformConfiguration; + + struct ExcludedFolderCacheInterface + { + AZ_RTTI(ExcludedFolderCacheInterface, "{3AC471B6-C9F8-49CF-9E9D-237BDF63328C}"); + AZ_DISABLE_COPY_MOVE(ExcludedFolderCacheInterface); + + ExcludedFolderCacheInterface() = default; + virtual ~ExcludedFolderCacheInterface() = default; + + virtual const AZStd::unordered_set& GetExcludedFolders() = 0; + virtual void FileAdded(QString path) = 0; + }; +} diff --git a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp index d21aca35f5..e49d1bbb47 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp +++ b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.cpp @@ -63,6 +63,11 @@ namespace AssetProcessor return true; } + void FileStateCache::RegisterForDeleteEvent(AZ::Event::Handler& handler) + { + handler.Connect(m_deleteEvent); + } + void FileStateCache::AddInfoSet(QSet infoSet) { LockGuardType scopeLock(m_mapMutex); @@ -103,6 +108,8 @@ namespace AssetProcessor if (itr != m_fileInfoMap.end()) { + m_deleteEvent.Signal(itr.value()); + bool isDirectory = itr.value().m_isDirectory; QString parentPath = itr.value().m_absolutePath; m_fileInfoMap.erase(itr); @@ -205,6 +212,21 @@ namespace AssetProcessor return true; } + void FileStatePassthrough::RegisterForDeleteEvent(AZ::Event::Handler& handler) + { + handler.Connect(m_deleteEvent); + } + + void FileStatePassthrough::SignalDeleteEvent(const QString& absolutePath) const + { + FileStateInfo info; + + if (GetFileInfo(absolutePath, &info)) + { + m_deleteEvent.Signal(info); + } + } + bool FileStateInfo::operator==(const FileStateInfo& rhs) const { return m_absolutePath == rhs.m_absolutePath diff --git a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h index ba663aef0e..56ec03aa7d 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h +++ b/Code/Tools/AssetProcessor/native/AssetManager/FileStateCache.h @@ -14,6 +14,7 @@ #include #include #include +#include namespace AssetProcessor { @@ -51,10 +52,11 @@ namespace AssetProcessor /// Convenience function to check if a file or directory exists. virtual bool Exists(const QString& absolutePath) const = 0; virtual bool GetHash(const QString& absolutePath, FileHash* foundHash) = 0; + virtual void RegisterForDeleteEvent(AZ::Event::Handler& handler) = 0; AZ_DISABLE_COPY_MOVE(IFileStateRequests); }; - + class FileStateBase : public IFileStateRequests { @@ -89,11 +91,11 @@ namespace AssetProcessor { public: - // FileStateRequestBus implementation bool GetFileInfo(const QString& absolutePath, FileStateInfo* foundFileInfo) const override; bool Exists(const QString& absolutePath) const override; bool GetHash(const QString& absolutePath, FileHash* foundHash) override; + void RegisterForDeleteEvent(AZ::Event::Handler& handler) override; void AddInfoSet(QSet infoSet) override; void AddFile(const QString& absolutePath) override; @@ -116,9 +118,11 @@ namespace AssetProcessor mutable AZStd::recursive_mutex m_mapMutex; QHash m_fileInfoMap; - + QHash m_fileHashMap; + AZ::Event m_deleteEvent; + using LockGuardType = AZStd::lock_guard; }; @@ -131,5 +135,10 @@ namespace AssetProcessor bool GetFileInfo(const QString& absolutePath, FileStateInfo* foundFileInfo) const override; bool Exists(const QString& absolutePath) const override; bool GetHash(const QString& absolutePath, FileHash* foundHash) override; + void RegisterForDeleteEvent(AZ::Event::Handler& handler) override; + + void SignalDeleteEvent(const QString& absolutePath) const; + protected: + AZ::Event m_deleteEvent; }; } // namespace AssetProcessor diff --git a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp index 367a296bd4..de0f919a14 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp +++ b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp @@ -18,13 +18,14 @@ #include - #include "native/AssetManager/assetProcessorManager.h" + #include #include #include #include +#include #include "AssetRequestHandler.h" @@ -66,8 +67,10 @@ namespace AssetProcessor m_sourceFileRelocator = AZStd::make_unique(m_stateData, m_platformConfig); - PopulateJobStateCache(); + m_excludedFolderCache = AZStd::make_unique(m_platformConfig); + PopulateJobStateCache(); + AssetProcessor::ProcessingJobInfoBus::Handler::BusConnect(); } @@ -121,6 +124,9 @@ namespace AssetProcessor { if (status == AssetProcessor::AssetScanningStatus::Started) { + // capture scanning stats: + AssetProcessor::StatsCapture::BeginCaptureStat("AssetScanning"); + // Ensure that the source file list is populated before a scan begins m_sourceFilesInDatabase.clear(); m_fileModTimes.clear(); @@ -174,6 +180,8 @@ namespace AssetProcessor (status == AssetProcessor::AssetScanningStatus::Stopped)) { m_isCurrentlyScanning = false; + AssetProcessor::StatsCapture::EndCaptureStat("AssetScanning"); + // we cannot invoke this immediately - the scanner might be done, but we aren't actually ready until we've processed all remaining messages: QMetaObject::invokeMethod(this, "CheckMissingFiles", Qt::QueuedConnection); } @@ -207,13 +215,24 @@ namespace AssetProcessor } else { + QString statKey = QString("ProcessJob,%1,%2,%3").arg(jobEntry.m_databaseSourceName).arg(jobEntry.m_jobKey).arg(jobEntry.m_platformInfo.m_identifier.c_str()); + if (status == JobStatus::InProgress) { //update to in progress status m_jobRunKeyToJobInfoMap[jobEntry.m_jobRunKey].m_status = JobStatus::InProgress; + // stats tracking. Start accumulating time. + AssetProcessor::StatsCapture::BeginCaptureStat(statKey.toUtf8().constData()); + } else //if failed or succeeded remove from the map { + // note that sometimes this gets called twice, once by the RCJobs thread and once by the AP itself, + // because sometimes jobs take a short cut from "started" -> "failed" or "started" -> "complete + // without going thru the RC. + // as such, all the code in this block should be crafted to work regardless of whether its double called. + AssetProcessor::StatsCapture::EndCaptureStat(statKey.toUtf8().constData()); + m_jobRunKeyToJobInfoMap.erase(jobEntry.m_jobRunKey); Q_EMIT SourceFinished(sourceUUID, legacySourceUUID); Q_EMIT JobComplete(jobEntry, status); @@ -3353,8 +3372,13 @@ namespace AssetProcessor AZStd::string logFileName = AssetUtilities::ComputeJobLogFileName(createJobsRequest); { AssetUtilities::JobLogTraceListener jobLogTraceListener(logFileName, runKey, true); + // track the time it takes to createJobs. We can perform analysis later to present it by extension and other stats. + QString statKey = QString("CreateJobs,%1,%2").arg(actualRelativePath).arg(builderInfo.m_name.c_str()); + AssetProcessor::StatsCapture::BeginCaptureStat(statKey.toUtf8().constData()); builderInfo.m_createJobFunction(createJobsRequest, createJobsResponse); + AssetProcessor::StatsCapture::EndCaptureStat(statKey.toUtf8().constData()); } + AssetProcessor::SetThreadLocalJobId(0); bool isBuilderMissingFingerprint = (createJobsResponse.m_result == AssetBuilderSDK::CreateJobsResultCode::Success @@ -3573,6 +3597,8 @@ namespace AssetProcessor QString knownPathBeforeWildcard = encodedFileData.left(slashBeforeWildcardIndex + 1); // include the slash QString relativeSearch = encodedFileData.mid(slashBeforeWildcardIndex + 1); // skip the slash + const auto& excludedFolders = m_excludedFolderCache->GetExcludedFolders(); + // Absolute path, just check the 1 scan folder if (AZ::IO::PathView(encodedFileData.toUtf8().constData()).IsAbsolute()) { @@ -3592,7 +3618,8 @@ namespace AssetProcessor QString scanFolderAndKnownSubPath = rooted.absoluteFilePath(knownPathBeforeWildcard); resolvedDependencyList.append(m_platformConfig->FindWildcardMatches( - scanFolderAndKnownSubPath, relativeSearch, false, scanFolderInfo->RecurseSubFolders())); + scanFolderAndKnownSubPath, relativeSearch, + excludedFolders, false, scanFolderInfo->RecurseSubFolders())); } } else // Relative path, check every scan folder @@ -3610,7 +3637,21 @@ namespace AssetProcessor QString absolutePath = rooted.absoluteFilePath(knownPathBeforeWildcard); resolvedDependencyList.append(m_platformConfig->FindWildcardMatches( - absolutePath, relativeSearch, false, scanFolderInfo->RecurseSubFolders())); + absolutePath, relativeSearch, + excludedFolders, false, scanFolderInfo->RecurseSubFolders())); + } + } + + // Filter out any excluded files + for (auto itr = resolvedDependencyList.begin(); itr != resolvedDependencyList.end();) + { + if (m_platformConfig->IsFileExcluded(*itr)) + { + itr = resolvedDependencyList.erase(itr); + } + else + { + ++itr; } } @@ -4820,5 +4861,7 @@ namespace AssetProcessor } return filesFound; } + + } // namespace AssetProcessor diff --git a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h index 891e091f91..fe77396760 100644 --- a/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h +++ b/Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.h @@ -40,6 +40,8 @@ #include "AssetRequestHandler.h" #include "native/utilities/JobDiagnosticTracker.h" #include "SourceFileRelocator.h" + +#include #endif class FileWatcher; @@ -341,7 +343,8 @@ namespace AssetProcessor void CleanEmptyFolder(QString folder, QString root); void ProcessBuilders(QString normalizedPath, QString relativePathToFile, const ScanFolderInfo* scanFolder, const AssetProcessor::BuilderInfoList& builderInfoList); - + AZStd::vector GetExcludedFolders(); + struct SourceInfo { QString m_watchFolder; @@ -552,6 +555,8 @@ namespace AssetProcessor // when true, a flag will be sent to builders process job indicating debug output/mode should be used bool m_builderDebugFlag = false; + AZStd::unique_ptr m_excludedFolderCache{}; + protected Q_SLOTS: void FinishAnalysis(AZStd::string fileToCheck); ////////////////////////////////////////////////////////// diff --git a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h index 8f26155fd3..fcfd831d0b 100644 --- a/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h +++ b/Code/Tools/AssetProcessor/native/tests/AssetProcessorTest.h @@ -26,7 +26,7 @@ namespace AssetProcessor { protected: AZStd::unique_ptr m_errorAbsorber{}; - FileStatePassthrough m_fileStateCache; + AZStd::unique_ptr m_fileStateCache{}; void SetUp() override { @@ -40,9 +40,10 @@ namespace AssetProcessor m_ownsSysAllocator = true; AZ::AllocatorInstance::Create(); } - m_errorAbsorber = AZStd::make_unique(); + m_errorAbsorber = AZStd::make_unique(); m_application = AZStd::make_unique(); + m_fileStateCache = AZStd::make_unique(); // Inject the AutomatedTesting project as a project path into test fixture using FixedValueString = AZ::SettingsRegistryInterface::FixedValueString; @@ -60,7 +61,8 @@ namespace AssetProcessor void TearDown() override { AssetUtilities::ResetAssetRoot(); - + + m_fileStateCache.reset(); m_application.reset(); m_errorAbsorber.reset(); diff --git a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp index 93344caf6e..58f76f8da6 100644 --- a/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp +++ b/Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp @@ -5364,13 +5364,29 @@ AZStd::vector WildcardSourceDependencyTest::FileAddedTest(const Q void WildcardSourceDependencyTest::SetUp() { AssetProcessorManagerTest::SetUp(); - + QDir tempPath(m_tempDir.path()); // Add a non-recursive scan folder. Only files directly inside of this folder should be picked up, subfolders are ignored m_config->AddScanFolder(ScanFolderInfo(tempPath.filePath("no_recurse"), "no_recurse", "no_recurse", false, false, m_config->GetEnabledPlatforms(), 1)); + { + ExcludeAssetRecognizer excludeFolder; + excludeFolder.m_name = "Exclude ignored Folder"; + excludeFolder.m_patternMatcher = + AssetBuilderSDK::FilePatternMatcher(R"REGEX(^(.*\/)?ignored(\/.*)?$)REGEX", AssetBuilderSDK::AssetBuilderPattern::Regex); + m_config->AddExcludeRecognizer(excludeFolder); + } + + { + ExcludeAssetRecognizer excludeFile; + excludeFile.m_name = "Exclude z.foo Files"; + excludeFile.m_patternMatcher = + AssetBuilderSDK::FilePatternMatcher(R"REGEX(^(.*\/)?z\.foo$)REGEX", AssetBuilderSDK::AssetBuilderPattern::Regex); + m_config->AddExcludeRecognizer(excludeFile); + } + UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder1/1a.foo")); UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder1/1b.foo")); UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder2/redirected/a.foo")); @@ -5384,6 +5400,19 @@ void WildcardSourceDependencyTest::SetUp() // Add a file in the non-recursive scanfolder. Since its not directly in the scan folder, it should always be ignored UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("no_recurse/one/two/three/f.foo")); + // Add a file to an ignored folder + UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder2/redirected/folder/ignored/g.foo")); + + // Add an ignored file + UnitTestUtils::CreateDummyFile(tempPath.absoluteFilePath("subfolder2/redirected/folder/one/z.foo")); + + // Add a file in the cache + AZStd::string projectCacheRootValue; + AZ::SettingsRegistry::Get()->Get(projectCacheRootValue, AZ::SettingsRegistryMergeUtils::FilePathKey_CacheProjectRootFolder); + projectCacheRootValue = AssetUtilities::NormalizeFilePath(projectCacheRootValue.c_str()).toUtf8().constData(); + auto path = AZ::IO::Path(projectCacheRootValue) / "cache.foo"; + UnitTestUtils::CreateDummyFile(path.c_str()); + AzToolsFramework::AssetDatabase::SourceFileDependencyEntryContainer dependencies; // Relative path wildcard dependency @@ -5518,6 +5547,102 @@ TEST_F(WildcardSourceDependencyTest, Absolute_NoWildcard) ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); } +TEST_F(WildcardSourceDependencyTest, Relative_IgnoredFolder) +{ + AZStd::vector resolvedPaths; + + ASSERT_TRUE(Test("*g.foo", resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Absolute_IgnoredFolder) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + ASSERT_TRUE(Test(tempPath.absoluteFilePath("*g.foo").toUtf8().constData(), resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Relative_IgnoredFile) +{ + AZStd::vector resolvedPaths; + + ASSERT_TRUE(Test("*z.foo", resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Absolute_IgnoredFile) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + ASSERT_TRUE(Test(tempPath.absoluteFilePath("*z.foo").toUtf8().constData(), resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, Relative_CacheFolder) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + ASSERT_TRUE(Test("*cache.foo", resolvedPaths)); + ASSERT_THAT(resolvedPaths, ::testing::UnorderedElementsAre()); +} + +TEST_F(WildcardSourceDependencyTest, FilesAddedAfterInitialCache) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + auto excludedFolderCacheInterface = AZ::Interface::Get(); + + ASSERT_TRUE(excludedFolderCacheInterface); + + { + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 2); + } + + // Add a file to a new ignored folder + QString newFilePath = tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored/three/new.foo"); + UnitTestUtils::CreateDummyFile(newFilePath); + + excludedFolderCacheInterface->FileAdded(newFilePath); + + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 3); + ASSERT_THAT(excludedFolders, ::testing::Contains(AZStd::string(tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored").toUtf8().constData()))); +} + +TEST_F(WildcardSourceDependencyTest, FilesRemovedAfterInitialCache) +{ + AZStd::vector resolvedPaths; + QDir tempPath(m_tempDir.path()); + + // Add a file to a new ignored folder + QString newFilePath = tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored/three/new.foo"); + UnitTestUtils::CreateDummyFile(newFilePath); + + auto excludedFolderCacheInterface = AZ::Interface::Get(); + + ASSERT_TRUE(excludedFolderCacheInterface); + + { + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 3); + } + + m_fileStateCache->SignalDeleteEvent(tempPath.absoluteFilePath("subfolder2/redirected/folder/two/ignored")); + + const auto& excludedFolders = excludedFolderCacheInterface->GetExcludedFolders(); + + ASSERT_EQ(excludedFolders.size(), 2); +} + TEST_F(WildcardSourceDependencyTest, NewFile_MatchesSavedRelativeDependency) { QDir tempPath(m_tempDir.path()); diff --git a/Code/Tools/AssetProcessor/native/tests/utilities/StatsCaptureTest.cpp b/Code/Tools/AssetProcessor/native/tests/utilities/StatsCaptureTest.cpp new file mode 100644 index 0000000000..ed7177e841 --- /dev/null +++ b/Code/Tools/AssetProcessor/native/tests/utilities/StatsCaptureTest.cpp @@ -0,0 +1,200 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include + +// the simple stats capture system has a trivial interface and only writes to printf. +// So the simplest tests we can do is make sure it only asserts when it should +// and doesn't assert in cases when it shouldn't, and that the stats are reasonable +// in printf format. + +namespace AssetProcessor +{ +// Its okay to talk to this system when unintialized, you can gain some perf +// by not intializing it at all +TEST_F(AssetProcessorTest, StatsCaptureTest_UninitializedSystemDoesNotAssert) +{ + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + AssetProcessor::StatsCapture::Dump(); + AssetProcessor::StatsCapture::Shutdown(); +} + +// Double-intiailize is an error +TEST_F(AssetProcessorTest, StatsCaptureTest_DoubleInitializeIsAnAssert) +{ + m_errorAbsorber->Clear(); + + AssetProcessor::StatsCapture::Initialize(); + AssetProcessor::StatsCapture::Initialize(); + + EXPECT_EQ(m_errorAbsorber->m_numErrorsAbsorbed, 0); + EXPECT_EQ(m_errorAbsorber->m_numAssertsAbsorbed, 1); // not allowed to assert on this + + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::Shutdown(); +} + +class StatsCaptureOutputTest : public AssetProcessorTest, public AZ::Debug::TraceMessageBus::Handler +{ +public: + void SetUp() override + { + AssetProcessorTest::SetUp(); + AssetProcessor::StatsCapture::Initialize(); + } + + // dump but also capture the dump as a vector of lines: + void Dump() + { + AZ::Debug::TraceMessageBus::Handler::BusConnect(); + AssetProcessor::StatsCapture::Dump(); + AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); + } + + virtual bool OnPrintf(const char* /*window*/, const char* message) + { + m_gatheredMessages.emplace_back(message); + AZ::StringFunc::TrimWhiteSpace(m_gatheredMessages.back(), true, true); + return false; + } + + void TearDown() override + { + m_gatheredMessages = {}; + + AssetProcessor::StatsCapture::Shutdown(); + AssetProcessorTest::TearDown(); + } + + AZStd::vector m_gatheredMessages; +}; + +// turning off machine and human readable mode, should not dump anything. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_DisabledByRegset_DumpsNothing) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", false); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", false); + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + Dump(); + EXPECT_EQ(m_gatheredMessages.size(), 0); +} + +// turning on Human Readable, turn off Machine Readable, should not output any machine readable stats. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_HumanReadableOnly_DumpsNoMachineReadable) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", true); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", false); + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + Dump(); + EXPECT_GT(m_gatheredMessages.size(), 0); + for (const auto& message : m_gatheredMessages) + { + // we expect to see ZERO "Machine Readable" lines + EXPECT_FALSE(message.contains("MachineReadableStat:")) << "Found unexpected line in output: " << message.c_str(); + } +} + +// Turn on Machine Readable, Turn off Human Readable, ensure only Machine Readable stats emitted. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_MachineReadableOnly_DumpsNoHumanReadable) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", false); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", true); + AssetProcessor::StatsCapture::BeginCaptureStat("Test"); + AssetProcessor::StatsCapture::EndCaptureStat("Test"); + Dump(); + for (const auto& message : m_gatheredMessages) + { + // we expect to see ONLY "Machine Readable" lines + EXPECT_TRUE(message.contains("MachineReadableStat:")) << "Found unexpected line in output: " << message.c_str(); + } + EXPECT_GT(m_gatheredMessages.size(), 0); +} + + +// The interface for StatsCapture just captures and then dumps. +// For us to test this, we thus have to capture and parse the dump output. +TEST_F(StatsCaptureOutputTest, StatsCaptureTest_Sanity) +{ + auto registry = AZ::SettingsRegistry::Get(); + ASSERT_NE(registry, nullptr); + + // Make it output in "machine raadable" format so that it is simpler to parse. + registry->Set("/Amazon/AssetProcessor/Settings/Stats/HumanReadable", false); + registry->Set("/Amazon/AssetProcessor/Settings/Stats/MachineReadable", true); + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo,mybuilder"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo,mybuilder"); + + // Intentionally not using sleeps in this test. It means that the + // captured duration will be likely 0 but its not worth it to slow down tests. + // If the durations end up 0 its going to be extremely noticable in day-to-day use. + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo,mybuilder"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo,mybuilder"); + + // for the second stat, we'll double capture and double end, in order to test debounce + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo2,mybuilder"); + AssetProcessor::StatsCapture::BeginCaptureStat("CreateJobs,foo2,mybuilder"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo2,mybuilder2"); + AssetProcessor::StatsCapture::EndCaptureStat("CreateJobs,foo2,mybuilder2"); + + m_gatheredMessages.clear(); + Dump(); + EXPECT_GT(m_gatheredMessages.size(), 0); + + // We'll parse the machine readable stat lines here and make sure that the following is true + // mybuilder appears + // mybuilder appears only once but count is 2 + bool foundFoo = false; + bool foundFoo2 = false; + + for (const auto& stat : m_gatheredMessages) + { + if (stat.contains("MachineReadableStat:")) + { + AZStd::vector tokens; + AZ::StringFunc::Tokenize(stat, tokens, ":", false, false); + ASSERT_EQ(tokens.size(), 5); // should be "MachineReadableStat:time:count:average:name) + const auto& countData = tokens[2]; + const auto& nameData = tokens[4]; + + if (AZ::StringFunc::Equal(nameData, "CreateJobs,foo,mybuilder")) + { + EXPECT_FALSE(foundFoo); // should only find one of these + foundFoo = true; + EXPECT_STREQ(countData.c_str(), "2"); + } + + if (AZ::StringFunc::Equal(nameData, "CreateJobs,foo2,mybuilder2")) + { + EXPECT_FALSE(foundFoo2); // should only find one of these + foundFoo2 = true; + EXPECT_STREQ(countData.c_str(), "1"); + } + } + } + + EXPECT_TRUE(foundFoo) << "The expected token CreateJobs,foo,mybuilder did not appear in the output."; + EXPECT_TRUE(foundFoo2) << "The expected CreateJobs.foo2.mybuilder2 did not appear in the output"; +} + +} + diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp index a024ce6c7a..7a14f158d6 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp @@ -16,7 +16,8 @@ #include #include -#include "native/resourcecompiler/RCBuilder.h" +#include +#include #include #include @@ -200,6 +201,10 @@ ApplicationManager::~ApplicationManager() delete m_appDependencies[idx]; } + // end stats capture (dump and shutdown) + AssetProcessor::StatsCapture::Dump(); + AssetProcessor::StatsCapture::Shutdown(); + qInstallMessageHandler(nullptr); //deleting QCoreApplication/QApplication @@ -571,6 +576,8 @@ bool ApplicationManager::StartAZFramework() bool ApplicationManager::ActivateModules() { + AssetProcessor::StatsCapture::BeginCaptureStat("LoadingModules"); + // we load the editor xml for our modules since it contains the list of gems we need for tools to function (not just runtime) connect(&m_frameworkApp, &AssetProcessorAZApplication::AssetProcessorStatus, this, [this](AssetProcessor::AssetProcessorStatusEntry entry) @@ -587,6 +594,8 @@ bool ApplicationManager::ActivateModules() } m_frameworkApp.LoadDynamicModules(); + + AssetProcessor::StatsCapture::EndCaptureStat("LoadingModules"); return true; } @@ -618,6 +627,9 @@ ApplicationManager::BeforeRunStatus ApplicationManager::BeforeRun() return ApplicationManager::BeforeRunStatus::Status_Failure; } + // enable stats capture from this point on + AssetProcessor::StatsCapture::Initialize(); + return ApplicationManager::BeforeRunStatus::Status_Success; } diff --git a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp index 4e0bc7e434..eb230ce336 100644 --- a/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/ApplicationManagerBase.cpp @@ -454,6 +454,8 @@ void ApplicationManagerBase::InitFileMonitor() QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileModified, [this](QString path) { m_fileStateCache->UpdateFile(path); }); QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileRemoved, [this](QString path) { m_fileStateCache->RemoveFile(path); }); + QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileAdded, [](QString path) { AZ::Interface::Get()->FileAdded(path); }); + QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileAdded, m_fileProcessor.get(), &AssetProcessor::FileProcessor::AssessAddedFile); QObject::connect(newFolderWatch, &FolderWatchCallbackEx::fileRemoved, @@ -1171,6 +1173,7 @@ void ApplicationManagerBase::InitBuilderManager() { m_builderManager->ConnectionLost(connId); }); + } void ApplicationManagerBase::ShutdownBuilderManager() diff --git a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp index bc516d5da6..7543e9ec8b 100644 --- a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.cpp @@ -1285,6 +1285,13 @@ namespace AssetProcessor return m_scanFolders[index]; } + const AssetProcessor::ScanFolderInfo& PlatformConfiguration::GetScanFolderAt(int index) const + { + Q_ASSERT(index >= 0); + Q_ASSERT(index < m_scanFolders.size()); + return m_scanFolders[index]; + } + void PlatformConfiguration::AddScanFolder(const AssetProcessor::ScanFolderInfo& source, bool isUnitTesting) { if (isUnitTesting) @@ -1436,7 +1443,10 @@ namespace AssetProcessor } QStringList PlatformConfiguration::FindWildcardMatches( - const QString& sourceFolder, QString relativeName, bool includeFolders, bool recursiveSearch) const + const QString& sourceFolder, + QString relativeName, + bool includeFolders, + bool recursiveSearch) const { if (relativeName.isEmpty()) { @@ -1469,6 +1479,67 @@ namespace AssetProcessor return returnList; } + QStringList PlatformConfiguration::FindWildcardMatches( + const QString& sourceFolder, + QString relativeName, + const AZStd::unordered_set& excludedFolders, + bool includeFolders, + bool recursiveSearch) const + { + if (relativeName.isEmpty()) + { + return QStringList(); + } + + QDir sourceFolderDir(sourceFolder); + + QString posixRelativeName = QDir::fromNativeSeparators(relativeName); + + QStringList returnList; + QRegExp nameMatch{ posixRelativeName, Qt::CaseInsensitive, QRegExp::Wildcard }; + AZStd::stack dirs; + dirs.push(sourceFolderDir.absolutePath()); + + while (!dirs.empty()) + { + QString absolutePath = dirs.top(); + dirs.pop(); + + if (excludedFolders.contains(absolutePath.toUtf8().constData())) + { + continue; + } + + QDirIterator dirIterator(absolutePath, QDir::AllEntries | QDir::NoSymLinks | QDir::NoDotAndDotDot); + + while (dirIterator.hasNext()) + { + dirIterator.next(); + + if (!dirIterator.fileInfo().isFile()) + { + if (recursiveSearch) + { + dirs.push(dirIterator.filePath()); + } + + if (!includeFolders) + { + continue; + } + } + + QString pathMatch{ sourceFolderDir.relativeFilePath(dirIterator.filePath()) }; + if (nameMatch.exactMatch(pathMatch)) + { + returnList.append(QDir::fromNativeSeparators(dirIterator.filePath())); + } + } + } + + return returnList; + } + const AssetProcessor::ScanFolderInfo* PlatformConfiguration::GetScanFolderForFile(const QString& fullFileName) const { QString normalized = AssetUtilities::NormalizeFilePath(fullFileName); diff --git a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h index 2c04ca1fad..a57416da10 100644 --- a/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h +++ b/Code/Tools/AssetProcessor/native/utilities/PlatformConfiguration.h @@ -256,6 +256,9 @@ namespace AssetProcessor //! Retrieve the scan folder at a given index. AssetProcessor::ScanFolderInfo& GetScanFolderAt(int index); + //! Retrieve the scan folder at a given index. + const AssetProcessor::ScanFolderInfo& GetScanFolderAt(int index) const; + //! Manually add a scan folder. Also used for testing. void AddScanFolder(const AssetProcessor::ScanFolderInfo& source, bool isUnitTesting = false); @@ -298,7 +301,16 @@ namespace AssetProcessor QString FindFirstMatchingFile(QString relativeName) const; //! given a relative name with wildcard characters (* allowed) find a set of matching files or optionally folders - QStringList FindWildcardMatches(const QString& sourceFolder, QString relativeName, bool includeFolders = false, bool recursiveSearch = true) const; + QStringList FindWildcardMatches(const QString& sourceFolder, QString relativeName, bool includeFolders = false, + bool recursiveSearch = true) const; + + //! given a relative name with wildcard characters (* allowed) find a set of matching files or optionally folders + QStringList FindWildcardMatches( + const QString& sourceFolder, + QString relativeName, + const AZStd::unordered_set& excludedFolders, + bool includeFolders = false, + bool recursiveSearch = true) const; //! given a fileName (as a full path), return the database source name which includes the output prefix. //! diff --git a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp new file mode 100644 index 0000000000..1174e2500c --- /dev/null +++ b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.cpp @@ -0,0 +1,394 @@ + /* + * 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 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +namespace AssetProcessor +{ + namespace StatsCapture + { + // This class captures stats by storing them in a map of type + // [name of stat] -> Stat struct + // It can then analyze these stats and produce more stats from the original + // Captures, before dumping. + class StatsCaptureImpl final + { + public: + AZ_CLASS_ALLOCATOR(StatsCaptureImpl, AZ::SystemAllocator, 0); + + void BeginCaptureStat(AZStd::string_view statName); + void EndCaptureStat(AZStd::string_view statName); + void Dump(); + private: + using timepoint = AZStd::chrono::high_resolution_clock::time_point; + using duration = AZStd::chrono::milliseconds; + struct StatsEntry + { + duration m_cumulativeTime = {}; // The total amount of time spent on this. + timepoint m_operationStartTime = {}; // Async tracking - the last time stamp an operation started. + int64_t m_operationCount = 0; // In case there's more than one sample. Used to calc average. + }; + + AZStd::unordered_map m_stats; + bool m_dumpMachineReadableStats = false; + bool m_dumpHumanReadableStats = true; + + // Make a friendly time string of the format nnHnnMhhS.xxxms + AZStd::string FormatDuration(const duration& duration) + { + int64_t milliseconds = duration.count(); + constexpr int64_t millisecondsInASecond = 1000; + constexpr int64_t millisecondsInAMinute = millisecondsInASecond * 60; + constexpr int64_t millisecondsInAnHour = millisecondsInAMinute * 60; + + int64_t hours = milliseconds / millisecondsInAnHour; + milliseconds -= hours * millisecondsInAnHour; + + int64_t minutes = milliseconds / millisecondsInAMinute; + milliseconds -= minutes * millisecondsInAMinute; + + int64_t seconds = milliseconds / millisecondsInASecond; + milliseconds -= seconds * millisecondsInASecond; + + // omit the sections which dont make sense for readability + if (hours) + { + return AZStd::string::format("%02" PRId64 "h%02" PRId64 "m%02" PRId64 "s%03" PRId64 "ms" , hours, minutes, seconds, milliseconds); + } + else if (minutes) + { + return AZStd::string::format(" %02" PRId64 "m%02" PRId64 "s%03" PRId64 "ms", minutes, seconds, milliseconds); + } + else if (seconds) + { + return AZStd::string::format(" %02" PRId64 "s%03" PRId64 "ms", seconds, milliseconds); + } + + return AZStd::string::format(" %03" PRId64 "ms", milliseconds); + } + + // Prints out a single stat. + void PrintStat([[maybe_unused]] const char* name, duration milliseconds, int64_t count) + { + // note that name may be unused as it only appears in Trace macros, which are + // stripped out in release builds. + if (count <= 1) + { + count = 1; + } + + duration average(static_cast(static_cast(milliseconds.count()) / static_cast(count))); + + if (m_dumpHumanReadableStats) + { + if (count > 1) + { + AZ_TracePrintf(AssetProcessor::ConsoleChannel, " Time: %s, Count: %4" PRId64 ", Average: %s, EventName: %s\n", + FormatDuration(milliseconds).c_str(), + count, + FormatDuration(average).c_str(), + name); + } + else + { + AZ_TracePrintf(AssetProcessor::ConsoleChannel, " Time: %s, EventName: %s\n", + FormatDuration(milliseconds).c_str(), + name); + } + } + if (m_dumpMachineReadableStats) + { + // machine Readable mode prints raw milliseconds and uses a CSV-like format + // note that the stat itself may contain commas, so we dont acutally separate with comma + // instead we separate with : + // and each "interesting line" is 'MachineReadableStat:milliseconds:count:average:name' + AZ_TracePrintf(AssetProcessor::ConsoleChannel, "MachineReadableStat:%" PRId64 ":%" PRId64 ":%" PRId64 ":%s\n", + milliseconds.count(), + count, + count > 1 ? average.count() : milliseconds.count(), + name); + } + } + + // calls PrintStat on each element in the vector. + void PrintStatsArray(AZStd::vector& keys, int maxToPrint, const char* header) + { + if ((m_dumpHumanReadableStats)&&(header)) + { + AZ_TracePrintf(AssetProcessor::ConsoleChannel,"Top %i %s\n", maxToPrint, header); + } + + auto sortByTimeDescending = [&](const AZStd::string& s1, const AZStd::string& s2) + { + return this->m_stats[s1].m_cumulativeTime > this->m_stats[s2].m_cumulativeTime; + }; + + AZStd::sort(keys.begin(), keys.end(), sortByTimeDescending); + + for (int idx = 0; idx < maxToPrint; ++idx) + { + if (idx < keys.size()) + { + PrintStat(keys[idx].c_str(), m_stats[keys[idx]].m_cumulativeTime, m_stats[keys[idx]].m_operationCount); + } + } + } + }; + + + void StatsCaptureImpl::BeginCaptureStat(AZStd::string_view statName) + { + StatsEntry& existingStat = m_stats[statName]; + if (existingStat.m_operationStartTime != timepoint()) + { + // prevent double 'Begins' + return; + } + existingStat.m_operationStartTime = AZStd::chrono::high_resolution_clock::now(); + } + + void StatsCaptureImpl::EndCaptureStat(AZStd::string_view statName) + { + StatsEntry& existingStat = m_stats[statName]; + if (existingStat.m_operationStartTime != timepoint()) + { + existingStat.m_cumulativeTime = AZStd::chrono::high_resolution_clock::now() - existingStat.m_operationStartTime; + existingStat.m_operationCount = existingStat.m_operationCount + 1; + existingStat.m_operationStartTime = timepoint(); // reset the start time so that double 'Ends' are ignored. + } + } + + void StatsCaptureImpl::Dump() + { + timepoint startTimeStamp = AZStd::chrono::high_resolution_clock::now(); + + auto settingsRegistry = AZ::SettingsRegistry::Get(); + + int maxCumulativeStats = 5; // default max cumulative stats to show + int maxIndividualStats = 5; // default max individual files to show + + if (settingsRegistry) + { + AZ::u64 cumulativeStats = static_cast(maxCumulativeStats); + AZ::u64 individualStats = static_cast(maxIndividualStats); + settingsRegistry->Get(m_dumpHumanReadableStats, "/Amazon/AssetProcessor/Settings/Stats/HumanReadable"); + settingsRegistry->Get(m_dumpMachineReadableStats, "/Amazon/AssetProcessor/Settings/Stats/MachineReadable"); + settingsRegistry->Get(cumulativeStats, "/Amazon/AssetProcessor/Settings/Stats/MaxCumulativeStats"); + settingsRegistry->Get(individualStats, "/Amazon/AssetProcessor/Settings/Stats/MaxIndividualStats"); + maxCumulativeStats = static_cast(cumulativeStats); + maxIndividualStats = static_cast(individualStats); + } + + if ((!m_dumpHumanReadableStats)&&(!m_dumpMachineReadableStats)) + { + return; + } + + AZStd::vector allCreateJobs; // individual + AZStd::vector allCreateJobsByBuilder; // bucketed by builder + AZStd::vector allProcessJobs; // individual + AZStd::vector allProcessJobsByPlatform; // bucketed by platform + AZStd::vector allProcessJobsByJobKey; // bucketed by type of job (job key) + AZStd::vector allHashFiles; + + // capture only existing keys as we will be expanding the stats + // this approach avoids mutating an iterator. + AZStd::vector statKeys; + for (const auto& element : m_stats) + { + statKeys.push_back(element.first); + } + + for (const AZStd::string& statKey : statKeys) + { + const StatsEntry& statistic = m_stats[statKey]; + // Createjobs stats encode like (CreateJobs,sourcefilepath,builderid) + if (AZ::StringFunc::StartsWith(statKey, "CreateJobs,", true)) + { + allCreateJobs.push_back(statKey); + AZStd::vector tokens; + AZ::StringFunc::Tokenize(statKey, tokens, ",", false, false); + + // look up the builder so you can get its name: + AZStd::string_view builderName = tokens[2]; + + // synthesize a stat to track per-builder createjobs times: + { + AZStd::string newStatKey = AZStd::string::format("CreateJobsByBuilder,%.*s", AZ_STRING_ARG(builderName)); + + auto insertion = m_stats.insert(newStatKey); + StatsEntry& statToSynth = insertion.first->second; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + if (insertion.second) + { + allCreateJobsByBuilder.push_back(newStatKey); + } + } + // synthesize a stat to track total createjobs times: + { + StatsEntry& statToSynth = m_stats["CreateJobsTotal"]; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + } + } + else if (AZ::StringFunc::StartsWith(statKey, "ProcessJob,", true)) + { + allProcessJobs.push_back(statKey); + // processjob has the format ProcessJob,sourcename,jobkey,platformname + AZStd::vector tokens; + AZ::StringFunc::Tokenize(statKey, tokens, ",", false, false); + AZStd::string_view jobKey = tokens[2]; + AZStd::string_view platformName = tokens[3]; + + // synthesize a stat to record process time accumulated by job key platform + { + AZStd::string newStatKey = AZStd::string::format("ProcessJobsByPlatform,%.*s", AZ_STRING_ARG(platformName)); + auto insertion = m_stats.insert(newStatKey); + StatsEntry& statToSynth = insertion.first->second; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + if (insertion.second) + { + allProcessJobsByPlatform.push_back(newStatKey); + } + } + + // synthesize a stat to record process time accumulated job key total across all platforms + { + AZStd::string newStatKey = AZStd::string::format("ProcessJobsByJobKey,%.*s", AZ_STRING_ARG(jobKey)); + auto insertion = m_stats.insert(newStatKey); + StatsEntry& statToSynth = insertion.first->second; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + if (insertion.second) + { + allProcessJobsByJobKey.push_back(newStatKey); + } + } + // synthesize a stat to track total processjob times: + { + StatsEntry& statToSynth = m_stats["ProcessJobsTotal"]; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + } + } + else if (AZ::StringFunc::StartsWith(statKey, "HashFile,", true)) + { + allHashFiles.push_back(statKey); + // processjob has the format ProcessJob,sourcename,jobkey,platformname + // synthesize a stat to track total hash times: + StatsEntry& statToSynth = m_stats["HashFileTotal"]; + statToSynth.m_cumulativeTime += statistic.m_cumulativeTime; + statToSynth.m_operationCount += statistic.m_operationCount; + } + } + + StatsEntry& gemLoadStat = m_stats["LoadingModules"]; + PrintStat("LoadingGems", gemLoadStat.m_cumulativeTime, 1); + // analysis-related stats + + StatsEntry& totalScanTime = m_stats["AssetScanning"]; + PrintStat("AssetScanning", totalScanTime.m_cumulativeTime, totalScanTime.m_operationCount); + StatsEntry& totalHashTime = m_stats["HashFileTotal"]; + PrintStat("HashFileTotal", totalHashTime.m_cumulativeTime, totalHashTime.m_operationCount); + PrintStatsArray(allHashFiles, maxIndividualStats, "longest individual file hashes:"); + + // CreateJobs stats + StatsEntry& totalCreateJobs = m_stats["CreateJobsTotal"]; + if (totalCreateJobs.m_operationCount) + { + PrintStat("CreateJobsTotal", totalCreateJobs.m_cumulativeTime, totalCreateJobs.m_operationCount); + PrintStatsArray(allCreateJobs, maxIndividualStats, "longest individual CreateJobs"); + PrintStatsArray(allCreateJobsByBuilder, maxCumulativeStats, "longest CreateJobs By builder"); + } + + // ProcessJobs stats + StatsEntry& totalProcessJobs = m_stats["ProcessJobsTotal"]; + if (totalProcessJobs.m_operationCount) + { + PrintStat("ProcessJobsTotal", totalProcessJobs.m_cumulativeTime, totalProcessJobs.m_operationCount); + PrintStatsArray(allProcessJobs, maxIndividualStats, "longest individual ProcessJob"); + PrintStatsArray(allProcessJobsByJobKey, maxCumulativeStats, "cumulative time spent in ProcessJob by JobKey"); + PrintStatsArray(allProcessJobsByPlatform, maxCumulativeStats, "cumulative time spent in ProcessJob by Platform"); + } + duration costToGenerateStats = AZStd::chrono::high_resolution_clock::now() - startTimeStamp; + PrintStat("ComputeStatsTime", costToGenerateStats, 1); + } + + // Public interface: + static StatsCaptureImpl* g_instance = nullptr; + + //! call this one time before capturing stats. + void Initialize() + { + if (g_instance) + { + AZ_Assert(false, "An instance of StatsCaptureImpl already exists."); + return; + } + g_instance = aznew StatsCaptureImpl(); + } + + //! Call this one time as part of shutting down. + //! note that while it is an error to double-initialize, it is intentionally + //! not an error to call any other function when uninitialized, allowing this system + //! to essentially be "turned off" just by not initializing it in the first place. + void Shutdown() + { + if (g_instance) + { + delete g_instance; + g_instance = nullptr; + } + } + + //! Start the clock running for a particular stat name. + void BeginCaptureStat(AZStd::string_view statName) + { + if (g_instance) + { + g_instance->BeginCaptureStat(statName); + } + } + + //! Stop the clock running for a particular stat name. + void EndCaptureStat(AZStd::string_view statName) + { + if (g_instance) + { + g_instance->EndCaptureStat(statName); + } + } + + //! Do additional processing and then write the cumulative stats to log. + //! Note that since this is an AP-specific system, the analysis done in the dump function + //! is going to make a lot of assumptions about the way the data is encoded. + void Dump() + { + if (g_instance) + { + g_instance->Dump(); + } + } + } +} diff --git a/Code/Tools/AssetProcessor/native/utilities/StatsCapture.h b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.h new file mode 100644 index 0000000000..dd3c9abccf --- /dev/null +++ b/Code/Tools/AssetProcessor/native/utilities/StatsCapture.h @@ -0,0 +1,40 @@ +/* + * 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 + * + */ + +// This is an AssetProcessor-only stats capture system. Its kept out-of-band +// from the rest of the Asset Processor systems so that it can avoid interfering +// with the rest of the processing decision making and other parts of AssetProcessor. +// This is not meant to be used anywhere except in AssetProcessor. + +#pragma once + +#include + +namespace AssetProcessor +{ + namespace StatsCapture + { + //! call this one time before capturing stats. + void Initialize(); + + //! Call this one time as part of shutting down. + void Shutdown(); + + //! Start the clock running for a particular stat name. + void BeginCaptureStat(AZStd::string_view statName); + + //! Stop the clock running for a particular stat name. + void EndCaptureStat(AZStd::string_view statName); + + //! Do additional processing and then write the cumulative stats to log. + //! Note that since this is an AP-specific system, the analysis done in the dump function + //! is going to make a lot of assumptions about the way the data is encoded. + void Dump(); + } + +} diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp index cacd6c4cc9..ae70ee7fe5 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.cpp @@ -10,9 +10,10 @@ #include #include -#include "native/utilities/PlatformConfiguration.h" -#include "native/AssetManager/FileStateCache.h" -#include "native/AssetDatabase/AssetDatabase.h" +#include +#include +#include +#include #include #include #include @@ -1161,7 +1162,7 @@ namespace AssetUtilities { #ifndef AZ_TESTS_ENABLED // Only used for unit tests, speed is critical for GetFileHash. - AZ_UNUSED(hashMsDelay); + hashMsDelay = 0; #endif bool useFileHashing = ShouldUseFileHashing(); @@ -1170,10 +1171,10 @@ namespace AssetUtilities return 0; } + AZ::u64 hash = 0; if(!force) { auto* fileStateInterface = AZ::Interface::Get(); - AZ::u64 hash = 0; if (fileStateInterface && fileStateInterface->GetHash(filePath, &hash)) { @@ -1181,64 +1182,8 @@ namespace AssetUtilities } } - char buffer[FileHashBufferSize]; - - constexpr bool ErrorOnReadFailure = true; - AZ::IO::FileIOStream readStream(filePath, AZ::IO::OpenMode::ModeRead | AZ::IO::OpenMode::ModeBinary, ErrorOnReadFailure); - - if(readStream.IsOpen() && readStream.CanRead()) - { - AZ::IO::SizeType bytesRead; - - auto* state = XXH64_createState(); - - if(state == nullptr) - { - AZ_Assert(false, "Failed to create hash state"); - return 0; - } - - if (XXH64_reset(state, 0) == XXH_ERROR) - { - AZ_Assert(false, "Failed to reset hash state"); - return 0; - } - - do - { - // In edge cases where another process is writing to this file while this hashing is occuring and that file wasn't locked, - // the following read check can fail because it performs an end of file check, and asserts and shuts down if the read size - // was smaller than the buffer and the read is not at the end of the file. The logic used to check end of file internal to read - // will be out of date in the edge cases where another process is actively writing to this file while this hash is running. - // The stream's length ends up more accurate in this case, preventing this assert and shut down. - // One area this occurs is the navigation mesh file (mnmnavmission0.bai) that's temporarily created when exporting a level, - // the navigation system can still be writing to this file when hashing begins, causing the EoF marker to change. - AZ::IO::SizeType remainingToRead = AZStd::min(readStream.GetLength() - readStream.GetCurPos(), aznumeric_cast(AZ_ARRAY_SIZE(buffer))); - bytesRead = readStream.Read(remainingToRead, buffer); - - if(bytesReadOut) - { - *bytesReadOut += bytesRead; - } - - XXH64_update(state, buffer, bytesRead); -#ifdef AZ_TESTS_ENABLED - // Used by unit tests to force the race condition mentioned above, to verify the crash fix. - if(hashMsDelay > 0) - { - AZStd::this_thread::sleep_for(AZStd::chrono::milliseconds(hashMsDelay)); - } -#endif - - } while (bytesRead > 0); - - auto hash = XXH64_digest(state); - - XXH64_freeState(state); - - return hash; - } - return 0; + hash = AssetBuilderSDK::GetFileHash(filePath, bytesReadOut, hashMsDelay); + return hash; } AZ::u64 AdjustTimestamp(QDateTime timestamp) diff --git a/Code/Tools/AssetProcessor/native/utilities/assetUtils.h b/Code/Tools/AssetProcessor/native/utilities/assetUtils.h index 2145c3e0e6..46ec5d6145 100644 --- a/Code/Tools/AssetProcessor/native/utilities/assetUtils.h +++ b/Code/Tools/AssetProcessor/native/utilities/assetUtils.h @@ -238,7 +238,6 @@ namespace AssetUtilities // hashMsDelay is only for automated tests to test that writing to a file while it's hashing does not cause a crash. // hashMsDelay is not used in non-unit test builds. AZ::u64 GetFileHash(const char* filePath, bool force = false, AZ::IO::SizeType* bytesReadOut = nullptr, int hashMsDelay = 0); - inline constexpr AZ::u64 FileHashBufferSize = 1024 * 64; //! Adjusts a timestamp to fix timezone settings and account for any precision adjustment needed AZ::u64 AdjustTimestamp(QDateTime timestamp); diff --git a/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp b/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp index 2987fc4dc2..fdeaef93bb 100644 --- a/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp +++ b/Code/Tools/ProjectManager/Platform/Linux/ProjectBuilderWorker_linux.cpp @@ -23,25 +23,11 @@ namespace O3DE::ProjectManager QString cmakeGenerator = (whichNinjaResult.IsSuccess()) ? "Ninja Multi-Config" : "Unix Makefiles"; bool compileProfileOnBuild = (whichNinjaResult.IsSuccess()); - // On Linux the default compiler is gcc. For O3DE, it is clang, so we need to specify the version of clang that is detected - // in order to get the compiler option. - auto compilerOptionResult = ProjectUtils::FindSupportedCompilerForPlatform(); - if (!compilerOptionResult.IsSuccess()) - { - return AZ::Failure(compilerOptionResult.GetError()); - } - auto clangCompilers = compilerOptionResult.GetValue().split('|'); - AZ_Assert(clangCompilers.length()==2, "Invalid clang compiler pair specification"); - - QString clangCompilerOption = clangCompilers[0]; - QString clangPPCompilerOption = clangCompilers[1]; QString targetBuildPath = QDir(m_projectInfo.m_path).filePath(ProjectBuildPathPostfix); QStringList generateProjectArgs = QStringList{ProjectCMakeCommand, "-B", ProjectBuildPathPostfix, "-S", ".", QString("-G%1").arg(cmakeGenerator), - QString("-DCMAKE_C_COMPILER=").append(clangCompilerOption), - QString("-DCMAKE_CXX_COMPILER=").append(clangPPCompilerOption), QString("-DLY_3RDPARTY_PATH=").append(thirdPartyPath)}; if (!compileProfileOnBuild) { diff --git a/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h b/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h index 7c0543361f..d7edcfcf12 100644 --- a/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h +++ b/Code/Tools/ProjectManager/Platform/Linux/ProjectManager_Traits_Linux.h @@ -9,3 +9,4 @@ #pragma once #define AZ_TRAIT_PROJECT_MANAGER_CUSTOM_TITLEBAR false +#define AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT false diff --git a/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp b/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp index e901d807b4..a7bd2dae08 100644 --- a/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp +++ b/Code/Tools/ProjectManager/Platform/Linux/ProjectUtils_linux.cpp @@ -17,13 +17,11 @@ namespace O3DE::ProjectManager namespace ProjectUtils { // The list of clang C/C++ compiler command lines to validate on the host Linux system - const QStringList SupportedClangCommands = {"clang-12|clang++-12"}; + const QStringList SupportedClangVersions = {"13", "12", "11", "10", "9", "8", "7", "6.0"}; AZ::Outcome GetCommandLineProcessEnvironment() { QProcessEnvironment currentEnvironment(QProcessEnvironment::systemEnvironment()); - currentEnvironment.insert("CC", "clang-12"); - currentEnvironment.insert("CXX", "clang++-12"); return AZ::Success(currentEnvironment); } @@ -39,16 +37,13 @@ namespace O3DE::ProjectManager } // Look for the first compatible version of clang. The list below will contain the known clang compilers that have been tested for O3DE. - for (const QString& supportClangCommand : SupportedClangCommands) + for (const QString& supportClangVersion : SupportedClangVersions) { - auto clangCompilers = supportClangCommand.split('|'); - AZ_Assert(clangCompilers.length()==2, "Invalid clang compiler pair specification"); - - auto whichClangResult = ProjectUtils::ExecuteCommandResult("which", QStringList{clangCompilers[0]}, QProcessEnvironment::systemEnvironment()); - auto whichClangPPResult = ProjectUtils::ExecuteCommandResult("which", QStringList{clangCompilers[1]}, QProcessEnvironment::systemEnvironment()); + auto whichClangResult = ProjectUtils::ExecuteCommandResult("which", QStringList{QString("clang-%1").arg(supportClangVersion)}, QProcessEnvironment::systemEnvironment()); + auto whichClangPPResult = ProjectUtils::ExecuteCommandResult("which", QStringList{QString("clang++-%1").arg(supportClangVersion)}, QProcessEnvironment::systemEnvironment()); if (whichClangResult.IsSuccess() && whichClangPPResult.IsSuccess()) { - return AZ::Success(supportClangCommand); + return AZ::Success(QString("clang-%1").arg(supportClangVersion)); } } return AZ::Failure(QObject::tr("Clang not found.

" @@ -101,5 +96,10 @@ namespace O3DE::ProjectManager { return AZ::Utils::GetExecutableDirectory(); } + + AZ::Outcome CreateDesktopShortcut([[maybe_unused]] const QString& filename, [[maybe_unused]] const QString& targetPath, [[maybe_unused]] const QStringList& arguments) + { + return AZ::Failure(QObject::tr("Creating desktop shortcuts functionality not implemented for this platform yet.")); + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h b/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h index 7c0543361f..d7edcfcf12 100644 --- a/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h +++ b/Code/Tools/ProjectManager/Platform/Mac/ProjectManager_Traits_Mac.h @@ -9,3 +9,4 @@ #pragma once #define AZ_TRAIT_PROJECT_MANAGER_CUSTOM_TITLEBAR false +#define AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT false diff --git a/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp b/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp index b768200398..62011bf04b 100644 --- a/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp +++ b/Code/Tools/ProjectManager/Platform/Mac/ProjectUtils_mac.cpp @@ -137,5 +137,10 @@ namespace O3DE::ProjectManager return editorPath; } + + AZ::Outcome CreateDesktopShortcut([[maybe_unused]] const QString& filename, [[maybe_unused]] const QString& targetPath, [[maybe_unused]] const QStringList& arguments) + { + return AZ::Failure(QObject::tr("Creating desktop shortcuts functionality not implemented for this platform yet.")); + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h b/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h index e6422b5a77..9e4d29b58f 100644 --- a/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h +++ b/Code/Tools/ProjectManager/Platform/Windows/ProjectManager_Traits_Windows.h @@ -9,3 +9,4 @@ #pragma once #define AZ_TRAIT_PROJECT_MANAGER_CUSTOM_TITLEBAR true +#define AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT true diff --git a/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp b/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp index 871f8e9567..d08da1d5e1 100644 --- a/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp +++ b/Code/Tools/ProjectManager/Platform/Windows/ProjectUtils_windows.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -146,5 +147,26 @@ namespace O3DE::ProjectManager { return AZ::Utils::GetExecutableDirectory(); } + + AZ::Outcome CreateDesktopShortcut(const QString& filename, const QString& targetPath, const QStringList& arguments) + { + const QString cmd{"powershell.exe"}; + const QString desktopPath = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); + const QString shortcutPath = QString("%1/%2.lnk").arg(desktopPath).arg(filename); + const QString arg = QString("$s=(New-Object -COM WScript.Shell).CreateShortcut('%1');$s.TargetPath='%2';$s.Arguments='%3';$s.Save();") + .arg(shortcutPath) + .arg(targetPath) + .arg(arguments.join(' ')); + auto createShortcutResult = ExecuteCommandResult(cmd, QStringList{"-Command", arg}, QProcessEnvironment::systemEnvironment()); + if (!createShortcutResult.IsSuccess()) + { + return AZ::Failure(QObject::tr("Failed to create desktop shortcut %1

" + "Please verify you have permission to create files at the specified location.

%2") + .arg(shortcutPath) + .arg(createShortcutResult.GetError())); + } + + return AZ::Success(QObject::tr("Desktop shortcut created at
%2").arg(desktopPath).arg(shortcutPath)); + } } // namespace ProjectUtils } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg b/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg index 3af15393c4..0d2ec8a301 100644 --- a/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg +++ b/Code/Tools/ProjectManager/Resources/Backgrounds/DefaultBackground.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:342c3eaccf68a178dfd8c2b1792a93a8c9197c8184dca11bf90706d7481df087 -size 1611268 +oid sha256:e9ad0383f3b917fa7f4efa307a8e109a70bb5f66deb197189d013f60eb8dc32c +size 1010250 diff --git a/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg b/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg index 44291a8b1d..258dc62429 100644 --- a/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg +++ b/Code/Tools/ProjectManager/Resources/Backgrounds/FtueBackground.jpg @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:797794816e4b1702f1ae1f32b408c95c79eb1f8a95aba43cfad9cccc181b0bda -size 1135182 +oid sha256:84aab95ec8a5e3ba6ecb3aff1a814afc3171a937aa658decd18c2740623bd172 +size 984146 diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc index 8dd7e4c9b5..2260ae62b9 100644 --- a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc +++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc @@ -41,5 +41,6 @@ Download.svg in_progress.gif gem.svg + checkmark.svg diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qss b/Code/Tools/ProjectManager/Resources/ProjectManager.qss index d3ec066be7..426f409581 100644 --- a/Code/Tools/ProjectManager/Resources/ProjectManager.qss +++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qss @@ -563,6 +563,52 @@ QProgressBar::chunk { margin-top:5px; } +#gemCatalogUpdateGemButton, +#gemCatalogUninstallGemButton +{ + qproperty-flat: true; + min-height:24px; + max-height:24px; + border-radius: 3px; + text-align:center; + font-size:12px; + font-weight:600; +} + +#gemCatalogUpdateGemButton { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #888888, stop: 1.0 #555555); +} +#gemCatalogUpdateGemButton:hover { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #999999, stop: 1.0 #666666); +} +#gemCatalogUpdateGemButton:pressed { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #555555, stop: 1.0 #777777); +} + +#footer > #gemCatalogUninstallGemButton, +#gemCatalogUninstallGemButton { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #E32C27, stop: 1.0 #951D21); +} +#footer > #gemCatalogUninstallGemButton:hover, +#gemCatalogUninstallGemButton:hover { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #FD3129, stop: 1.0 #AF2221); +} +#footer > #gemCatalogUninstallGemButton:pressed, +#gemCatalogUninstallGemButton:pressed { + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, + stop: 0 #951D1F, stop: 1.0 #C92724); +} + +#gemCatalogDialogSubTitle { + font-size:14px; + font-weight:600; +} + /************** Filter Tag widget **************/ #FilterTagWidgetTextLabel { diff --git a/Code/Tools/ProjectManager/Resources/checkmark.svg b/Code/Tools/ProjectManager/Resources/checkmark.svg new file mode 100644 index 0000000000..d612b35370 --- /dev/null +++ b/Code/Tools/ProjectManager/Resources/checkmark.svg @@ -0,0 +1,12 @@ + + + Icons / Hub / Download Copy 5 + + + + + + + + + diff --git a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp index 6b19e839d7..205395c935 100644 --- a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/Code/Tools/ProjectManager/Source/DownloadController.cpp b/Code/Tools/ProjectManager/Source/DownloadController.cpp index 6326b2fc11..9b64c5e276 100644 --- a/Code/Tools/ProjectManager/Source/DownloadController.cpp +++ b/Code/Tools/ProjectManager/Source/DownloadController.cpp @@ -18,7 +18,6 @@ namespace O3DE::ProjectManager { DownloadController::DownloadController(QWidget* parent) : QObject() - , m_lastProgress(0) , m_parent(parent) { m_worker = new DownloadWorker(); @@ -69,25 +68,37 @@ namespace O3DE::ProjectManager } } - void DownloadController::UpdateUIProgress(int progress) + void DownloadController::UpdateUIProgress(int bytesDownloaded, int totalBytes) { - m_lastProgress = progress; - emit GemDownloadProgress(m_gemNames.front(), progress); + emit GemDownloadProgress(m_gemNames.front(), bytesDownloaded, totalBytes); } - void DownloadController::HandleResults(const QString& result) + void DownloadController::HandleResults(const QString& result, const QString& detailedError) { bool succeeded = true; if (!result.isEmpty()) { - QMessageBox::critical(nullptr, tr("Gem download"), result); + if (!detailedError.isEmpty()) + { + QMessageBox gemDownloadError; + gemDownloadError.setIcon(QMessageBox::Critical); + gemDownloadError.setWindowTitle(tr("Gem download")); + gemDownloadError.setText(result); + gemDownloadError.setDetailedText(detailedError); + gemDownloadError.exec(); + } + else + { + QMessageBox::critical(nullptr, tr("Gem download"), result); + } succeeded = false; } QString gemName = m_gemNames.front(); m_gemNames.erase(m_gemNames.begin()); emit Done(gemName, succeeded); + emit GemDownloadRemoved(gemName); if (!m_gemNames.empty()) { diff --git a/Code/Tools/ProjectManager/Source/DownloadController.h b/Code/Tools/ProjectManager/Source/DownloadController.h index 0bf0ae473c..5e637971e9 100644 --- a/Code/Tools/ProjectManager/Source/DownloadController.h +++ b/Code/Tools/ProjectManager/Source/DownloadController.h @@ -53,22 +53,20 @@ namespace O3DE::ProjectManager } } public slots: - void UpdateUIProgress(int progress); - void HandleResults(const QString& result); + void UpdateUIProgress(int bytesDownloaded, int totalBytes); + void HandleResults(const QString& result, const QString& detailedError); signals: void StartGemDownload(const QString& gemName); void Done(const QString& gemName, bool success = true); void GemDownloadAdded(const QString& gemName); void GemDownloadRemoved(const QString& gemName); - void GemDownloadProgress(const QString& gemName, int percentage); + void GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes); private: DownloadWorker* m_worker; QThread m_workerThread; QWidget* m_parent; AZStd::vector m_gemNames; - - int m_lastProgress; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/DownloadWorker.cpp b/Code/Tools/ProjectManager/Source/DownloadWorker.cpp index 9bda1b34cc..e58c41c89e 100644 --- a/Code/Tools/ProjectManager/Source/DownloadWorker.cpp +++ b/Code/Tools/ProjectManager/Source/DownloadWorker.cpp @@ -20,19 +20,20 @@ namespace O3DE::ProjectManager void DownloadWorker::StartDownload() { - auto gemDownloadProgress = [=](int downloadProgress) + auto gemDownloadProgress = [=](int bytesDownloaded, int totalBytes) { - m_downloadProgress = downloadProgress; - emit UpdateProgress(downloadProgress); + emit UpdateProgress(bytesDownloaded, totalBytes); }; - AZ::Outcome gemInfoResult = PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress); + AZ::Outcome> gemInfoResult = + PythonBindingsInterface::Get()->DownloadGem(m_gemName, gemDownloadProgress, /*force*/true); + if (gemInfoResult.IsSuccess()) { - emit Done(""); + emit Done("", ""); } else { - emit Done(tr("Gem download failed")); + emit Done(gemInfoResult.GetError().first.c_str(), gemInfoResult.GetError().second.c_str()); } } diff --git a/Code/Tools/ProjectManager/Source/DownloadWorker.h b/Code/Tools/ProjectManager/Source/DownloadWorker.h index 316a730a78..d33de7bacc 100644 --- a/Code/Tools/ProjectManager/Source/DownloadWorker.h +++ b/Code/Tools/ProjectManager/Source/DownloadWorker.h @@ -31,12 +31,11 @@ namespace O3DE::ProjectManager void SetGemToDownload(const QString& gemName, bool downloadNow = true); signals: - void UpdateProgress(int progress); - void Done(QString result = ""); + void UpdateProgress(int bytesDownloaded, int totalBytes); + void Done(QString result = "", QString detailedResult = ""); private: QString m_gemName; - int m_downloadProgress; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp b/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp index 9d9110922f..1f41acd3d1 100644 --- a/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/EngineScreenCtrl.cpp @@ -72,12 +72,7 @@ namespace O3DE::ProjectManager bool EngineScreenCtrl::ContainsScreen(ProjectManagerScreen screen) { - if (screen == m_engineSettingsScreen->GetScreenEnum() || screen == m_gemRepoScreen->GetScreenEnum()) - { - return true; - } - - return false; + return screen == m_engineSettingsScreen->GetScreenEnum() || screen == m_gemRepoScreen->GetScreenEnum(); } void EngineScreenCtrl::NotifyCurrentScreen() diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp index bd0a6e9bc3..d6f4da0051 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.cpp @@ -7,23 +7,32 @@ */ #include +#include + #include + #include #include #include #include #include -#include #include +#include +#include +#include +#include namespace O3DE::ProjectManager { - CartOverlayWidget::CartOverlayWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent) - : QWidget(parent) + GemCartWidget::GemCartWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent) + : QScrollArea(parent) , m_gemModel(gemModel) , m_downloadController(downloadController) { setObjectName("GemCatalogCart"); + setWidgetResizable(true); + setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); + setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded); m_layout = new QVBoxLayout(); m_layout->setSpacing(0); @@ -116,17 +125,15 @@ namespace O3DE::ProjectManager } return dependencies; }); - - setWindowFlags(Qt::FramelessWindowHint | Qt::Dialog); } - CartOverlayWidget::~CartOverlayWidget() + GemCartWidget::~GemCartWidget() { // disconnect from all download controller signals disconnect(m_downloadController, nullptr, this, nullptr); } - void CartOverlayWidget::CreateGemSection(const QString& singularTitle, const QString& pluralTitle, GetTagIndicesCallback getTagIndices) + void GemCartWidget::CreateGemSection(const QString& singularTitle, const QString& pluralTitle, GetTagIndicesCallback getTagIndices) { QWidget* widget = new QWidget(); widget->setFixedWidth(s_width); @@ -162,12 +169,12 @@ namespace O3DE::ProjectManager update(); } - void CartOverlayWidget::OnCancelDownloadActivated(const QString& gemName) + void GemCartWidget::OnCancelDownloadActivated(const QString& gemName) { m_downloadController->CancelGemDownload(gemName); } - void CartOverlayWidget::CreateDownloadSection() + void GemCartWidget::CreateDownloadSection() { m_downloadSectionWidget = new QWidget(); m_downloadSectionWidget->setFixedWidth(s_width); @@ -221,13 +228,12 @@ namespace O3DE::ProjectManager } // connect to download controller data changed - connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &CartOverlayWidget::GemDownloadAdded); - connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &CartOverlayWidget::GemDownloadRemoved); - connect(m_downloadController, &DownloadController::GemDownloadProgress, this, &CartOverlayWidget::GemDownloadProgress); - connect(m_downloadController, &DownloadController::Done, this, &CartOverlayWidget::GemDownloadComplete); + connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &GemCartWidget::GemDownloadAdded); + connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &GemCartWidget::GemDownloadRemoved); + connect(m_downloadController, &DownloadController::GemDownloadProgress, this, &GemCartWidget::GemDownloadProgress); } - void CartOverlayWidget::GemDownloadAdded(const QString& gemName) + void GemCartWidget::GemDownloadAdded(const QString& gemName) { // Containing widget for the current download item QWidget* newGemDownloadWidget = new QWidget(); @@ -245,7 +251,7 @@ namespace O3DE::ProjectManager nameProgressLayout->addStretch(); QLabel* cancelText = new QLabel(tr("Cancel").arg(gemName), newGemDownloadWidget); cancelText->setTextInteractionFlags(Qt::LinksAccessibleByMouse); - connect(cancelText, &QLabel::linkActivated, this, &CartOverlayWidget::OnCancelDownloadActivated); + connect(cancelText, &QLabel::linkActivated, this, &GemCartWidget::OnCancelDownloadActivated); nameProgressLayout->addWidget(cancelText); downloadingGemLayout->addLayout(nameProgressLayout); @@ -266,7 +272,7 @@ namespace O3DE::ProjectManager m_downloadingListWidget->show(); } - void CartOverlayWidget::GemDownloadRemoved(const QString& gemName) + void GemCartWidget::GemDownloadRemoved(const QString& gemName) { QWidget* gemToRemove = m_downloadingListWidget->findChild(gemName); if (gemToRemove) @@ -288,30 +294,42 @@ namespace O3DE::ProjectManager } } - void CartOverlayWidget::GemDownloadProgress(const QString& gemName, int percentage) + void GemCartWidget::GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes) { QWidget* gemToUpdate = m_downloadingListWidget->findChild(gemName); if (gemToUpdate) { QLabel* progressLabel = gemToUpdate->findChild("DownloadProgressLabel"); - if (progressLabel) + QProgressBar* progressBar = gemToUpdate->findChild("DownloadProgressBar"); + + // totalBytes can be 0 if the server does not return a content-length for the object + if (totalBytes != 0) { - progressLabel->setText(QString("%1%").arg(percentage)); + int downloadPercentage = static_cast((bytesDownloaded / static_cast(totalBytes)) * 100); + if (progressLabel) + { + progressLabel->setText(QString("%1%").arg(downloadPercentage)); + } + if (progressBar) + { + progressBar->setValue(downloadPercentage); + } } - QProgressBar* progressBar = gemToUpdate->findChild("DownloadProgressBar"); - if (progressBar) + else { - progressBar->setValue(percentage); + if (progressLabel) + { + progressLabel->setText(QLocale::system().formattedDataSize(bytesDownloaded)); + } + if (progressBar) + { + progressBar->setRange(0, 0); + } } } } - void CartOverlayWidget::GemDownloadComplete(const QString& gemName, bool /*success*/) - { - GemDownloadRemoved(gemName); // update the list to remove the gem that has finished - } - - QVector CartOverlayWidget::GetTagsFromModelIndices(const QVector& gems) const + QVector GemCartWidget::GetTagsFromModelIndices(const QVector& gems) const { QVector tags; tags.reserve(gems.size()); @@ -336,7 +354,7 @@ namespace O3DE::ProjectManager iconButton->setFocusPolicy(Qt::NoFocus); iconButton->setIcon(QIcon(":/Summary.svg")); iconButton->setFixedSize(s_iconSize, s_iconSize); - connect(iconButton, &QPushButton::clicked, this, &CartButton::ShowOverlay); + connect(iconButton, &QPushButton::clicked, this, &CartButton::ShowGemCart); m_layout->addWidget(iconButton); m_countLabel = new QLabel(); @@ -349,7 +367,7 @@ namespace O3DE::ProjectManager m_dropDownButton->setFocusPolicy(Qt::NoFocus); m_dropDownButton->setIcon(QIcon(":/CarrotArrowDown.svg")); m_dropDownButton->setFixedSize(s_arrowDownIconSize, s_arrowDownIconSize); - connect(m_dropDownButton, &QPushButton::clicked, this, &CartButton::ShowOverlay); + connect(m_dropDownButton, &QPushButton::clicked, this, &CartButton::ShowGemCart); m_layout->addWidget(m_dropDownButton); // Adjust the label text whenever the model gets updated. @@ -364,72 +382,69 @@ namespace O3DE::ProjectManager m_dropDownButton->setVisible(!toBeAdded.isEmpty() || !toBeRemoved.isEmpty()); // Automatically close the overlay window in case there are no gems to be activated or deactivated anymore. - if (m_cartOverlay && toBeAdded.isEmpty() && toBeRemoved.isEmpty()) + if (m_gemCart && toBeAdded.isEmpty() && toBeRemoved.isEmpty()) { - m_cartOverlay->deleteLater(); - m_cartOverlay = nullptr; + m_gemCart->deleteLater(); + m_gemCart = nullptr; } }); } void CartButton::mousePressEvent([[maybe_unused]] QMouseEvent* event) { - ShowOverlay(); + ShowGemCart(); } void CartButton::hideEvent(QHideEvent*) { - if (m_cartOverlay) + if (m_gemCart) { - m_cartOverlay->hide(); + m_gemCart->hide(); } } - void CartButton::ShowOverlay() + void CartButton::ShowGemCart() { const QVector toBeAdded = m_gemModel->GatherGemsToBeAdded(/*includeDependencies=*/true); const QVector toBeRemoved = m_gemModel->GatherGemsToBeRemoved(/*includeDependencies=*/true); - if (toBeAdded.isEmpty() && toBeRemoved.isEmpty()) + if (toBeAdded.isEmpty() && toBeRemoved.isEmpty() && m_downloadController->IsDownloadQueueEmpty()) { return; } - if (m_cartOverlay) + if (m_gemCart) { // Directly delete the former overlay before creating the new one. // Don't use deleteLater() here. This might overwrite the new overlay pointer // depending on the event queue. - delete m_cartOverlay; + delete m_gemCart; } - m_cartOverlay = new CartOverlayWidget(m_gemModel, m_downloadController, this); - connect(m_cartOverlay, &QWidget::destroyed, this, [=] + m_gemCart = new GemCartWidget(m_gemModel, m_downloadController, this); + connect(m_gemCart, &QWidget::destroyed, this, [=] { // Reset the overlay pointer on destruction to prevent dangling pointers. - m_cartOverlay = nullptr; + m_gemCart = nullptr; + // Tell header gem cart is no longer open + UpdateGemCart(nullptr); }); - m_cartOverlay->show(); - - const QPoint parentPos = m_dropDownButton->mapToParent(m_dropDownButton->pos()); - const QPoint globalPos = m_dropDownButton->mapToGlobal(m_dropDownButton->pos()); - const QPoint offset(-4, 10); - m_cartOverlay->setGeometry(globalPos.x() - parentPos.x() - m_cartOverlay->width() + width() + offset.x(), - globalPos.y() + offset.y(), - m_cartOverlay->width(), - m_cartOverlay->height()); + m_gemCart->show(); + + emit UpdateGemCart(m_gemCart); } CartButton::~CartButton() { // Make sure the overlay window is automatically closed in case the gem catalog is destroyed. - if (m_cartOverlay) + if (m_gemCart) { - m_cartOverlay->deleteLater(); + m_gemCart->deleteLater(); } } GemCatalogHeaderWidget::GemCatalogHeaderWidget(GemModel* gemModel, GemSortFilterProxyModel* filterProxyModel, DownloadController* downloadController, QWidget* parent) : QFrame(parent) + , m_downloadController(downloadController) { QHBoxLayout* hLayout = new QHBoxLayout(); hLayout->setAlignment(Qt::AlignLeft); @@ -456,8 +471,25 @@ namespace O3DE::ProjectManager hLayout->addSpacerItem(new QSpacerItem(0, 0, QSizePolicy::Expanding)); hLayout->addSpacerItem(new QSpacerItem(75, 0, QSizePolicy::Fixed)); - CartButton* cartButton = new CartButton(gemModel, downloadController); - hLayout->addWidget(cartButton); + // spinner + m_downloadSpinnerMovie = new QMovie(":/in_progress.gif"); + m_downloadSpinner = new QLabel(this); + m_downloadSpinner->setScaledContents(true); + m_downloadSpinner->setMaximumSize(16, 16); + m_downloadSpinner->setMovie(m_downloadSpinnerMovie); + hLayout->addWidget(m_downloadSpinner); + hLayout->addSpacing(8); + + // downloading label + m_downloadLabel = new QLabel(tr("Downloading")); + hLayout->addWidget(m_downloadLabel); + m_downloadSpinner->hide(); + m_downloadLabel->hide(); + + hLayout->addSpacing(16); + + m_cartButton = new CartButton(gemModel, downloadController); + hLayout->addWidget(m_cartButton); hLayout->addSpacing(16); // Separating line @@ -469,6 +501,7 @@ namespace O3DE::ProjectManager hLayout->addSpacing(16); QMenu* gemMenu = new QMenu(this); + gemMenu->addAction( tr("Refresh"), [this]() { emit RefreshGems(); }); gemMenu->addAction( tr("Show Gem Repos"), [this]() { emit OpenGemsRepo(); }); gemMenu->addSeparator(); gemMenu->addAction( tr("Add Existing Gem"), [this]() { emit AddGem(); }); @@ -479,10 +512,78 @@ namespace O3DE::ProjectManager gemMenuButton->setIcon(QIcon(":/menu.svg")); gemMenuButton->setIconSize(QSize(36, 24)); hLayout->addWidget(gemMenuButton); + + connect(m_downloadController, &DownloadController::GemDownloadAdded, this, &GemCatalogHeaderWidget::GemDownloadAdded); + connect(m_downloadController, &DownloadController::GemDownloadRemoved, this, &GemCatalogHeaderWidget::GemDownloadRemoved); + + connect( + m_cartButton, &CartButton::UpdateGemCart, this, + [this](QWidget* gemCart) + { + GemCartShown(gemCart); + if (gemCart) + { + emit UpdateGemCart(gemCart); + } + }); + } + + void GemCatalogHeaderWidget::GemDownloadAdded(const QString& /*gemName*/) + { + m_downloadSpinner->show(); + m_downloadLabel->show(); + m_downloadSpinnerMovie->start(); + m_cartButton->ShowGemCart(); + } + + void GemCatalogHeaderWidget::GemDownloadRemoved(const QString& /*gemName*/) + { + if (m_downloadController->IsDownloadQueueEmpty()) + { + m_downloadSpinner->hide(); + m_downloadLabel->hide(); + m_downloadSpinnerMovie->stop(); + } + } + + void GemCatalogHeaderWidget::GemCartShown(bool state) + { + m_showGemCart = state; + repaint(); } void GemCatalogHeaderWidget::ReinitForProject() { m_filterLineEdit->setText({}); } + + void GemCatalogHeaderWidget::paintEvent([[maybe_unused]] QPaintEvent* event) + { + // Only show triangle when cart is shown + if (!m_showGemCart) + { + return; + } + + const QPoint buttonPos = m_cartButton->pos(); + const QSize buttonSize = m_cartButton->size(); + + // Draw isosceles triangle with top point touching bottom of cartButton + // Bottom aligned with header bottom and top of right panel + const QPoint topPoint(buttonPos.x() + buttonSize.width() / 2, buttonPos.y() + buttonSize.height()); + const QPoint bottomLeftPoint(topPoint.x() - 20, height()); + const QPoint bottomRightPoint(topPoint.x() + 20, height()); + + QPainterPath trianglePath; + trianglePath.moveTo(topPoint); + trianglePath.lineTo(bottomLeftPoint); + trianglePath.lineTo(bottomRightPoint); + trianglePath.lineTo(topPoint); + + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing, true); + painter.setPen(Qt::NoPen); + painter.fillPath(trianglePath, QBrush(QColor("#555555"))); + } + } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h index f3242d6db7..b749e9831d 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogHeaderWidget.h @@ -14,8 +14,10 @@ #include #include #include -#include #include + +#include +#include #endif QT_FORWARD_DECLARE_CLASS(QPushButton) @@ -24,23 +26,23 @@ QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QHBoxLayout) QT_FORWARD_DECLARE_CLASS(QHideEvent) QT_FORWARD_DECLARE_CLASS(QMoveEvent) +QT_FORWARD_DECLARE_CLASS(QMovie) namespace O3DE::ProjectManager { - class CartOverlayWidget - : public QWidget + class GemCartWidget + : public QScrollArea { Q_OBJECT // AUTOMOC public: - CartOverlayWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent = nullptr); - ~CartOverlayWidget(); + GemCartWidget(GemModel* gemModel, DownloadController* downloadController, QWidget* parent = nullptr); + ~GemCartWidget(); public slots: void GemDownloadAdded(const QString& gemName); void GemDownloadRemoved(const QString& gemName); - void GemDownloadProgress(const QString& gemName, int percentage); - void GemDownloadComplete(const QString& gemName, bool success); + void GemDownloadProgress(const QString& gemName, int bytesDownloaded, int totalBytes); private: QVector GetTagsFromModelIndices(const QVector& gems) const; @@ -68,7 +70,10 @@ namespace O3DE::ProjectManager public: CartButton(GemModel* gemModel, DownloadController* downloadController, QWidget* parent = nullptr); ~CartButton(); - void ShowOverlay(); + void ShowGemCart(); + + signals: + void UpdateGemCart(QWidget* gemCart); private: void mousePressEvent(QMouseEvent* event) override; @@ -78,7 +83,7 @@ namespace O3DE::ProjectManager QHBoxLayout* m_layout = nullptr; QLabel* m_countLabel = nullptr; QPushButton* m_dropDownButton = nullptr; - CartOverlayWidget* m_cartOverlay = nullptr; + GemCartWidget* m_gemCart = nullptr; DownloadController* m_downloadController = nullptr; inline constexpr static int s_iconSize = 24; @@ -96,12 +101,28 @@ namespace O3DE::ProjectManager void ReinitForProject(); + public slots: + void GemDownloadAdded(const QString& gemName); + void GemDownloadRemoved(const QString& gemName); + void GemCartShown(bool state = false); + signals: void AddGem(); void OpenGemsRepo(); + void RefreshGems(); + void UpdateGemCart(QWidget* gemCart); + + protected slots: + void paintEvent(QPaintEvent* event) override; private: AzQtComponents::SearchLineEdit* m_filterLineEdit = nullptr; inline constexpr static int s_height = 60; + DownloadController* m_downloadController = nullptr; + QLabel* m_downloadSpinner = nullptr; + QLabel* m_downloadLabel = nullptr; + QMovie* m_downloadSpinnerMovie = nullptr; + CartButton* m_cartButton = nullptr; + bool m_showGemCart = false; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp index 732f4813a2..1d4f354fb5 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp @@ -8,11 +8,20 @@ #include #include +#include +#include +#include +#include +#include #include #include #include #include +#include +#include #include +#include + #include #include #include @@ -24,6 +33,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -47,8 +57,12 @@ namespace O3DE::ProjectManager vLayout->addWidget(m_headerWidget); connect(m_gemModel, &GemModel::gemStatusChanged, this, &GemCatalogScreen::OnGemStatusChanged); + connect(m_gemModel, &GemModel::dependencyGemStatusChanged, this, &GemCatalogScreen::OnDependencyGemStatusChanged); + connect(m_gemModel->GetSelectionModel(), &QItemSelectionModel::selectionChanged, this, [this]{ ShowInspector(); }); + connect(m_headerWidget, &GemCatalogHeaderWidget::RefreshGems, this, &GemCatalogScreen::Refresh); connect(m_headerWidget, &GemCatalogHeaderWidget::OpenGemsRepo, this, &GemCatalogScreen::HandleOpenGemRepo); connect(m_headerWidget, &GemCatalogHeaderWidget::AddGem, this, &GemCatalogScreen::OnAddGemClicked); + connect(m_headerWidget, &GemCatalogHeaderWidget::UpdateGemCart, this, &GemCatalogScreen::UpdateAndShowGemCart); connect(m_downloadController, &DownloadController::Done, this, &GemCatalogScreen::OnGemDownloadResult); QHBoxLayout* hLayout = new QHBoxLayout(); @@ -56,10 +70,15 @@ namespace O3DE::ProjectManager vLayout->addLayout(hLayout); m_gemListView = new GemListView(m_proxyModel, m_proxyModel->GetSelectionModel(), this); + + m_rightPanelStack = new QStackedWidget(this); + m_rightPanelStack->setFixedWidth(240); + m_gemInspector = new GemInspector(m_gemModel, this); - m_gemInspector->setFixedWidth(240); connect(m_gemInspector, &GemInspector::TagClicked, [=](const Tag& tag) { SelectGem(tag.id); }); + connect(m_gemInspector, &GemInspector::UpdateGem, this, &GemCatalogScreen::UpdateGem); + connect(m_gemInspector, &GemInspector::UninstallGem, this, &GemCatalogScreen::UninstallGem); QWidget* filterWidget = new QWidget(this); filterWidget->setFixedWidth(240); @@ -78,7 +97,9 @@ namespace O3DE::ProjectManager hLayout->addWidget(filterWidget); hLayout->addLayout(middleVLayout); - hLayout->addWidget(m_gemInspector); + + hLayout->addWidget(m_rightPanelStack); + m_rightPanelStack->addWidget(m_gemInspector); m_notificationsView = AZStd::make_unique(this, AZ_CRC("GemCatalogNotificationsView")); m_notificationsView->SetOffset(QPoint(10, 70)); @@ -99,7 +120,7 @@ namespace O3DE::ProjectManager FillModel(projectPath); - m_proxyModel->ResetFilters(); + m_proxyModel->ResetFilters(false); m_proxyModel->sort(/*column=*/0); if (m_filterWidget) @@ -118,9 +139,10 @@ namespace O3DE::ProjectManager // Select the first entry after everything got correctly sized QTimer::singleShot(200, [=]{ - QModelIndex firstModelIndex = m_gemListView->model()->index(0,0); - m_gemListView->selectionModel()->select(firstModelIndex, QItemSelectionModel::ClearAndSelect); - }); + QModelIndex firstModelIndex = m_gemModel->index(0, 0); + QModelIndex proxyIndex = m_proxyModel->mapFromSource(firstModelIndex); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + }); } void GemCatalogScreen::OnAddGemClicked() @@ -180,7 +202,7 @@ namespace O3DE::ProjectManager } // add all the gem repos into the hash - const AZ::Outcome, AZStd::string>& allRepoGemInfosResult = PythonBindingsInterface::Get()->GetAllGemRepoGemsInfos(); + const AZ::Outcome, AZStd::string>& allRepoGemInfosResult = PythonBindingsInterface::Get()->GetGemInfosForAllRepos(); if (allRepoGemInfosResult.IsSuccess()) { const QVector& allRepoGemInfos = allRepoGemInfosResult.GetValue(); @@ -202,7 +224,7 @@ namespace O3DE::ProjectManager const bool gemFound = gemInfoHash.contains(gemName); if (!gemFound && !m_gemModel->IsAdded(index) && !m_gemModel->IsAddedDependency(index)) { - m_gemModel->removeRow(i); + m_gemModel->RemoveGem(index); } else { @@ -228,8 +250,11 @@ namespace O3DE::ProjectManager m_proxyModel->sort(/*column=*/0); // temporary, until we can refresh filter counts - m_proxyModel->ResetFilters(); + m_proxyModel->ResetFilters(false); m_filterWidget->ResetAllFilters(); + + // Reselect the same selection to proc UI updates + m_proxyModel->GetSelectionModel()->setCurrentIndex(m_proxyModel->GetSelectionModel()->currentIndex(), QItemSelectionModel::Select); } void GemCatalogScreen::OnGemStatusChanged(const QString& gemName, uint32_t numChangedDependencies) @@ -253,24 +278,25 @@ namespace O3DE::ProjectManager notification = GemModel::GetDisplayName(modelIndex); if (numChangedDependencies > 0) { - notification += " " + tr("and") + " "; + notification += tr(" and "); } - if (added && GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::NotDownloaded) + if (added && (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::NotDownloaded) || + (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::DownloadFailed)) { m_downloadController->AddGemDownload(GemModel::GetName(modelIndex)); - GemModel::SetDownloadStatus(*m_proxyModel, m_proxyModel->mapFromSource(modelIndex), GemInfo::DownloadStatus::Downloading); + GemModel::SetDownloadStatus(*m_gemModel, modelIndex, GemInfo::DownloadStatus::Downloading); } } - if (numChangedDependencies == 1 ) + if (numChangedDependencies == 1) { - notification += "1 Gem " + tr("dependency"); + notification += tr("1 Gem dependency"); } else if (numChangedDependencies > 1) { - notification += QString("%1 Gem ").arg(numChangedDependencies) + tr("dependencies"); + notification += tr("%1 Gem %2").arg(QString(numChangedDependencies), tr("dependencies")); } - notification += " " + (added ? tr("activated") : tr("deactivated")); + notification += (added ? tr(" activated") : tr(" deactivated")); AzQtComponents::ToastConfiguration toastConfiguration(AzQtComponents::ToastType::Custom, notification, ""); toastConfiguration.m_customIconImage = ":/gem.svg"; @@ -280,6 +306,18 @@ namespace O3DE::ProjectManager } } + void GemCatalogScreen::OnDependencyGemStatusChanged(const QString& gemName) + { + QModelIndex modelIndex = m_gemModel->FindIndexByNameString(gemName); + bool added = GemModel::IsAddedDependency(modelIndex); + if (added && (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::NotDownloaded) || + (GemModel::GetDownloadStatus(modelIndex) == GemInfo::DownloadStatus::DownloadFailed)) + { + m_downloadController->AddGemDownload(GemModel::GetName(modelIndex)); + GemModel::SetDownloadStatus(*m_gemModel, modelIndex, GemInfo::DownloadStatus::Downloading); + } + } + void GemCatalogScreen::SelectGem(const QString& gemName) { QModelIndex modelIndex = m_gemModel->FindIndexByNameString(gemName); @@ -290,8 +328,108 @@ namespace O3DE::ProjectManager } QModelIndex proxyIndex = m_proxyModel->mapFromSource(modelIndex); - m_proxyModel->GetSelectionModel()->select(proxyIndex, QItemSelectionModel::ClearAndSelect); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); m_gemListView->scrollTo(proxyIndex); + + ShowInspector(); + } + + void GemCatalogScreen::UpdateGem(const QModelIndex& modelIndex) + { + const QString selectedGemName = m_gemModel->GetName(modelIndex); + const QString selectedGemLastUpdate = m_gemModel->GetLastUpdated(modelIndex); + const QString selectedDisplayGemName = m_gemModel->GetDisplayName(modelIndex); + const QString selectedGemRepoUri = m_gemModel->GetRepoUri(modelIndex); + + // Refresh gem repo + if (!selectedGemRepoUri.isEmpty()) + { + AZ::Outcome refreshResult = PythonBindingsInterface::Get()->RefreshGemRepo(selectedGemRepoUri); + if (refreshResult.IsSuccess()) + { + Refresh(); + } + else + { + QMessageBox::critical( + this, tr("Operation failed"), + tr("Failed to refresh gem repository %1
Error:
%2").arg(selectedGemRepoUri, refreshResult.GetError().c_str())); + } + } + // If repo uri isn't specified warn user that repo might not be refreshed + else + { + int result = QMessageBox::warning( + this, tr("Gem Repository Unspecified"), + tr("The repo for %1 is unspecfied. Repository cannot be automatically refreshed. " + "Please ensure this gem's repo is refreshed before attempting to update.") + .arg(selectedDisplayGemName), + QMessageBox::Cancel, QMessageBox::Ok); + + // Allow user to cancel update to manually refresh repo + if (result != QMessageBox::Ok) + { + return; + } + } + + // Check if there is an update avaliable now that repo is refreshed + bool updateAvaliable = PythonBindingsInterface::Get()->IsGemUpdateAvaliable(selectedGemName, selectedGemLastUpdate); + + GemUpdateDialog* confirmUpdateDialog = new GemUpdateDialog(selectedGemName, updateAvaliable, this); + if (confirmUpdateDialog->exec() == QDialog::Accepted) + { + m_downloadController->AddGemDownload(selectedGemName); + } + } + + void GemCatalogScreen::UninstallGem(const QModelIndex& modelIndex) + { + const QString selectedDisplayGemName = m_gemModel->GetDisplayName(modelIndex); + + GemUninstallDialog* confirmUninstallDialog = new GemUninstallDialog(selectedDisplayGemName, this); + if (confirmUninstallDialog->exec() == QDialog::Accepted) + { + const QString selectedGemPath = m_gemModel->GetPath(modelIndex); + + const bool wasAdded = GemModel::WasPreviouslyAdded(modelIndex); + const bool wasAddedDependency = GemModel::WasPreviouslyAddedDependency(modelIndex); + + // Remove gem from gems to be added to update any dependencies + GemModel::SetIsAdded(*m_gemModel, modelIndex, false); + GemModel::DeactivateDependentGems(*m_gemModel, modelIndex); + + // Unregister the gem + auto unregisterResult = PythonBindingsInterface::Get()->UnregisterGem(selectedGemPath); + if (!unregisterResult) + { + QMessageBox::critical(this, tr("Failed to unregister gem"), unregisterResult.GetError().c_str()); + } + else + { + const QString selectedGemName = m_gemModel->GetName(modelIndex); + + // Remove gem from model + m_gemModel->RemoveGem(modelIndex); + + // Delete uninstalled gem directory + if (!ProjectUtils::DeleteProjectFiles(selectedGemPath, /*force*/true)) + { + QMessageBox::critical( + this, tr("Failed to remove gem directory"), tr("Could not delete gem directory at:
%1").arg(selectedGemPath)); + } + + // Show undownloaded remote gem again + Refresh(); + + // Select remote gem + QModelIndex remoteGemIndex = m_gemModel->FindIndexByNameString(selectedGemName); + GemModel::SetWasPreviouslyAdded(*m_gemModel, remoteGemIndex, wasAdded); + GemModel::SetWasPreviouslyAddedDependency(*m_gemModel, remoteGemIndex, wasAddedDependency); + QModelIndex proxyIndex = m_proxyModel->mapFromSource(remoteGemIndex); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + } + } } void GemCatalogScreen::hideEvent(QHideEvent* event) @@ -332,7 +470,7 @@ namespace O3DE::ProjectManager m_gemModel->AddGem(gemInfo); } - const AZ::Outcome, AZStd::string>& allRepoGemInfosResult = PythonBindingsInterface::Get()->GetAllGemRepoGemsInfos(); + const AZ::Outcome, AZStd::string>& allRepoGemInfosResult = PythonBindingsInterface::Get()->GetGemInfosForAllRepos(); if (allRepoGemInfosResult.IsSuccess()) { const QVector& allRepoGemInfos = allRepoGemInfosResult.GetValue(); @@ -388,6 +526,12 @@ namespace O3DE::ProjectManager } } + void GemCatalogScreen::ShowInspector() + { + m_rightPanelStack->setCurrentIndex(RightPanelWidgetOrder::Inspector); + m_headerWidget->GemCartShown(); + } + GemCatalogScreen::EnableDisableGemsResult GemCatalogScreen::EnableDisableGemsForProject(const QString& projectPath) { IPythonBindings* pythonBindings = PythonBindingsInterface::Get(); @@ -420,7 +564,9 @@ namespace O3DE::ProjectManager const QString& gemPath = GemModel::GetPath(modelIndex); // make sure any remote gems we added were downloaded successfully - if (GemModel::GetGemOrigin(modelIndex) == GemInfo::Remote && GemModel::GetDownloadStatus(modelIndex) != GemInfo::Downloaded) + const GemInfo::DownloadStatus status = GemModel::GetDownloadStatus(modelIndex); + if (GemModel::GetGemOrigin(modelIndex) == GemInfo::Remote && + !(status == GemInfo::Downloaded || status == GemInfo::DownloadSuccessful)) { QMessageBox::critical( nullptr, "Cannot add gem that isn't downloaded", @@ -467,12 +613,25 @@ namespace O3DE::ProjectManager emit ChangeScreenRequest(ProjectManagerScreen::GemRepos); } + void GemCatalogScreen::UpdateAndShowGemCart(QWidget* cartWidget) + { + QWidget* previousCart = m_rightPanelStack->widget(RightPanelWidgetOrder::Cart); + if (previousCart) + { + m_rightPanelStack->removeWidget(previousCart); + } + + m_rightPanelStack->insertWidget(RightPanelWidgetOrder::Cart, cartWidget); + m_rightPanelStack->setCurrentIndex(RightPanelWidgetOrder::Cart); + } + void GemCatalogScreen::OnGemDownloadResult(const QString& gemName, bool succeeded) { if (succeeded) { // refresh the information for downloaded gems - const AZ::Outcome, AZStd::string>& allGemInfosResult = PythonBindingsInterface::Get()->GetAllGemInfos(m_projectPath); + const AZ::Outcome, AZStd::string>& allGemInfosResult = + PythonBindingsInterface::Get()->GetAllGemInfos(m_projectPath); if (allGemInfosResult.IsSuccess()) { // we should find the gem name now in all gem infos @@ -480,19 +639,47 @@ namespace O3DE::ProjectManager { if (gemInfo.m_name == gemName) { - QModelIndex index = m_gemModel->FindIndexByNameString(gemName); - if (index.isValid()) + QModelIndex oldIndex = m_gemModel->FindIndexByNameString(gemName); + if (oldIndex.isValid()) { - m_gemModel->setData(index, GemInfo::Downloaded, GemModel::RoleDownloadStatus); - m_gemModel->setData(index, gemInfo.m_path, GemModel::RolePath); - m_gemModel->setData(index, gemInfo.m_path, GemModel::RoleDirectoryLink); + // Check if old gem is selected + bool oldGemSelected = false; + if (m_gemModel->GetSelectionModel()->currentIndex() == oldIndex) + { + oldGemSelected = true; + } + + // Remove old remote gem + m_gemModel->RemoveGem(oldIndex); + + // Add new downloaded version of gem + QModelIndex newIndex = m_gemModel->AddGem(gemInfo); + GemModel::SetDownloadStatus(*m_gemModel, newIndex, GemInfo::DownloadSuccessful); + GemModel::SetIsAdded(*m_gemModel, newIndex, true); + + // Select new version of gem if it was previously selected + if (oldGemSelected) + { + QModelIndex proxyIndex = m_proxyModel->mapFromSource(newIndex); + m_proxyModel->GetSelectionModel()->setCurrentIndex(proxyIndex, QItemSelectionModel::ClearAndSelect); + } } - return; + break; } } } } + else + { + QModelIndex index = m_gemModel->FindIndexByNameString(gemName); + if (index.isValid()) + { + GemModel::SetIsAdded(*m_gemModel, index, false); + GemModel::DeactivateDependentGems(*m_gemModel, index); + GemModel::SetDownloadStatus(*m_gemModel, index, GemInfo::DownloadFailed); + } + } } ProjectManagerScreen GemCatalogScreen::GetScreenEnum() diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h index da6d2efa7b..20b0c27ff8 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h @@ -12,18 +12,24 @@ #include #include #include -#include -#include -#include -#include -#include -#include + #include #include #endif +QT_FORWARD_DECLARE_CLASS(QVBoxLayout) +QT_FORWARD_DECLARE_CLASS(QStackedWidget) + namespace O3DE::ProjectManager { + QT_FORWARD_DECLARE_CLASS(GemCatalogHeaderWidget) + QT_FORWARD_DECLARE_CLASS(GemFilterWidget) + QT_FORWARD_DECLARE_CLASS(GemListView) + QT_FORWARD_DECLARE_CLASS(GemInspector) + QT_FORWARD_DECLARE_CLASS(GemModel) + QT_FORWARD_DECLARE_CLASS(GemSortFilterProxyModel) + QT_FORWARD_DECLARE_CLASS(DownloadController) + class GemCatalogScreen : public ScreenWidget { @@ -47,10 +53,13 @@ namespace O3DE::ProjectManager public slots: void OnGemStatusChanged(const QString& gemName, uint32_t numChangedDependencies); + void OnDependencyGemStatusChanged(const QString& gemName); void OnAddGemClicked(); void SelectGem(const QString& gemName); void OnGemDownloadResult(const QString& gemName, bool succeeded = true); void Refresh(); + void UpdateGem(const QModelIndex& modelIndex); + void UninstallGem(const QModelIndex& modelIndex); protected: void hideEvent(QHideEvent* event) override; @@ -60,14 +69,22 @@ namespace O3DE::ProjectManager private slots: void HandleOpenGemRepo(); - + void UpdateAndShowGemCart(QWidget* cartWidget); + void ShowInspector(); private: + enum RightPanelWidgetOrder + { + Inspector = 0, + Cart + }; + void FillModel(const QString& projectPath); AZStd::unique_ptr m_notificationsView; GemListView* m_gemListView = nullptr; + QStackedWidget* m_rightPanelStack = nullptr; GemInspector* m_gemInspector = nullptr; GemModel* m_gemModel = nullptr; GemCatalogHeaderWidget* m_headerWidget = nullptr; @@ -77,6 +94,6 @@ namespace O3DE::ProjectManager DownloadController* m_downloadController = nullptr; bool m_notificationsEnabled = true; QSet m_gemsToRegisterWithProject; - QString m_projectPath = nullptr; + QString m_projectPath; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h index 12cce5a4ea..5c1bc90c6e 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h @@ -57,7 +57,9 @@ namespace O3DE::ProjectManager UnknownDownloadStatus = -1, NotDownloaded, Downloading, - Downloaded, + DownloadSuccessful, + DownloadFailed, + Downloaded }; static QString GetDownloadStatusString(DownloadStatus status); @@ -85,6 +87,7 @@ namespace O3DE::ProjectManager QString m_licenseLink; QString m_directoryLink; QString m_documentationLink; + QString m_repoUri; QString m_version = "Unknown Version"; QString m_lastUpdatedDate = "Unknown Date"; int m_binarySizeInKB = 0; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp index 1bcfc6ce9d..8bdd1f0f0f 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp @@ -14,6 +14,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -52,10 +53,13 @@ namespace O3DE::ProjectManager Update(selectedIndices[0]); } - void SetLabelElidedText(QLabel* label, QString text) + void SetLabelElidedText(QLabel* label, QString text, int labelWidth = 0) { QFontMetrics nameFontMetrics(label->font()); - int labelWidth = label->width(); + if (!labelWidth) + { + labelWidth = label->width(); + } // Don't elide if the widgets are sized too small (sometimes occurs when loading gem catalog) if (labelWidth > 100) @@ -70,6 +74,8 @@ namespace O3DE::ProjectManager void GemInspector::Update(const QModelIndex& modelIndex) { + m_curModelIndex = modelIndex; + if (!modelIndex.isValid()) { m_mainWidget->hide(); @@ -81,7 +87,8 @@ namespace O3DE::ProjectManager m_summaryLabel->setText(m_model->GetSummary(modelIndex)); m_summaryLabel->adjustSize(); - m_licenseLinkLabel->setText(m_model->GetLicenseText(modelIndex)); + // Manually define remaining space to elide text because spacer would like to take all of the space + SetLabelElidedText(m_licenseLinkLabel, m_model->GetLicenseText(modelIndex), width() - m_licenseLabel->width() - 35); m_licenseLinkLabel->SetUrl(m_model->GetLicenseLink(modelIndex)); m_directoryLinkLabel->SetUrl(m_model->GetDirectoryLink(modelIndex)); @@ -123,6 +130,20 @@ namespace O3DE::ProjectManager const int binarySize = m_model->GetBinarySizeInKB(modelIndex); m_binarySizeLabel->setText(tr("Binary Size: %1").arg(binarySize ? tr("%1 KB").arg(binarySize) : tr("Unknown"))); + // Update and Uninstall buttons + if (m_model->GetGemOrigin(modelIndex) == GemInfo::Remote && + (m_model->GetDownloadStatus(modelIndex) == GemInfo::Downloaded || + m_model->GetDownloadStatus(modelIndex) == GemInfo::DownloadSuccessful)) + { + m_updateGemButton->show(); + m_uninstallGemButton->show(); + } + else + { + m_updateGemButton->hide(); + m_uninstallGemButton->hide(); + } + m_mainWidget->adjustSize(); m_mainWidget->show(); } @@ -158,8 +179,8 @@ namespace O3DE::ProjectManager licenseHLayout->setAlignment(Qt::AlignLeft); m_mainLayout->addLayout(licenseHLayout); - QLabel* licenseLabel = CreateStyledLabel(licenseHLayout, s_baseFontSize, s_headerColor); - licenseLabel->setText(tr("License: ")); + m_licenseLabel = CreateStyledLabel(licenseHLayout, s_baseFontSize, s_headerColor); + m_licenseLabel->setText(tr("License: ")); m_licenseLinkLabel = new LinkLabel("", QUrl(), s_baseFontSize); licenseHLayout->addWidget(m_licenseLinkLabel); @@ -223,7 +244,7 @@ namespace O3DE::ProjectManager // Depending gems m_dependingGems = new GemsSubWidget(); - connect(m_dependingGems, &GemsSubWidget::TagClicked, this, [=](const Tag& tag){ emit TagClicked(tag); }); + connect(m_dependingGems, &GemsSubWidget::TagClicked, this, [this](const Tag& tag){ emit TagClicked(tag); }); m_mainLayout->addWidget(m_dependingGems); m_mainLayout->addSpacing(20); @@ -234,5 +255,20 @@ namespace O3DE::ProjectManager m_versionLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_textColor); m_lastUpdatedLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_textColor); m_binarySizeLabel = CreateStyledLabel(m_mainLayout, s_baseFontSize, s_textColor); + + m_mainLayout->addSpacing(20); + + // Update and Uninstall buttons + m_updateGemButton = new QPushButton(tr("Update Gem")); + m_updateGemButton->setObjectName("gemCatalogUpdateGemButton"); + m_mainLayout->addWidget(m_updateGemButton); + connect(m_updateGemButton, &QPushButton::clicked, this , [this]{ emit UpdateGem(m_curModelIndex); }); + + m_mainLayout->addSpacing(10); + + m_uninstallGemButton = new QPushButton(tr("Uninstall Gem")); + m_uninstallGemButton->setObjectName("gemCatalogUninstallGemButton"); + m_mainLayout->addWidget(m_uninstallGemButton); + connect(m_uninstallGemButton, &QPushButton::clicked, this , [this]{ emit UninstallGem(m_curModelIndex); }); } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h index 9a6ad84dea..1713191623 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h @@ -16,11 +16,12 @@ #include #include -#include #endif QT_FORWARD_DECLARE_CLASS(QVBoxLayout) QT_FORWARD_DECLARE_CLASS(QLabel) +QT_FORWARD_DECLARE_CLASS(QSpacerItem) +QT_FORWARD_DECLARE_CLASS(QPushButton) namespace O3DE::ProjectManager { @@ -45,6 +46,8 @@ namespace O3DE::ProjectManager signals: void TagClicked(const Tag& tag); + void UpdateGem(const QModelIndex& modelIndex); + void UninstallGem(const QModelIndex& modelIndex); private slots: void OnSelectionChanged(const QItemSelection& selected, const QItemSelection& deselected); @@ -55,11 +58,13 @@ namespace O3DE::ProjectManager GemModel* m_model = nullptr; QWidget* m_mainWidget = nullptr; QVBoxLayout* m_mainLayout = nullptr; + QModelIndex m_curModelIndex; // General info (top) section QLabel* m_nameLabel = nullptr; QLabel* m_creatorLabel = nullptr; QLabel* m_summaryLabel = nullptr; + QLabel* m_licenseLabel = nullptr; LinkLabel* m_licenseLinkLabel = nullptr; LinkLabel* m_directoryLinkLabel = nullptr; LinkLabel* m_documentationLinkLabel = nullptr; @@ -77,5 +82,8 @@ namespace O3DE::ProjectManager QLabel* m_versionLabel = nullptr; QLabel* m_lastUpdatedLabel = nullptr; QLabel* m_binarySizeLabel = nullptr; + + QPushButton* m_updateGemButton = nullptr; + QPushButton* m_uninstallGemButton = nullptr; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp index e15c4b3b39..dd94e42fc4 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp @@ -37,6 +37,8 @@ namespace O3DE::ProjectManager SetStatusIcon(m_notDownloadedPixmap, ":/Download.svg"); SetStatusIcon(m_unknownStatusPixmap, ":/X.svg"); + SetStatusIcon(m_downloadSuccessfulPixmap, ":/checkmark.svg"); + SetStatusIcon(m_downloadFailedPixmap, ":/Warning.svg"); m_downloadingMovie = new QMovie(":/in_progress.gif"); } @@ -480,6 +482,14 @@ namespace O3DE::ProjectManager currentFrame = currentFrame.scaled(s_statusIconSize, s_statusIconSize); statusPixmap = ¤tFrame; } + else if (downloadStatus == GemInfo::DownloadStatus::DownloadSuccessful) + { + statusPixmap = &m_downloadSuccessfulPixmap; + } + else if (downloadStatus == GemInfo::DownloadStatus::DownloadFailed) + { + statusPixmap = &m_downloadFailedPixmap; + } else if (downloadStatus == GemInfo::DownloadStatus::NotDownloaded) { statusPixmap = &m_notDownloadedPixmap; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h index c013be0d9e..107de6de15 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h @@ -97,6 +97,8 @@ namespace O3DE::ProjectManager QPixmap m_unknownStatusPixmap; QPixmap m_notDownloadedPixmap; + QPixmap m_downloadSuccessfulPixmap; + QPixmap m_downloadFailedPixmap; QMovie* m_downloadingMovie = nullptr; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp index 88c54de0b3..d163ab9076 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp @@ -26,14 +26,14 @@ namespace O3DE::ProjectManager return m_selectionModel; } - void GemModel::AddGem(const GemInfo& gemInfo) + QModelIndex GemModel::AddGem(const GemInfo& gemInfo) { if (FindIndexByNameString(gemInfo.m_name).isValid()) { // do not add gems with duplicate names // this can happen by mistake or when a gem repo has a gem with the same name as a local gem AZ_TracePrintf("GemModel", "Ignoring duplicate gem: %s", gemInfo.m_name.toUtf8().constData()); - return; + return QModelIndex(); } QStandardItem* item = new QStandardItem(); @@ -61,11 +61,28 @@ namespace O3DE::ProjectManager item->setData(gemInfo.m_downloadStatus, RoleDownloadStatus); item->setData(gemInfo.m_licenseText, RoleLicenseText); item->setData(gemInfo.m_licenseLink, RoleLicenseLink); + item->setData(gemInfo.m_repoUri, RoleRepoUri); appendRow(item); const QModelIndex modelIndex = index(rowCount()-1, 0); m_nameToIndexMap[gemInfo.m_name] = modelIndex; + + return modelIndex; + } + + void GemModel::RemoveGem(const QModelIndex& modelIndex) + { + removeRow(modelIndex.row()); + } + + void GemModel::RemoveGem(const QString& gemName) + { + auto nameFind = m_nameToIndexMap.find(gemName); + if (nameFind != m_nameToIndexMap.end()) + { + removeRow(nameFind->row()); + } } void GemModel::Clear() @@ -255,6 +272,11 @@ namespace O3DE::ProjectManager return modelIndex.data(RoleLicenseLink).toString(); } + QString GemModel::GetRepoUri(const QModelIndex& modelIndex) + { + return modelIndex.data(RoleRepoUri).toString(); + } + GemModel* GemModel::GetSourceModel(QAbstractItemModel* model) { GemSortFilterProxyModel* proxyModel = qobject_cast(model); @@ -335,6 +357,8 @@ namespace O3DE::ProjectManager if (!IsAdded(dependency)) { numChangedDependencies++; + const QString dependencyName = gemModel->GetName(dependency); + gemModel->emit dependencyGemStatusChanged(dependencyName); } } } @@ -359,6 +383,8 @@ namespace O3DE::ProjectManager if (!IsAdded(dependency)) { numChangedDependencies++; + const QString dependencyName = gemModel->GetName(dependency); + gemModel->emit dependencyGemStatusChanged(dependencyName); } } } @@ -369,11 +395,30 @@ namespace O3DE::ProjectManager void GemModel::OnRowsAboutToBeRemoved(const QModelIndex& parent, int first, int last) { + bool selectedRowRemoved = false; for (int i = first; i <= last; ++i) { QModelIndex modelIndex = index(i, 0, parent); const QString& gemName = GetName(modelIndex); m_nameToIndexMap.remove(gemName); + + if (GetSelectionModel()->isRowSelected(i)) + { + selectedRowRemoved = true; + } + } + + // Select a valid row if currently selected row was removed + if (selectedRowRemoved) + { + for (const QModelIndex& index : m_nameToIndexMap) + { + if (index.isValid()) + { + GetSelectionModel()->setCurrentIndex(index, QItemSelectionModel::ClearAndSelect); + break; + } + } } } @@ -438,6 +483,23 @@ namespace O3DE::ProjectManager return previouslyAdded && !added; } + void GemModel::DeactivateDependentGems(QAbstractItemModel& model, const QModelIndex& modelIndex) + { + GemModel* gemModel = GetSourceModel(&model); + AZ_Assert(gemModel, "Failed to obtain GemModel"); + + QVector dependentGems = gemModel->GatherDependentGems(modelIndex); + if (!dependentGems.isEmpty()) + { + // we need to deactivate all gems that depend on this one + for (auto dependentModelIndex : dependentGems) + { + SetIsAdded(model, dependentModelIndex, false); + } + + } + } + void GemModel::SetDownloadStatus(QAbstractItemModel& model, const QModelIndex& modelIndex, GemInfo::DownloadStatus status) { model.setData(modelIndex, status, RoleDownloadStatus); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h index e25a1c7703..cb99581468 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h @@ -51,10 +51,13 @@ namespace O3DE::ProjectManager RoleRequirement, RoleDownloadStatus, RoleLicenseText, - RoleLicenseLink + RoleLicenseLink, + RoleRepoUri }; - void AddGem(const GemInfo& gemInfo); + QModelIndex AddGem(const GemInfo& gemInfo); + void RemoveGem(const QModelIndex& modelIndex); + void RemoveGem(const QString& gemName); void Clear(); void UpdateGemDependencies(); @@ -80,6 +83,7 @@ namespace O3DE::ProjectManager static QString GetRequirement(const QModelIndex& modelIndex); static QString GetLicenseText(const QModelIndex& modelIndex); static QString GetLicenseLink(const QModelIndex& modelIndex); + static QString GetRepoUri(const QModelIndex& modelIndex); static GemModel* GetSourceModel(QAbstractItemModel* model); static const GemModel* GetSourceModel(const QAbstractItemModel* model); @@ -95,6 +99,7 @@ namespace O3DE::ProjectManager static bool NeedsToBeRemoved(const QModelIndex& modelIndex, bool includeDependencies = false); static bool HasRequirement(const QModelIndex& modelIndex); static void UpdateDependencies(QAbstractItemModel& model, const QString& gemName, bool isAdded); + static void DeactivateDependentGems(QAbstractItemModel& model, const QModelIndex& modelIndex); static void SetDownloadStatus(QAbstractItemModel& model, const QModelIndex& modelIndex, GemInfo::DownloadStatus status); bool DoGemsToBeAddedHaveRequirements() const; @@ -109,6 +114,7 @@ namespace O3DE::ProjectManager signals: void gemStatusChanged(const QString& gemName, uint32_t numChangedDependencies); + void dependencyGemStatusChanged(const QString& gemName); protected slots: void OnRowsAboutToBeRemoved(const QModelIndex& parent, int first, int last); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp index 32d0e2fee9..a32492cf1e 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.cpp @@ -204,9 +204,12 @@ namespace O3DE::ProjectManager emit OnInvalidated(); } - void GemSortFilterProxyModel::ResetFilters() + void GemSortFilterProxyModel::ResetFilters(bool clearSearchString) { - m_searchString.clear(); + if (clearSearchString) + { + m_searchString.clear(); + } m_gemSelectedFilter = GemSelected::NoFilter; m_gemActiveFilter = GemActive::NoFilter; m_gemOriginFilter = {}; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h index ab739e62f9..0c58d66ccf 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemSortFilterProxyModel.h @@ -70,7 +70,7 @@ namespace O3DE::ProjectManager void SetFeatures(const QSet& features) { m_featureFilter = features; InvalidateFilter(); } void InvalidateFilter(); - void ResetFilters(); + void ResetFilters(bool clearSearchString = true); signals: void OnInvalidated(); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp new file mode 100644 index 0000000000..1408e29b6d --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.cpp @@ -0,0 +1,60 @@ +/* + * 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 + +#include +#include +#include +#include +#include + +namespace O3DE::ProjectManager +{ + GemUninstallDialog::GemUninstallDialog(const QString& gemName, QWidget* parent) + : QDialog(parent) + { + setWindowTitle(tr("Uninstall Remote Gem")); + setObjectName("GemUninstallDialog"); + setAttribute(Qt::WA_DeleteOnClose); + setModal(true); + + QVBoxLayout* layout = new QVBoxLayout(); + layout->setMargin(30); + layout->setAlignment(Qt::AlignTop); + setLayout(layout); + + // Body + QLabel* subTitleLabel = new QLabel(tr("Are you sure you want to uninstall %1?").arg(gemName)); + subTitleLabel->setObjectName("gemCatalogDialogSubTitle"); + layout->addWidget(subTitleLabel); + + layout->addSpacing(10); + + QLabel* bodyLabel = new QLabel(tr("The Gem and its related files will be uninstalled. This does not affect the Gem's repository. " + "You can reinstall this Gem from the Catalog, but its contents may be subject to change.")); + bodyLabel->setWordWrap(true); + bodyLabel->setFixedSize(QSize(440, 80)); + layout->addWidget(bodyLabel); + + layout->addSpacing(40); + + // Buttons + QDialogButtonBox* dialogButtons = new QDialogButtonBox(); + dialogButtons->setObjectName("footer"); + layout->addWidget(dialogButtons); + + QPushButton* cancelButton = dialogButtons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); + cancelButton->setProperty("secondary", true); + QPushButton* uninstallButton = dialogButtons->addButton(tr("Uninstall Gem"), QDialogButtonBox::ApplyRole); + uninstallButton->setObjectName("gemCatalogUninstallGemButton"); + + connect(cancelButton, &QPushButton::clicked, this, &QDialog::reject); + connect(uninstallButton, &QPushButton::clicked, this, &QDialog::accept); + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.h new file mode 100644 index 0000000000..9e3f4c3f3b --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUninstallDialog.h @@ -0,0 +1,25 @@ +/* + * 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 + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + class GemUninstallDialog + : public QDialog + { + Q_OBJECT // AUTOMOC + public: + explicit GemUninstallDialog(const QString& gemName, QWidget *parent = nullptr); + ~GemUninstallDialog() = default; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp new file mode 100644 index 0000000000..82d205aab5 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.cpp @@ -0,0 +1,64 @@ +/* + * 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 + +#include +#include +#include +#include +#include + +namespace O3DE::ProjectManager +{ + GemUpdateDialog::GemUpdateDialog(const QString& gemName, bool updateAvaliable, QWidget* parent) + : QDialog(parent) + { + setWindowTitle(tr("Update Remote Gem")); + setObjectName("GemUpdateDialog"); + setAttribute(Qt::WA_DeleteOnClose); + setModal(true); + + QVBoxLayout* layout = new QVBoxLayout(); + layout->setMargin(30); + layout->setAlignment(Qt::AlignTop); + setLayout(layout); + + // Body + QLabel* subTitleLabel = new QLabel(tr("%1 to the latest version of %2?").arg( + updateAvaliable ? tr("Update") : tr("Force update"), gemName)); + subTitleLabel->setObjectName("gemCatalogDialogSubTitle"); + layout->addWidget(subTitleLabel); + + layout->addSpacing(10); + + QLabel* bodyLabel = new QLabel(tr("%1The latest version of this Gem may not be compatible with your engine. " + "Updating this Gem will remove any local changes made to this Gem, " + "and may remove old features that are in use.").arg( + updateAvaliable ? "" : tr("No update detected for Gem. " + "This will force a re-download of the gem. "))); + bodyLabel->setWordWrap(true); + bodyLabel->setFixedSize(QSize(440, 80)); + layout->addWidget(bodyLabel); + + layout->addSpacing(40); + + // Buttons + QDialogButtonBox* dialogButtons = new QDialogButtonBox(); + dialogButtons->setObjectName("footer"); + layout->addWidget(dialogButtons); + + QPushButton* cancelButton = dialogButtons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); + cancelButton->setProperty("secondary", true); + QPushButton* updateButton = + dialogButtons->addButton(tr("%1Update Gem").arg(updateAvaliable ? "" : tr("Force ")), QDialogButtonBox::ApplyRole); + + connect(cancelButton, &QPushButton::clicked, this, &QDialog::reject); + connect(updateButton, &QPushButton::clicked, this, &QDialog::accept); + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.h new file mode 100644 index 0000000000..cf34abfb3d --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemUpdateDialog.h @@ -0,0 +1,25 @@ +/* + * 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 + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + class GemUpdateDialog + : public QDialog + { + Q_OBJECT // AUTOMOC + public : + explicit GemUpdateDialog(const QString& gemName, bool updateAvaliable = true, QWidget* parent = nullptr); + ~GemUpdateDialog() = default; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h index f1d1c2a8a2..c22511faad 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInfo.h @@ -37,7 +37,7 @@ namespace O3DE::ProjectManager QString m_additionalInfo = ""; QString m_directoryLink = ""; QString m_repoUri = ""; - QStringList m_includedGemPaths = {}; + QStringList m_includedGemUris = {}; QDateTime m_lastUpdated; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp index f816e86733..24a3e58ea2 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoInspector.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -60,8 +61,10 @@ namespace O3DE::ProjectManager // Repo name and url link m_nameLabel->setText(m_model->GetName(modelIndex)); - m_repoLinkLabel->setText(m_model->GetRepoUri(modelIndex)); - m_repoLinkLabel->SetUrl(m_model->GetRepoUri(modelIndex)); + + const QString repoUri = m_model->GetRepoUri(modelIndex); + m_repoLinkLabel->setText(repoUri); + m_repoLinkLabel->SetUrl(repoUri); // Repo summary m_summaryLabel->setText(m_model->GetSummary(modelIndex)); diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp index 6189b6d8bf..436f84019a 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.cpp @@ -41,7 +41,7 @@ namespace O3DE::ProjectManager item->setData(gemRepoInfo.m_lastUpdated, RoleLastUpdated); item->setData(gemRepoInfo.m_path, RolePath); item->setData(gemRepoInfo.m_additionalInfo, RoleAdditionalInfo); - item->setData(gemRepoInfo.m_includedGemPaths, RoleIncludedGems); + item->setData(gemRepoInfo.m_includedGemUris, RoleIncludedGems); appendRow(item); @@ -98,7 +98,7 @@ namespace O3DE::ProjectManager return modelIndex.data(RolePath).toString(); } - QStringList GemRepoModel::GetIncludedGemPaths(const QModelIndex& modelIndex) + QStringList GemRepoModel::GetIncludedGemUris(const QModelIndex& modelIndex) { return modelIndex.data(RoleIncludedGems).toStringList(); } @@ -118,23 +118,19 @@ namespace O3DE::ProjectManager QVector GemRepoModel::GetIncludedGemInfos(const QModelIndex& modelIndex) { - QVector allGemInfos; - QStringList repoGemPaths = GetIncludedGemPaths(modelIndex); + QString repoUri = GetRepoUri(modelIndex); - for (const QString& gemPath : repoGemPaths) + const AZ::Outcome, AZStd::string>& gemInfosResult = PythonBindingsInterface::Get()->GetGemInfosForRepo(repoUri); + if (gemInfosResult.IsSuccess()) { - AZ::Outcome gemInfoResult = PythonBindingsInterface::Get()->GetGemInfo(gemPath); - if (gemInfoResult.IsSuccess()) - { - allGemInfos.append(gemInfoResult.GetValue()); - } - else - { - QMessageBox::critical(nullptr, tr("Gem Not Found"), tr("Cannot find info for gem %1.").arg(gemPath)); - } + return gemInfosResult.GetValue(); + } + else + { + QMessageBox::critical(nullptr, tr("Gems not found"), tr("Cannot find info for gems from repo %1").arg(GetName(modelIndex))); } - return allGemInfos; + return QVector(); } bool GemRepoModel::IsEnabled(const QModelIndex& modelIndex) diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h index 66fe972a95..68991a0509 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoModel.h @@ -39,7 +39,7 @@ namespace O3DE::ProjectManager static QDateTime GetLastUpdated(const QModelIndex& modelIndex); static QString GetPath(const QModelIndex& modelIndex); - static QStringList GetIncludedGemPaths(const QModelIndex& modelIndex); + static QStringList GetIncludedGemUris(const QModelIndex& modelIndex); static QVector GetIncludedGemTags(const QModelIndex& modelIndex); static QVector GetIncludedGemInfos(const QModelIndex& modelIndex); diff --git a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp index 794635a3e3..f62c30c280 100644 --- a/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemRepo/GemRepoScreen.cpp @@ -75,7 +75,7 @@ namespace O3DE::ProjectManager // Select the first entry after everything got correctly sized QTimer::singleShot(200, [=]{ QModelIndex firstModelIndex = m_gemRepoListView->model()->index(0,0); - m_gemRepoListView->selectionModel()->select(firstModelIndex, QItemSelectionModel::ClearAndSelect); + m_gemRepoListView->selectionModel()->setCurrentIndex(firstModelIndex, QItemSelectionModel::ClearAndSelect); }); } @@ -92,8 +92,9 @@ namespace O3DE::ProjectManager return; } - bool addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); - if (addGemRepoResult) + AZ::Outcome < void, + AZStd::pair> addGemRepoResult = PythonBindingsInterface::Get()->AddGemRepo(repoUri); + if (addGemRepoResult.IsSuccess()) { Reinit(); emit OnRefresh(); @@ -101,8 +102,21 @@ namespace O3DE::ProjectManager else { QString failureMessage = tr("Failed to add gem repo: %1.").arg(repoUri); - QMessageBox::critical(this, tr("Operation failed"), failureMessage); - AZ_Error("Project Manger", false, failureMessage.toUtf8()); + if (!addGemRepoResult.GetError().second.empty()) + { + QMessageBox addRepoError; + addRepoError.setIcon(QMessageBox::Critical); + addRepoError.setWindowTitle(failureMessage); + addRepoError.setText(addGemRepoResult.GetError().first.c_str()); + addRepoError.setDetailedText(addGemRepoResult.GetError().second.c_str()); + addRepoError.exec(); + } + else + { + QMessageBox::critical(this, failureMessage, addGemRepoResult.GetError().first.c_str()); + } + + AZ_Error("Project Manager", false, failureMessage.toUtf8()); } } } diff --git a/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp b/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp index 7981e9d758..ecb125ae4e 100644 --- a/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectBuilderController.cpp @@ -9,12 +9,14 @@ #include #include #include +#include + +#include #include #include #include - namespace O3DE::ProjectManager { ProjectBuilderController::ProjectBuilderController(const ProjectInfo& projectInfo, ProjectButton* projectButton, QWidget* parent) @@ -27,6 +29,15 @@ namespace O3DE::ProjectManager m_worker = new ProjectBuilderWorker(m_projectInfo); m_worker->moveToThread(&m_workerThread); + auto settingsRegistry = AZ::SettingsRegistry::Get(); + if (settingsRegistry) + { + // Remove key here in case Project Manager crashing while building that causes HandleResults to not be called + QString settingsKey = GetProjectBuiltSuccessfullyKey(m_projectInfo.m_projectName); + settingsRegistry->Remove(settingsKey.toStdString().c_str()); + SaveProjectManagerSettings(); + } + connect(&m_workerThread, &QThread::finished, m_worker, &ProjectBuilderWorker::deleteLater); connect(&m_workerThread, &QThread::started, m_worker, &ProjectBuilderWorker::BuildProject); connect(m_worker, &ProjectBuilderWorker::Done, this, &ProjectBuilderController::HandleResults); @@ -80,6 +91,8 @@ namespace O3DE::ProjectManager void ProjectBuilderController::HandleResults(const QString& result) { + QString settingsKey = GetProjectBuiltSuccessfullyKey(m_projectInfo.m_projectName); + if (!result.isEmpty()) { if (result.contains(tr("log"))) @@ -109,12 +122,26 @@ namespace O3DE::ProjectManager emit NotifyBuildProject(m_projectInfo); } + auto settingsRegistry = AZ::SettingsRegistry::Get(); + if (settingsRegistry) + { + settingsRegistry->Remove(settingsKey.toStdString().c_str()); + SaveProjectManagerSettings(); + } + emit Done(false); return; } else { m_projectInfo.m_buildFailed = false; + + auto settingsRegistry = AZ::SettingsRegistry::Get(); + if (settingsRegistry) + { + settingsRegistry->Set(settingsKey.toStdString().c_str(), true); + SaveProjectManagerSettings(); + } } emit Done(true); diff --git a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp index c425c344e1..2f4fe901bb 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp @@ -8,7 +8,11 @@ #include #include +#include +#include #include +#include +#include #include #include @@ -23,6 +27,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -198,6 +203,7 @@ namespace O3DE::ProjectManager QMenu* menu = new QMenu(this); menu->addAction(tr("Edit Project Settings..."), this, [this]() { emit EditProject(m_projectInfo.m_path); }); + menu->addAction(tr("Configure Gems..."), this, [this]() { emit EditProjectGems(m_projectInfo.m_path); }); menu->addAction(tr("Build"), this, [this]() { emit BuildProject(m_projectInfo); }); menu->addAction(tr("Open CMake GUI..."), this, [this]() { emit OpenCMakeGUI(m_projectInfo); }); menu->addSeparator(); @@ -205,6 +211,29 @@ namespace O3DE::ProjectManager { AzQtComponents::ShowFileOnDesktop(m_projectInfo.m_path); }); + +#if AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT + menu->addAction(tr("Create Editor desktop shortcut..."), this, [this]() + { + AZ::IO::FixedMaxPath executableDirectory = ProjectUtils::GetEditorDirectory(); + AZStd::string executableFilename = "Editor"; + AZ::IO::FixedMaxPath editorExecutablePath = executableDirectory / (executableFilename + AZ_TRAIT_OS_EXECUTABLE_EXTENSION); + + const QString shortcutName = QString("%1 Editor").arg(m_projectInfo.m_displayName); + const QString arg = QString("--regset=\"/Amazon/AzCore/Bootstrap/project_path=%1\"").arg(m_projectInfo.m_path); + + auto result = ProjectUtils::CreateDesktopShortcut(shortcutName, editorExecutablePath.c_str(), { arg }); + if(result.IsSuccess()) + { + QMessageBox::information(this, tr("Desktop Shortcut Created"), result.GetValue()); + } + else + { + QMessageBox::critical(this, tr("Failed to create shortcut"), result.GetError()); + } + }); +#endif // AZ_TRAIT_PROJECT_MANAGER_CREATE_DESKTOP_SHORTCUT + menu->addSeparator(); menu->addAction(tr("Duplicate"), this, [this]() { emit CopyProject(m_projectInfo); }); menu->addSeparator(); diff --git a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h index 5e81dfc2d9..ccb644c458 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.h @@ -95,6 +95,7 @@ namespace O3DE::ProjectManager signals: void OpenProject(const QString& projectName); void EditProject(const QString& projectName); + void EditProjectGems(const QString& projectName); void CopyProject(const ProjectInfo& projectInfo); void RemoveProject(const QString& projectName); void DeleteProject(const QString& projectName); diff --git a/Code/Tools/ProjectManager/Source/ProjectManagerSettings.cpp b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.cpp new file mode 100644 index 0000000000..3049a6d70c --- /dev/null +++ b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.cpp @@ -0,0 +1,54 @@ +/* + * 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 "ProjectManagerSettings.h" + +#include +#include +#include + +namespace O3DE::ProjectManager +{ + void SaveProjectManagerSettings() + { + auto settingsRegistry = AZ::SettingsRegistry::Get(); + AZ::SettingsRegistryMergeUtils::DumperSettings dumperSettings; + dumperSettings.m_prettifyOutput = true; + dumperSettings.m_jsonPointerPrefix = ProjectManagerKeyPrefix; + + AZStd::string stringBuffer; + AZ::IO::ByteContainerStream stringStream(&stringBuffer); + if (!AZ::SettingsRegistryMergeUtils::DumpSettingsRegistryToStream( + *settingsRegistry, ProjectManagerKeyPrefix, stringStream, dumperSettings)) + { + AZ_Warning("ProjectManager", false, "Could not save Project Manager settings to stream"); + return; + } + + AZ::IO::FixedMaxPath o3deUserPath = AZ::Utils::GetO3deManifestDirectory(); + o3deUserPath /= AZ::SettingsRegistryInterface::RegistryFolder; + o3deUserPath /= "ProjectManager.setreg"; + + bool saved = false; + constexpr auto configurationMode = + AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY; + + AZ::IO::SystemFile outputFile; + if (outputFile.Open(o3deUserPath.c_str(), configurationMode)) + { + saved = outputFile.Write(stringBuffer.data(), stringBuffer.size()) == stringBuffer.size(); + } + + AZ_Warning("ProjectManager", saved, "Unable to save Project Manager registry file to path: %s", o3deUserPath.c_str()); + } + + QString GetProjectBuiltSuccessfullyKey(const QString& projectName) + { + return QString("%1/Projects/%2/BuiltSuccessfully").arg(ProjectManagerKeyPrefix).arg(projectName); + } +} diff --git a/Code/Tools/ProjectManager/Source/ProjectManagerSettings.h b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.h new file mode 100644 index 0000000000..3454909062 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/ProjectManagerSettings.h @@ -0,0 +1,21 @@ +/* + * 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 + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + static constexpr char ProjectManagerKeyPrefix[] = "/O3DE/ProjectManager"; + + void SaveProjectManagerSettings(); + QString GetProjectBuiltSuccessfullyKey(const QString& projectName); +} diff --git a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp index 88ae3d6319..d4ac43d655 100644 --- a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp @@ -19,6 +19,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -33,11 +34,23 @@ namespace O3DE::ProjectManager // if we don't set this in a frame (just use a sub-layout) all the content will align incorrectly horizontally QFrame* projectSettingsFrame = new QFrame(this); projectSettingsFrame->setObjectName("projectSettings"); - m_verticalLayout = new QVBoxLayout(); - // you cannot remove content margins in qss - m_verticalLayout->setContentsMargins(0, 0, 0, 0); + QVBoxLayout* vLayout = new QVBoxLayout(); + vLayout->setMargin(0); + vLayout->setAlignment(Qt::AlignTop); + projectSettingsFrame->setLayout(vLayout); + + QScrollArea* scrollArea = new QScrollArea(this); + scrollArea->setWidgetResizable(true); + vLayout->addWidget(scrollArea); + + QWidget* scrollWidget = new QWidget(this); + scrollArea->setWidget(scrollWidget); + + m_verticalLayout = new QVBoxLayout(); + m_verticalLayout->setMargin(0); m_verticalLayout->setAlignment(Qt::AlignTop); + scrollWidget->setLayout(m_verticalLayout); m_projectName = new FormLineEditWidget(tr("Project name"), "", this); connect(m_projectName->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::OnProjectNameUpdated); diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp index bb2bcd070e..4a0e1c153c 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp @@ -628,11 +628,11 @@ namespace O3DE::ProjectManager return AZ::Failure(QObject::tr("Process for command '%1' timed out at %2 seconds").arg(cmd).arg(commandTimeoutSeconds)); } int resultCode = execProcess.exitCode(); + QString resultOutput = execProcess.readAllStandardOutput(); if (resultCode != 0) { - return AZ::Failure(QObject::tr("Process for command '%1' failed (result code %2").arg(cmd).arg(resultCode)); + return AZ::Failure(QObject::tr("Process for command '%1' failed (result code %2) %3").arg(cmd).arg(resultCode).arg(resultOutput)); } - QString resultOutput = execProcess.readAllStandardOutput(); return AZ::Success(resultOutput); } diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.h b/Code/Tools/ProjectManager/Source/ProjectUtils.h index 890d50d2de..ee605b5117 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.h +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.h @@ -68,6 +68,15 @@ namespace O3DE::ProjectManager AZ::Outcome GetProjectBuildPath(const QString& projectPath); AZ::Outcome OpenCMakeGUI(const QString& projectPath); AZ::Outcome RunGetPythonScript(const QString& enginePath); + + /** + * Create a desktop shortcut. + * @param filename the name of the desktop shorcut file + * @param target the path to the target to run + * @param arguments the argument list to provide to the target + * @return AZ::Outcome with the command result on success + */ + AZ::Outcome CreateDesktopShortcut(const QString& filename, const QString& targetPath, const QStringList& arguments); AZ::IO::FixedMaxPath GetEditorDirectory(); diff --git a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp index f86a689e59..4a82783949 100644 --- a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -22,6 +23,7 @@ #include #include #include +#include #include #include @@ -181,6 +183,7 @@ namespace O3DE::ProjectManager connect(projectButton, &ProjectButton::OpenProject, this, &ProjectsScreen::HandleOpenProject); connect(projectButton, &ProjectButton::EditProject, this, &ProjectsScreen::HandleEditProject); + connect(projectButton, &ProjectButton::EditProjectGems, this, &ProjectsScreen::HandleEditProjectGems); connect(projectButton, &ProjectButton::CopyProject, this, &ProjectsScreen::HandleCopyProject); connect(projectButton, &ProjectButton::RemoveProject, this, &ProjectsScreen::HandleRemoveProject); connect(projectButton, &ProjectButton::DeleteProject, this, &ProjectsScreen::HandleDeleteProject); @@ -269,17 +272,36 @@ namespace O3DE::ProjectManager // Add any missing project buttons and restore buttons to default state for (const ProjectInfo& project : projectsVector) { + ProjectButton* currentButton = nullptr; if (!m_projectButtons.contains(QDir::toNativeSeparators(project.m_path))) { - m_projectButtons.insert(QDir::toNativeSeparators(project.m_path), CreateProjectButton(project)); + currentButton = CreateProjectButton(project); + m_projectButtons.insert(QDir::toNativeSeparators(project.m_path), currentButton); } else { auto projectButtonIter = m_projectButtons.find(QDir::toNativeSeparators(project.m_path)); if (projectButtonIter != m_projectButtons.end()) { - projectButtonIter.value()->RestoreDefaultState(); - m_projectsFlowLayout->addWidget(projectButtonIter.value()); + currentButton = projectButtonIter.value(); + currentButton->RestoreDefaultState(); + m_projectsFlowLayout->addWidget(currentButton); + } + } + + // Check whether project manager has successfully built the project + if (currentButton) + { + auto settingsRegistry = AZ::SettingsRegistry::Get(); + bool projectBuiltSuccessfully = false; + if (settingsRegistry) + { + QString settingsKey = GetProjectBuiltSuccessfullyKey(project.m_projectName); + settingsRegistry->Get(projectBuiltSuccessfully, settingsKey.toStdString().c_str()); + } + if (!projectBuiltSuccessfully) + { + currentButton->ShowBuildRequired(); } } } @@ -448,6 +470,14 @@ namespace O3DE::ProjectManager emit ChangeScreenRequest(ProjectManagerScreen::UpdateProject); } } + void ProjectsScreen::HandleEditProjectGems(const QString& projectPath) + { + if (!WarnIfInBuildQueue(projectPath)) + { + emit NotifyCurrentProject(projectPath); + emit ChangeScreenRequest(ProjectManagerScreen::GemCatalog); + } + } void ProjectsScreen::HandleCopyProject(const ProjectInfo& projectInfo) { if (!WarnIfInBuildQueue(projectInfo.m_path)) diff --git a/Code/Tools/ProjectManager/Source/ProjectsScreen.h b/Code/Tools/ProjectManager/Source/ProjectsScreen.h index 859f8d0eae..c690621fb6 100644 --- a/Code/Tools/ProjectManager/Source/ProjectsScreen.h +++ b/Code/Tools/ProjectManager/Source/ProjectsScreen.h @@ -46,6 +46,7 @@ namespace O3DE::ProjectManager void HandleAddProjectButton(); void HandleOpenProject(const QString& projectPath); void HandleEditProject(const QString& projectPath); + void HandleEditProjectGems(const QString& projectPath); void HandleCopyProject(const ProjectInfo& projectInfo); void HandleRemoveProject(const QString& projectPath); void HandleDeleteProject(const QString& projectPath); diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 021066e1c7..12f97e6d2e 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -210,6 +211,16 @@ namespace RedirectOutput }); SetRedirection("stderr", g_redirect_stderr_saved, g_redirect_stderr, []([[maybe_unused]] const char* msg) { + AZStd::string lastPythonError = msg; + constexpr const char* pythonErrorPrefix = "ERROR:root:"; + constexpr size_t lengthOfErrorPrefix = AZStd::char_traits::length(pythonErrorPrefix); + auto errorPrefix = lastPythonError.find(pythonErrorPrefix); + if (errorPrefix != AZStd::string::npos) + { + lastPythonError.erase(errorPrefix, lengthOfErrorPrefix); + } + O3DE::ProjectManager::PythonBindingsInterface::Get()->AddErrorString(lastPythonError); + AZ_TracePrintf("Python", msg); }); @@ -376,6 +387,8 @@ namespace O3DE::ProjectManager pybind11::gil_scoped_release release; pybind11::gil_scoped_acquire acquire; + ClearErrorStrings(); + try { executionCallback(); @@ -515,7 +528,11 @@ namespace O3DE::ProjectManager auto pyProjectPath = QString_To_Py_Path(projectPath); for (auto path : m_manifest.attr("get_all_gems")(pyProjectPath)) { - gems.push_back(GemInfoFromPath(path, pyProjectPath)); + GemInfo gemInfo = GemInfoFromPath(path, pyProjectPath); + // Mark as downloaded because this gem was registered with an existing directory + gemInfo.m_downloadStatus = GemInfo::DownloadStatus::Downloaded; + + gems.push_back(AZStd::move(gemInfo)); } }); if (!result.IsSuccess()) @@ -560,7 +577,7 @@ namespace O3DE::ProjectManager return AZ::Success(AZStd::move(gemNames)); } - AZ::Outcome PythonBindings::RegisterGem(const QString& gemPath, const QString& projectPath) + AZ::Outcome PythonBindings::GemRegistration(const QString& gemPath, const QString& projectPath, bool remove) { bool registrationResult = false; auto result = ExecuteWithLockErrorHandling( @@ -582,7 +599,8 @@ namespace O3DE::ProjectManager pybind11::none(), // default_restricted_folder pybind11::none(), // default_third_party_folder pybind11::none(), // external_subdir_engine_path - externalProjectPath // external_subdir_project_path + externalProjectPath, // external_subdir_project_path + remove // remove ); // Returns an exit code so boolify it then invert result @@ -595,12 +613,23 @@ namespace O3DE::ProjectManager } else if (!registrationResult) { - return AZ::Failure(AZStd::string::format("Failed to register gem path %s", gemPath.toUtf8().constData())); + return AZ::Failure(AZStd::string::format( + "Failed to %s gem path %s", remove ? "unregister" : "register", gemPath.toUtf8().constData())); } return AZ::Success(); } + AZ::Outcome PythonBindings::RegisterGem(const QString& gemPath, const QString& projectPath) + { + return GemRegistration(gemPath, projectPath); + } + + AZ::Outcome PythonBindings::UnregisterGem(const QString& gemPath, const QString& projectPath) + { + return GemRegistration(gemPath, projectPath, /*remove*/true); + } + bool PythonBindings::AddProject(const QString& path) { bool registrationResult = false; @@ -715,6 +744,7 @@ namespace O3DE::ProjectManager gemInfo.m_documentationLink = Py_To_String_Optional(data, "documentation_url", ""); gemInfo.m_licenseText = Py_To_String_Optional(data, "license", "Unspecified License"); gemInfo.m_licenseLink = Py_To_String_Optional(data, "license_url", ""); + gemInfo.m_repoUri = Py_To_String_Optional(data, "repo_uri", ""); if (gemInfo.m_creator.contains("Open 3D Engine")) { @@ -728,6 +758,11 @@ namespace O3DE::ProjectManager { gemInfo.m_gemOrigin = GemInfo::GemOrigin::Remote; } + // If no origin was provided this cannot be remote and would be specified if O3DE so it should be local + else + { + gemInfo.m_gemOrigin = GemInfo::GemOrigin::Local; + } // As long Base Open3DEngine gems are installed before first startup non-remote gems will be downloaded if (gemInfo.m_gemOrigin != GemInfo::GemOrigin::Remote) @@ -1029,7 +1064,7 @@ namespace O3DE::ProjectManager return result && refreshResult; } - bool PythonBindings::AddGemRepo(const QString& repoUri) + AZ::Outcome> PythonBindings::AddGemRepo(const QString& repoUri) { bool registrationResult = false; bool result = ExecuteWithLock( @@ -1043,7 +1078,12 @@ namespace O3DE::ProjectManager registrationResult = !pythonRegistrationResult.cast(); }); - return result && registrationResult; + if (!result || !registrationResult) + { + return AZ::Failure>(GetSimpleDetailedErrorPair()); + } + + return AZ::Success(); } bool PythonBindings::RemoveGemRepo(const QString& repoUri) @@ -1113,11 +1153,11 @@ namespace O3DE::ProjectManager gemRepoInfo.m_isEnabled = false; } - if (data.contains("gem_paths")) + if (data.contains("gems")) { - for (auto gemPath : data["gem_paths"]) + for (auto gemPath : data["gems"]) { - gemRepoInfo.m_includedGemPaths.push_back(Py_To_String(gemPath)); + gemRepoInfo.m_includedGemUris.push_back(Py_To_String(gemPath)); } } } @@ -1166,7 +1206,63 @@ namespace O3DE::ProjectManager return AZ::Success(AZStd::move(gemRepos)); } - AZ::Outcome PythonBindings::DownloadGem(const QString& gemName, std::function gemProgressCallback) + AZ::Outcome, AZStd::string> PythonBindings::GetGemInfosForRepo(const QString& repoUri) + { + QVector gemInfos; + AZ::Outcome result = ExecuteWithLockErrorHandling( + [&] + { + auto pyUri = QString_To_Py_String(repoUri); + auto gemPaths = m_repo.attr("get_gem_json_paths_from_cached_repo")(pyUri); + + if (pybind11::isinstance(gemPaths)) + { + for (auto path : gemPaths) + { + GemInfo gemInfo = GemInfoFromPath(path, pybind11::none()); + gemInfo.m_downloadStatus = GemInfo::DownloadStatus::NotDownloaded; + gemInfos.push_back(gemInfo); + } + } + }); + + if (!result.IsSuccess()) + { + return AZ::Failure(result.GetError()); + } + + return AZ::Success(AZStd::move(gemInfos)); + } + + AZ::Outcome, AZStd::string> PythonBindings::GetGemInfosForAllRepos() + { + QVector gemInfos; + AZ::Outcome result = ExecuteWithLockErrorHandling( + [&] + { + auto gemPaths = m_repo.attr("get_gem_json_paths_from_all_cached_repos")(); + + if (pybind11::isinstance(gemPaths)) + { + for (auto path : gemPaths) + { + GemInfo gemInfo = GemInfoFromPath(path, pybind11::none()); + gemInfo.m_downloadStatus = GemInfo::DownloadStatus::NotDownloaded; + gemInfos.push_back(gemInfo); + } + } + }); + + if (!result.IsSuccess()) + { + return AZ::Failure(result.GetError()); + } + + return AZ::Success(AZStd::move(gemInfos)); + } + + AZ::Outcome> PythonBindings::DownloadGem( + const QString& gemName, std::function gemProgressCallback, bool force) { // This process is currently limited to download a single gem at a time. bool downloadSucceeded = false; @@ -1179,11 +1275,11 @@ namespace O3DE::ProjectManager QString_To_Py_String(gemName), // gem name pybind11::none(), // destination path false, // skip auto register - false, // force + force, // force overwrite pybind11::cpp_function( - [this, gemProgressCallback](int progress) + [this, gemProgressCallback](int bytesDownloaded, int totalBytes) { - gemProgressCallback(progress); + gemProgressCallback(bytesDownloaded, totalBytes); return m_requestCancelDownload; }) // Callback for download progress and cancelling @@ -1194,11 +1290,12 @@ namespace O3DE::ProjectManager if (!result.IsSuccess()) { - return result; + AZStd::pair pythonRunError(result.GetError(), result.GetError()); + return AZ::Failure>(AZStd::move(pythonRunError)); } else if (!downloadSucceeded) { - return AZ::Failure("Failed to download gem."); + return AZ::Failure>(GetSimpleDetailedErrorPair()); } return AZ::Success(); @@ -1209,30 +1306,38 @@ namespace O3DE::ProjectManager m_requestCancelDownload = true; } - AZ::Outcome, AZStd::string> PythonBindings::GetAllGemRepoGemsInfos() + bool PythonBindings::IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) { - QVector gemInfos; - AZ::Outcome result = ExecuteWithLockErrorHandling( + bool updateAvaliableResult = false; + bool result = ExecuteWithLock( [&] { - auto gemPaths = m_repo.attr("get_gem_json_paths_from_all_cached_repos")(); + auto pyGemName = QString_To_Py_String(gemName); + auto pyLastUpdated = QString_To_Py_String(lastUpdated); + auto pythonUpdateAvaliableResult = m_download.attr("is_o3de_gem_update_available")(pyGemName, pyLastUpdated); - if (pybind11::isinstance(gemPaths)) - { - for (auto path : gemPaths) - { - GemInfo gemInfo = GemInfoFromPath(path, pybind11::none()); - gemInfo.m_downloadStatus = GemInfo::DownloadStatus::NotDownloaded; - gemInfos.push_back(gemInfo); - } - } + updateAvaliableResult = pythonUpdateAvaliableResult.cast(); }); - if (!result.IsSuccess()) - { - return AZ::Failure(result.GetError()); - } + return result && updateAvaliableResult; + } - return AZ::Success(AZStd::move(gemInfos)); + AZStd::pair PythonBindings::GetSimpleDetailedErrorPair() + { + AZStd::string detailedString = m_pythonErrorStrings.size() == 1 + ? "" + : AZStd::accumulate(m_pythonErrorStrings.begin(), m_pythonErrorStrings.end(), AZStd::string("")); + + return AZStd::pair(m_pythonErrorStrings.front(), detailedString); + } + + void PythonBindings::AddErrorString(AZStd::string errorString) + { + m_pythonErrorStrings.push_back(errorString); + } + + void PythonBindings::ClearErrorStrings() + { + m_pythonErrorStrings.clear(); } } diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.h b/Code/Tools/ProjectManager/Source/PythonBindings.h index 4375d56d02..48841b6565 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.h +++ b/Code/Tools/ProjectManager/Source/PythonBindings.h @@ -43,6 +43,7 @@ namespace O3DE::ProjectManager AZ::Outcome, AZStd::string> GetAllGemInfos(const QString& projectPath) override; AZ::Outcome, AZStd::string> GetEnabledGemNames(const QString& projectPath) override; AZ::Outcome RegisterGem(const QString& gemPath, const QString& projectPath = {}) override; + AZ::Outcome UnregisterGem(const QString& gemPath, const QString& projectPath = {}) override; // Project AZ::Outcome CreateProject(const QString& projectTemplatePath, const ProjectInfo& projectInfo) override; @@ -61,12 +62,18 @@ namespace O3DE::ProjectManager // Gem Repos AZ::Outcome RefreshGemRepo(const QString& repoUri) override; bool RefreshAllGemRepos() override; - bool AddGemRepo(const QString& repoUri) override; + AZ::Outcome> AddGemRepo(const QString& repoUri) override; bool RemoveGemRepo(const QString& repoUri) override; AZ::Outcome, AZStd::string> GetAllGemRepoInfos() override; - AZ::Outcome DownloadGem(const QString& gemName, std::function gemProgressCallback) override; + AZ::Outcome, AZStd::string> GetGemInfosForRepo(const QString& repoUri) override; + AZ::Outcome, AZStd::string> GetGemInfosForAllRepos() override; + AZ::Outcome> DownloadGem( + const QString& gemName, std::function gemProgressCallback, bool force = false) override; void CancelDownload() override; - AZ::Outcome, AZStd::string> GetAllGemRepoGemsInfos() override; + bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) override; + + void AddErrorString(AZStd::string errorString) override; + void ClearErrorStrings() override; private: AZ_DISABLE_COPY_MOVE(PythonBindings); @@ -77,8 +84,10 @@ namespace O3DE::ProjectManager GemRepoInfo GetGemRepoInfo(pybind11::handle repoUri); ProjectInfo ProjectInfoFromPath(pybind11::handle path); ProjectTemplateInfo ProjectTemplateInfoFromPath(pybind11::handle path, pybind11::handle pyProjectPath); + AZ::Outcome GemRegistration(const QString& gemPath, const QString& projectPath, bool remove = false); bool RegisterThisEngine(); bool StopPython(); + AZStd::pair GetSimpleDetailedErrorPair(); bool m_pythonStarted = false; @@ -98,5 +107,6 @@ namespace O3DE::ProjectManager pybind11::handle m_pathlib; bool m_requestCancelDownload = false; + AZStd::vector m_pythonErrorStrings; }; } diff --git a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h index 1134804f1f..c7c8af2ce1 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h +++ b/Code/Tools/ProjectManager/Source/PythonBindingsInterface.h @@ -94,11 +94,19 @@ namespace O3DE::ProjectManager /** * Registers the gem to the specified project, or to the o3de_manifest.json if no project path is given * @param gemPath the path to the gem - * @param projectPath the path to the project. If empty, will register the external path in o3de_manifest.json + * @param projectPath the path to the project. If empty, will register the external path in o3de_manifest.json * @return An outcome with the success flag as well as an error message in case of a failure. */ virtual AZ::Outcome RegisterGem(const QString& gemPath, const QString& projectPath = {}) = 0; + /** + * Unregisters the gem from the specified project, or from the o3de_manifest.json if no project path is given + * @param gemPath the path to the gem + * @param projectPath the path to the project. If empty, will unregister the external path in o3de_manifest.json + * @return An outcome with the success flag as well as an error message in case of a failure. + */ + virtual AZ::Outcome UnregisterGem(const QString& gemPath, const QString& projectPath = {}) = 0; + // Projects @@ -192,9 +200,9 @@ namespace O3DE::ProjectManager /** * Registers this gem repo with the current engine. * @param repoUri the absolute filesystem path or url to the gem repo. - * @return true on success, false on failure. + * @return an outcome with a pair of string error and detailed messages on failure. */ - virtual bool AddGemRepo(const QString& repoUri) = 0; + virtual AZ::Outcome> AddGemRepo(const QString& repoUri) = 0; /** * Unregisters this gem repo with the current engine. @@ -209,24 +217,52 @@ namespace O3DE::ProjectManager */ virtual AZ::Outcome, AZStd::string> GetAllGemRepoInfos() = 0; + /** + * Gathers all gem infos from the provided repo + * @param repoUri the absolute filesystem path or url to the gem repo. + * @return A list of gem infos. + */ + virtual AZ::Outcome, AZStd::string> GetGemInfosForRepo(const QString& repoUri) = 0; + + /** + * Gathers all gem infos for all gems registered from repos. + * @return A list of gem infos. + */ + virtual AZ::Outcome, AZStd::string> GetGemInfosForAllRepos() = 0; + /** * Downloads and registers a Gem. - * @param gemName the name of the Gem to download - * @param gemProgressCallback a callback function that is called with an int percentage download value - * @return an outcome with a string error message on failure. + * @param gemName the name of the Gem to download. + * @param gemProgressCallback a callback function that is called with an int percentage download value. + * @param force should we forcibly overwrite the old version of the gem. + * @return an outcome with a pair of string error and detailed messages on failure. */ - virtual AZ::Outcome DownloadGem(const QString& gemName, std::function gemProgressCallback) = 0; + virtual AZ::Outcome> DownloadGem( + const QString& gemName, std::function gemProgressCallback, bool force = false) = 0; /** - * Cancels the current download. - */ + * Cancels the current download. + */ virtual void CancelDownload() = 0; /** - * Gathers all gem infos for all gems registered from repos. - * @return A list of gem infos. + * Checks if there is an update avaliable for a gem on a repo. + * @param gemName the name of the gem to check. + * @param lastUpdated last time the gem was update. + * @return true if update is avaliable, false if not. + */ + virtual bool IsGemUpdateAvaliable(const QString& gemName, const QString& lastUpdated) = 0; + + /** + * Add an error string to be returned when the current python call is complete. + * @param The error string to be displayed. + */ + virtual void AddErrorString(AZStd::string errorString) = 0; + + /** + * Clears the current list of error strings. */ - virtual AZ::Outcome, AZStd::string> GetAllGemRepoGemsInfos() = 0; + virtual void ClearErrorStrings() = 0; }; using PythonBindingsInterface = AZ::Interface; diff --git a/Code/Tools/ProjectManager/Source/ScreenWidget.h b/Code/Tools/ProjectManager/Source/ScreenWidget.h index 148dcdb8c8..a84fb0be80 100644 --- a/Code/Tools/ProjectManager/Source/ScreenWidget.h +++ b/Code/Tools/ProjectManager/Source/ScreenWidget.h @@ -47,9 +47,9 @@ namespace O3DE::ProjectManager return tr("Missing"); } - virtual bool ContainsScreen([[maybe_unused]] ProjectManagerScreen screen) + virtual bool ContainsScreen(ProjectManagerScreen screen) { - return false; + return GetScreenEnum() == screen; } virtual void GoToScreen([[maybe_unused]] ProjectManagerScreen screen) { @@ -58,7 +58,6 @@ namespace O3DE::ProjectManager //! Notify this screen it is the current screen virtual void NotifyCurrentScreen() { - } signals: diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp index fb16484961..36d78ed2ac 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp @@ -15,6 +15,9 @@ #include #include #include +#include +#include +#include #include #include @@ -94,6 +97,17 @@ namespace O3DE::ProjectManager return ProjectManagerScreen::UpdateProject; } + bool UpdateProjectCtrl::ContainsScreen(ProjectManagerScreen screen) + { + // Do not include GemRepos because we don't want to advertise jumping to it from all other screens here + return screen == GetScreenEnum() || screen == ProjectManagerScreen::GemCatalog; + } + + void UpdateProjectCtrl::GoToScreen(ProjectManagerScreen screen) + { + OnChangeScreenRequest(screen); + } + // Called when pressing "Edit Project Settings..." void UpdateProjectCtrl::NotifyCurrentScreen() { @@ -114,6 +128,16 @@ namespace O3DE::ProjectManager m_stack->setCurrentWidget(m_gemRepoScreen); Update(); } + else if (screen == ProjectManagerScreen::GemCatalog) + { + m_stack->setCurrentWidget(m_gemCatalogScreen); + Update(); + } + else if (screen == ProjectManagerScreen::UpdateProjectSettings) + { + m_stack->setCurrentWidget(m_updateSettingsScreen); + Update(); + } else { emit ChangeScreenRequest(screen); @@ -280,6 +304,21 @@ namespace O3DE::ProjectManager } } + if (newProjectSettings.m_projectName != m_projectInfo.m_projectName) + { + // update reg key + QString oldSettingsKey = GetProjectBuiltSuccessfullyKey(m_projectInfo.m_projectName); + QString newSettingsKey = GetProjectBuiltSuccessfullyKey(newProjectSettings.m_projectName); + + auto settingsRegistry = AZ::SettingsRegistry::Get(); + bool projectBuiltSuccessfully = false; + if (settingsRegistry && settingsRegistry->Get(projectBuiltSuccessfully, oldSettingsKey.toStdString().c_str())) + { + settingsRegistry->Set(newSettingsKey.toStdString().c_str(), projectBuiltSuccessfully); + SaveProjectManagerSettings(); + } + } + if (!newProjectSettings.m_newPreviewImagePath.isEmpty()) { if (!ProjectUtils::ReplaceProjectFile( diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h index ee6fc792f2..070e2c58bf 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h @@ -24,7 +24,8 @@ namespace O3DE::ProjectManager QT_FORWARD_DECLARE_CLASS(GemCatalogScreen) QT_FORWARD_DECLARE_CLASS(GemRepoScreen) - class UpdateProjectCtrl : public ScreenWidget + class UpdateProjectCtrl + : public ScreenWidget { Q_OBJECT public: @@ -32,7 +33,8 @@ namespace O3DE::ProjectManager ~UpdateProjectCtrl() = default; ProjectManagerScreen GetScreenEnum() override; - protected: + bool ContainsScreen(ProjectManagerScreen screen) override; + void GoToScreen(ProjectManagerScreen screen) override; void NotifyCurrentScreen() override; protected slots: diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp index 3bfc07c5b0..a430102c27 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp @@ -35,7 +35,7 @@ namespace O3DE::ProjectManager previewExtrasLayout->setContentsMargins(50, 0, 0, 0); QLabel* projectPreviewLabel = new QLabel(tr("Select an image (PNG). Minimum %1 x %2 pixels.") - .arg(QString::number(ProjectPreviewImageWidth), QString::number(ProjectPreviewImageHeight))); + .arg(QString::number(ProjectPreviewImageWidth), QString::number(ProjectPreviewImageHeight))); projectPreviewLabel->setObjectName("projectPreviewLabel"); previewExtrasLayout->addWidget(projectPreviewLabel); diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake index e2e35717f6..43c11edacc 100644 --- a/Code/Tools/ProjectManager/project_manager_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_files.cmake @@ -58,6 +58,8 @@ set(FILES Source/CreateProjectCtrl.cpp Source/UpdateProjectCtrl.h Source/UpdateProjectCtrl.cpp + Source/ProjectManagerSettings.h + Source/ProjectManagerSettings.cpp Source/ProjectsScreen.h Source/ProjectsScreen.cpp Source/ProjectSettingsScreen.h @@ -96,6 +98,10 @@ set(FILES Source/GemCatalog/GemListHeaderWidget.cpp Source/GemCatalog/GemModel.h Source/GemCatalog/GemModel.cpp + Source/GemCatalog/GemUninstallDialog.h + Source/GemCatalog/GemUninstallDialog.cpp + Source/GemCatalog/GemUpdateDialog.h + Source/GemCatalog/GemUpdateDialog.cpp Source/GemCatalog/GemDependenciesDialog.h Source/GemCatalog/GemDependenciesDialog.cpp Source/GemCatalog/GemRequirementDialog.h diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h b/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h new file mode 100644 index 0000000000..ad7faf4671 --- /dev/null +++ b/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h @@ -0,0 +1,44 @@ +/* + * 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 + +#include +#include +#include + +namespace AWSClientAuth +{ + //! Cognito Caching Credentials Provider implementation that is derived from AWS Native SDK. + //! For use with authenticated credentials. + class AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider + : public Aws::Auth::CognitoCachingCredentialsProvider + { + public: + AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient = nullptr); + + protected: + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome GetCredentialsFromCognito() const override; + }; + + //! Cognito Caching Credentials Provider implementation that is eventually derived from AWS Native SDK. + //! For use with anonymous credentials. + class AWSClientAuthCachingAnonymousCredsProvider : public AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider + { + public: + AWSClientAuthCachingAnonymousCredsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient = nullptr); + + protected: + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome GetCredentialsFromCognito() const override; + }; + +} // namespace AWSClientAuth diff --git a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h b/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h index 042be8fe89..1378feff19 100644 --- a/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h +++ b/Gems/AWSClientAuth/Code/Include/Private/Authorization/AWSCognitoAuthorizationController.h @@ -9,6 +9,7 @@ #pragma once #include +#include #include #include #include @@ -51,8 +52,8 @@ namespace AWSClientAuth std::shared_ptr m_persistentCognitoIdentityProvider; std::shared_ptr m_persistentAnonymousCognitoIdentityProvider; - std::shared_ptr m_cognitoCachingCredentialsProvider; - std::shared_ptr m_cognitoCachingAnonymousCredentialsProvider; + std::shared_ptr m_cognitoCachingCredentialsProvider; + std::shared_ptr m_cognitoCachingAnonymousCredentialsProvider; AZStd::string m_cognitoIdentityPoolId; AZStd::string m_formattedCognitoUserPoolId; diff --git a/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp new file mode 100644 index 0000000000..2492afa441 --- /dev/null +++ b/Gems/AWSClientAuth/Code/Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp @@ -0,0 +1,122 @@ +/* + * 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 + +#include + +#include +#include +#include +#include +#include +#include +#include + + +namespace AWSClientAuth +{ + static const char* AUTH_LOG_TAG = "AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider"; + static const char* ANON_LOG_TAG = "AWSClientAuthCachingAnonymousCredsProvider"; + + // Modification of https://github.com/aws/aws-sdk-cpp/blob/main/aws-cpp-sdk-identity-management/source/auth/CognitoCachingCredentialsProvider.cpp#L92 + // to work around account ID requirement. Account id is not required for call to succeed and is not set unless provided. + // see: https://github.com/aws/aws-sdk-cpp/issues/1448 + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome FetchCredsFromCognito( + const Aws::CognitoIdentity::CognitoIdentityClient& cognitoIdentityClient, + Aws::Auth::PersistentCognitoIdentityProvider& identityRepository, + const char* logTag, + bool includeLogins) + { + auto logins = identityRepository.GetLogins(); + Aws::Map cognitoLogins; + for (auto& login : logins) + { + cognitoLogins[login.first] = login.second.accessToken; + } + + if (!identityRepository.HasIdentityId()) + { + auto accountId = identityRepository.GetAccountId(); + auto identityPoolId = identityRepository.GetIdentityPoolId(); + + Aws::CognitoIdentity::Model::GetIdRequest getIdRequest; + getIdRequest.SetIdentityPoolId(identityPoolId); + + if (!accountId.empty()) // new check + { + getIdRequest.SetAccountId(accountId); + AWS_LOGSTREAM_INFO(logTag, "Identity not found, requesting an id for accountId " + << accountId << " identity pool id " + << identityPoolId << " with logins."); + } + else + { + AWS_LOGSTREAM_INFO( + logTag, "Identity not found, requesting an id for identity pool id %s" << identityPoolId << " with logins."); + } + if (includeLogins) + { + getIdRequest.SetLogins(cognitoLogins); + } + + auto getIdOutcome = cognitoIdentityClient.GetId(getIdRequest); + if (getIdOutcome.IsSuccess()) + { + auto identityId = getIdOutcome.GetResult().GetIdentityId(); + AWS_LOGSTREAM_INFO(logTag, "Successfully retrieved identity: " << identityId); + identityRepository.PersistIdentityId(identityId); + } + else + { + AWS_LOGSTREAM_ERROR( + logTag, + "Failed to retrieve identity. Error: " << getIdOutcome.GetError().GetExceptionName() << " " + << getIdOutcome.GetError().GetMessage()); + return Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome(getIdOutcome.GetError()); + } + } + + Aws::CognitoIdentity::Model::GetCredentialsForIdentityRequest getCredentialsForIdentityRequest; + getCredentialsForIdentityRequest.SetIdentityId(identityRepository.GetIdentityId()); + if (includeLogins) + { + getCredentialsForIdentityRequest.SetLogins(cognitoLogins); + } + + return cognitoIdentityClient.GetCredentialsForIdentity(getCredentialsForIdentityRequest); + } + + AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider::AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient) + : CognitoCachingCredentialsProvider(identityRepository, cognitoIdentityClient) + { + } + + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome + AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider::GetCredentialsFromCognito() const + { + return FetchCredsFromCognito(*m_cognitoIdentityClient, *m_identityRepository, AUTH_LOG_TAG, true); + } + + AWSClientAuthCachingAnonymousCredsProvider::AWSClientAuthCachingAnonymousCredsProvider( + const std::shared_ptr& identityRepository, + const std::shared_ptr& cognitoIdentityClient) + : AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider(identityRepository, cognitoIdentityClient) + { + } + + Aws::CognitoIdentity::Model::GetCredentialsForIdentityOutcome AWSClientAuthCachingAnonymousCredsProvider:: + GetCredentialsFromCognito() const + { + return FetchCredsFromCognito(*m_cognitoIdentityClient, *m_identityRepository, ANON_LOG_TAG, false); + } + + +} // namespace AWSClientAuth diff --git a/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp index 3af28582d6..f53149c90f 100644 --- a/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -38,10 +39,12 @@ namespace AWSClientAuth auto identityClient = AZ::Interface::Get()->GetCognitoIdentityClient(); m_cognitoCachingCredentialsProvider = - std::make_shared(m_persistentCognitoIdentityProvider, identityClient); + std::make_shared( + m_persistentCognitoIdentityProvider, identityClient); m_cognitoCachingAnonymousCredentialsProvider = - std::make_shared(m_persistentAnonymousCognitoIdentityProvider, identityClient); + std::make_shared( + m_persistentAnonymousCognitoIdentityProvider, identityClient); } AWSCognitoAuthorizationController::~AWSCognitoAuthorizationController() @@ -65,9 +68,13 @@ namespace AWSClientAuth AWSCore::AWSResourceMappingRequestBus::BroadcastResult( m_cognitoIdentityPoolId, &AWSCore::AWSResourceMappingRequests::GetResourceNameId, CognitoIdentityPoolIdResourceMappingKey); - if (m_awsAccountId.empty() || m_cognitoIdentityPoolId.empty()) + if (m_awsAccountId.empty()) + { + AZ_TracePrintf("AWSCognitoAuthorizationController", "AWS account id not not configured. Proceeding without it."); + } + + if (m_cognitoIdentityPoolId.empty()) { - AZ_Warning("AWSCognitoAuthorizationController", !m_awsAccountId.empty(), "Missing AWS account id not configured."); AZ_Warning("AWSCognitoAuthorizationController", !m_cognitoIdentityPoolId.empty(), "Missing Cognito Identity pool id in resource mappings."); return false; } diff --git a/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp b/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp index 2269a2340a..19064eb1ed 100644 --- a/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp +++ b/Gems/AWSClientAuth/Code/Tests/Authorization/AWSCognitoAuthorizationControllerTest.cpp @@ -62,6 +62,14 @@ TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Success) ASSERT_TRUE(m_mockController->m_cognitoIdentityPoolId == AWSClientAuthUnitTest::TEST_RESOURCE_NAME_ID); } +TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Success_GetAWSAccountEmpty) +{ + EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetResourceNameId(testing::_)).Times(2); + EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultAccountId()).Times(1).WillOnce(testing::Return("")); + EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultRegion()).Times(1); + ASSERT_TRUE(m_mockController->Initialize()); +} + TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_WithLogins_Success) { AWSClientAuth::AuthenticationTokens tokens( @@ -121,7 +129,7 @@ TEST_F(AWSCognitoAuthorizationControllerTest, MultipleCalls_UsesCacheCredentials m_mockController->RequestAWSCredentialsAsync(); } -TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetIdError) +TEST_F(AWSCognitoAuthorizationControllerTest, RequestAWSCredentials_Fail_GetIdError) // fail { AWSClientAuth::AuthenticationTokens cognitoTokens( AWSClientAuthUnitTest::TEST_TOKEN, AWSClientAuthUnitTest::TEST_TOKEN, AWSClientAuthUnitTest::TEST_TOKEN, @@ -325,7 +333,7 @@ TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersisted EXPECT_TRUE(actualCredentialsProvider == m_mockController->m_cognitoCachingAnonymousCredentialsProvider); } -TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersistedLogins_NoAnonymousCredentials_ResultNullPtr) +TEST_F(AWSCognitoAuthorizationControllerTest, GetCredentialsProvider_NoPersistedLogins_NoAnonymousCredentials_ResultNullPtr) // fails { Aws::Client::AWSError error; error.SetExceptionName(AWSClientAuthUnitTest::TEST_EXCEPTION); @@ -437,11 +445,3 @@ TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Fail_GetResourceNameEmp EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultAccountId()).Times(1); ASSERT_FALSE(m_mockController->Initialize()); } - -TEST_F(AWSCognitoAuthorizationControllerTest, Initialize_Fail_GetAWSAccountEmpty) -{ - EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetResourceNameId(testing::_)).Times(1); - EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultAccountId()).Times(1).WillOnce(testing::Return("")); - EXPECT_CALL(m_awsResourceMappingRequestBusMock, GetDefaultRegion()).Times(0); - ASSERT_FALSE(m_mockController->Initialize()); -} diff --git a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake index bd4c971377..3b07b710e7 100644 --- a/Gems/AWSClientAuth/Code/awsclientauth_files.cmake +++ b/Gems/AWSClientAuth/Code/awsclientauth_files.cmake @@ -24,6 +24,7 @@ set(FILES Include/Private/Authorization/AWSCognitoAuthorizationController.h Include/Private/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.h Include/Private/Authorization/AWSCognitoAuthorizationNotificationBusBehaviorHandler.h + Include/Private/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.h Include/Private/UserManagement/AWSCognitoUserManagementController.h Include/Private/UserManagement/UserManagementNotificationBusBehaviorHandler.h @@ -45,6 +46,7 @@ set(FILES Source/Authorization/ClientAuthAWSCredentials.cpp Source/Authorization/AWSCognitoAuthorizationController.cpp Source/Authorization/AWSClientAuthPersistentCognitoIdentityProvider.cpp + Source/Authorization/AWSClientAuthCognitoCachingAuthenticatedCredentialsProvider.cpp Source/UserManagement/AWSCognitoUserManagementController.cpp ) diff --git a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h b/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h index 97eb5b6492..a3d18c1ea1 100644 --- a/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h +++ b/Gems/AWSCore/Code/Include/Private/ResourceMapping/AWSResourceMappingConstants.h @@ -68,7 +68,7 @@ namespace AWSCore }, "AccountIdString": { "type": "string", - "pattern": "^[0-9]{12}$|EMPTY" + "pattern": "^[0-9]{12}$|EMPTY|^$" }, "NonEmptyString": { "type": "string", diff --git a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp index fb03dea4c0..81ea166848 100644 --- a/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp +++ b/Gems/AWSCore/Code/Tests/ResourceMapping/AWSResourceMappingManagerTest.cpp @@ -59,6 +59,34 @@ R"({ "Version": "1.0.0" })"; +static constexpr const char TEST_VALID_EMPTY_ACCOUNTID_RESOURCE_MAPPING_CONFIG_FILE[] = + R"({ + "AWSResourceMappings": { + "TestLambda": { + "Type": "AWS::Lambda::Function", + "Name/ID": "MyTestLambda", + "Region": "us-east-1", + "AccountId": "012345678912" + }, + "TestS3Bucket": { + "Type": "AWS::S3::Bucket", + "Name/ID": "MyTestS3Bucket" + }, + "TestService.RESTApiId": { + "Type": "AWS::ApiGateway::RestApi", + "Name/ID": "1234567890" + }, + "TestService.RESTApiStage": { + "Type": "AWS::ApiGateway::Stage", + "Name/ID": "prod", + "Region": "us-east-1" + } + }, + "AccountId": "", + "Region": "us-west-2", + "Version": "1.1.0" +})"; + static constexpr const char TEST_INVALID_RESOURCE_MAPPING_CONFIG_FILE[] = R"({ "AWSResourceMappings": {}, @@ -237,6 +265,21 @@ TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseValidConfigFile_Confi EXPECT_TRUE(actualEbusCalls == testThreadNumber); } +TEST_F(AWSResourceMappingManagerTest, ActivateManager_ParseValidConfigFile_GlobalAccountIdEmpty) +{ + CreateTestConfigFile(TEST_VALID_EMPTY_ACCOUNTID_RESOURCE_MAPPING_CONFIG_FILE); + m_resourceMappingManager->ActivateManager(); + + AZStd::string actualAccountId; + AZStd::string actualRegion; + AWSResourceMappingRequestBus::BroadcastResult(actualAccountId, &AWSResourceMappingRequests::GetDefaultAccountId); + AWSResourceMappingRequestBus::BroadcastResult(actualRegion, &AWSResourceMappingRequests::GetDefaultRegion); + EXPECT_EQ(m_reloadConfigurationCounter, 0); + EXPECT_TRUE(actualAccountId.empty()); + EXPECT_FALSE(actualRegion.empty()); + EXPECT_TRUE(m_resourceMappingManager->GetStatus() == AWSResourceMappingManager::Status::Ready); +} + TEST_F(AWSResourceMappingManagerTest, DeactivateManager_AfterActivatingWithValidConfigFile_ConfigDataGetCleanedUp) { CreateTestConfigFile(TEST_VALID_RESOURCE_MAPPING_CONFIG_FILE); diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md b/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md index e09ecc281f..38b7c48d2f 100644 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/README.md @@ -17,7 +17,7 @@ Or follow **AWS CLI** configuration which can be reused by boto3 lib: 1. In order to use engine python environment, it requires to link Qt binaries for this tool. Follow cmake instructions to configure your project, for example: ``` - $ cmake -B -S . -G "Visual Studio 16 2019" -DLY_3RDPARTY_PATH= -DLY_PROJECTS= + $ cmake -B -S . -G "Visual Studio 16 2019" -DLY_PROJECTS= ``` 2. At this point, double check engine python environment gets setup under */python/runtime* directory diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py index bdfe7fa11e..39f7b5ccf1 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/controller/view_edit_controller.py @@ -69,17 +69,13 @@ class ViewEditController(QObject): json_dict: Dict[str, any] = \ json_utils.convert_resources_to_json_dict(self._proxy_model.get_resources(), self._config_file_json_source) - configuration: Configuration = self._configuration_manager.configuration - if json_dict.get(json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME) == \ - json_utils.RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE: - json_dict[json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] = configuration.account_id - if json_dict == self._config_file_json_source: # skip because no difference found against existing json file return True # try to write in memory json content into json file try: + configuration: Configuration = self._configuration_manager.configuration config_file_full_path: str = file_utils.join_path(configuration.config_directory, config_file_name) json_utils.write_into_json_file(config_file_full_path, json_dict) self._config_file_json_source = json_dict diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py index c73bddcd9c..41d4490c44 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/controller/test_view_edit_controller.py @@ -420,8 +420,30 @@ class TestViewEditController(TestCase): self._mocked_view_edit_page.config_file_combobox.currentText.return_value = \ TestViewEditController._expected_config_file_name expected_json_dict: Dict[str, any] = { - "dummyKey": "dummyValue", - self._expected_account_id_attribute_name: self._expected_account_id_template_vale} + "dummyKey": "dummyValue" + } + mock_json_utils.validate_resources_according_to_json_schema.return_value = [] + mock_json_utils.convert_resources_to_json_dict.return_value = expected_json_dict + mock_file_utils.join_path.return_value = TestViewEditController._expected_config_file_full_path + mocked_call_args: call = self._mocked_view_edit_page.save_changes_button.clicked.connect.call_args[0] + + mocked_call_args[0]() # triggering save_changes_button connected function + mock_json_utils.convert_resources_to_json_dict.assert_called_once() + mock_json_utils.write_into_json_file.assert_called_once_with( + TestViewEditController._expected_config_file_full_path, expected_json_dict) + self._mocked_proxy_model.override_all_resources_status.assert_called_once_with( + ResourceMappingAttributesStatus(ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE, + [ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE])) + + @patch("controller.view_edit_controller.file_utils") + @patch("controller.view_edit_controller.json_utils") + def test_page_save_changes_button_json_file_saved_and_template_account_id_unchanged( + self, mock_json_utils: MagicMock, mock_file_utils: MagicMock) -> None: + self._mocked_view_edit_page.config_file_combobox.currentText.return_value = \ + TestViewEditController._expected_config_file_name + expected_json_dict: Dict[str, any] = { + self._expected_account_id_attribute_name: self._expected_account_id_template_vale + } mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME = self._expected_account_id_attribute_name mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE = self._expected_account_id_template_vale mock_json_utils.validate_resources_according_to_json_schema.return_value = [] @@ -430,7 +452,31 @@ class TestViewEditController(TestCase): mocked_call_args: call = self._mocked_view_edit_page.save_changes_button.clicked.connect.call_args[0] mocked_call_args[0]() # triggering save_changes_button connected function - assert expected_json_dict["AccountId"] == self._mocked_configuration_manager.configuration.account_id + assert expected_json_dict[mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] == self._expected_account_id_template_vale + mock_json_utils.convert_resources_to_json_dict.assert_called_once() + mock_json_utils.write_into_json_file.assert_called_once_with( + TestViewEditController._expected_config_file_full_path, expected_json_dict) + self._mocked_proxy_model.override_all_resources_status.assert_called_once_with( + ResourceMappingAttributesStatus(ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE, + [ResourceMappingAttributesStatus.SUCCESS_STATUS_VALUE])) + + @patch("controller.view_edit_controller.file_utils") + @patch("controller.view_edit_controller.json_utils") + def test_page_save_changes_button_json_file_saved_and_empty_account_id_unchanged( + self, mock_json_utils: MagicMock, mock_file_utils: MagicMock) -> None: + self._mocked_view_edit_page.config_file_combobox.currentText.return_value = \ + TestViewEditController._expected_config_file_name + expected_json_dict: Dict[str, any] = { + self._expected_account_id_attribute_name: '' + } + mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME = self._expected_account_id_attribute_name + mock_json_utils.validate_resources_according_to_json_schema.return_value = [] + mock_json_utils.convert_resources_to_json_dict.return_value = expected_json_dict + mock_file_utils.join_path.return_value = TestViewEditController._expected_config_file_full_path + mocked_call_args: call = self._mocked_view_edit_page.save_changes_button.clicked.connect.call_args[0] + + mocked_call_args[0]() # triggering save_changes_button connected function + assert expected_json_dict[mock_json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] == '' mock_json_utils.convert_resources_to_json_dict.assert_called_once() mock_json_utils.write_into_json_file.assert_called_once_with( TestViewEditController._expected_config_file_full_path, expected_json_dict) diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py index 7eb92ff222..9fe99461ba 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/tests/unit/utils/test_json_utils.py @@ -103,6 +103,11 @@ class TestJsonUtils(TestCase): invalid_json_dict.pop(json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME) self.assertRaises(KeyError, json_utils.validate_json_dict_according_to_json_schema, invalid_json_dict) + def test_validate_json_dict_according_to_json_schema_raise_error_when_json_dict_has_empty_accountid(self) -> None: + valid_json_dict: Dict[str, any] = copy.deepcopy(TestJsonUtils._expected_json_dict) + valid_json_dict[json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] = '' + json_utils.validate_json_dict_according_to_json_schema(valid_json_dict) + def test_validate_json_dict_according_to_json_schema_pass_when_json_dict_has_template_accountid(self) -> None: valid_json_dict: Dict[str, any] = copy.deepcopy(TestJsonUtils._expected_json_dict) valid_json_dict[json_utils.RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME] = \ diff --git a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py index 5b9377ada3..8c094a895c 100755 --- a/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py +++ b/Gems/AWSCore/Code/Tools/ResourceMappingTool/utils/json_utils.py @@ -24,11 +24,11 @@ _RESOURCE_MAPPING_TYPE_JSON_KEY_NAME: str = "Type" _RESOURCE_MAPPING_NAMEID_JSON_KEY_NAME: str = "Name/ID" _RESOURCE_MAPPING_REGION_JSON_KEY_NAME: str = "Region" _RESOURCE_MAPPING_VERSION_JSON_KEY_NAME: str = "Version" -_RESOURCE_MAPPING_JSON_FORMAT_VERSION: str = "1.0.0" +_RESOURCE_MAPPING_JSON_FORMAT_VERSION: str = "1.1.0" RESOURCE_MAPPING_ACCOUNTID_JSON_KEY_NAME: str = "AccountId" RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE: str = "EMPTY" -_RESOURCE_MAPPING_ACCOUNTID_PATTERN: str = f"^[0-9]{{12}}|{RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE}$" +_RESOURCE_MAPPING_ACCOUNTID_PATTERN: str = f"^[0-9]{{12}}$|{RESOURCE_MAPPING_ACCOUNTID_TEMPLATE_VALUE}|^$" _RESOURCE_MAPPING_REGION_PATTERN: str = "^[a-z]{2}-[a-z]{4,9}-[0-9]{1}$" _RESOURCE_MAPPING_VERSION_PATTERN: str = "^[0-9]{1}.[0-9]{1}.[0-9]{1}$" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Albedo.preset similarity index 60% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Albedo.preset index fe2e7e0cb4..dc1f38d2da 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Albedo.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Albedo.preset @@ -7,16 +7,6 @@ "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", "Name": "Albedo", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_basecolor", - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_bc", - "_diffuse" - ], "PixelFormat": "BC1", "DiscardAlpha": true, "IsPowerOf2": true, @@ -29,16 +19,6 @@ "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", "Name": "Albedo", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "ASTC_6x6", "MaxTextureSize": 2048, "DiscardAlpha": true, @@ -51,16 +31,6 @@ "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", "Name": "Albedo", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "ASTC_6x6", "MaxTextureSize": 2048, "DiscardAlpha": true, @@ -73,16 +43,6 @@ "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", "Name": "Albedo", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "BC1", "DiscardAlpha": true, "IsPowerOf2": true, @@ -94,16 +54,6 @@ "UUID": "{08A95286-ADB2-41E4-96EB-DB48F4726D6A}", "Name": "Albedo", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_col", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "BC1", "DiscardAlpha": true, "IsPowerOf2": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithCoverage.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithCoverage.preset similarity index 60% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithCoverage.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithCoverage.preset index fda5a9cc52..439a057410 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithCoverage.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithCoverage.preset @@ -7,15 +7,6 @@ "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", "Name": "AlbedoWithCoverage", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "BC1a", "IsPowerOf2": true, "MipMapSetting": { @@ -27,15 +18,6 @@ "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", "Name": "AlbedoWithCoverage", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "ASTC_6x6", "IsPowerOf2": true, "MipMapSetting": { @@ -46,15 +28,6 @@ "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", "Name": "AlbedoWithCoverage", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "ASTC_6x6", "IsPowerOf2": true, "MipMapSetting": { @@ -65,15 +38,6 @@ "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", "Name": "AlbedoWithCoverage", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "BC1a", "IsPowerOf2": true, "MipMapSetting": { @@ -84,15 +48,6 @@ "UUID": "{57ED16B1-407B-4E29-BCFC-D3BAE60F2C85}", "Name": "AlbedoWithCoverage", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "BC1a", "IsPowerOf2": true, "MipMapSetting": { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithGenericAlpha.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithGenericAlpha.preset similarity index 55% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithGenericAlpha.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithGenericAlpha.preset index 19d2b2bbe6..c315ede21c 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/AlbedoWithGenericAlpha.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AlbedoWithGenericAlpha.preset @@ -7,17 +7,7 @@ "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", "Name": "AlbedoWithGenericAlpha", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], - "PixelFormat": "BC3", - "IsPowerOf2": true, + "PixelFormat": "ASTC_4x4", "MipMapSetting": { "MipGenType": "Box" } @@ -27,18 +17,8 @@ "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", "Name": "AlbedoWithGenericAlpha", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "ASTC_6x6", "MaxTextureSize": 2048, - "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" } @@ -47,18 +27,8 @@ "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", "Name": "AlbedoWithGenericAlpha", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "ASTC_6x6", "MaxTextureSize": 2048, - "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" } @@ -67,17 +37,7 @@ "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", "Name": "AlbedoWithGenericAlpha", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "BC3", - "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" } @@ -86,17 +46,7 @@ "UUID": "{5D9ECB52-4CD9-4CB8-80E3-10CAE5EFB8A2}", "Name": "AlbedoWithGenericAlpha", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_diff", - "_color", - "_albedo", - "_alb", - "_basecolor", - "_bc", - "_diffuse" - ], "PixelFormat": "BC3", - "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AmbientOcclusion.preset similarity index 64% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AmbientOcclusion.preset index d5acef34d6..573de18b88 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/AmbientOcclusion.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/AmbientOcclusion.preset @@ -8,12 +8,6 @@ "Name": "AmbientOcclusion", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], "PixelFormat": "BC4" }, "PlatformsPresets": { @@ -22,12 +16,6 @@ "Name": "AmbientOcclusion", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], "MaxTextureSize": 2048, "PixelFormat": "ASTC_4x4" }, @@ -36,12 +24,6 @@ "Name": "AmbientOcclusion", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], "MaxTextureSize": 2048, "PixelFormat": "ASTC_4x4" }, @@ -50,12 +32,6 @@ "Name": "AmbientOcclusion", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], "PixelFormat": "BC4" }, "provo": { @@ -63,12 +39,6 @@ "Name": "AmbientOcclusion", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ao", - "_ambocc", - "_amb", - "_ambientocclusion" - ], "PixelFormat": "BC4" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ConvolvedCubemap.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ConvolvedCubemap.preset similarity index 88% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ConvolvedCubemap.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ConvolvedCubemap.preset index abdf6501be..1ef15ada45 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/ConvolvedCubemap.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ConvolvedCubemap.preset @@ -8,10 +8,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -35,10 +31,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -61,10 +53,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -87,10 +75,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, @@ -113,10 +97,6 @@ "Name": "ConvolvedCubemap", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ccm", - "_convolvedcubemap" - ], "SuppressEngineReduce": true, "PixelFormat": "R9G9B9E5", "DiscardAlpha": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Decal_AlbedoWithOpacity.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Decal_AlbedoWithOpacity.preset similarity index 86% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Decal_AlbedoWithOpacity.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Decal_AlbedoWithOpacity.preset index e2e009afc5..873d434380 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Decal_AlbedoWithOpacity.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Decal_AlbedoWithOpacity.preset @@ -6,9 +6,6 @@ "DefaultPreset": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "BC7t", "IsPowerOf2": true, "MipMapSetting": { @@ -21,9 +18,6 @@ "android": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "ASTC_4x4", "MaxTextureSize": 2048, "IsPowerOf2": true, @@ -36,9 +30,6 @@ "ios": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "ASTC_4x4", "MaxTextureSize": 2048, "IsPowerOf2": true, @@ -51,9 +42,6 @@ "mac": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "BC3", "IsPowerOf2": true, "MipMapSetting": { @@ -65,9 +53,6 @@ "provo": { "UUID": "{E06B5087-2640-49B6-B9BA-D40048162B90}", "Name": "Decal_AlbedoWithOpacity", - "FileMasks": [ - "_decal" - ], "PixelFormat": "BC7t", "IsPowerOf2": true, "MipMapSetting": { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Displacement.preset similarity index 59% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Displacement.preset index 28ac84d646..04f35dbd6f 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Displacement.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Displacement.preset @@ -8,18 +8,6 @@ "Name": "Displacement", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], "PixelFormat": "BC4", "DiscardAlpha": true, "IsPowerOf2": true, @@ -33,18 +21,6 @@ "Name": "Displacement", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], "PixelFormat": "ASTC_4x4", "MaxTextureSize": 2048, "DiscardAlpha": true, @@ -59,18 +35,6 @@ "Name": "Displacement", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], "PixelFormat": "ASTC_4x4", "MaxTextureSize": 2048, "DiscardAlpha": true, @@ -84,18 +48,6 @@ "Name": "Displacement", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], "PixelFormat": "BC4", "DiscardAlpha": true, "IsPowerOf2": true, @@ -108,18 +60,6 @@ "Name": "Displacement", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_displ", - "_disp", - "_dsp", - "_d", - "_dm", - "_displacement", - "_height", - "_hm", - "_ht", - "_h" - ], "PixelFormat": "BC4", "DiscardAlpha": true, "IsPowerOf2": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Emissive.preset similarity index 61% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Emissive.preset index f5e3a79357..798b8d1657 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Emissive.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Emissive.preset @@ -7,13 +7,6 @@ "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", "Name": "Emissive", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], "PixelFormat": "BC7", "DiscardAlpha": true }, @@ -22,13 +15,6 @@ "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", "Name": "Emissive", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], "PixelFormat": "ASTC_6x6", "MaxTextureSize": 2048, "DiscardAlpha": true @@ -37,13 +23,6 @@ "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", "Name": "Emissive", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], "PixelFormat": "ASTC_6x6", "MaxTextureSize": 2048, "DiscardAlpha": true @@ -52,13 +31,6 @@ "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", "Name": "Emissive", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], "PixelFormat": "BC7", "DiscardAlpha": true }, @@ -66,13 +38,6 @@ "UUID": "{07041D83-E0C3-4726-8735-CA0FE550C9A0}", "Name": "Emissive", "RGB_Weight": "CIEXYZ", - "FileMasks": [ - "_emissive", - "_e", - "_glow", - "_em", - "_emit" - ], "PixelFormat": "BC7", "DiscardAlpha": true } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Gradient.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Gradient.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Gradient.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Gradient.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Greyscale.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Greyscale.preset similarity index 77% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Greyscale.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Greyscale.preset index c71ada1269..19439bad2d 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Greyscale.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Greyscale.preset @@ -8,11 +8,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "BC4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -23,11 +20,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "ASTC_4x4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -37,11 +31,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "ASTC_4x4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -51,11 +42,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "BC4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } @@ -65,11 +53,8 @@ "Name": "Greyscale", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_mask" - ], "PixelFormat": "BC4", - "IsPowerOf2": true, + "Swizzle": "rrr1", "MipMapSetting": { "MipGenType": "Box" } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLDiffuse.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLDiffuse.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLDiffuse.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLDiffuse.preset index 8bd6b348d1..845f8e13e4 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLDiffuse.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLDiffuse.preset @@ -7,9 +7,6 @@ "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", "Description": "The input cubemap generates an IBL diffuse output cubemap.", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -31,9 +28,6 @@ "android": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -54,9 +48,6 @@ "ios": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -77,9 +68,6 @@ "mac": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -100,9 +88,6 @@ "provo": { "UUID": "{E3706342-BF21-4D9C-AE28-9670EB3EF3C5}", "Name": "IBLDiffuse", - "FileMasks": [ - "_ibldiffusecm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLGlobal.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLGlobal.preset similarity index 83% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLGlobal.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLGlobal.preset index 717157f2aa..51daf44d6e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLGlobal.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLGlobal.preset @@ -8,11 +8,6 @@ "Name": "IBLGlobal", "Description": "The input cubemap generates IBL specular and diffuse cubemaps.", "GenerateIBLOnly": true, - "FileMasks": [ - "_iblglobalcm", - "_cubemap", - "_cm" - ], "CubemapSettings": { "GenerateIBLSpecular": true, "IBLSpecularPreset": "IBLSpecular", diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSkybox.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSkybox.preset index eee9af4cea..1a596468bd 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSkybox.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSkybox.preset @@ -7,9 +7,6 @@ "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", "Description": "The input cubemap generates a skybox, IBL specular, and IBL diffuse output cubemaps.", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -29,9 +26,6 @@ "android": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -50,9 +44,6 @@ "ios": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -71,9 +62,6 @@ "mac": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -92,9 +80,6 @@ "provo": { "UUID": "{E6441EAC-9843-484B-8EFC-C03B2935B48D}", "Name": "IBLSkybox", - "FileMasks": [ - "_iblskyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecular.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecular.preset similarity index 87% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecular.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecular.preset index 4f935c73ff..691f554540 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecular.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecular.preset @@ -7,10 +7,6 @@ "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -34,10 +30,6 @@ "android": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -60,10 +52,6 @@ "ios": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -86,10 +74,6 @@ "mac": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -112,10 +96,6 @@ "provo": { "UUID": "{908DA68C-97FB-4C4A-97BC-5A55F30F14FA}", "Name": "IBLSpecular", - "FileMasks": [ - "_iblspecularcm", - "_iblspecularcm256" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularHigh.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularHigh.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularHigh.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularHigh.preset index ff4e143326..b436386864 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularHigh.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularHigh.preset @@ -7,9 +7,6 @@ "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{B66395E1-8D0E-4159-989B-FC2B9F091B75}", "Name": "IBLSpecularHigh", - "FileMasks": [ - "_iblspecularcm512" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularLow.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularLow.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularLow.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularLow.preset index ee9ddd6ac7..7810028efa 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularLow.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularLow.preset @@ -7,9 +7,6 @@ "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{7273ACAE-6E34-487C-AF71-99423A6E1CB0}", "Name": "IBLSpecularLow", - "FileMasks": [ - "_iblspecularcm128" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryHigh.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryHigh.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryHigh.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryHigh.preset index 08d9416935..a18885dad9 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryHigh.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryHigh.preset @@ -7,9 +7,6 @@ "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{5CD1AFA6-915B-4716-893C-A5B1F4074C22}", "Name": "IBLSpecularVeryHigh", - "FileMasks": [ - "_iblspecularcm1024" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryLow.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryLow.preset similarity index 90% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryLow.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryLow.preset index c5c0788848..fb910b563a 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/IBLSpecularVeryLow.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/IBLSpecularVeryLow.preset @@ -7,9 +7,6 @@ "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", "Description": "The input cubemap generates an IBL specular output cubemap.", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -33,9 +30,6 @@ "android": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +52,6 @@ "ios": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -83,9 +74,6 @@ "mac": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -108,9 +96,6 @@ "provo": { "UUID": "{8293C236-D3E8-4352-8B18-C2E82EEE6547}", "Name": "IBLSpecularVeryLow", - "FileMasks": [ - "_iblspecularcm64" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ImageBuilder.settings b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ImageBuilder.settings new file mode 100644 index 0000000000..bba2855650 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ImageBuilder.settings @@ -0,0 +1,154 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "BuilderSettingManager", + "ClassData": { + "BuildSettings": { + "android": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "ios": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "mac": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "pc": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "linux": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": true + }, + "provo": { + "GlossScale": 16.0, + "GlossBias": 0.0, + "Streaming": false, + "Enable": false + } + }, + "PresetsByFileMask": { + // albedo + "_basecolor": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_diff": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_diffuse": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_color": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_col": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_albedo": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_alb": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + "_bc": [ "Albedo", "AlbedoWithGenericAlpha", "AlbedoWithCoverage" ], + // normals + "_ddn": [ "Normals" ], + "_normal": [ "Normals" ], + "_normalmap": [ "Normals" ], + "_normals": [ "Normals" ], + "_norm": [ "Normals" ], + "_nor": [ "Normals" ], + "_nrm": [ "Normals" ], + "_nm": [ "Normals" ], + "_n": [ "Normals" ], + "_ddna": [ "NormalsWithSmoothness" ], + "_normala": [ "NormalsWithSmoothness" ], + "_nrma": [ "NormalsWithSmoothness" ], + "_nma": [ "NormalsWithSmoothness" ], + "_na": [ "NormalsWithSmoothness" ], + // refelctance + "_spec": [ "Reflectance" ], + "_specular": [ "Reflectance" ], + "_metallic": [ "Reflectance" ], + "_refl": [ "Reflectance" ], + "_ref": [ "Reflectance" ], + "_rf": [ "Reflectance" ], + "_gloss": [ "Reflectance" ], + "_g": [ "Reflectance" ], + "_f0": [ "Reflectance" ], + "_specf0": [ "Reflectance" ], + "_metal": [ "Reflectance" ], + "_mtl": [ "Reflectance" ], + "_m": [ "Reflectance" ], + "_mt": [ "Reflectance" ], + "_metalness": [ "Reflectance" ], + "_rough": [ "Reflectance" ], + "_roughness": [ "Reflectance" ], + // opacity + "_sss": [ "Opacity" ], + "_trans": [ "Opacity" ], + "_opac": [ "Opacity" ], + "_opacity": [ "Opacity" ], + "_o": [ "Opacity" ], + "_op": [ "Opacity" ], + "_mask": [ "Opacity", "Greyscale" ], + "_msk": [ "Opacity" ], + "_blend": [ "Opacity" ], + // AO + "_ao": [ "AmbientOcclusion" ], + "_ambocc": [ "AmbientOcclusion" ], + "_amb": [ "AmbientOcclusion" ], + "_ambientocclusion": [ "AmbientOcclusion" ], + // emissive + "_emissive": [ "Emissive" ], + "_e": [ "Emissive" ], + "_glow": [ "Emissive" ], + "_em": [ "Emissive" ], + "_emit": [ "Emissive" ], + // displacement + "_displ": [ "Displacement" ], + "_disp": [ "Displacement" ], + "_dsp": [ "Displacement" ], + "_d": [ "Displacement" ], + "_dm": [ "Displacement" ], + "_displacement": [ "Displacement" ], + "_height": [ "Displacement" ], + "_hm": [ "Displacement" ], + "_ht": [ "Displacement" ], + "_h": [ "Displacement" ], + // cubemap + "_ibldiffusecm": [ "IBLDiffuse" ], + "_iblskyboxcm": [ "IBLSkybox" ], + "_iblspecularcm": [ "IBLSpecular" ], + "_iblspecularcm64": [ "IBLSpecularVeryLow" ], + "_iblspecularcm128": [ "IBLSpecularLow" ], + "_iblspecularcm256": [ "IBLSpecular" ], + "_iblspecularcm512": [ "IBLSpecularHigh" ], + "_iblspecularcm1024": [ "IBLSpecularVeryHigh" ], + "_skyboxcm": [ "Skybox" ], + "_ccm": [ "ConvolvedCubemap" ], + "_convolvedcubemap": [ "ConvolvedCubemap" ], + "_iblglobalcm": [ "IBLGlobal" ], + "_cubemap": [ "IBLGlobal" ], + "_cm": [ "IBLGlobal" ], + // lut + "_lut": [ "LUT_RG8" ], + "_lutr32f": [ "LUT_R32F" ], + "_lutrgba8": [ "LUT_RGBA8" ], + "_lutrgba16": [ "LUT_RGBA16" ], + "_lutrgba16f": [ "LUT_RGBA16F" ], + "_lutrg16": [ "LUT_RG16" ], + "_lutrg32f": [ "LUT_RG32F" ], + "_lutrgba32f": [ "LUT_RGBA32F" ], + // layer mask + "_layers": [ "LayerMask" ], + "_rgbmask": [ "LayerMask" ], + // decal + "_decal": [ "Decal_AlbedoWithOpacity" ], + // ui + "_ui": [ "UserInterface_Compressed","UserInterface_Lossless" ] + }, + "DefaultPreset": "Albedo", + "DefaultPresetAlpha": "AlbedoWithGenericAlpha" + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_R32F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_R32F.preset similarity index 97% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_R32F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_R32F.preset index 1bb23c6e96..693f268304 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_R32F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_R32F.preset @@ -6,7 +6,6 @@ "DefaultPreset": { "UUID": "{10D4D7D8-23E2-4FC5-BE6A-DA9949D2C603}", "Name": "LUT_R32F", - "FileMasks": ["_lutr32f"], "SourceColor": "Linear", "DestColor": "Linear", "PixelFormat": "R32F" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG16.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG16.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG16.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG16.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG32F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG32F.preset similarity index 97% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG32F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG32F.preset index 2cf0c6ca0a..7277a4b111 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG32F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG32F.preset @@ -6,7 +6,6 @@ "DefaultPreset": { "UUID": "{52470B8B-0798-4E03-B0D3-039D5141CFEC}", "Name": "LUT_RG32F", - "FileMasks": ["_lutrg32f"], "SourceColor": "Linear", "DestColor": "Linear", "PixelFormat": "R32G32F" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG8.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG8.preset similarity index 79% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG8.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG8.preset index 9838d532b2..051cc2bedc 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RG8.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RG8.preset @@ -8,9 +8,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "PlatformsPresets": { @@ -19,9 +16,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "ios": { @@ -29,9 +23,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "mac": { @@ -39,9 +30,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" }, "provo": { @@ -49,9 +37,6 @@ "Name": "LUT_RG8", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lut" - ], "PixelFormat": "R8G8" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16.preset similarity index 78% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16.preset index f36d566d7e..ed940e5f25 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16.preset @@ -8,9 +8,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "PlatformsPresets": { @@ -19,9 +16,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "ios": { @@ -29,9 +23,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "osx_gl": { @@ -39,9 +30,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" }, "provo": { @@ -49,9 +37,6 @@ "Name": "LUT_RGBA16", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16" - ], "PixelFormat": "R16G16B16A16" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16F.preset similarity index 78% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16F.preset index 367c5101b3..f5d109b4a1 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA16F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA16F.preset @@ -8,9 +8,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "PlatformsPresets": { @@ -19,9 +16,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "ios": { @@ -29,9 +23,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "osx_gl": { @@ -39,9 +30,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" }, "provo": { @@ -49,9 +37,6 @@ "Name": "LUT_RGBA16F", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_lutrgba16f" - ], "PixelFormat": "R16G16B16A16F" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA32F.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA32F.preset similarity index 97% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA32F.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA32F.preset index 3a456825bf..b85cb66c9d 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA32F.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA32F.preset @@ -6,7 +6,6 @@ "DefaultPreset": { "UUID": "{AC4C49D4-2C70-425A-8DBF-E7FB2C61CF8D}", "Name": "LUT_RGBA32F", - "FileMasks": ["_lutrgba32f"], "SourceColor": "Linear", "DestColor": "Linear", "PixelFormat": "R32G32B32A32F" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA8.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA8.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LUT_RGBA8.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LUT_RGBA8.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LayerMask.preset similarity index 72% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LayerMask.preset index 5ce06aaea2..d33db40547 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/LayerMask.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/LayerMask.preset @@ -8,10 +8,6 @@ "Name": "LayerMask", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], "PixelFormat": "R8G8B8X8" }, "PlatformsPresets": { @@ -20,10 +16,6 @@ "Name": "LayerMask", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], "PixelFormat": "R8G8B8X8" }, "ios": { @@ -31,10 +23,6 @@ "Name": "LayerMask", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], "PixelFormat": "R8G8B8X8" }, "mac": { @@ -42,10 +30,6 @@ "Name": "LayerMask", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], "PixelFormat": "R8G8B8X8" }, "provo": { @@ -53,10 +37,6 @@ "Name": "LayerMask", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_layers", - "_rgbmask" - ], "PixelFormat": "R8G8B8X8" } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Normals.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Normals.preset similarity index 62% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Normals.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Normals.preset index eee0b88686..3f7a9ff111 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Normals.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Normals.preset @@ -8,17 +8,6 @@ "Name": "Normals", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], "PixelFormat": "BC5s", "DiscardAlpha": true, "IsPowerOf2": true, @@ -33,17 +22,6 @@ "Name": "Normals", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], "PixelFormat": "ASTC_4x4", "DiscardAlpha": true, "MaxTextureSize": 1024, @@ -58,17 +36,6 @@ "Name": "Normals", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], "PixelFormat": "ASTC_4x4", "DiscardAlpha": true, "MaxTextureSize": 1024, @@ -83,17 +50,6 @@ "Name": "Normals", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], "PixelFormat": "BC5s", "DiscardAlpha": true, "IsPowerOf2": true, @@ -107,17 +63,6 @@ "Name": "Normals", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddn", - "_normal", - "_normalmap", - "_normals", - "_norm", - "_nor", - "_nrm", - "_nm", - "_n" - ], "PixelFormat": "BC5s", "DiscardAlpha": true, "IsPowerOf2": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/NormalsWithSmoothness.preset similarity index 74% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/NormalsWithSmoothness.preset index 2c66cf9190..fd0abf3467 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/NormalsWithSmoothness.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/NormalsWithSmoothness.preset @@ -8,13 +8,6 @@ "Name": "NormalsWithSmoothness", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], "PixelFormat": "BC5s", "PixelFormatAlpha": "BC4", "IsPowerOf2": true, @@ -30,13 +23,6 @@ "Name": "NormalsWithSmoothness", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], "PixelFormat": "ASTC_4x4", "PixelFormatAlpha": "ASTC_4x4", "MaxTextureSize": 2048, @@ -52,13 +38,6 @@ "Name": "NormalsWithSmoothness", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], "PixelFormat": "ASTC_4x4", "PixelFormatAlpha": "ASTC_4x4", "MaxTextureSize": 2048, @@ -74,13 +53,6 @@ "Name": "NormalsWithSmoothness", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], "PixelFormat": "BC5s", "PixelFormatAlpha": "BC4", "IsPowerOf2": true, @@ -95,13 +67,6 @@ "Name": "NormalsWithSmoothness", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_ddna", - "_normala", - "_nrma", - "_nma", - "_na" - ], "PixelFormat": "BC5s", "PixelFormatAlpha": "BC4", "IsPowerOf2": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Opacity.preset similarity index 56% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Opacity.preset index 53998583cc..e896b74522 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Opacity.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Opacity.preset @@ -8,19 +8,8 @@ "Name": "Opacity", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], "PixelFormat": "BC4", + "Swizzle": "rrr1", "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" @@ -32,19 +21,8 @@ "Name": "Opacity", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], "PixelFormat": "ASTC_4x4", + "Swizzle": "rrr1", "MaxTextureSize": 2048, "IsPowerOf2": true, "MipMapSetting": { @@ -56,19 +34,8 @@ "Name": "Opacity", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], "PixelFormat": "ASTC_4x4", + "Swizzle": "rrr1", "MaxTextureSize": 2048, "IsPowerOf2": true, "MipMapSetting": { @@ -80,19 +47,8 @@ "Name": "Opacity", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], "PixelFormat": "BC4", + "Swizzle": "rrr1", "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" @@ -103,19 +59,8 @@ "Name": "Opacity", "SourceColor": "Linear", "DestColor": "Linear", - "FileMasks": [ - "_sss", - "_trans", - "_opac", - "_opacity", - "_o", - "_opac", - "_op", - "_mask", - "_msk", - "_blend" - ], "PixelFormat": "BC4", + "Swizzle": "rrr1", "IsPowerOf2": true, "MipMapSetting": { "MipGenType": "Box" diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinear.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinear.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinear.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinear.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinearUncompressed.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinearUncompressed.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_HDRLinearUncompressed.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_HDRLinearUncompressed.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_Linear.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_Linear.preset similarity index 100% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/ReferenceImage_Linear.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/ReferenceImage_Linear.preset diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Reflectance.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Reflectance.preset new file mode 100644 index 0000000000..9e3c718978 --- /dev/null +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Reflectance.preset @@ -0,0 +1,68 @@ +{ + "Type": "JsonSerialization", + "Version": 1, + "ClassName": "MultiplatformPresetSettings", + "ClassData": { + "DefaultPreset": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "PlatformsPresets": { + "android": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_6x6", + "Swizzle": "rrr1", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "ios": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "ASTC_6x6", + "Swizzle": "rrr1", + "MaxTextureSize": 2048, + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "mac": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + }, + "provo": { + "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", + "Name": "Reflectance", + "SourceColor": "Linear", + "DestColor": "Linear", + "PixelFormat": "BC4", + "IsPowerOf2": true, + "MipMapSetting": { + "MipGenType": "Box" + } + } + } + } +} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Skybox.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Skybox.preset similarity index 86% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/Skybox.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Skybox.preset index 4f71855ecf..b502872f92 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Skybox.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/Skybox.preset @@ -6,9 +6,6 @@ "DefaultPreset": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -24,9 +21,6 @@ "android": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -41,9 +35,6 @@ "ios": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -58,9 +49,6 @@ "mac": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, @@ -75,9 +63,6 @@ "provo": { "UUID": "{F359CD3B-37E6-4627-B4F6-2DFC2C0E3C1C}", "Name": "Skybox", - "FileMasks": [ - "_skyboxcm" - ], "SourceColor": "Linear", "DestColor": "Linear", "SuppressEngineReduce": true, diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Compressed.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Compressed.preset similarity index 95% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Compressed.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Compressed.preset index 13334de700..7e2c42fa6b 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Compressed.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Compressed.preset @@ -9,8 +9,7 @@ "SuppressEngineReduce": true, "PixelFormat": "R8G8B8A8", "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ "_ui" ] + "DestColor": "Linear" }, "PlatformsPresets": { "android": { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Lossless.preset b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Lossless.preset similarity index 95% rename from Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Lossless.preset rename to Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Lossless.preset index 39066b242b..bec6a604ef 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/UserInterface_Lossless.preset +++ b/Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/UserInterface_Lossless.preset @@ -9,8 +9,7 @@ "SuppressEngineReduce": true, "PixelFormat": "R8G8B8A8", "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ "_ui" ] + "DestColor": "Linear" }, "PlatformsPresets": { "android": { diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp index a4ba846f1b..1ae406c6fd 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.cpp @@ -8,6 +8,7 @@ #include "BuilderSettingManager.h" +#include #include #include #include @@ -17,8 +18,9 @@ #include #include #include -#include #include +#include +#include #include #include @@ -41,13 +43,18 @@ namespace ImageProcessingAtom { - const char* BuilderSettingManager::s_defaultConfigRelativeFolder = "Gems/Atom/Asset/ImageProcessingAtom/Config/"; + const char* BuilderSettingManager::s_defaultConfigRelativeFolder = "Gems/Atom/Asset/ImageProcessingAtom/Assets/Config/"; const char* BuilderSettingManager::s_projectConfigRelativeFolder = "Config/AtomImageBuilder/"; const char* BuilderSettingManager::s_builderSettingFileName = "ImageBuilder.settings"; - const char* BuilderSettingManager::s_presetFileExtension = ".preset"; + const char* BuilderSettingManager::s_presetFileExtension = "preset"; const char FileMaskDelimiter = '_'; + namespace + { + [[maybe_unused]] static constexpr const char* const LogWindow = "Image Processing"; + } + #if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS) #define AZ_RESTRICTED_PLATFORM_EXPANSION(CodeName, CODENAME, codename, PrivateName, PRIVATENAME, privatename, PublicName, PUBLICNAME, publicname, PublicAuxName1, PublicAuxName2, PublicAuxName3) \ namespace ImageProcess##PrivateName \ @@ -69,13 +76,15 @@ namespace ImageProcessingAtom if (serialize) { serialize->Class() - ->Version(1) - ->Field("AnalysisFingerprint", &BuilderSettingManager::m_analysisFingerprint) + ->Version(2) ->Field("BuildSettings", &BuilderSettingManager::m_builderSettings) - ->Field("DefaultPresetsByFileMask", &BuilderSettingManager::m_defaultPresetByFileMask) + ->Field("PresetsByFileMask", &BuilderSettingManager::m_presetFilterMap) ->Field("DefaultPreset", &BuilderSettingManager::m_defaultPreset) ->Field("DefaultPresetAlpha", &BuilderSettingManager::m_defaultPresetAlpha) - ->Field("DefaultPresetNonePOT", &BuilderSettingManager::m_defaultPresetNonePOT); + ->Field("DefaultPresetNonePOT", &BuilderSettingManager::m_defaultPresetNonePOT) + // deprecated properties + ->Field("DefaultPresetsByFileMask", &BuilderSettingManager::m_defaultPresetByFileMask) + ->Field("AnalysisFingerprint", &BuilderSettingManager::m_analysisFingerprint); } } @@ -122,7 +131,7 @@ namespace ImageProcessingAtom s_globalInstance.Reset(); } - const PresetSettings* BuilderSettingManager::GetPreset(const PresetName& presetName, const PlatformName& platform, AZStd::string_view* settingsFilePathOut) + const PresetSettings* BuilderSettingManager::GetPreset(const PresetName& presetName, const PlatformName& platform, AZStd::string_view* settingsFilePathOut) const { AZStd::lock_guard lock(m_presetMapLock); auto itr = m_presets.find(presetName); @@ -137,16 +146,36 @@ namespace ImageProcessingAtom return nullptr; } - const BuilderSettings* BuilderSettingManager::GetBuilderSetting(const PlatformName& platform) + AZStd::vector BuilderSettingManager::GetFileMasksForPreset(const PresetName& presetName) const + { + AZStd::vector fileMasks; + + AZStd::lock_guard lock(m_presetMapLock); + for (const auto& mapping:m_presetFilterMap) + { + for (const auto& preset : mapping.second) + { + if (preset == presetName) + { + fileMasks.push_back(mapping.first); + break; + } + } + } + return fileMasks; + } + + const BuilderSettings* BuilderSettingManager::GetBuilderSetting(const PlatformName& platform) const { - if (m_builderSettings.find(platform) != m_builderSettings.end()) + auto itr = m_builderSettings.find(platform); + if (itr != m_builderSettings.end()) { - return &m_builderSettings[platform]; + return &itr->second; } return nullptr; } - const PlatformNameList BuilderSettingManager::GetPlatformList() + const PlatformNameList BuilderSettingManager::GetPlatformList() const { PlatformNameList platforms; @@ -161,12 +190,19 @@ namespace ImageProcessingAtom return platforms; } - const AZStd::map >& BuilderSettingManager::GetPresetFilterMap() + const AZStd::map >& BuilderSettingManager::GetPresetFilterMap() const { AZStd::lock_guard lock(m_presetMapLock); return m_presetFilterMap; } + const AZStd::unordered_set& BuilderSettingManager::GetFullPresetList() const + { + AZStd::lock_guard lock(m_presetMapLock); + AZStd::string noFilter = AZStd::string(); + return m_presetFilterMap.find(noFilter)->second; + } + const PresetName BuilderSettingManager::GetPresetNameFromId(const AZ::Uuid& presetId) { AZStd::lock_guard lock(m_presetMapLock); @@ -188,7 +224,6 @@ namespace ImageProcessingAtom m_presetFilterMap.clear(); m_builderSettings.clear(); m_presets.clear(); - m_defaultPresetByFileMask.clear(); } StringOutcome BuilderSettingManager::LoadConfig() @@ -198,44 +233,53 @@ namespace ImageProcessingAtom auto fileIoBase = AZ::IO::FileIOBase::GetInstance(); if (fileIoBase == nullptr) { - return AZ::Failure(AZStd::string("File IO instance needs to be initialized to resolve ImageProcessing builder file aliases")); + return AZ::Failure( + AZStd::string("File IO instance needs to be initialized to resolve ImageProcessing builder file aliases")); } - // Construct the default setting path - - AZ::IO::FixedMaxPath defaultConfigFolder; if (auto engineRoot = fileIoBase->ResolvePath("@engroot@"); engineRoot.has_value()) { - defaultConfigFolder = *engineRoot; - defaultConfigFolder /= s_defaultConfigRelativeFolder; + m_defaultConfigFolder = *engineRoot; + m_defaultConfigFolder /= s_defaultConfigRelativeFolder; } - AZ::IO::FixedMaxPath projectConfigFolder; if (auto sourceGameRoot = fileIoBase->ResolvePath("@projectroot@"); sourceGameRoot.has_value()) { - projectConfigFolder = *sourceGameRoot; - projectConfigFolder /= s_projectConfigRelativeFolder; + m_projectConfigFolder = *sourceGameRoot; + m_projectConfigFolder /= s_projectConfigRelativeFolder; } AZStd::lock_guard lock(m_presetMapLock); ClearSettings(); - outcome = LoadSettings((projectConfigFolder / s_builderSettingFileName).Native()); - - if (!outcome.IsSuccess()) - { - outcome = LoadSettings((defaultConfigFolder / s_builderSettingFileName).Native()); - } + outcome = LoadSettings(); if (outcome.IsSuccess()) { // Load presets in default folder first, then load from project folder. // The same presets which loaded last will overwrite previous loaded one. - LoadPresets(defaultConfigFolder.Native()); - LoadPresets(projectConfigFolder.Native()); + LoadPresets(m_defaultConfigFolder.Native()); + LoadPresets(m_projectConfigFolder.Native()); + } - // Regenerate file mask mapping after all presets loaded - RegenerateMappings(); + // Collect extra file masks from preset files + CollectFileMasksFromPresets(); + + + if (QCoreApplication::instance()) + { + m_fileWatcher.reset(new QFileSystemWatcher); + // track preset files + // Note, the QT signal would only works for AP but not AssetBuilder + // We use file time stamp to track preset file change in builder's CreateJob + for (auto& preset : m_presets) + { + m_fileWatcher.data()->addPath(QString(preset.second.m_presetFilePath.c_str())); + } + m_fileWatcher.data()->addPath(QString(m_defaultConfigFolder.c_str())); + m_fileWatcher.data()->addPath(QString(m_projectConfigFolder.c_str())); + QObject::connect(m_fileWatcher.data(), &QFileSystemWatcher::fileChanged, this, &BuilderSettingManager::OnFileChanged); + QObject::connect(m_fileWatcher.data(), &QFileSystemWatcher::directoryChanged, this, &BuilderSettingManager::OnFolderChanged); } return outcome; @@ -243,36 +287,84 @@ namespace ImageProcessingAtom void BuilderSettingManager::LoadPresets(AZStd::string_view presetFolder) { - AZStd::lock_guard lock(m_presetMapLock); - QDirIterator it(presetFolder.data(), QStringList() << "*.preset", QDir::Files, QDirIterator::NoIteratorFlags); while (it.hasNext()) { QString filePath = it.next(); - QFileInfo fileInfo = it.fileInfo(); + LoadPreset(filePath.toUtf8().data()); + } + } - MultiplatformPresetSettings preset; - auto result = AZ::JsonSerializationUtils::LoadObjectFromFile(preset, filePath.toUtf8().data()); - if (!result.IsSuccess()) - { - AZ_Warning("Image Processing", false, "Failed to load preset file %s. Error: %s", - filePath.toUtf8().data(), result.GetError().c_str()); - } + bool BuilderSettingManager::LoadPreset(const AZStd::string& filePath) + { + QFileInfo fileInfo (filePath.c_str()); - PresetName presetName(fileInfo.baseName().toUtf8().data()); + if (!fileInfo.exists()) + { + return false; + } + + MultiplatformPresetSettings preset; + auto result = AZ::JsonSerializationUtils::LoadObjectFromFile(preset, filePath); + if (!result.IsSuccess()) + { + AZ_Warning(LogWindow, false, "Failed to load preset file %s. Error: %s", + filePath.c_str(), result.GetError().c_str()); + return false; + } + + PresetName presetName(fileInfo.baseName().toUtf8().data()); + + AZ_Warning(LogWindow, presetName == preset.GetPresetName(), "Preset file name '%s' is not" + " same as preset name '%s'. Using preset file name as preset name", + filePath.c_str(), preset.GetPresetName().GetCStr()); + + preset.SetPresetName(presetName); + + m_presets[presetName] = PresetEntry{preset, filePath.c_str(), fileInfo.lastModified()}; + return true; + } - AZ_Warning("Image Processing", presetName == preset.GetPresetName(), "Preset file name '%s' is not" - " same as preset name '%s'. Using preset file name as preset name", - filePath.toUtf8().data(), preset.GetPresetName().GetCStr()); + void BuilderSettingManager::ReloadPreset(const PresetName& presetName) + { + // Find the preset file from project or default config folder + AZStd::string presetFileName = AZStd::string::format("%s.%s", presetName.GetCStr(), s_presetFileExtension); + AZ::IO::FixedMaxPath filePath = m_projectConfigFolder/presetFileName; + QFileInfo fileInfo (filePath.c_str()); + if (!fileInfo.exists()) + { + filePath = (m_defaultConfigFolder/presetFileName).c_str(); + fileInfo = QFileInfo(filePath.c_str()); + } + + AZStd::lock_guard lock(m_presetMapLock); + + //Skip the loading if the file wasn't chagned + if (fileInfo.exists()) + { + if (m_presets.find(presetName) != m_presets.end()) + { + if (m_presets[presetName].m_lastModifiedTime == fileInfo.lastModified() + && m_presets[presetName].m_presetFilePath == filePath.c_str()) + { + return; + } + } + } - preset.SetPresetName(presetName); + // remove preset + m_presets.erase(presetName); - m_presets[presetName] = PresetEntry{preset, filePath.toUtf8().data()}; + if (fileInfo.exists()) + { + LoadPreset(filePath.c_str()); } } StringOutcome BuilderSettingManager::LoadConfigFromFolder(AZStd::string_view configFolder) { + AZStd::lock_guard lock(m_presetMapLock); + // Load builder settings AZStd::string settingFilePath = AZStd::string::format("%.*s%s", aznumeric_cast(configFolder.size()), configFolder.data(), s_builderSettingFileName); @@ -282,12 +374,108 @@ namespace ImageProcessingAtom if (result.IsSuccess()) { LoadPresets(configFolder); - RegenerateMappings(); } return result; } + void BuilderSettingManager::ReportDeprecatedSettings() + { + // reported deprecated attributes in image builder settings + if (!m_analysisFingerprint.empty()) + { + AZ_Warning(LogWindow, false, "'AnalysisFingerprint' is deprecated and it should be removed from file [%s]", s_builderSettingFileName); + } + if (!m_defaultPresetByFileMask.empty()) + { + AZ_Warning(LogWindow, false, "'DefaultPresetsByFileMask' is deprecated and it should be removed from file [%s]. Use PresetsByFileMask instead", s_builderSettingFileName); + } + } + + StringOutcome BuilderSettingManager::LoadSettings() + { + // If the project image build setting file exist, it will merge image builder settings from project folder to the settings from default config folder. + bool needMerge = false; + AZStd::string projectSettingFile{ (m_projectConfigFolder / s_builderSettingFileName).Native() }; + + if (AZ::IO::SystemFile::Exists(projectSettingFile.c_str())) + { + needMerge = true; + } + + AZ::Outcome outcome; + AZStd::string defaultSettingFile{ (m_defaultConfigFolder / s_builderSettingFileName).Native() }; + if (needMerge) + { + auto outcome1 = AZ::JsonSerializationUtils::ReadJsonFile(defaultSettingFile); + auto outcome2 = AZ::JsonSerializationUtils::ReadJsonFile(projectSettingFile); + + // return error if it failed to load default settings + if (!outcome1.IsSuccess()) + { + return STRING_OUTCOME_ERROR(outcome1.GetError()); + } + + // if project config was loaded successfully, apply merge patch + rapidjson::Document& originDoc = outcome1.GetValue(); + if (outcome2.IsSuccess()) + { + const rapidjson::Document& patchDoc = outcome2.GetValue(); + AZ::JsonSerializationResult::ResultCode result = + AZ::JsonSerialization::ApplyPatch(originDoc, originDoc.GetAllocator(), patchDoc, AZ::JsonMergeApproach::JsonMergePatch); + + if (result.GetProcessing() == AZ::JsonSerializationResult::Processing::Completed) + { + AZStd::vector outBuffer; + AZ::IO::ByteContainerStream> outStream{ &outBuffer }; + AZ::JsonSerializationUtils::WriteJsonStream(originDoc, outStream); + + outStream.Seek(0, AZ::IO::GenericStream::ST_SEEK_BEGIN); + + outcome = AZ::JsonSerializationUtils::LoadObjectFromStream(*this, outStream); + if (!outcome.IsSuccess()) + { + return STRING_OUTCOME_ERROR(outcome.GetError()); + } + + ReportDeprecatedSettings(); + + + // Generate config file fingerprint + outStream.Seek(0, AZ::IO::GenericStream::ST_SEEK_BEGIN); + AZ::u64 hash = AssetBuilderSDK::GetHashFromIOStream(outStream); + m_analysisFingerprint = AZStd::string::format("%llX", hash); + } + else + { + needMerge = false; + AZ_Warning(LogWindow, false, "Failed to fully merge data into image builder settings. Skipping project build setting file [%s]", projectSettingFile.c_str()); + } + } + else + { + AZ_Warning(LogWindow, false, "Failed to load project setting file [%s]. Skipping", projectSettingFile.c_str()); + } + } + + if (!needMerge) + { + outcome = AZ::JsonSerializationUtils::LoadObjectFromFile(*this, defaultSettingFile); + if (!outcome.IsSuccess()) + { + return STRING_OUTCOME_ERROR(outcome.GetError()); + } + + ReportDeprecatedSettings(); + + // Generate config file fingerprint + AZ::u64 hash = AssetBuilderSDK::GetFileHash(defaultSettingFile.c_str()); + m_analysisFingerprint = AZStd::string::format("%llX", hash); + } + + return STRING_OUTCOME_SUCCESS; + } + StringOutcome BuilderSettingManager::LoadSettings(AZStd::string_view filepath) { AZStd::lock_guard lock(m_presetMapLock); @@ -336,13 +524,13 @@ namespace ImageProcessingAtom return m_analysisFingerprint; } - void BuilderSettingManager::RegenerateMappings() + void BuilderSettingManager::CollectFileMasksFromPresets() { AZStd::lock_guard lock(m_presetMapLock); AZStd::string noFilter = AZStd::string(); - - m_presetFilterMap.clear(); + + AZStd::string extraString; for (const auto& presetIter : m_presets) { @@ -357,22 +545,31 @@ namespace ImageProcessingAtom { if (filemask.empty() || filemask[0] != FileMaskDelimiter) { - AZ_Warning("Image Processing", false, "File mask '%s' is invalid. It must start with '%c'.", filemask.c_str(), FileMaskDelimiter); + AZ_Warning(LogWindow, false, "File mask '%s' is invalid. It must start with '%c'.", filemask.c_str(), FileMaskDelimiter); continue; } else if (filemask.size() < 2) { - AZ_Warning("Image Processing", false, "File mask '%s' is invalid. The '%c' must be followed by at least one other character.", filemask.c_str()); + AZ_Warning(LogWindow, false, "File mask '%s' is invalid. The '%c' must be followed by at least one other character.", filemask.c_str()); continue; } else if (filemask.find(FileMaskDelimiter, 1) != AZStd::string::npos) { - AZ_Warning("Image Processing", false, "File mask '%s' is invalid. It must contain only a single '%c' character.", filemask.c_str(), FileMaskDelimiter); + AZ_Warning(LogWindow, false, "File mask '%s' is invalid. It must contain only a single '%c' character.", filemask.c_str(), FileMaskDelimiter); continue; } + + extraString += (filemask + preset.m_name.GetCStr()); + m_presetFilterMap[filemask].insert(preset.m_name); } } + + if (!extraString.empty()) + { + AZ::u64 hash = AZStd::hash{}(extraString); + m_analysisFingerprint += AZStd::string::format("%llX", hash); + } } void BuilderSettingManager::MetafilePathFromImagePath(AZStd::string_view imagePath, AZStd::string& metafilePath) @@ -419,38 +616,15 @@ namespace ImageProcessingAtom return m_presets.find(presetName) != m_presets.end(); } - PresetName BuilderSettingManager::GetSuggestedPreset(AZStd::string_view imageFilePath, IImageObjectPtr imageFromFile) + PresetName BuilderSettingManager::GetSuggestedPreset(AZStd::string_view imageFilePath) const { PresetName emptyPreset; - //load the image to get its size for later use - IImageObjectPtr image = imageFromFile; - //if the input image is empty we will try to load it from the path - if (imageFromFile == nullptr) - { - image = IImageObjectPtr(LoadImageFromFile(imageFilePath)); - } - - if (image == nullptr) - { - return emptyPreset; - } - //get file mask of this image file AZStd::string fileMask = GetFileMask(imageFilePath); PresetName outPreset = emptyPreset; - //check default presets for some file masks - if (m_defaultPresetByFileMask.find(fileMask) != m_defaultPresetByFileMask.end()) - { - outPreset = m_defaultPresetByFileMask[fileMask]; - if (!IsValidPreset(outPreset)) - { - outPreset = emptyPreset; - } - } - //use the preset filter map to find if (outPreset.IsEmpty() && !fileMask.empty()) { @@ -461,54 +635,21 @@ namespace ImageProcessingAtom } } - const PresetSettings* presetInfo = nullptr; - - if (!outPreset.IsEmpty()) - { - presetInfo = GetPreset(outPreset); - - //special case for cubemap - if (presetInfo && presetInfo->m_cubemapSetting) - { - // If it's not a latitude-longitude map or it doesn't match any cubemap layouts then reset its preset - if (!IsValidLatLongMap(image) && CubemapLayout::GetCubemapLayoutInfo(image) == nullptr) - { - outPreset = emptyPreset; - } - } - } - if (outPreset == emptyPreset) { - if (image->GetAlphaContent() == EAlphaContent::eAlphaContent_Absent) - { - outPreset = m_defaultPreset; - } - else - { - outPreset = m_defaultPresetAlpha; - } + outPreset = m_defaultPreset; } - //get the pixel format for selected preset - presetInfo = GetPreset(outPreset); - - if (presetInfo) - { - //valid whether image size work with pixel format - if (CPixelFormats::GetInstance().IsImageSizeValid(presetInfo->m_pixelFormat, - image->GetWidth(0), image->GetHeight(0), false)) - { - return outPreset; - } - else - { - AZ_Warning("Image Processing", false, "Image dimensions are not compatible with preset '%s'. The default preset will be used.", presetInfo->m_name.GetCStr()); - } - } + return outPreset; + } - //uncompressed one which could be used for almost everything - return m_defaultPresetNonePOT; + AZStd::vector BuilderSettingManager::GetPossiblePresetPaths(const PresetName& presetName) const + { + AZStd::vector paths; + AZStd::string presetFile = AZStd::string::format("%s.preset", presetName.GetCStr()); + paths.push_back((m_defaultConfigFolder / presetFile).c_str()); + paths.push_back((m_projectConfigFolder / presetFile).c_str()); + return paths; } bool BuilderSettingManager::DoesSupportPlatform(AZStd::string_view platformId) @@ -526,18 +667,50 @@ namespace ImageProcessingAtom AZStd::string filePath; if (!AzFramework::StringFunc::Path::Join(outputFolder.data(), fileName.c_str(), filePath)) { - AZ_Warning("Image Processing", false, "Failed to construct path with folder '%.*s' and file: '%s' to save preset", + AZ_Warning(LogWindow, false, "Failed to construct path with folder '%.*s' and file: '%s' to save preset", aznumeric_cast(outputFolder.size()), outputFolder.data(), filePath.c_str()); continue; } auto result = AZ::JsonSerializationUtils::SaveObjectToFile(&presetEntry.m_multiPreset, filePath); if (!result.IsSuccess()) { - AZ_Warning("Image Processing", false, "Failed to save preset '%s' to file '%s'. Error: %s", + AZ_Warning(LogWindow, false, "Failed to save preset '%s' to file '%s'. Error: %s", presetEntry.m_multiPreset.GetDefaultPreset().m_name.GetCStr(), filePath.c_str(), result.GetError().c_str()); } } } + void BuilderSettingManager::OnFileChanged(const QString &path) + { + // handles preset file change + // Note: this signal only works with AP but not AssetBuilder + AZ_TracePrintf(LogWindow, "File changed %s\n", path.toUtf8().data()); + QFileInfo info(path); + + // skip if the file is not a preset file + // Note: for .settings file change it's handled when restart AP. + if (info.suffix() != s_presetFileExtension) + { + return; + } + + ReloadPreset(PresetName(info.baseName().toUtf8().data())); + } + + void BuilderSettingManager::OnFolderChanged([[maybe_unused]] const QString &path) + { + // handles new file added or removed + // Note: this signal only works with AP but not AssetBuilder + AZ_TracePrintf(LogWindow, "folder changed %s\n", path.toUtf8().data()); + + AZStd::lock_guard lock(m_presetMapLock); + m_presets.clear(); + LoadPresets(m_defaultConfigFolder.Native()); + LoadPresets(m_projectConfigFolder.Native()); + for (auto& preset : m_presets) + { + m_fileWatcher.data()->addPath(QString(preset.second.m_presetFilePath.c_str())); + } + } } // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h index 3bbb71ea43..443b91bc07 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/BuilderSettingManager.h @@ -10,10 +10,15 @@ #include #include -#include #include +#include +#include #include +#include +#include +#include + class QSettings; class QString; @@ -36,6 +41,7 @@ namespace ImageProcessingAtom * Each preset setting may have different values on different platform, but they are using same uuid. */ class BuilderSettingManager + : public QObject // required for using QFileSystemWatcher { friend class ImageProcessingTest; @@ -49,17 +55,21 @@ namespace ImageProcessingAtom static void DestroyInstance(); static void Reflect(AZ::ReflectContext* context); - const PresetSettings* GetPreset(const PresetName& presetName, const PlatformName& platform = "", AZStd::string_view* settingsFilePathOut = nullptr); + const PresetSettings* GetPreset(const PresetName& presetName, const PlatformName& platform = "", AZStd::string_view* settingsFilePathOut = nullptr) const; + + AZStd::vector GetFileMasksForPreset(const PresetName& presetName) const; - const BuilderSettings* GetBuilderSetting(const PlatformName& platform); + const BuilderSettings* GetBuilderSetting(const PlatformName& platform) const; //! Return A list of platform supported - const PlatformNameList GetPlatformList(); + const PlatformNameList GetPlatformList() const; //! Return A map of preset settings based on their filemasks. //! @key filemask string, empty string means no filemask //! @value set of preset setting names supporting the specified filemask - const AZStd::map>& GetPresetFilterMap(); + const AZStd::map>& GetPresetFilterMap() const; + + const AZStd::unordered_set& GetFullPresetList() const; //! Find preset name based on the preset id. const PresetName GetPresetNameFromId(const AZ::Uuid& presetId); @@ -68,7 +78,11 @@ namespace ImageProcessingAtom StringOutcome LoadConfig(); //! Load configurations files from a folder which includes builder settings and presets - StringOutcome LoadConfigFromFolder(AZStd::string_view configFolder); + //! Note: this is only used for unit test. Use LoadConfig() for editor or game launcher + StringOutcome LoadConfigFromFolder(AZStd::string_view configFolder); + + //! Reload preset from config folders + void ReloadPreset(const PresetName& presetName); const AZStd::string& GetAnalysisFingerprint() const; @@ -81,7 +95,12 @@ namespace ImageProcessingAtom //! @param imageFilePath: Filepath string of the image file. The function may load the image from the path for better detection //! @param image: an optional image object which can be used for preset selection if there is no match based file mask. //! @return suggested preset name. - PresetName GetSuggestedPreset(AZStd::string_view imageFilePath, IImageObjectPtr image = nullptr); + PresetName GetSuggestedPreset(AZStd::string_view imageFilePath) const; + + //! Get the possible preset config's full file paths + //! This function is only used for setting up image's source dependency if a preset file is missing + //! Otherwise, the preset's file path can be retrieved in GetPreset() function + AZStd::vector GetPossiblePresetPaths(const PresetName& presetName) const; bool IsValidPreset(PresetName presetName) const; @@ -105,25 +124,41 @@ namespace ImageProcessingAtom private: // functions AZ_DISABLE_COPY_MOVE(BuilderSettingManager); + // Write image builder setting to the file specified by filepath StringOutcome WriteSettings(AZStd::string_view filepath); + // Load image builder settings from the file specified by filepath StringOutcome LoadSettings(AZStd::string_view filepath); + // Load merge image builder settings (project and default) + StringOutcome LoadSettings(); + + // report warnings for the deprecated properties in image builder setting data + void ReportDeprecatedSettings(); + // Clear Builder Settings and any cached maps/lists void ClearSettings(); - // Regenerate Builder Settings and any cached maps/lists - void RegenerateMappings(); + // collect file masks + void CollectFileMasksFromPresets(); // Functions to save/load preset from a folder void SavePresets(AZStd::string_view outputFolder); void LoadPresets(AZStd::string_view presetFolder); + // Load a preset to m_presets and return true if success + bool LoadPreset(const AZStd::string& filePath); + + // handle preset files changes + void OnFileChanged(const QString &path); + void OnFolderChanged(const QString &path); + private: // variables struct PresetEntry { MultiplatformPresetSettings m_multiPreset; AZStd::string m_presetFilePath; // Can be used for debug output + QDateTime m_lastModifiedTime; }; // Builder settings for each platform @@ -131,13 +166,13 @@ namespace ImageProcessingAtom AZStd::unordered_map m_presets; - // Cached list of presets mapped by their file masks. + // a list of presets mapped by their file masks. // @Key file mask, use empty string to indicate all presets without filtering // @Value set of preset names that matches the file mask AZStd::map > m_presetFilterMap; - // A mutex to protect when modifying any map in this manager - AZStd::recursive_mutex m_presetMapLock; + // A mutex to protect when modifying any map in this manager + mutable AZStd::recursive_mutex m_presetMapLock; // Default presets for certain file masks AZStd::map m_defaultPresetByFileMask; @@ -153,5 +188,14 @@ namespace ImageProcessingAtom // Image builder's version AZStd::string m_analysisFingerprint; + + // default config folder + AZ::IO::FixedMaxPath m_defaultConfigFolder; + + // project config folder + AZ::IO::FixedMaxPath m_projectConfigFolder; + + // File system watcher to detect preset file changes + QScopedPointer m_fileWatcher; }; } // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h index 9135a0f4d1..77f804b646 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/CubemapSettings.h @@ -26,19 +26,19 @@ namespace ImageProcessingAtom static void Reflect(AZ::ReflectContext* context); // "cm_ftype", cubemap angular filter type: gaussian, cone, disc, cosine, cosine_power, ggx - CubemapFilterType m_filter; + CubemapFilterType m_filter = CubemapFilterType::ggx; // "cm_fangle", base filter angle for cubemap filtering(degrees), 0 - disabled - float m_angle; + float m_angle = 0; // "cm_fmipangle", initial mip filter angle for cubemap filtering(degrees), 0 - disabled - float m_mipAngle; + float m_mipAngle = 0; // "cm_fmipslope", mip filter angle multiplier for cubemap filtering, 1 - default" - float m_mipSlope; + float m_mipSlope = 1; // "cm_edgefixup", cubemap edge fix-up width, 0 - disabled - float m_edgeFixup; + float m_edgeFixup = 0; // generate an IBL specular cubemap bool m_generateIBLSpecular = false; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h index e421715995..7c35a0634e 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/BuilderSettings/ImageProcessingDefines.h @@ -39,7 +39,8 @@ namespace ImageProcessingAtom #define STRING_OUTCOME_ERROR(error) AZ::Failure(AZStd::string(error)) // Common typedefs (with dependent forward-declarations) - typedef AZStd::string PlatformName, FileMask; + typedef AZStd::string PlatformName; + typedef AZStd::string FileMask; typedef AZ::Name PresetName; typedef AZStd::vector PlatformNameVector; typedef AZStd::list PlatformNameList; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp index 067faf3dab..3e255dcccc 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/EditorCommon.cpp @@ -171,7 +171,7 @@ namespace ImageProcessingAtomEditor if (!preset) { AZ_Warning("Texture Editor", false, "Cannot find preset %s! Will assign a suggested one for the texture.", presetName.GetCStr()); - presetName = BuilderSettingManager::Instance()->GetSuggestedPreset(m_fullPath, m_img); + presetName = BuilderSettingManager::Instance()->GetSuggestedPreset(m_fullPath); for (auto& settingIter : m_settingsMap) { @@ -257,15 +257,22 @@ namespace ImageProcessingAtomEditor // Update input width and height if it's a cubemap if (presetSetting->m_cubemapSetting != nullptr) { - CubemapLayout *srcCubemap = CubemapLayout::CreateCubemapLayout(m_img); - if (srcCubemap == nullptr) + if (IsValidLatLongMap(m_img)) { - return false; + inputWidth = inputWidth/4; + } + else + { + CubemapLayout *srcCubemap = CubemapLayout::CreateCubemapLayout(m_img); + if (srcCubemap == nullptr) + { + return false; + } + inputWidth = srcCubemap->GetFaceSize(); + delete srcCubemap; } - inputWidth = srcCubemap->GetFaceSize(); inputHeight = inputWidth; outResolutionInfo.arrayCount = 6; - delete srcCubemap; } GetOutputExtent(inputWidth, inputHeight, outResolutionInfo.width, outResolutionInfo.height, outResolutionInfo.reduce, &textureSetting, presetSetting); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp index e50d95b907..cc341c5e31 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Editor/TexturePresetSelectionWidget.cpp @@ -18,6 +18,27 @@ namespace ImageProcessingAtomEditor { using namespace ImageProcessingAtom; + + AZStd::string GetImageFileMask(const AZStd::string& imageFilePath) + { + const char FileMaskDelimiter = '_'; + + //get file name + AZStd::string fileName; + QString lowerFileName = imageFilePath.data(); + lowerFileName = lowerFileName.toLower(); + AzFramework::StringFunc::Path::GetFileName(lowerFileName.toUtf8().constData(), fileName); + + //get the substring from last '_' + size_t lastUnderScore = fileName.find_last_of(FileMaskDelimiter); + if (lastUnderScore != AZStd::string::npos) + { + return fileName.substr(lastUnderScore); + } + + return AZStd::string(); + } + TexturePresetSelectionWidget::TexturePresetSelectionWidget(EditorTextureSetting& textureSetting, QWidget* parent /*= nullptr*/) : QWidget(parent) , m_ui(new Ui::TexturePresetSelectionWidget) @@ -29,33 +50,31 @@ namespace ImageProcessingAtomEditor m_presetList.clear(); auto& presetFilterMap = BuilderSettingManager::Instance()->GetPresetFilterMap(); - AZStd::unordered_set noFilterPresetList; - - // Check if there is any filtered preset list first - for(auto& presetFilter : presetFilterMap) + if (m_listAllPresets) + { + m_presetList = BuilderSettingManager::Instance()->GetFullPresetList(); + } + else { - if (presetFilter.first.empty()) + auto fileMask = GetImageFileMask(m_textureSetting->m_textureName); + auto itr = presetFilterMap.find(fileMask); + if (itr != presetFilterMap.end()) { - noFilterPresetList = presetFilter.second; + m_presetList = itr->second; } - else if (IsMatchingWithFileMask(m_textureSetting->m_textureName, presetFilter.first)) + else { - for(const auto& presetName : presetFilter.second) - { - m_presetList.insert(presetName); - } + m_presetList = BuilderSettingManager::Instance()->GetFullPresetList(); } } - // If no filtered preset list available or should list all presets, use non-filter list - if (m_presetList.size() == 0 || m_listAllPresets) - { - m_presetList = noFilterPresetList; - } + QStringList stringList; foreach (const auto& presetName, m_presetList) { - m_ui->presetComboBox->addItem(QString(presetName.GetCStr())); + stringList.append(QString(presetName.GetCStr())); } + stringList.sort(); + m_ui->presetComboBox->addItems(stringList); // Set current preset const auto& currPreset = m_textureSetting->GetMultiplatformTextureSetting().m_preset; @@ -173,8 +192,9 @@ namespace ImageProcessingAtomEditor AZStd::string conventionText = ""; if (presetSettings) { + auto fileMasks = BuilderSettingManager::Instance()->GetFileMasksForPreset(presetSettings->m_name); int i = 0; - for (const PlatformName& filemask : presetSettings->m_fileMasks) + for (const auto& filemask : fileMasks) { conventionText += i > 0 ? " " + filemask : filemask; i++; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp index 90d45ae65a..57596f4a71 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/ImageBuilderComponent.cpp @@ -221,6 +221,58 @@ namespace ImageProcessingAtom m_isShuttingDown = true; } + PresetName GetImagePreset(const AZStd::string& filepath) + { + // first let preset from asset info + TextureSettings textureSettings; + StringOutcome output = TextureSettings::LoadTextureSetting(filepath, textureSettings); + + if (!textureSettings.m_preset.IsEmpty()) + { + return textureSettings.m_preset; + } + + return BuilderSettingManager::Instance()->GetSuggestedPreset(filepath); + } + + void HandlePresetDependency(PresetName presetName, AZStd::vector& sourceDependencyList) + { + // Reload preset if it was changed + ImageProcessingAtom::BuilderSettingManager::Instance()->ReloadPreset(presetName); + + AZStd::string_view filePath; + auto presetSettings = BuilderSettingManager::Instance()->GetPreset(presetName, /*default platform*/"", &filePath); + + AssetBuilderSDK::SourceFileDependency sourceFileDependency; + sourceFileDependency.m_sourceDependencyType = AssetBuilderSDK::SourceFileDependency::SourceFileDependencyType::Absolute; + + // Need to watch any possibe preset paths + AZStd::vector possiblePresetPaths = BuilderSettingManager::Instance()->GetPossiblePresetPaths(presetName); + for (const auto& path:possiblePresetPaths) + { + sourceFileDependency.m_sourceFileDependencyPath = path; + sourceDependencyList.push_back(sourceFileDependency); + } + + if (presetSettings) + { + // handle special case here + // Cubemap setting may reference some other presets + if (presetSettings->m_cubemapSetting) + { + if (presetSettings->m_cubemapSetting->m_generateIBLDiffuse && !presetSettings->m_cubemapSetting->m_iblDiffusePreset.IsEmpty()) + { + HandlePresetDependency(presetSettings->m_cubemapSetting->m_iblDiffusePreset, sourceDependencyList); + } + + if (presetSettings->m_cubemapSetting->m_generateIBLSpecular && !presetSettings->m_cubemapSetting->m_iblSpecularPreset.IsEmpty()) + { + HandlePresetDependency(presetSettings->m_cubemapSetting->m_iblSpecularPreset, sourceDependencyList); + } + } + } + } + // this happens early on in the file scanning pass // this function should consistently always create the same jobs, and should do no checking whether the job is up to date or not - just be consistent. void ImageBuilderWorker::CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) @@ -242,13 +294,26 @@ namespace ImageProcessingAtom if (ImageProcessingAtom::BuilderSettingManager::Instance()->DoesSupportPlatform(platformInfo.m_identifier)) { AssetBuilderSDK::JobDescriptor descriptor; - descriptor.m_jobKey = ext + " Atom Compile"; + descriptor.m_jobKey = "Image Compile: " + ext; descriptor.SetPlatformIdentifier(platformInfo.m_identifier.c_str()); descriptor.m_critical = false; + descriptor.m_additionalFingerprintInfo = ""; response.m_createJobOutputs.push_back(descriptor); } } + // add source dependency for .assetinfo file + AssetBuilderSDK::SourceFileDependency sourceFileDependency; + sourceFileDependency.m_sourceDependencyType = AssetBuilderSDK::SourceFileDependency::SourceFileDependencyType::Absolute; + sourceFileDependency.m_sourceFileDependencyPath = request.m_sourceFile; + AZ::StringFunc::Path::ReplaceExtension(sourceFileDependency.m_sourceFileDependencyPath, TextureSettings::ExtensionName); + response.m_sourceFileDependencyList.push_back(sourceFileDependency); + + // add source dependencies for .preset files + // Get the preset for this file + auto presetName = GetImagePreset(request.m_sourceFile); + HandlePresetDependency(presetName, response.m_sourceFileDependencyList); + response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; return; } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp index 5b23009cff..defca690a3 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -229,12 +230,24 @@ namespace ImageProcessingAtom AZStd::unique_ptr& cubemapSettings = m_input->m_presetSetting.m_cubemapSetting; if (cubemapSettings->m_generateIBLSpecular && !cubemapSettings->m_iblSpecularPreset.IsEmpty()) { - CreateIBLCubemap(cubemapSettings->m_iblSpecularPreset, SpecularCubemapSuffix, m_iblSpecularCubemapImage); + bool success = CreateIBLCubemap(cubemapSettings->m_iblSpecularPreset, SpecularCubemapSuffix, m_iblSpecularCubemapImage); + if (!success) + { + m_isSucceed = false; + m_isFinished = true; + break; + } } if (cubemapSettings->m_generateIBLDiffuse && !cubemapSettings->m_iblDiffusePreset.IsEmpty()) { - CreateIBLCubemap(cubemapSettings->m_iblDiffusePreset, DiffuseCubemapSuffix, m_iblDiffuseCubemapImage); + bool success = CreateIBLCubemap(cubemapSettings->m_iblDiffusePreset, DiffuseCubemapSuffix, m_iblDiffuseCubemapImage); + if (!success) + { + m_isSucceed = false; + m_isFinished = true; + break; + } } } @@ -251,7 +264,12 @@ namespace ImageProcessingAtom { if (m_input->m_presetSetting.m_cubemapSetting->m_requiresConvolve) { - FillCubemapMipmaps(); + bool success = FillCubemapMipmaps(); + if (!success) + { + m_isSucceed = false; + m_isFinished = true; + } } } else @@ -268,9 +286,7 @@ namespace ImageProcessingAtom // get gloss from normal for all mipmaps and save to alpha channel if (m_input->m_presetSetting.m_glossFromNormals) { - bool hasAlpha = (m_alphaContent == EAlphaContent::eAlphaContent_OnlyBlack - || m_alphaContent == EAlphaContent::eAlphaContent_OnlyBlackAndWhite - || m_alphaContent == EAlphaContent::eAlphaContent_Greyscale); + bool hasAlpha = Utils::NeedAlphaChannel(m_alphaContent); m_image->Get()->GlossFromNormals(hasAlpha); // set alpha content so it won't be ignored later. @@ -347,7 +363,11 @@ namespace ImageProcessingAtom } else { - AZ_TracePrintf("Image Processing", "Image converted with preset [%s] [%s] and saved to [%s] (%d bytes) taking %f seconds\n", + + [[maybe_unused]] const PixelFormatInfo* formatInfo = CPixelFormats::GetInstance().GetPixelFormatInfo(m_image->Get()->GetPixelFormat()); + AZ_TracePrintf("Image Processing", "Image [%dx%d] [%s] converted with preset [%s] [%s] and saved to [%s] (%d bytes) taking %f seconds\n", + m_image->Get()->GetWidth(0), m_image->Get()->GetHeight(0), + formatInfo->szName, m_input->m_presetSetting.m_name.GetCStr(), m_input->m_filePath.c_str(), m_input->m_outputFolder.c_str(), sizeTotal, m_processTime); @@ -421,6 +441,17 @@ namespace ImageProcessingAtom outHeight >>= 1; outReduce++; } + + // resize to min texture size if it's smaller + if (outWidth < presetSettings->m_minTextureSize) + { + outWidth = presetSettings->m_minTextureSize; + } + + if (outHeight < presetSettings->m_minTextureSize) + { + outHeight = presetSettings->m_minTextureSize; + } } bool ImageConvertProcess::ConvertToLinear() @@ -647,7 +678,7 @@ namespace ImageProcessingAtom } else if (!CPixelFormats::GetInstance().IsImageSizeValid(dstFmt, dwWidth, dwHeight, false)) { - AZ_Warning("Image Processing", false, "Image size will be scaled for pixel format %s", CPixelFormats::GetInstance().GetPixelFormatInfo(dstFmt)->szName); + AZ_TracePrintf("Image processing", "Image size will be scaled for pixel format %s\n", CPixelFormats::GetInstance().GetPixelFormatInfo(dstFmt)->szName); } #if defined(AZ_TOOLS_EXPAND_FOR_RESTRICTED_PLATFORMS) @@ -758,7 +789,7 @@ namespace ImageProcessingAtom // in very rare user case, an old texture setting file may not have a preset. We fix it over here too. if (textureSettings.m_preset.IsEmpty()) { - textureSettings.m_preset = BuilderSettingManager::Instance()->GetSuggestedPreset(imageFilePath, srcImage); + textureSettings.m_preset = BuilderSettingManager::Instance()->GetSuggestedPreset(imageFilePath); } // Get preset @@ -795,7 +826,7 @@ namespace ImageProcessingAtom return process; } - void ImageConvertProcess::CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage) + bool ImageConvertProcess::CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage) { const AZStd::string& platformId = m_input->m_platform; AZStd::string_view filePath; @@ -803,7 +834,7 @@ namespace ImageProcessingAtom if (presetSettings == nullptr) { AZ_Error("Image Processing", false, "Couldn't find preset for IBL cubemap generation"); - return; + return false; } // generate export file name @@ -838,14 +869,14 @@ namespace ImageProcessingAtom if (!imageConvertProcess) { AZ_Error("Image Processing", false, "Failed to create image convert process for the IBL cubemap"); - return; + return false; } imageConvertProcess->ProcessAll(); if (!imageConvertProcess->IsSucceed()) { AZ_Error("Image Processing", false, "Image convert process for the IBL cubemap failed"); - return; + return false; } // append the output products to the job's product list @@ -853,6 +884,7 @@ namespace ImageProcessingAtom // store the output cubemap so it can be accessed by unit tests cubemapImage = imageConvertProcess->m_image->Get(); + return true; } bool ConvertImageFile(const AZStd::string& imageFilePath, const AZStd::string& exportDir, @@ -873,68 +905,6 @@ namespace ImageProcessingAtom return result; } - IImageObjectPtr MergeOutputImageForPreview(IImageObjectPtr image, IImageObjectPtr alphaImage) - { - if (!image) - { - return IImageObjectPtr(); - } - - ImageToProcess imageToProcess(image); - imageToProcess.ConvertFormat(ePixelFormat_R8G8B8A8); - IImageObjectPtr previewImage = imageToProcess.Get(); - - // If there is separate Alpha image, combine it with output - if (alphaImage) - { - // Create pixel operation function for rgb and alpha images - IPixelOperationPtr imageOp = CreatePixelOperation(ePixelFormat_R8G8B8A8); - IPixelOperationPtr alphaOp = CreatePixelOperation(ePixelFormat_A8); - - // Convert the alpha image to A8 first - ImageToProcess imageToProcess2(alphaImage); - imageToProcess2.ConvertFormat(ePixelFormat_A8); - IImageObjectPtr previewImageAlpha = imageToProcess2.Get(); - - const uint32 imageMips = previewImage->GetMipCount(); - [[maybe_unused]] const uint32 alphaMips = previewImageAlpha->GetMipCount(); - - // Get count of bytes per pixel for both rgb and alpha images - uint32 imagePixelBytes = CPixelFormats::GetInstance().GetPixelFormatInfo(ePixelFormat_R8G8B8A8)->bitsPerBlock / 8; - uint32 alphaPixelBytes = CPixelFormats::GetInstance().GetPixelFormatInfo(ePixelFormat_A8)->bitsPerBlock / 8; - - AZ_Assert(imageMips <= alphaMips, "Mip level of alpha image is less than origin image!"); - - // For each mip level, set the alpha value to the image - for (uint32 mipLevel = 0; mipLevel < imageMips; ++mipLevel) - { - const uint32 pixelCount = previewImage->GetPixelCount(mipLevel); - [[maybe_unused]] const uint32 alphaPixelCount = previewImageAlpha->GetPixelCount(mipLevel); - - AZ_Assert(pixelCount == alphaPixelCount, "Pixel count for image and alpha image at mip level %d is not equal!", mipLevel); - - uint8* imageBuf; - uint32 pitch; - previewImage->GetImagePointer(mipLevel, imageBuf, pitch); - - uint8* alphaBuf; - uint32 alphaPitch; - previewImageAlpha->GetImagePointer(mipLevel, alphaBuf, alphaPitch); - - float rAlpha, gAlpha, bAlpha, aAlpha, rImage, gImage, bImage, aImage; - - for (uint32 i = 0; i < pixelCount; ++i, imageBuf += imagePixelBytes, alphaBuf += alphaPixelBytes) - { - alphaOp->GetRGBA(alphaBuf, rAlpha, gAlpha, bAlpha, aAlpha); - imageOp->GetRGBA(imageBuf, rImage, gImage, bImage, aImage); - imageOp->SetRGBA(imageBuf, rImage, gImage, bImage, aAlpha); - } - } - } - - return previewImage; - } - IImageObjectPtr ConvertImageForPreview(IImageObjectPtr image) { if (!image) diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h index fe57b1a89f..ba3d21191f 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvert.h @@ -51,9 +51,6 @@ namespace ImageProcessingAtom //Converts the image to a RGBA8 format that can be displayed in a preview UI. IImageObjectPtr ConvertImageForPreview(IImageObjectPtr image); - //Combine image with alpha image if any and output as RGBA8 - IImageObjectPtr MergeOutputImageForPreview(IImageObjectPtr image, IImageObjectPtr alphaImage); - //get output image size and mip count based on the texture setting and preset setting //other helper functions @@ -160,7 +157,7 @@ namespace ImageProcessingAtom bool FillCubemapMipmaps(); //IBL cubemap generation, this creates a separate ImageConvertProcess - void CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage); + bool CreateIBLCubemap(PresetName preset, const char* fileNameSuffix, IImageObjectPtr& cubemapImage); //convert color space to linear with pixel format rgba32f bool ConvertToLinear(); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp index 0e4521ab24..d81685f0c6 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.cpp @@ -16,28 +16,14 @@ namespace ImageProcessingAtom { - IImageObjectPtr ImageConvertOutput::GetOutputImage(OutputImageType type) const + IImageObjectPtr ImageConvertOutput::GetOutputImage() const { - if (type < OutputImageType::Count) - { - return m_outputImage[static_cast(type)]; - } - else - { - return IImageObjectPtr(); - } + return m_outputImage; } - void ImageConvertOutput::SetOutputImage(IImageObjectPtr image, OutputImageType type) + void ImageConvertOutput::SetOutputImage(IImageObjectPtr image) { - if (type < OutputImageType::Count) - { - m_outputImage[static_cast(type)] = image; - } - else - { - AZ_Error("ImageProcess", false, "Cannot set output image to %d", type); - } + m_outputImage = image; } void ImageConvertOutput::SetReady(bool ready) @@ -62,10 +48,7 @@ namespace ImageProcessingAtom void ImageConvertOutput::Reset() { - for (int i = 0; i < static_cast(OutputImageType::Count); i++) - { - m_outputImage[i] = nullptr; - } + m_outputImage = nullptr; m_outputReady = false; m_progress = 0.0f; } @@ -109,13 +92,12 @@ namespace ImageProcessingAtom IImageObjectPtr outputImage = m_process->GetOutputImage(); - m_output->SetOutputImage(outputImage, ImageConvertOutput::Base); - if (!IsJobCancelled()) { - // For preview, combine image output with alpha if any + // convert the output image to RGBA format for preview m_output->SetProgress(1.0f / static_cast(m_previewProcessStep)); - m_output->SetOutputImage(outputImage, ImageConvertOutput::Preview); + IImageObjectPtr uncompressedImage = ConvertImageForPreview(outputImage); + m_output->SetOutputImage(uncompressedImage); } m_output->SetReady(true); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h index 9baa5dd1b4..ac15d47806 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageConvertJob.h @@ -21,16 +21,8 @@ namespace ImageProcessingAtom class ImageConvertOutput { public: - enum OutputImageType - { - Base = 0, // Might contains alpha or not - Alpha, // Separate alpha image - Preview, // Combine base image with alpha if any, format RGBA8 - Count - }; - - IImageObjectPtr GetOutputImage(OutputImageType type) const; - void SetOutputImage(IImageObjectPtr image, OutputImageType type); + IImageObjectPtr GetOutputImage() const; + void SetOutputImage(IImageObjectPtr image); void SetReady(bool ready); bool IsReady() const; float GetProgress() const; @@ -38,7 +30,7 @@ namespace ImageProcessingAtom void Reset(); private: - IImageObjectPtr m_outputImage[OutputImageType::Count]; + IImageObjectPtr m_outputImage; bool m_outputReady = false; float m_progress = 0.0f; }; diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp index 465d992ef6..758df462ec 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImageObjectImpl.cpp @@ -183,10 +183,9 @@ namespace ImageProcessingAtom return EAlphaContent::eAlphaContent_Absent; } - //if it's compressed format, return indeterminate. if user really want to know the content, they may convert the format to ARGB8 first if (!CPixelFormats::GetInstance().IsPixelFormatUncompressed(m_pixelFormat)) { - AZ_Assert(false, "the function only works right with uncompressed formats. convert to uncompressed format if you get accurate result"); + AZ_TracePrintf("Image processing", "GetAlphaContent() was called for compressed format\n"); return EAlphaContent::eAlphaContent_Indeterminate; } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp index 77a7fbef76..ff7fa911d7 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/ImagePreview.cpp @@ -86,7 +86,7 @@ namespace ImageProcessingAtom IImageObjectPtr ImagePreview::GetOutputImage() { - return m_output.GetOutputImage(ImageConvertOutput::Preview); + return m_output.GetOutputImage(); } ImagePreview::~ImagePreview() diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp index 29ba8c3351..20e1b18e77 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.cpp @@ -385,6 +385,13 @@ namespace ImageProcessingAtom } return true; } + + bool NeedAlphaChannel(EAlphaContent alphaContent) + { + return (alphaContent == EAlphaContent::eAlphaContent_OnlyBlack + || alphaContent == EAlphaContent::eAlphaContent_OnlyBlackAndWhite + || alphaContent == EAlphaContent::eAlphaContent_Greyscale); + } } } // namespace ImageProcessingAtom diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h index d5905eddbc..59503a2366 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Processing/Utils.h @@ -26,5 +26,7 @@ namespace ImageProcessingAtom IImageObjectPtr LoadImageFromImageAsset(const AZ::Data::Asset& asset); bool SaveImageToDdsFile(IImageObjectPtr image, AZStd::string_view filePath); + + bool NeedAlphaChannel(EAlphaContent alphaContent); } } diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp b/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp index d0029ffc86..91b0952a06 100644 --- a/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp +++ b/Gems/Atom/Asset/ImageProcessingAtom/Code/Tests/ImageProcessing_Test.cpp @@ -203,7 +203,7 @@ namespace UnitTest m_gemFolder = AZ::Test::GetEngineRootPath() + "/Gems/Atom/Asset/ImageProcessingAtom/"; m_outputFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/temp/"); - m_defaultSettingFolder = m_gemFolder + AZStd::string("Config/"); + m_defaultSettingFolder = m_gemFolder + AZStd::string("Assets/Config/"); m_testFileFolder = m_gemFolder + AZStd::string("Code/Tests/TestAssets/"); InitialImageFilenames(); diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/ImageBuilder.settings b/Gems/Atom/Asset/ImageProcessingAtom/Config/ImageBuilder.settings deleted file mode 100644 index 466ac4b71d..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/ImageBuilder.settings +++ /dev/null @@ -1,67 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "BuilderSettingManager", - "ClassData": { - "AnalysisFingerprint": "2", - "BuildSettings": { - "android": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "ios": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "mac": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "pc": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "linux": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": true - }, - "provo": { - "GlossScale": 16.0, - "GlossBias": 0.0, - "Streaming": false, - "Enable": false - } - }, - "DefaultPresetsByFileMask": { - "_basecolor": "Albedo", - "_diff": "Albedo", - "_diffuse": "Albedo", - "_ddn": "Normals", - "_normal": "Normals", - "_ddna": "NormalsWithSmoothness", - "_glossness": "Reflectance", - "_spec": "Reflectance", - "_specular": "Reflectance", - "_metallic": "Reflectance", - "_refl": "Reflectance", - "_roughness": "Reflectance", - "_ibldiffusecm": "IBLDiffuse", - "_iblskyboxcm": "IBLSkybox", - "_iblspecularcm": "IBLSpecular", - "_skyboxcm": "Skybox" - }, - "DefaultPreset": "Albedo", - "DefaultPresetAlpha": "AlbedoWithGenericAlpha", - "DefaultPresetNonePOT": "ReferenceImage" - } -} diff --git a/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset b/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset deleted file mode 100644 index 2ac88dca85..0000000000 --- a/Gems/Atom/Asset/ImageProcessingAtom/Config/Reflectance.preset +++ /dev/null @@ -1,157 +0,0 @@ -{ - "Type": "JsonSerialization", - "Version": 1, - "ClassName": "MultiplatformPresetSettings", - "ClassData": { - "DefaultPreset": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_specular", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "BC1", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "PlatformsPresets": { - "android": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "ios": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "ASTC_6x6", - "MaxTextureSize": 2048, - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "mac": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "BC1", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - }, - "provo": { - "UUID": "{7A3CC95E-0A0C-4CA1-8357-5712B028B77D}", - "Name": "Reflectance", - "SourceColor": "Linear", - "DestColor": "Linear", - "FileMasks": [ - "_spec", - "_refl", - "_ref", - "_rf", - "_gloss", - "_g", - "_f0", - "_specf0", - "_metal", - "_mtl", - "_m", - "_mt", - "_metalness", - "_metallic", - "_roughness", - "_rough" - ], - "PixelFormat": "BC1", - "IsPowerOf2": true, - "MipMapSetting": { - "MipGenType": "Box" - } - } - } - } -} diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp index e41c04a0be..99b7c814d1 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/AzslShaderBuilderSystemComponent.cpp @@ -82,7 +82,7 @@ namespace AZ // Register Shader Asset Builder AssetBuilderSDK::AssetBuilderDesc shaderAssetBuilderDescriptor; shaderAssetBuilderDescriptor.m_name = "Shader Asset Builder"; - shaderAssetBuilderDescriptor.m_version = 107; // Required .azsl extension in .shader file references + shaderAssetBuilderDescriptor.m_version = 108; // The Build Time Stamp of ShaderAsset And ShaderVariantAsset Should Be Based On GetTimeUTCMilliSecond() // .shader file changes trigger rebuilds shaderAssetBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern( AZStd::string::format("*.%s", RPI::ShaderSourceData::Extension), AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); shaderAssetBuilderDescriptor.m_busId = azrtti_typeid(); @@ -108,7 +108,7 @@ namespace AZ shaderVariantAssetBuilderDescriptor.m_name = "Shader Variant Asset Builder"; // Both "Shader Variant Asset Builder" and "Shader Asset Builder" produce ShaderVariantAsset products. If you update // ShaderVariantAsset you will need to update BOTH version numbers, not just "Shader Variant Asset Builder". - shaderVariantAssetBuilderDescriptor.m_version = 26; // [AZSL] Changing inlineConstant to rootConstant keyword work. + shaderVariantAssetBuilderDescriptor.m_version = 27; // The Build Time Stamp of ShaderAsset And ShaderVariantAsset Should Be Based On GetTimeUTCMilliSecond(). shaderVariantAssetBuilderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern(AZStd::string::format("*.%s", RPI::ShaderVariantListSourceData::Extension), AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); shaderVariantAssetBuilderDescriptor.m_busId = azrtti_typeid(); shaderVariantAssetBuilderDescriptor.m_createJobFunction = AZStd::bind(&ShaderVariantAssetBuilder::CreateJobs, &m_shaderVariantAssetBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp index 89e202a4bc..e431b74282 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderAssetBuilder.cpp @@ -162,7 +162,7 @@ namespace AZ // has the same value, because later the ShaderVariantTreeAsset job will fetch this value from the local ShaderAsset // which could cross platforms (i.e. building an android ShaderVariantTreeAsset on PC would fetch the tiemstamp from // the PC's ShaderAsset). - AZStd::sys_time_t shaderAssetBuildTimestamp = AZStd::GetTimeNowMicroSecond(); + AZ::u64 shaderAssetBuildTimestamp = AZStd::GetTimeUTCMilliSecond(); // Need to get the name of the azsl file from the .shader source asset, to be able to declare a dependency to SRG Layout Job. // and the macro options to preprocess. @@ -229,8 +229,8 @@ namespace AZ } // for all request.m_enabledPlatforms AZ_TracePrintf( - ShaderAssetBuilderName, "CreateJobs for %s took %llu microseconds", shaderAssetSourceFileFullPath.c_str(), - AZStd::GetTimeNowMicroSecond() - shaderAssetBuildTimestamp); + ShaderAssetBuilderName, "CreateJobs for %s took %llu milliseconds", shaderAssetSourceFileFullPath.c_str(), + AZStd::GetTimeUTCMilliSecond() - shaderAssetBuildTimestamp); response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; } @@ -355,8 +355,8 @@ namespace AZ return; } - // Get the time stamp string as sys_time_t, and also convert back to string to make sure it was converted correctly. - AZStd::sys_time_t shaderAssetBuildTimestamp = 0; + // Get the time stamp string as u64, and also convert back to string to make sure it was converted correctly. + AZ::u64 shaderAssetBuildTimestamp = 0; auto shaderAssetBuildTimestampIterator = request.m_jobDescription.m_jobParameters.find(ShaderAssetBuildTimestampParam); if (shaderAssetBuildTimestampIterator != request.m_jobDescription.m_jobParameters.end()) { diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp index bb40baca7d..5eaa0d9ddb 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp @@ -765,7 +765,7 @@ namespace AZ return; } - const AZStd::sys_time_t shaderVariantAssetBuildTimestamp = AZStd::GetTimeNowMicroSecond(); + const AZ::u64 shaderVariantAssetBuildTimestamp = AZStd::GetTimeUTCMilliSecond(); auto supervariantList = ShaderBuilderUtility::GetSupervariantListFromShaderSourceData(shaderSourceDescriptor); diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h index 2eaf1d9d8b..b0457656af 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.h @@ -38,7 +38,7 @@ namespace AZ const AZStd::string& m_tempDirPath; //! Used to synchronize versions of the ShaderAsset and ShaderVariantAsset, //! especially during hot-reload. A (ShaderVariantAsset.timestamp) >= (ShaderAsset.timestamp). - const AZStd::sys_time_t m_assetBuildTimestamp; + const AZ::u64 m_assetBuildTimestamp; const RPI::ShaderSourceData& m_shaderSourceDataDescriptor; const RPI::ShaderOptionGroupLayout& m_shaderOptionGroupLayout; const MapOfStringToStageType& m_shaderEntryPoints; diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass index 4972f0f494..d1825be820 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpace.pass @@ -34,10 +34,6 @@ } ], "PassRequests": [ - { - "Name": "ReflectionScreenSpaceBlurPass", - "TemplateName": "ReflectionScreenSpaceBlurPassTemplate" - }, { "Name": "ReflectionScreenSpaceTracePass", "TemplateName": "ReflectionScreenSpaceTracePassTemplate", @@ -57,18 +53,44 @@ } }, { - "LocalSlot": "DepthStencilInput", + "LocalSlot": "SpecularF0Input", "AttachmentRef": { "Pass": "Parent", - "Attachment": "DepthStencilInput" - + "Attachment": "SpecularF0Input" } }, { - "LocalSlot": "SpecularF0Input", + "LocalSlot": "ReflectionInputOutput", "AttachmentRef": { "Pass": "Parent", - "Attachment": "SpecularF0Input" + "Attachment": "ReflectionInputOutput" + } + } + ] + }, + { + "Name": "ReflectionScreenSpaceBlurPass", + "TemplateName": "ReflectionScreenSpaceBlurPassTemplate", + "Connections": [ + { + "LocalSlot": "DepthInput", + "AttachmentRef": { + "Pass": "Parent", + "Attachment": "DepthStencilInput" + } + }, + { + "LocalSlot": "ScreenSpaceReflectionInputOutput", + "AttachmentRef": { + "Pass": "ReflectionScreenSpaceTracePass", + "Attachment": "ScreenSpaceReflectionOutput" + } + }, + { + "LocalSlot": "DownsampledDepthInputOutput", + "AttachmentRef": { + "Pass": "ReflectionScreenSpaceTracePass", + "Attachment": "DownsampledDepthOutput" } } ] @@ -76,22 +98,19 @@ { "Name": "ReflectionScreenSpaceCompositePass", "TemplateName": "ReflectionScreenSpaceCompositePassTemplate", - "ExecuteAfter": [ - "ReflectionScreenSpaceBlurPass" - ], "Connections": [ { - "LocalSlot": "TraceInput", + "LocalSlot": "ReflectionInput", "AttachmentRef": { - "Pass": "ReflectionScreenSpaceTracePass", - "Attachment": "Output" + "Pass": "ReflectionScreenSpaceBlurPass", + "Attachment": "ScreenSpaceReflectionInputOutput" } }, { - "LocalSlot": "PreviousFrameBufferInput", + "LocalSlot": "DownsampledDepthInput", "AttachmentRef": { "Pass": "ReflectionScreenSpaceBlurPass", - "Attachment": "PreviousFrameInputOutput" + "Attachment": "DownsampledDepthInputOutput" } }, { @@ -115,6 +134,13 @@ "Attachment": "DepthStencilInput" } }, + { + "LocalSlot": "PreviousFrameInputOutput", + "AttachmentRef": { + "Pass": "ReflectionScreenSpaceTracePass", + "Attachment": "PreviousFrameInputOutput" + } + }, { "LocalSlot": "DepthStencilInput", "AttachmentRef": { diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass index e2fde2d4ef..a5fd2fdfb1 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlur.pass @@ -8,34 +8,19 @@ "PassClass": "ReflectionScreenSpaceBlurPass", "Slots": [ { - "Name": "PreviousFrameInputOutput", - "SlotType": "InputOutput", + "Name": "DepthInput", + "SlotType": "Input", "ScopeAttachmentUsage": "Shader" - } - ], - "ImageAttachments": [ + }, { - "Name": "PreviousFrameImage", - "SizeSource": { - "Source": { - "Pass": "Parent", - "Attachment": "SpecularInput" - } - }, - "ImageDescriptor": { - "Format": "R16G16B16A16_FLOAT", - "SharedQueueMask": "Graphics" - }, - "GenerateFullMipChain": true - } - ], - "Connections": [ + "Name": "ScreenSpaceReflectionInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "Shader" + }, { - "LocalSlot": "PreviousFrameInputOutput", - "AttachmentRef": { - "Pass": "This", - "Attachment": "PreviousFrameImage" - } + "Name": "DownsampledDepthInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "DepthStencil" } ] } diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass index a616ed4c8e..af3878cf6b 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceBlurVertical.pass @@ -7,6 +7,11 @@ "Name": "ReflectionScreenSpaceBlurVerticalPassTemplate", "PassClass": "ReflectionScreenSpaceBlurChildPass", "Slots": [ + { + "Name": "DepthInput", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader" + }, { "Name": "Input", "SlotType": "InputOutput", @@ -16,6 +21,20 @@ "Name": "Output", "SlotType": "InputOutput", "ScopeAttachmentUsage": "RenderTarget" + }, + { + "Name": "DownsampledDepthOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "DepthStencil" + } + ], + "Connections": [ + { + "LocalSlot": "DepthInput", + "AttachmentRef": { + "Pass": "Parent", + "Attachment": "DepthInput" + } } ], "PassData": { diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass index 5443c32406..17b58dbc9e 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceComposite.pass @@ -8,12 +8,12 @@ "PassClass": "ReflectionScreenSpaceCompositePass", "Slots": [ { - "Name": "TraceInput", + "Name": "ReflectionInput", "SlotType": "Input", "ScopeAttachmentUsage": "Shader" }, { - "Name": "PreviousFrameBufferInput", + "Name": "DownsampledDepthInput", "SlotType": "Input", "ScopeAttachmentUsage": "Shader" }, @@ -37,6 +37,11 @@ ] } }, + { + "Name": "PreviousFrameInputOutput", + "SlotType": "InputOutput", + "ScopeAttachmentUsage": "Shader" + }, { "Name": "DepthStencilInput", "SlotType": "Input", diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass index 370db1f45a..824d23a046 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionScreenSpaceTrace.pass @@ -5,7 +5,7 @@ "ClassData": { "PassTemplate": { "Name": "ReflectionScreenSpaceTracePassTemplate", - "PassClass": "FullScreenTriangle", + "PassClass": "ReflectionScreenSpaceTracePass", "Slots": [ { "Name": "DepthStencilTextureInput", @@ -28,24 +28,52 @@ "ScopeAttachmentUsage": "Shader" }, { - "Name": "DepthStencilInput", + "Name": "ReflectionInputOutput", "SlotType": "Input", - "ScopeAttachmentUsage": "DepthStencil", - "ImageViewDesc": { - "AspectFlags": [ - "Stencil" - ] + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "PreviousFrameInputOutput", + "SlotType": "Input", + "ScopeAttachmentUsage": "Shader" + }, + { + "Name": "ScreenSpaceReflectionOutput", + "SlotType": "Output", + "ScopeAttachmentUsage": "RenderTarget", + "LoadStoreAction": { + "ClearValue": { + "Value": [ + 0.0, + 0.0, + 0.0, + 0.0 + ] + }, + "LoadAction": "Clear" } }, { - "Name": "Output", + "Name": "DownsampledDepthOutput", "SlotType": "Output", - "ScopeAttachmentUsage": "RenderTarget" + "ScopeAttachmentUsage": "DepthStencil", + "LoadStoreAction": { + "ClearValue": { + "Type": "DepthStencil", + "Value": [ + 1.0, + {}, + {}, + {} + ] + }, + "LoadAction": "Clear" + } } ], "ImageAttachments": [ { - "Name": "TraceImage", + "Name": "ScreenSpaceReflectionImage", "SizeSource": { "Source": { "Pass": "This", @@ -56,9 +84,40 @@ "HeightMultiplier": 0.5 } }, - "MultisampleSource": { - "Pass": "This", - "Attachment": "SpecularF0Input" + "ImageDescriptor": { + "Format": "R16G16B16A16_FLOAT", + "MipLevels": "5", + "SharedQueueMask": "Graphics" + } + }, + { + "Name": "DownsampledDepthImage", + "SizeSource": { + "Source": { + "Pass": "Parent", + "Attachment": "DepthStencilInput" + }, + "Multipliers": { + "WidthMultiplier": 0.5, + "HeightMultiplier": 0.5 + } + }, + "FormatSource": { + "Pass": "Parent", + "Attachment": "DepthStencilInput" + }, + "ImageDescriptor": { + "MipLevels": "5", + "SharedQueueMask": "Graphics" + } + }, + { + "Name": "PreviousFrameImage", + "SizeSource": { + "Source": { + "Pass": "Parent", + "Attachment": "SpecularInput" + } }, "ImageDescriptor": { "Format": "R16G16B16A16_FLOAT", @@ -68,15 +127,28 @@ ], "Connections": [ { - "LocalSlot": "Output", + "LocalSlot": "ScreenSpaceReflectionOutput", + "AttachmentRef": { + "Pass": "This", + "Attachment": "ScreenSpaceReflectionImage" + } + }, + { + "LocalSlot": "DownsampledDepthOutput", + "AttachmentRef": { + "Pass": "This", + "Attachment": "DownsampledDepthImage" + } + }, + { + "LocalSlot": "PreviousFrameInputOutput", "AttachmentRef": { "Pass": "This", - "Attachment": "TraceImage" + "Attachment": "PreviousFrameImage" } } ], - "PassData": - { + "PassData": { "$type": "FullscreenTrianglePassData", "ShaderAsset": { "FilePath": "Shaders/Reflections/ReflectionScreenSpaceTrace.shader" diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli index a7122aaf3a..59817af701 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli @@ -166,7 +166,7 @@ float DirectionalLightShadow::GetThickness(uint lightIndex, float3 shadowCoords[ bool2 DirectionalLightShadow::IsShadowed(float3 shadowCoord, uint indexOfCascade) { static const float PixelMargin = 1.5; // avoiding artifact between cascade levels. - static const float DepthMargin = 0.01; // avoiding artifact when near depth bounds. + static const float DepthMargin = 1e-8; // avoiding artifact when near depth bounds. // size is the shadowap's width and height. const uint size = ViewSrg::m_directionalLightShadows[m_lightIndex].m_shadowmapSize; @@ -210,8 +210,8 @@ float DirectionalLightShadow::GetVisibilityFromLightNoFilter() float DirectionalLightShadow::GetVisibilityFromLightPcf() { - static const float DepthMargin = 0.01; // avoiding artifact when near depth bounds. static const float PixelMargin = 1.5; // avoiding artifact between cascade levels. + static const float DepthMargin = 1e-8; // avoiding artifact when near depth bounds. const uint size = ViewSrg::m_directionalLightShadows[m_lightIndex].m_shadowmapSize; const uint cascadeCount = ViewSrg::m_directionalLightShadows[m_lightIndex].m_cascadeCount; diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli index daed3a2921..3b8379e7fa 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/ProjectedShadow.azsli @@ -14,6 +14,7 @@ #include #include "BicubicPcfFilters.azsli" #include "Shadow.azsli" +#include "NormalOffsetShadows.azsli" // ProjectedShadow calculates shadowed area projected from a light. class ProjectedShadow @@ -123,6 +124,7 @@ float ProjectedShadow::GetThickness(uint shadowIndex, float3 worldPosition) ProjectedShadow shadow; shadow.m_worldPosition = worldPosition; + shadow.m_normalVector = 0; // The normal vector is used to reduce acne, this is not an issue when using the shadowmap to determine thickness. shadow.m_shadowIndex = shadowIndex; shadow.SetShadowPosition(); return shadow.GetThickness(); @@ -317,8 +319,13 @@ bool ProjectedShadow::IsShadowed(float3 shadowPosition) void ProjectedShadow::SetShadowPosition() { + const float normalBias = ViewSrg::m_projectedShadows[m_shadowIndex].m_normalShadowBias; + const float shadowmapSize = ViewSrg::m_projectedFilterParams[m_shadowIndex].m_shadowmapSize; + const float3 shadowOffset = ComputeNormalShadowOffset(normalBias, m_normalVector, shadowmapSize); const float4x4 depthBiasMatrix = ViewSrg::m_projectedShadows[m_shadowIndex].m_depthBiasMatrix; - float4 shadowPositionHomogeneous = mul(depthBiasMatrix, float4(m_worldPosition, 1)); + + float4 shadowPositionHomogeneous = mul(depthBiasMatrix, float4(m_worldPosition + shadowOffset, 1)); + m_shadowPosition = shadowPositionHomogeneous.xyz / shadowPositionHomogeneous.w; m_bias = ViewSrg::m_projectedShadows[m_shadowIndex].m_bias / shadowPositionHomogeneous.w; diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader index 31fae5d98b..a9b5567f6b 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant index 19e9fdfc8d..6d4b6d0fca 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant index 43c4a615cf..5d8800a6fe 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant index 75f070a03e..930f7898c4 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblenddistance_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader index 0025388bc1..268020b431 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant index 34a9b3659f..d95ec6c1b9 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant index 4a2b0e9944..3253ddba37 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant index c053a7db19..c38b94c4f1 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridblendirradiance_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader index c507b12563..5c46d368ce 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant index f60c713597..eb6938f8c9 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant index 3e810bcfb5..8c83c1e3ff 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant index 5918f277b5..2fbb9ffffe 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdatecolumn_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader index 120eb70e54..96053f4091 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant index d38d779696..4bdbdddf33 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant index 6d7a604701..77668a2450 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant index dee941cfae..fb3dd771ca 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridborderupdaterow_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader index e2e0fa90f5..eda8d53376 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant index 7a92fc2de5..2df610df77 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant index 43408b26f3..f2458e692b 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant index 877085446d..0e08e84f74 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridclassification_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader index 2c403c77f8..1cea4860a1 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant index 4bcc47ee43..5605a47e9c 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant index f173416210..15f3477cb5 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant index 0eb04a25b8..c2bcd4ab07 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracing_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader index 2847d0035a..9958708a64 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant index 93cfb47819..fbd1d90251 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant index 4a16e24211..483be0eceb 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant index df52c9c8d2..530eef2f10 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingclosesthit_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader index d95fd5b3b2..eddac4e2bd 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant index c853de4d14..ad06bbd104 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant index 40e18c215c..527b42569a 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant index 34761ccf98..426d955938 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridraytracingmiss_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader index c19020dc84..08ed61ab03 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant index a7d44b5541..d1012a896f 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant index 82e0065216..cb730be1df 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant index 20b81aee6c..b58af4c473 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrelocation_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader index aec2786540..56009d56ab 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender.azshader differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant index de851f187e..e9893c96da 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_dx12_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant index 5d8207dfdb..d195b08c34 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_null_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant index c819e57c4c..47789d9b9b 100644 Binary files a/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant and b/Gems/Atom/Feature/Common/Assets/Shaders/DiffuseGlobalIllumination/diffuseprobegridrender_vulkan_0.azshadervariant differ diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl index 6d55648f22..db91c369ef 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/PostProcessing/NewDepthOfFieldTileReduce.azsl @@ -48,6 +48,9 @@ void MainCS(uint3 group_thread_id : SV_GroupThreadID, uint3 group_id : SV_GroupI LDS_MAX_COC[group_thread_id.x] = 0; } + // Sync LDS + GroupMemoryBarrierWithGroupSync(); + // We use gather to get 2x2 values at once, so thread samples are spaced 2 pixels apart (+1 so the sample position is in between the four pixels) float2 samplePos = float2(dispatch_id.xy) * 2 + float2(1, 1); float2 sampleUV = samplePos * PassSrg::m_inputDimensions.zw; @@ -74,6 +77,9 @@ void MainCS(uint3 group_thread_id : SV_GroupThreadID, uint3 group_id : SV_GroupI InterlockedMin( LDS_MIN_COC[0], LDS_MIN_COC[group_thread_id.x] ); InterlockedMax( LDS_MAX_COC[0], LDS_MAX_COC[group_thread_id.x] ); + // Sync LDS + GroupMemoryBarrierWithGroupSync(); + // Each group write to just one pixel. If we're the last thread in the group, write out if(group_thread_id.x == 0) { diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli index 1e4d4af8a2..3d38df2816 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurCommon.azsli @@ -6,11 +6,31 @@ * */ -// 7-tap Gaussian Kernel (Sigma 1.1) -static const uint GaussianKernelSize = 7; -static const int2 TexelOffsetsV[GaussianKernelSize] = {{0, -3}, {0, -2}, {0, -1}, {0, 0}, {0, 1}, {0, 2}, {0, 3}}; -static const int2 TexelOffsetsH[GaussianKernelSize] = {{-3, 0}, {-2, 0}, {-1, 0}, {0, 0}, {1, 0}, {2, 0}, {3, 0}}; -static const float TexelWeights[GaussianKernelSize] = {0.010805f, 0.074929f, 0.238727f, 0.351078f, 0.238727f, 0.074929f, 0.010805f}; +// Gaussian Kernel Radius 9, Sigma 1.8 +static const uint GaussianKernelSize = 19; +static const int2 TexelOffsetsV[GaussianKernelSize] = {{0, -9}, {0, -8}, {0, -7}, {0, -6}, {0, -5}, {0, -4}, {0, -3}, {0, -2}, {0, -1}, {0, 0}, {0, 1}, {0, 2}, {0, 3}, {0, 4}, {0, 5}, {0, 6}, {0, 7}, {0, 8}, {0, 9}}; +static const int2 TexelOffsetsH[GaussianKernelSize] = {{-9, 0}, {-8, 0}, {-7, 0}, {-6, 0}, {-5, 0}, {-4, 0}, {-3, 0}, {-2, 0}, {-1, 0}, {0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}, {5, 0}, {6, 0}, {7, 0}, {8, 0}, {9, 0}}; +static const float TexelWeights[GaussianKernelSize] = { + 0.0000011022801820635918f, + 0.000014295732881160677f, + 0.0001370168487067367f, + 0.0009708086495991633f, + 0.005086391900047703f, + 0.019711193240183777f, + 0.056512463228943335f, + 0.11989501853796679f, + 0.18826323520204147f, + 0.21881694875889543f, + 0.18826323520204147f, + 0.11989501853796679f, + 0.056512463228943335f, + 0.019711193240183777f, + 0.005086391900047703f, + 0.0009708086495991633f, + 0.0001370168487067367f, + 0.000014295732881160677f, + 0.0000011022801820635918f +}; float3 GaussianFilter(uint2 screenCoords, int2 texelOffsets[GaussianKernelSize], RWTexture2D inputImage) { diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl index cfc35d10e4..bdc787350e 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.azsl @@ -10,12 +10,13 @@ #include #include -#include #include +#include #include "ReflectionScreenSpaceBlurCommon.azsli" ShaderResourceGroup PassSrg : SRG_PerPass { + Texture2DMS m_depth; RWTexture2D m_input; RWTexture2D m_output; uint m_imageWidth; @@ -26,13 +27,39 @@ ShaderResourceGroup PassSrg : SRG_PerPass #include // Pixel Shader +struct PSOutput +{ + float4 m_color : SV_Target0; + float m_depth : SV_Depth; +}; + PSOutput MainPS(VSOutput IN) { // vertical blur uses coordinates from the mip0 input image - uint2 coords = IN.m_position.xy * PassSrg::m_outputScale; - float3 result = GaussianFilter(coords, TexelOffsetsV, PassSrg::m_input); + uint2 halfResCoords = IN.m_position.xy * PassSrg::m_outputScale; + float3 result = GaussianFilter(halfResCoords, TexelOffsetsV, PassSrg::m_input); + + // downsample depth, using fullscreen image coordinates + float downsampledDepth = 0; + if (PassSrg::m_input[halfResCoords].w > 0.0f) + { + uint2 fullScreenCoords = halfResCoords * 2; + + for (int y = -2; y < 2; ++y) + { + for (int x = -2; x < 2; ++x) + { + float depth = PassSrg::m_depth.Load(fullScreenCoords + int2(x, y), 0).r; + if (depth > downsampledDepth) + { + downsampledDepth = depth; + } + } + } + } PSOutput OUT; OUT.m_color = float4(result, 1.0f); + OUT.m_depth = downsampledDepth; return OUT; } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader index dcebb4d2ae..92995bd69f 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceBlurVertical.shader @@ -10,7 +10,8 @@ { "Depth" : { - "Enable" : false + "Enable" : true, // required to bind the depth buffer SRV + "CompareFunc" : "Always" } }, diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl index a0c31442fa..6cd4ce16f5 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceComposite.azsl @@ -12,17 +12,19 @@ #include #include #include +#include #include #include #include ShaderResourceGroup PassSrg : SRG_PerPass { - Texture2DMS m_trace; - Texture2D m_previousFrame; + Texture2D m_reflection; + Texture2D m_downsampledDepth; Texture2DMS m_normal; // RGB10 = Normal (Encoded), A2 = Flags Texture2DMS m_specularF0; // RGB8 = SpecularF0, A8 = Roughness Texture2DMS m_depth; + Texture2D m_previousFrame; Sampler LinearSampler { @@ -40,6 +42,49 @@ ShaderResourceGroup PassSrg : SRG_PerPass #include +float3 SampleReflection(float2 reflectionUV, float mip, float depth, float3 normal, uint2 invDimensions) +{ + const float DepthTolerance = 0.001f; + + // attempt to trivially accept the downsampled reflection texel + float downsampledDepth = PassSrg::m_downsampledDepth.SampleLevel(PassSrg::LinearSampler, reflectionUV, floor(mip)).r; + if (abs(depth - downsampledDepth) <= DepthTolerance) + { + // use this reflection sample + float3 reflection = PassSrg::m_reflection.SampleLevel(PassSrg::LinearSampler, reflectionUV, mip).rgb; + return reflection; + } + + // neighborhood search surrounding the downsampled texel, searching for the closest matching depth + float closestDepthDelta = 1.0f; + int2 closestOffsetUV = float2(0.0f, 0.0f); + for (int y = -4; y <= 4; ++y) + { + for (int x = -4; x <= 4; ++x) + { + float2 offsetUV = float2(x * invDimensions.x, y * invDimensions.y); + float downsampledDepth = PassSrg::m_downsampledDepth.SampleLevel(PassSrg::LinearSampler, reflectionUV + offsetUV, floor(mip)).r; + float depthDelta = abs(depth - downsampledDepth); + + if (depthDelta <= DepthTolerance) + { + // depth is within tolerance, use this texel + float3 reflection = PassSrg::m_reflection.SampleLevel(PassSrg::LinearSampler, reflectionUV + offsetUV, mip).rgb; + return reflection; + } + + if (closestDepthDelta > depthDelta) + { + closestDepthDelta = depthDelta; + closestOffsetUV = offsetUV; + } + } + } + + float3 reflection = PassSrg::m_reflection.SampleLevel(PassSrg::LinearSampler, reflectionUV + closestOffsetUV, mip).rgb; + return reflection; +} + // Pixel Shader PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) { @@ -52,11 +97,21 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) // compute trace image coordinates for the half-res image float2 traceCoords = screenCoords * 0.5f; - // load trace data and check w-component to see if there was a hit - float4 traceData = PassSrg::m_trace.Load(traceCoords, sampleIndex); - if (traceData.w <= 0.0f) + // check reflection data mip0 to see if there was a hit + float4 reflectionData = PassSrg::m_reflection.Load(uint3(traceCoords, 0)); + if (reflectionData.w <= 0.0f) + { + // fallback to the cubemap reflections currently in the reflection buffer + discard; + } + + // load specular and roughness + float4 specularF0 = PassSrg::m_specularF0.Load(screenCoords, sampleIndex); + float roughness = specularF0.a; + const float MaxRoughness = 0.5f; + if (roughness > MaxRoughness) { - // no hit, fallback to the cubemap reflections currently in the reflection buffer + // fallback to the cubemap reflections currently in the reflection buffer discard; } @@ -65,8 +120,9 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) float depth = PassSrg::m_depth.Load(screenCoords, sampleIndex).r; float2 ndcPos = float2(UV.x, 1.0f - UV.y) * 2.0f - 1.0f; float4 projectedPos = float4(ndcPos, depth, 1.0f); - float4 positionWS = mul(ViewSrg::m_viewProjectionInverseMatrix, projectedPos); - positionWS /= positionWS.w; + float4 positionVS = mul(ViewSrg::m_projectionMatrixInverse, projectedPos); + positionVS /= positionVS.w; + float3 positionWS = mul(ViewSrg::m_viewMatrixInverse, positionVS).xyz; // compute ray from camera to surface position float3 cameraToPositionWS = normalize(positionWS.xyz - ViewSrg::m_worldPosition); @@ -74,42 +130,16 @@ PSOutput MainPS(VSOutput IN, in uint sampleIndex : SV_SampleIndex) // retrieve surface normal float4 encodedNormal = PassSrg::m_normal.Load(screenCoords, sampleIndex); float3 normalWS = DecodeNormalSignedOctahedron(encodedNormal.rgb); - - // compute surface specular - float4 specularF0 = PassSrg::m_specularF0.Load(screenCoords, sampleIndex); - float roughness = specularF0.a; float NdotV = dot(normalWS, -cameraToPositionWS); - float3 specular = FresnelSchlickWithRoughness(NdotV, specularF0.rgb, roughness); - - // reconstruct the world space position of the trace coordinates - float2 traceUV = saturate(traceData.xy / dimensions); - float traceDepth = PassSrg::m_depth.Load(traceData.xy, sampleIndex).r; - float2 traceNDC = float2(traceUV.x, 1.0f - traceUV.y) * 2.0f - 1.0f; - float4 traceProjectedPos = float4(traceNDC, traceDepth, 1.0f); - float4 tracePositionVS = mul(ViewSrg::m_projectionMatrixInverse, traceProjectedPos); - tracePositionVS /= tracePositionVS.w; - float4 tracePositionWS = mul(ViewSrg::m_viewMatrixInverse, tracePositionVS); - - // reproject to the previous frame image coordinates - float4 tracePrevNDC = mul(ViewSrg::m_viewProjectionPrevMatrix, tracePositionWS); - tracePrevNDC /= tracePrevNDC.w; - float2 tracePrevUV = float2(tracePrevNDC.x, -1.0f * tracePrevNDC.y) * 0.5f + 0.5f; - - // compute the roughness mip to use in the previous frame image + + // compute the roughness mip to use in the reflection image // remap the roughness mip into a lower range to more closely match the material roughness values - const float MaxRoughness = 0.5f; float mip = saturate(roughness / MaxRoughness) * PassSrg::m_maxMipLevel; - // sample reflection value from the roughness mip - float4 reflectionColor = float4(PassSrg::m_previousFrame.SampleLevel(PassSrg::LinearSampler, tracePrevUV, mip).rgb, 1.0f); - - // fade rays close to screen edge - const float ScreenFadeDistance = 0.95f; - float2 fadeAmount = max(max(0.0f, traceUV - ScreenFadeDistance), max(0.0f, 1.0f - traceUV - ScreenFadeDistance)); - fadeAmount /= (1.0f - ScreenFadeDistance); - float alpha = 1.0f - max(fadeAmount.x, fadeAmount.y); - + // sample reflection color from the mip chain + float3 reflectionColor = SampleReflection(IN.m_texCoord, mip, depth, normalWS, 1.0f / dimensions); + PSOutput OUT; - OUT.m_color = float4(reflectionColor.rgb * specular, alpha); + OUT.m_color = float4(reflectionColor, reflectionData.w); return OUT; } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl index c95befce05..7c18b7f5de 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.azsl @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include @@ -20,6 +20,18 @@ ShaderResourceGroup PassSrg : SRG_PerPass Texture2DMS m_depth; Texture2DMS m_normal; // RGB10 = Normal (Encoded), A2 = Flags Texture2DMS m_specularF0; // RGB8 = SpecularF0, A8 = Roughness + Texture2DMS m_reflection; + Texture2D m_previousFrame; + + Sampler LinearSampler + { + MinFilter = Linear; + MagFilter = Linear; + MipFilter = Linear; + AddressU = Clamp; + AddressV = Clamp; + AddressW = Clamp; + }; } #include @@ -49,6 +61,12 @@ VSOutput MainVS(VSInput input) } // Pixel Shader +struct PSOutput +{ + float4 m_color : SV_Target0; + float m_depth : SV_Depth; +}; + PSOutput MainPS(VSOutput IN) { // compute screen coords based on a half-res render target @@ -83,16 +101,83 @@ PSOutput MainPS(VSOutput IN) // reflect view ray around surface normal float3 reflectDirVS = normalize(reflect(cameraToPositionVS, normalVS)); + // check to see if the reflected direction is approaching the camera + float rdotv = dot(reflectDirVS, -cameraToPositionVS); + bool fallbackEdge = false; + if (rdotv >= -0.05f) + { + if (rdotv >= 0.0f) + { + // ray points back to camera, fallback to cubemaps + discard; + } + + // ray is approaching the camera direction, but not there yet - trace the reflection and set this + // as a non-reflected pixel, which will prevent artifacts at the boundary + fallbackEdge = true; + } + // trace screenspace rays against the depth buffer to find the screenspace intersection coordinates float4 result = float4(0.0f, 0.0f, 0.0f, 0.0f); float2 hitCoords = float2(0.0f, 0.0f); if (TraceRayScreenSpace(positionVS, reflectDirVS, dimensions, hitCoords)) { - float rdotv = dot(reflectDirVS, cameraToPositionVS); - result = float4(hitCoords, 0.0f, rdotv); + // reconstruct the world space position of the trace coordinates + float2 traceUV = saturate(hitCoords / dimensions); + float traceDepth = PassSrg::m_depth.Load(hitCoords, 0).r; + float2 traceNDC = float2(traceUV.x, 1.0f - traceUV.y) * 2.0f - 1.0f; + float4 traceProjectedPos = float4(traceNDC, traceDepth, 1.0f); + float4 tracePositionVS = mul(ViewSrg::m_projectionMatrixInverse, traceProjectedPos); + tracePositionVS /= tracePositionVS.w; + float4 tracePositionWS = mul(ViewSrg::m_viewMatrixInverse, tracePositionVS); + + // reproject to the previous frame image coordinates + float4 tracePrevNDC = mul(ViewSrg::m_viewProjectionPrevMatrix, tracePositionWS); + tracePrevNDC /= tracePrevNDC.w; + float2 tracePrevUV = float2(tracePrevNDC.x, -1.0f * tracePrevNDC.y) * 0.5f + 0.5f; + + // sample the previous frame image + result.rgb = PassSrg::m_previousFrame.SampleLevel(PassSrg::LinearSampler, tracePrevUV, 0).rgb; + + // apply surface specular + float3 specularF0 = PassSrg::m_specularF0.Load(screenCoords, 0).rgb; + result.rgb *= specularF0; + + // fade rays close to screen edge + const float ScreenFadeDistance = 0.95f; + float2 fadeAmount = max(max(0.0f, traceUV - ScreenFadeDistance), max(0.0f, 1.0f - traceUV - ScreenFadeDistance)); + fadeAmount /= (1.0f - ScreenFadeDistance); + result.a = fallbackEdge ? 0.0f : 1.0f - max(fadeAmount.x, fadeAmount.y); + } + else + { + // ray miss, add in the IBL/probe reflections from the specular pass + float4 positionWS = mul(ViewSrg::m_viewMatrixInverse, positionVS); + float3 cameraToPositionWS = normalize(positionWS - ViewSrg::m_worldPosition); + float3 reflectDirWS = normalize(reflect(cameraToPositionWS, normalWS)); + + result.rgb += PassSrg::m_reflection.Load(screenCoords, 0).rgb; + result.a = fallbackEdge ? 0.0f : 1.0f; + } + + // downsample depth + float downsampledDepth = 0.0f; + for (int y = -2; y < 2; ++y) + { + for (int x = -2; x < 2; ++x) + { + float depth = PassSrg::m_depth.Load(screenCoords + int2(x, y), 0).r; + + // take the closest depth sample (larger depth value due to reverse depth) + if (depth > downsampledDepth) + { + downsampledDepth = depth; + } + } } PSOutput OUT; OUT.m_color = result; + OUT.m_depth = downsampledDepth; return OUT; } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader index 563e0e3276..3ceabd404a 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/Reflections/ReflectionScreenSpaceTrace.shader @@ -10,7 +10,8 @@ { "Depth" : { - "Enable" : false + "Enable" : true, // required to bind the depth buffer SRV + "CompareFunc" : "Always" } }, diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h index 5aa2dfb800..98220fae15 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/DiskLightFeatureProcessorInterface.h @@ -86,6 +86,8 @@ namespace AZ virtual void SetShadowsEnabled(LightHandle handle, bool enabled) = 0; //! Sets the shadow bias virtual void SetShadowBias(LightHandle handle, float bias) = 0; + //! Sets the normal shadow bias + virtual void SetNormalShadowBias(LightHandle handle, float bias) = 0; //! Sets the shadowmap size (width and height) of the light. virtual void SetShadowmapMaxResolution(LightHandle handle, ShadowmapSize shadowmapSize) = 0; //! Specifies filter method of shadows. diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h index 1a5a776cdf..52b1402b24 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/CoreLights/PointLightFeatureProcessorInterface.h @@ -74,6 +74,8 @@ namespace AZ virtual void SetFilteringSampleCount(LightHandle handle, uint16_t count) = 0; //! Sets the Esm exponent to use. Higher values produce a steeper falloff in the border areas between light and shadow. virtual void SetEsmExponent(LightHandle handle, float exponent) = 0; + //! Sets the normal shadow bias. Reduces acne by biasing the shadowmap lookup along the geometric normal. + virtual void SetNormalShadowBias(LightHandle handle, float bias) = 0; //! Sets all of the the point data for the provided LightHandle. virtual void SetPointData(LightHandle handle, const PointLightData& data) = 0; }; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h index 82cc1e7d50..b2d483e48c 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.h @@ -27,31 +27,50 @@ namespace AZ::Render static constexpr IndexType NoFreeSlot = std::numeric_limits::max(); IndexType m_firstFreeSlot = NoFreeSlot; + //! Clears all data and resets to initial state. void Clear(); + + //! Creates a new entry, default-constructs it, and returns an index that references it. IndexType GetFreeSlotIndex(); + + //! Destroys the data referenced by index and frees that index for future use. void RemoveIndex(IndexType index); + + //! Destroys the data and related index by using a pointer to the data itself. void RemoveData(DataType* data); + //! Returns a reference to the data using the provided index. DataType& GetData(IndexType index); const DataType& GetData(IndexType index) const; + + //! Returns a count of how many items are stored in the IndexedDataVector size_t GetDataCount() const; + //! Returns a reference to the internal data vector. + //! This vector should not be altered by calling code or the IndexedDataVector will be corrupted AZStd::vector& GetDataVector(); const AZStd::vector& GetDataVector() const; + + //! Returns a reference to the internal vector. + const AZStd::vector& GetDataToIndexVector() const; - AZStd::vector& GetIndexVector(); - const AZStd::vector& GetIndexVector() const; - + //! Returns the offset into the internal data vector for a given index. IndexType GetRawIndex(IndexType index) const; + + //! Returns the logical index for data given its pointer, which could passed to + //! GetData() to retrieve the data again. IndexType GetIndexForData(const DataType* data) const; private: constexpr static size_t InitialReservedSize = 128; - // Stores data indices and an embedded free list + // Indices to data and an embedded free list in the unused entries AZStd::vector m_indices; - // Stores the indirection index + + // Map of the physical index in m_data to the logical index for that data in m_indices. AZStd::vector m_dataToIndices; + + // The actual data. AZStd::vector m_data; }; } // namespace AZ::Render diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl index 581186dbcc..03c3564ce9 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/IndexedDataVector.inl @@ -125,13 +125,7 @@ namespace AZ::Render } template - inline AZStd::vector& IndexedDataVector::GetIndexVector() - { - return m_dataToIndices; - } - - template - inline const AZStd::vector& IndexedDataVector::GetIndexVector() const + inline const AZStd::vector& IndexedDataVector::GetDataToIndexVector() const { return m_dataToIndices; } diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h index 8bd494dfde..2dd4bed264 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/ModelPreset.h @@ -30,7 +30,6 @@ namespace AZ AZStd::string m_displayName; AZ::Data::Asset m_modelAsset; - AZ::Data::Asset m_previewImageAsset; }; using ModelPresetPtr = AZStd::shared_ptr; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h index e815d85cf3..c0f11dd159 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Utils/MultiIndexedDataVector.h @@ -17,7 +17,7 @@ namespace AZ { //! MultiIndexedDataVector is similar to IndexedDataVector but adds support for multiple different data vectors each containing different types //! i.e. structure of (N) arrays - //! See IndexedDataVectorTests.cpp for examples of use + //! See MultiIndexedDataVectorTests.cpp for examples of use template class MultiIndexedDataVector { diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h index fe731f4ad6..b329a35977 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomBase.h @@ -155,8 +155,10 @@ namespace AZ enum AuxGeomShapeType { ShapeType_Sphere, + ShapeType_Hemisphere, ShapeType_Cone, ShapeType_Cylinder, + ShapeType_CylinderNoEnds, // Cylinder without disks on either end ShapeType_Disk, ShapeType_Quad, diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp index b755a6efee..5cc43e9013 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.cpp @@ -314,15 +314,40 @@ namespace AZ AddShape(style, shape); } - void AuxGeomDrawQueue::DrawSphere( - const AZ::Vector3& center, + Matrix3x3 CreateMatrix3x3FromDirection(const AZ::Vector3& direction) + { + Vector3 unitDirection(direction.GetNormalized()); + Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); + Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); + return Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + } + + void AuxGeomDrawQueue::DrawSphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawSphereCommon(center, direction, radius, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, false); + } + + void AuxGeomDrawQueue::DrawSphere(const AZ::Vector3& center, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawSphereCommon(center, AZ::Vector3::CreateAxisZ(), radius, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, false); + } + + void AuxGeomDrawQueue::DrawHemisphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawSphereCommon(center, direction, radius, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, true); + } + + void AuxGeomDrawQueue::DrawSphereCommon( + const AZ::Vector3& center, + const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, - int32_t viewProjOverrideIndex) + int32_t viewProjOverrideIndex, + bool isHemisphere) { if (radius <= 0.0f) { @@ -330,12 +355,12 @@ namespace AZ } ShapeBufferEntry shape; - shape.m_shapeType = ShapeType_Sphere; + shape.m_shapeType = isHemisphere ? ShapeType_Hemisphere : ShapeType_Sphere; shape.m_depthRead = ConvertRPIDepthTestFlag(depthTest); shape.m_depthWrite = ConvertRPIDepthWriteFlag(depthWrite); shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - shape.m_rotationMatrix = Matrix3x3::CreateIdentity(); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, radius, radius); shape.m_pointSize = m_pointSize; @@ -362,13 +387,9 @@ namespace AZ shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - Vector3 unitDirection(direction.GetNormalized()); - Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); - Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); - // The disk mesh is created with the top of the disk pointing along the positive Y axis. This creates a // rotation so that the top of the disk will point along the given direction vector. - shape.m_rotationMatrix = Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, 1.0f, radius); shape.m_pointSize = m_pointSize; @@ -401,13 +422,7 @@ namespace AZ shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - Vector3 unitDirection(direction.GetNormalized()); - Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); - Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); - - // The cone mesh is created with the tip of the cone pointing along the positive Y axis. This creates a - // rotation so that the tip of the cone will point along the given direction vector. - shape.m_rotationMatrix = Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, height, radius); shape.m_pointSize = m_pointSize; @@ -416,17 +431,30 @@ namespace AZ AddShape(style, shape); } - void AuxGeomDrawQueue::DrawCylinder( - const AZ::Vector3& center, - const AZ::Vector3& direction, - float radius, - float height, - const AZ::Color& color, - DrawStyle style, - DepthTest depthTest, - DepthWrite depthWrite, - FaceCullMode faceCull, - int32_t viewProjOverrideIndex) + void AuxGeomDrawQueue::DrawCylinder(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, + DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawCylinderCommon(center, direction, radius, height, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, true); + } + + void AuxGeomDrawQueue::DrawCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, + DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) + { + DrawCylinderCommon(center, direction, radius, height, color, style, depthTest, depthWrite, faceCull, viewProjOverrideIndex, false); + } + + void AuxGeomDrawQueue::DrawCylinderCommon( + const AZ::Vector3& center, + const AZ::Vector3& direction, + float radius, + float height, + const AZ::Color& color, + DrawStyle style, + DepthTest depthTest, + DepthWrite depthWrite, + FaceCullMode faceCull, + int32_t viewProjOverrideIndex, + bool drawEnds) { if (radius <= 0.0f || height <= 0.0f) { @@ -434,19 +462,15 @@ namespace AZ } ShapeBufferEntry shape; - shape.m_shapeType = ShapeType_Cylinder; - shape.m_depthRead = ConvertRPIDepthTestFlag(depthTest); + shape.m_shapeType = drawEnds ? ShapeType_Cylinder : ShapeType_CylinderNoEnds; + shape.m_depthRead = ConvertRPIDepthTestFlag(depthTest); shape.m_depthWrite = ConvertRPIDepthWriteFlag(depthWrite); shape.m_faceCullMode = ConvertRPIFaceCullFlag(faceCull); shape.m_color = color; - Vector3 unitDirection(direction.GetNormalized()); - Vector3 unitOrthogonal(direction.GetOrthogonalVector().GetNormalized()); - Vector3 unitCross(unitOrthogonal.Cross(unitDirection)); - // The cylinder mesh is created with the top end cap of the cylinder facing along the positive Y axis. This creates a // rotation so that the top face of the cylinder will face along the given direction vector. - shape.m_rotationMatrix = Matrix3x3::CreateFromColumns(unitOrthogonal, unitDirection, unitCross); + shape.m_rotationMatrix = CreateMatrix3x3FromDirection(direction); shape.m_position = center; shape.m_scale = AZ::Vector3(radius, height, radius); shape.m_pointSize = m_pointSize; diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h index 535a992fe0..7fa1bbdca8 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/AuxGeomDrawQueue.h @@ -60,9 +60,12 @@ namespace AZ // Fixed shape draws void DrawQuad(float width, float height, const AZ::Matrix3x4& transform, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawSphere(const AZ::Vector3& center, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; + void DrawSphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; + void DrawHemisphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawDisk(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawCone(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawCylinder(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; + void DrawCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawAabb(const AZ::Aabb& aabb, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawAabb(const AZ::Aabb& aabb, const AZ::Matrix3x4& transform, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; void DrawObb(const AZ::Obb& obb, const AZ::Vector3& position, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex) override; @@ -73,6 +76,9 @@ namespace AZ private: // functions + void DrawCylinderCommon(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex, bool drawEnds); + void DrawSphereCommon(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style, DepthTest depthTest, DepthWrite depthWrite, FaceCullMode faceCull, int32_t viewProjOverrideIndex, bool isHemisphere); + //! Clear the current buffers void ClearCurrentBufferData(); diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp index c2ee397b4c..2e7c0759db 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.cpp @@ -10,6 +10,7 @@ #include "AuxGeomDrawProcessorShared.h" #include +#include #include #include @@ -69,11 +70,13 @@ namespace AZ SetupInputStreamLayout(m_objectStreamLayout[DrawStyle_Solid], RHI::PrimitiveTopology::TriangleList, false); SetupInputStreamLayout(m_objectStreamLayout[DrawStyle_Shaded], RHI::PrimitiveTopology::TriangleList, true); - CreateSphereBuffersAndViews(); + CreateSphereBuffersAndViews(AuxGeomShapeType::ShapeType_Sphere); + CreateSphereBuffersAndViews(AuxGeomShapeType::ShapeType_Hemisphere); CreateQuadBuffersAndViews(); CreateDiskBuffersAndViews(); CreateConeBuffersAndViews(); - CreateCylinderBuffersAndViews(); + CreateCylinderBuffersAndViews(AuxGeomShapeType::ShapeType_Cylinder); + CreateCylinderBuffersAndViews(AuxGeomShapeType::ShapeType_CylinderNoEnds); CreateBoxBuffersAndViews(); // cache scene pointer for RHI::PipelineState creation. @@ -293,8 +296,11 @@ namespace AZ } } - bool FixedShapeProcessor::CreateSphereBuffersAndViews() + bool FixedShapeProcessor::CreateSphereBuffersAndViews(AuxGeomShapeType sphereShapeType) { + AZ_Assert(sphereShapeType == ShapeType_Sphere || sphereShapeType == ShapeType_Hemisphere, + "Trying to create sphere buffers and views with a non-sphere shape type!"); + const uint32_t numSphereLods = 5; struct LodInfo { @@ -311,13 +317,13 @@ namespace AZ { 9, 9, 0.0000f} }}; - auto& m_shape = m_shapes[ShapeType_Sphere]; + auto& m_shape = m_shapes[sphereShapeType]; m_shape.m_numLods = numSphereLods; for (uint32_t lodIndex = 0; lodIndex < numSphereLods; ++lodIndex) { MeshData meshData; - CreateSphereMeshData(meshData, lodInfo[lodIndex].numRings, lodInfo[lodIndex].numSections); + CreateSphereMeshData(meshData, lodInfo[lodIndex].numRings, lodInfo[lodIndex].numSections, sphereShapeType); ObjectBuffers objectBuffers; @@ -334,12 +340,25 @@ namespace AZ return true; } - void FixedShapeProcessor::CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections) + void FixedShapeProcessor::CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections, AuxGeomShapeType sphereShapeType) { const float radius = 1.0f; + // calculate "inner" vertices + float sectionAngle(DegToRad(360.0f / static_cast(numSections))); + float ringSlice(DegToRad(180.0f / static_cast(numRings))); + + uint32_t numberOfPoles = 2; + + if (sphereShapeType == ShapeType_Hemisphere) + { + numberOfPoles = 1; + numRings = (numRings + 1) / 2; + ringSlice = DegToRad(90.0f / static_cast(numRings)); + } + // calc required number of vertices/indices/triangles to build a sphere for the given parameters - uint32_t numVertices = (numRings - 1) * numSections + 2; + uint32_t numVertices = (numRings - 1) * numSections + numberOfPoles; // setup buffers auto& positions = meshData.m_positions; @@ -354,30 +373,29 @@ namespace AZ using NormalType = AuxGeomNormal; // 1st pole vertex - positions.push_back(PosType(0.0f, 0.0f, radius)); - normals.push_back(NormalType(0.0f, 0.0f, 1.0f)); + positions.push_back(PosType(0.0f, radius, 0.0f)); + normals.push_back(NormalType(0.0f, 1.0f, 0.0f)); - // calculate "inner" vertices - float sectionAngle(DegToRad(360.0f / static_cast(numSections))); - float ringSlice(DegToRad(180.0f / static_cast(numRings))); - - for (uint32_t ring = 1; ring < numRings; ++ring) + for (uint32_t ring = 1; ring < numRings - numberOfPoles + 2; ++ring) { float w(sinf(ring * ringSlice)); for (uint32_t section = 0; section < numSections; ++section) { float x = radius * cosf(section * sectionAngle) * w; - float y = radius * sinf(section * sectionAngle) * w; - float z = radius * cosf(ring * ringSlice); + float y = radius * cosf(ring * ringSlice); + float z = radius * sinf(section * sectionAngle) * w; Vector3 radialVector(x, y, z); positions.push_back(radialVector); normals.push_back(radialVector.GetNormalized()); } } - // 2nd vertex of pole (for end cap) - positions.push_back(PosType(0.0f, 0.0f, -radius)); - normals.push_back(NormalType(0.0f, 0.0f, -1.0f)); + if (sphereShapeType == ShapeType_Sphere) + { + // 2nd vertex of pole (for end cap) + positions.push_back(PosType(0.0f, -radius, 0.0f)); + normals.push_back(NormalType(0.0f, -1.0f, 0.0f)); + } // point indices { @@ -393,7 +411,8 @@ namespace AZ // line indices { - const uint32_t numEdges = (numRings - 2) * numSections * 2 + 2 * numSections * 2; + // NumEdges = NumRingEdges + NumSectionEdges = (numRings * numSections) + (numRings * numSections) + const uint32_t numEdges = numRings * numSections * 2; const uint32_t numLineIndices = numEdges * 2; // build "inner" faces @@ -401,10 +420,9 @@ namespace AZ indices.clear(); indices.reserve(numLineIndices); - for (uint16_t ring = 0; ring < numRings - 2; ++ring) + for (uint16_t ring = 0; ring < numRings - numberOfPoles + 1; ++ring) { uint16_t firstVertOfThisRing = static_cast(1 + ring * numSections); - uint16_t firstVertOfNextRing = static_cast(1 + (ring + 1) * numSections); for (uint16_t section = 0; section < numSections; ++section) { uint32_t nextSection = (section + 1) % numSections; @@ -414,32 +432,33 @@ namespace AZ indices.push_back(static_cast(firstVertOfThisRing + nextSection)); // line around section - indices.push_back(firstVertOfThisRing + section); - indices.push_back(firstVertOfNextRing + section); + int currentVertexIndex = firstVertOfThisRing + section; + // max 0 will implicitly handle the top pole + int previousVertexIndex = AZStd::max(currentVertexIndex - (int)numSections, 0); + indices.push_back(static_cast(currentVertexIndex)); + indices.push_back(static_cast(previousVertexIndex)); } } - // build faces for end caps (to connect "inner" vertices with poles) - uint16_t firstPoleVert = 0; - uint16_t firstVertOfFirstRing = static_cast(1 + (0) * numSections); - for (uint16_t section = 0; section < numSections; ++section) - { - indices.push_back(firstPoleVert); - indices.push_back(firstVertOfFirstRing + section); - } - - uint16_t lastPoleVert = static_cast((numRings - 1) * numSections + 1); - uint16_t firstVertOfLastRing = static_cast(1 + (numRings - 2) * numSections); - for (uint16_t section = 0; section < numSections; ++section) + if (sphereShapeType == ShapeType_Sphere) { - indices.push_back(firstVertOfLastRing + section); - indices.push_back(lastPoleVert); + // build faces for bottom pole (to connect "inner" vertices with poles) + uint16_t lastPoleVert = static_cast((numRings - 1) * numSections + 1); + uint16_t firstVertOfLastRing = static_cast(1 + (numRings - 2) * numSections); + for (uint16_t section = 0; section < numSections; ++section) + { + indices.push_back(firstVertOfLastRing + section); + indices.push_back(lastPoleVert); + } } } // triangle indices { - const uint32_t numTriangles = (numRings - 2) * numSections * 2 + 2 * numSections; + // NumTriangles = NumTrianglesAtPoles + NumQuads * 2 + // = (numSections * 2) + ((numRings - 2) * numSections * 2) + // = (numSections * 2) * (numRings - 2 + 1) + const uint32_t numTriangles = (numRings - 1) * numSections * 2; const uint32_t numTriangleIndices = numTriangles * 3; // build "inner" faces @@ -447,10 +466,10 @@ namespace AZ indices.clear(); indices.reserve(numTriangleIndices); - for (uint32_t ring = 0; ring < numRings - 2; ++ring) + for (uint32_t ring = 0; ring < numRings - numberOfPoles; ++ring) { uint32_t firstVertOfThisRing = 1 + ring * numSections; - uint32_t firstVertOfNextRing = 1 + (ring + 1) * numSections; + uint32_t firstVertOfNextRing = firstVertOfThisRing + numSections; for (uint32_t section = 0; section < numSections; ++section) { @@ -476,14 +495,17 @@ namespace AZ indices.push_back(static_cast(firstPoleVert)); } - uint32_t lastPoleVert = (numRings - 1) * numSections + 1; - uint32_t firstVertOfLastRing = 1 + (numRings - 2) * numSections; - for (uint32_t section = 0; section < numSections; ++section) + if (sphereShapeType == ShapeType_Sphere) { - uint32_t nextSection = (section + 1) % numSections; - indices.push_back(static_cast(firstVertOfLastRing + nextSection)); - indices.push_back(static_cast(firstVertOfLastRing + section)); - indices.push_back(static_cast(lastPoleVert)); + uint32_t lastPoleVert = (numRings - 1) * numSections + 1; + uint32_t firstVertOfLastRing = 1 + (numRings - 2) * numSections; + for (uint32_t section = 0; section < numSections; ++section) + { + uint32_t nextSection = (section + 1) % numSections; + indices.push_back(static_cast(firstVertOfLastRing + nextSection)); + indices.push_back(static_cast(firstVertOfLastRing + section)); + indices.push_back(static_cast(lastPoleVert)); + } } } } @@ -827,8 +849,11 @@ namespace AZ } } - bool FixedShapeProcessor::CreateCylinderBuffersAndViews() + bool FixedShapeProcessor::CreateCylinderBuffersAndViews(AuxGeomShapeType cylinderShapeType) { + AZ_Assert(cylinderShapeType == ShapeType_Cylinder || cylinderShapeType == ShapeType_CylinderNoEnds, + "Trying to create cylinder buffers and views with a non-cylinder shape type!"); + const uint32_t numCylinderLods = 5; struct LodInfo { @@ -836,21 +861,21 @@ namespace AZ float screenPercentage; }; const AZStd::array lodInfo = - {{ + { { { 38, 0.1000f}, { 22, 0.0100f}, { 14, 0.0010f}, { 10, 0.0001f}, { 8, 0.0000f} - }}; + } }; - auto& m_shape = m_shapes[ShapeType_Cylinder]; + auto& m_shape = m_shapes[cylinderShapeType]; m_shape.m_numLods = numCylinderLods; for (uint32_t lodIndex = 0; lodIndex < numCylinderLods; ++lodIndex) { MeshData meshData; - CreateCylinderMeshData(meshData, lodInfo[lodIndex].numSections); + CreateCylinderMeshData(meshData, lodInfo[lodIndex].numSections, cylinderShapeType); ObjectBuffers objectBuffers; @@ -867,13 +892,25 @@ namespace AZ return true; } - void FixedShapeProcessor::CreateCylinderMeshData(MeshData& meshData, uint32_t numSections) + void FixedShapeProcessor::CreateCylinderMeshData(MeshData& meshData, uint32_t numSections, AuxGeomShapeType cylinderShapeType) { const float radius = 1.0f; const float height = 1.0f; + //uint16_t indexOfBottomCenter = 0; + //uint16_t indexOfBottomStart = 1; + //uint16_t indexOfTopCenter = numSections + 1; + //uint16_t indexOfTopStart = numSections + 2; + uint16_t indexOfSidesStart = static_cast(2 * numSections + 2); + + if (cylinderShapeType == ShapeType_CylinderNoEnds) + { + // We won't draw disks at the ends of the cylinder, so no need to offset side indices + indexOfSidesStart = 0; + } + // calc required number of vertices to build a cylinder for the given parameters - uint32_t numVertices = 4 * numSections + 2; + uint32_t numVertices = indexOfSidesStart + 2 * numSections; // setup buffers auto& positions = meshData.m_positions; @@ -888,8 +925,11 @@ namespace AZ float topHeight = height * 0.5f; // Create caps - CreateDiskMeshData(meshData, numSections, Facing::Down, bottomHeight); - CreateDiskMeshData(meshData, numSections, Facing::Up, topHeight); + if (cylinderShapeType == ShapeType_Cylinder) + { + CreateDiskMeshData(meshData, numSections, Facing::Down, bottomHeight); + CreateDiskMeshData(meshData, numSections, Facing::Up, topHeight); + } // create vertices for side (so normal points out correctly) float sectionAngle(DegToRad(360.0f / (float)numSections)); @@ -906,12 +946,6 @@ namespace AZ normals.push_back(normal); } - //uint16_t indexOfBottomCenter = 0; - //uint16_t indexOfBottomStart = 1; - //uint16_t indexOfTopCenter = numSections + 1; - //uint16_t indexOfTopStart = numSections + 2; - uint16_t indexOfSidesStart = static_cast(2 * numSections + 2); - // build point indices { auto& indices = meshData.m_pointIndices; @@ -930,6 +964,24 @@ namespace AZ indices.push_back(indexOfSidesStart + 2 * section); indices.push_back(indexOfSidesStart + 2 * section + 1); } + + // If we're not drawing the disks at the ends of the cylinder, we still want to + // draw a ring around the end to join the tips of lines we created just above + if (cylinderShapeType == ShapeType_CylinderNoEnds) + { + for (uint16_t section = 0; section < numSections; ++section) + { + uint16_t nextSection = (section + 1) % numSections; + + // line around the bottom cap + indices.push_back(section * 2); + indices.push_back(nextSection * 2); + + // line around the top cap + indices.push_back(section * 2 + 1); + indices.push_back(nextSection * 2 + 1); + } + } } // indices for triangles diff --git a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h index 4007d62f66..958cee3143 100644 --- a/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/AuxGeom/FixedShapeProcessor.h @@ -138,8 +138,8 @@ namespace AZ Both, }; - bool CreateSphereBuffersAndViews(); - void CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections); + bool CreateSphereBuffersAndViews(AuxGeomShapeType sphereShapeType); + void CreateSphereMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections, AuxGeomShapeType sphereShapeType); bool CreateQuadBuffersAndViews(); void CreateQuadMeshDataSide(MeshData& meshData, bool isUp, bool drawLines); @@ -152,8 +152,8 @@ namespace AZ bool CreateConeBuffersAndViews(); void CreateConeMeshData(MeshData& meshData, uint32_t numRings, uint32_t numSections); - bool CreateCylinderBuffersAndViews(); - void CreateCylinderMeshData(MeshData& meshData, uint32_t numSections); + bool CreateCylinderBuffersAndViews(AuxGeomShapeType cylinderShapeType); + void CreateCylinderMeshData(MeshData& meshData, uint32_t numSections, AuxGeomShapeType cylinderShapeType); bool CreateBoxBuffersAndViews(); void CreateBoxMeshData(MeshData& meshData); diff --git a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp index 2e5db39880..c3c189eb62 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CommonSystemComponent.cpp @@ -100,6 +100,7 @@ #include #include #include +#include #include #include #include @@ -292,6 +293,7 @@ namespace AZ passSystem->AddPassCreator(Name("DeferredFogPass"), &DeferredFogPass::Create); // Add Reflection passes + passSystem->AddPassCreator(Name("ReflectionScreenSpaceTracePass"), &Render::ReflectionScreenSpaceTracePass::Create); passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurPass"), &Render::ReflectionScreenSpaceBlurPass::Create); passSystem->AddPassCreator(Name("ReflectionScreenSpaceBlurChildPass"), &Render::ReflectionScreenSpaceBlurChildPass::Create); passSystem->AddPassCreator(Name("ReflectionScreenSpaceCompositePass"), &Render::ReflectionScreenSpaceCompositePass::Create); diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp index 410c80dbdc..8a1ff95f29 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.cpp @@ -343,7 +343,6 @@ namespace AZ m_shadowBufferNeedsUpdate = true; m_shadowProperties.GetData(index).m_cameraConfigurations[nullptr] = {}; - m_shadowProperties.GetData(index).m_cameraTransforms[nullptr] = Transform::CreateIdentity(); const LightHandle handle(index); m_shadowingLightHandle = handle; // only the recent light has shadows. @@ -495,20 +494,10 @@ namespace AZ void DirectionalLightFeatureProcessor::SetCameraTransform( LightHandle handle, - const Transform& cameraTransform, - const RPI::RenderPipelineId& renderPipelineId) + const Transform&, + const RPI::RenderPipelineId&) { ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); - - if (RPI::RenderPipeline* renderPipeline = GetParentScene()->GetRenderPipeline(renderPipelineId).get()) - { - const RPI::View* cameraView = renderPipeline->GetDefaultView().get(); - property.m_cameraTransforms[cameraView] = cameraTransform; - } - else - { - property.m_cameraTransforms[nullptr] = cameraTransform; - } property.m_shadowmapViewNeedsUpdate = true; } @@ -934,17 +923,6 @@ namespace AZ return property.m_cameraConfigurations.at(nullptr); } - const Transform& DirectionalLightFeatureProcessor::GetCameraTransform(LightHandle handle, const RPI::View* cameraView) const - { - const ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); - const auto findIt = property.m_cameraTransforms.find(cameraView); - if (findIt != property.m_cameraTransforms.end()) - { - return findIt->second; - } - return property.m_cameraTransforms.at(nullptr); - } - void DirectionalLightFeatureProcessor::UpdateFrustums( LightHandle handle) { @@ -1248,6 +1226,32 @@ namespace AZ property.m_shadowmapViewNeedsUpdate = true; } + float DirectionalLightFeatureProcessor::GetShadowmapSizeFromCameraView(const LightHandle handle, const RPI::View* cameraView) const + { + const DirectionalLightShadowData& shadowData = m_shadowData.at(cameraView).GetData(handle.GetIndex()); + return static_cast(shadowData.m_shadowmapSize); + } + + void DirectionalLightFeatureProcessor::SnapAabbToPixelIncrements(const float invShadowmapSize, Vector3& orthoMin, Vector3& orthoMax) + { + // This function stops the cascaded shadowmap from shimmering as the camera moves. + // See CascadedShadowsManager.cpp in the Microsoft CascadedShadowMaps11 sample for details. + + const Vector3 normalizeByBufferSize = Vector3(invShadowmapSize, invShadowmapSize, invShadowmapSize); + + const Vector3 worldUnitsPerTexel = (orthoMax - orthoMin) * normalizeByBufferSize; + + // We snap the camera to 1 pixel increments so that moving the camera does not cause the shadows to jitter. + // This is a matter of dividing by the world space size of a texel + orthoMin /= worldUnitsPerTexel; + orthoMin = orthoMin.GetFloor(); + orthoMin *= worldUnitsPerTexel; + + orthoMax /= worldUnitsPerTexel; + orthoMax = orthoMax.GetFloor(); + orthoMax *= worldUnitsPerTexel; + } + void DirectionalLightFeatureProcessor::UpdateShadowmapViews(LightHandle handle) { ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); @@ -1259,18 +1263,26 @@ namespace AZ for (auto& segmentIt : property.m_segments) { + const float invShadowmapSize = 1.0f / GetShadowmapSizeFromCameraView(handle, segmentIt.first); + for (uint16_t cascadeIndex = 0; cascadeIndex < segmentIt.second.size(); ++cascadeIndex) { - const Aabb viewAabb = CalculateShadowViewAabb( - handle, segmentIt.first, cascadeIndex, lightTransform); + const Aabb viewAabb = CalculateShadowViewAabb(handle, segmentIt.first, cascadeIndex, lightTransform); if (viewAabb.IsValid() && viewAabb.IsFinite()) { + const float cascadeNear = viewAabb.GetMin().GetY(); + const float cascadeFar = viewAabb.GetMax().GetY(); + + Vector3 snappedAabbMin = viewAabb.GetMin(); + Vector3 snappedAabbMax = viewAabb.GetMax(); + + SnapAabbToPixelIncrements(invShadowmapSize, snappedAabbMin, snappedAabbMax); + Matrix4x4 viewToClipMatrix = Matrix4x4::CreateIdentity(); - MakeOrthographicMatrixRH(viewToClipMatrix, - viewAabb.GetMin().GetElement(0), viewAabb.GetMax().GetElement(0), - viewAabb.GetMin().GetElement(2), viewAabb.GetMax().GetElement(2), - viewAabb.GetMin().GetElement(1), viewAabb.GetMax().GetElement(1)); + MakeOrthographicMatrixRH( + viewToClipMatrix, snappedAabbMin.GetElement(0), snappedAabbMax.GetElement(0), snappedAabbMin.GetElement(2), + snappedAabbMax.GetElement(2), cascadeNear, cascadeFar); CascadeSegment& segment = segmentIt.second[cascadeIndex]; segment.m_aabb = viewAabb; @@ -1331,10 +1343,11 @@ namespace AZ // If we used an AABB whose Y-direction range is from a segment, // the depth value on the shadowmap saturated to 0 or 1, // and we could not draw shadow correctly. + const Transform cameraTransform = cameraView->GetCameraTransform(); const Vector3 entireFrustumCenterLight = - lightTransform.GetInverseFast() * (GetCameraTransform(handle, cameraView).TransformPoint(property.m_entireFrustumCenterLocal)); + lightTransform.GetInverseFast() * (cameraTransform.TransformPoint(property.m_entireFrustumCenterLocal)); const float entireCenterY = entireFrustumCenterLight.GetElement(1); - const Vector3 cameraLocationWorld = GetCameraTransform(handle, cameraView).GetTranslation(); + const Vector3 cameraLocationWorld = cameraTransform.GetTranslation(); const Vector3 cameraLocationLight = lightTransformInverse * cameraLocationWorld; // Extend light view frustum by camera depth far in order to avoid shadow lacking behind camera. const float cameraBehindMinY = cameraLocationLight.GetElement(1) - GetCameraConfiguration(handle, cameraView).GetDepthFar(); @@ -1394,8 +1407,8 @@ namespace AZ GetCameraConfiguration(handle, cameraView).GetDepthCenter(depthNear, depthFar), depthFar); - const Vector3 localCenter{ 0.f, depthCenter, 0.f }; - return GetCameraTransform(handle, cameraView).TransformPoint(localCenter); + const Vector3 localCenter{ 0.f, depthCenter, 0.f }; + return cameraView->GetCameraTransform().TransformPoint(localCenter); } float DirectionalLightFeatureProcessor::GetRadius( @@ -1449,7 +1462,7 @@ namespace AZ const ShadowProperty& property = m_shadowProperties.GetData(handle.GetIndex()); const Vector3& boundaryCenter = GetWorldCenterPosition(handle, cameraView, depthNear, depthFar); const CascadeShadowCameraConfiguration& cameraConfiguration = GetCameraConfiguration(handle, cameraView); - const Transform& cameraTransform = GetCameraTransform(handle, cameraView); + const Transform cameraTransform = cameraView->GetCameraTransform(); const Vector3& cameraFwd = cameraTransform.GetBasis(1); const Vector3& cameraUp = cameraTransform.GetBasis(2); const Vector3 cameraToBoundaryCenter = boundaryCenter - cameraTransform.GetTranslation(); diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h index 8d7a9d76e4..c206a5097f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DirectionalLightFeatureProcessor.h @@ -134,9 +134,6 @@ namespace AZ // Default far depth of each cascade. AZStd::array m_defaultFarDepths; - // Transforms of camera who offers view frustum for each camera view. - AZStd::unordered_map m_cameraTransforms; - // Configuration offers shape of the camera view frustum for each camera view. AZStd::unordered_map m_cameraConfigurations; @@ -259,11 +256,6 @@ namespace AZ //! it returns one of the fallback render pipeline ID. const CascadeShadowCameraConfiguration& GetCameraConfiguration(LightHandle handle, const RPI::View* cameraView) const; - //! This returns the camera transform. - //! If it has not been registered for the given camera view. - //! it returns one of the fallback render pipeline ID. - const Transform& GetCameraTransform(LightHandle handle, const RPI::View* cameraView) const; - //! This update view frustum of camera. void UpdateFrustums(LightHandle handle); @@ -341,6 +333,9 @@ namespace AZ //! This draws bounding boxes of cascades. void DrawCascadeBoundingBoxes(LightHandle handle); + float GetShadowmapSizeFromCameraView(const LightHandle handle, const RPI::View* cameraView) const; + void SnapAabbToPixelIncrements(const float invShadowmapSize, Vector3& orthoMin, Vector3& orthoMax); + IndexedDataVector m_shadowProperties; // [GFX TODO][ATOM-2012] shadow for multiple directional lights LightHandle m_shadowingLightHandle; diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp index acf81ede32..e362ee3afc 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.cpp @@ -313,6 +313,11 @@ namespace AZ SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetShadowBias, bias); } + void DiskLightFeatureProcessor::SetNormalShadowBias(LightHandle handle, float bias) + { + SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetNormalShadowBias, bias); + } + void DiskLightFeatureProcessor::SetShadowmapMaxResolution(LightHandle handle, ShadowmapSize shadowmapSize) { SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetShadowmapMaxResolution, shadowmapSize); diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h index 275712f84f..bafddacc65 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/DiskLightFeatureProcessor.h @@ -51,6 +51,7 @@ namespace AZ void SetConeAngles(LightHandle handle, float innerDegrees, float outerDegrees) override; void SetShadowsEnabled(LightHandle handle, bool enabled) override; void SetShadowBias(LightHandle handle, float bias) override; + void SetNormalShadowBias(LightHandle handle, float bias) override; void SetShadowmapMaxResolution(LightHandle handle, ShadowmapSize shadowmapSize) override; void SetShadowFilterMethod(LightHandle handle, ShadowFilterMethod method) override; void SetFilteringSampleCount(LightHandle handle, uint16_t count) override; diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp index dcf412c35d..c5d6c3bf78 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.cpp @@ -302,5 +302,10 @@ namespace AZ SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetEsmExponent, esmExponent); } + void PointLightFeatureProcessor::SetNormalShadowBias(LightHandle handle, float bias) + { + SetShadowSetting(handle, &ProjectedShadowFeatureProcessor::SetNormalShadowBias, bias); + } + } // namespace Render } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h index 54cb0303cc..df97fa0a52 100644 --- a/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/CoreLights/PointLightFeatureProcessor.h @@ -52,6 +52,7 @@ namespace AZ void SetShadowFilterMethod(LightHandle handle, ShadowFilterMethod method) override; void SetFilteringSampleCount(LightHandle handle, uint16_t count) override; void SetEsmExponent(LightHandle handle, float esmExponent) override; + void SetNormalShadowBias(LightHandle handle, float bias) override; void SetPointData(LightHandle handle, const PointLightData& data) override; const Data::Instance GetLightBuffer() const; diff --git a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp index 8b016410aa..5fc4fed420 100644 --- a/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/FrameCaptureSystemComponent.cpp @@ -142,7 +142,12 @@ namespace AZ Utils::PngFile image = Utils::PngFile::Create(readbackResult.m_imageDescriptor.m_size, format, *buffer); Utils::PngFile::SaveSettings saveSettings; - saveSettings.m_compressionLevel = r_pngCompressionLevel; + + if (auto console = AZ::Interface::Get(); console != nullptr) + { + console->GetCvarValue("r_pngCompressionLevel", saveSettings.m_compressionLevel); + } + // We should probably strip alpha to save space, especially for automated test screenshots. Alpha is left in to maintain // prior behavior, changing this is out of scope for the current task. Note, it would have bit of a cascade effect where // AtomSampleViewer's ScriptReporter assumes an RGBA image. diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp index a1858a7e9d..8c5e36e706 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionCopyFrameBufferPass.cpp @@ -7,7 +7,7 @@ */ #include "ReflectionCopyFrameBufferPass.h" -#include "ReflectionScreenSpaceBlurPass.h" +#include "ReflectionScreenSpaceTracePass.h" #include #include @@ -28,16 +28,16 @@ namespace AZ void ReflectionCopyFrameBufferPass::BuildInternal() { - RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassName(AZ::Name("ReflectionScreenSpaceBlurPass"), GetRenderPipeline()); + RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassName(AZ::Name("ReflectionScreenSpaceTracePass"), GetRenderPipeline()); RPI::PassSystemInterface::Get()->ForEachPass(passFilter, [this](RPI::Pass* pass) -> RPI::PassFilterExecutionFlow { - Render::ReflectionScreenSpaceBlurPass* blurPass = azrtti_cast(pass); - Data::Instance& frameBufferAttachment = blurPass->GetFrameBufferImageAttachment(); + Render::ReflectionScreenSpaceTracePass* tracePass = azrtti_cast(pass); + Data::Instance& frameBufferAttachment = tracePass->GetPreviousFrameImageAttachment(); RPI::PassAttachmentBinding& outputBinding = GetOutputBinding(0); AttachImageToSlot(outputBinding.m_name, frameBufferAttachment); - return RPI::PassFilterExecutionFlow::StopVisitingPasses; + return RPI::PassFilterExecutionFlow::StopVisitingPasses; }); FullscreenTrianglePass::BuildInternal(); diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp index edd7ad1013..c0b25697a3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -79,7 +80,7 @@ namespace AZ horizontalBlurChildDesc.m_passTemplate = blurHorizontalPassTemplate; // add child passes to perform the vertical and horizontal Gaussian blur for each roughness mip level - for (uint32_t mip = 0; mip < m_numBlurMips; ++mip) + for (uint32_t mip = 0; mip < NumMipLevels - 1; ++mip) { // create Vertical blur child passes { @@ -114,35 +115,15 @@ namespace AZ RemoveChildren(); m_flags.m_createChildren = true; - Data::Instance pool = RPI::ImageSystemInterface::Get()->GetSystemAttachmentPool(); - - // retrieve the image attachment from the pass - AZ_Assert(m_ownedAttachments.size() == 1, "ReflectionScreenSpaceBlurPass must have exactly one ImageAttachment defined"); - RPI::Ptr reflectionImageAttachment = m_ownedAttachments[0]; - - // update the image attachment descriptor to sync up size and format - reflectionImageAttachment->Update(); - - // change the lifetime since we want it to live between frames - reflectionImageAttachment->m_lifetime = RHI::AttachmentLifetimeType::Imported; - - // set the bind flags - RHI::ImageDescriptor& imageDesc = reflectionImageAttachment->m_descriptor.m_image; - imageDesc.m_bindFlags |= RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite; - - // create the image attachment - RHI::ClearValue clearValue = RHI::ClearValue::CreateVector4Float(0, 0, 0, 0); - m_frameBufferImageAttachment = RPI::AttachmentImage::Create(*pool.get(), imageDesc, Name(reflectionImageAttachment->m_path.GetCStr()), &clearValue, nullptr); - - reflectionImageAttachment->m_path = m_frameBufferImageAttachment->GetAttachmentId(); - reflectionImageAttachment->m_importedResource = m_frameBufferImageAttachment; - - uint32_t mipLevels = reflectionImageAttachment->m_descriptor.m_image.m_mipLevels; + // retrieve the reflection, downsampled normal, and downsampled depth attachments + RPI::PassAttachment* reflectionImageAttachment = GetInputOutputBinding(0).m_attachment.get(); RHI::Size imageSize = reflectionImageAttachment->m_descriptor.m_image.m_size; + RPI::PassAttachment* downsampledDepthImageAttachment = GetInputOutputBinding(1).m_attachment.get(); + // create transient attachments, one for each blur mip level AZStd::vector transientPassAttachments; - for (uint32_t mip = 1; mip <= mipLevels - 1; ++mip) + for (uint32_t mip = 1; mip <= NumMipLevels - 1; ++mip) { RHI::Size mipSize = imageSize.GetReducedMip(mip); @@ -160,8 +141,6 @@ namespace AZ m_ownedAttachments.push_back(transientPassAttachment); } - m_numBlurMips = mipLevels - 1; - // call ParentPass::BuildInternal() first to configure the slots and auto-add the empty bindings, // then we will assign attachments to the bindings ParentPass::BuildInternal(); @@ -170,13 +149,27 @@ namespace AZ uint32_t attachmentIndex = 0; for (auto& verticalBlurChildPass : m_verticalBlurChildPasses) { + // mip0 source input RPI::PassAttachmentBinding& inputAttachmentBinding = verticalBlurChildPass->GetInputOutputBinding(0); inputAttachmentBinding.SetAttachment(reflectionImageAttachment); inputAttachmentBinding.m_connectedBinding = &GetInputOutputBinding(0); + // mipN transient output RPI::PassAttachmentBinding& outputAttachmentBinding = verticalBlurChildPass->GetInputOutputBinding(1); outputAttachmentBinding.SetAttachment(transientPassAttachments[attachmentIndex]); + // setup downsampled depth output + // Note: this is a vertical pass output only, and each vertical child pass writes a specific mip level + uint32_t mipLevel = attachmentIndex + 1; + + // downsampled depth output + RPI::PassAttachmentBinding& downsampledDepthAttachmentBinding = verticalBlurChildPass->GetInputOutputBinding(2); + RHI::ImageViewDescriptor downsampledDepthOutputViewDesc; + downsampledDepthOutputViewDesc.m_mipSliceMin = static_cast(mipLevel); + downsampledDepthOutputViewDesc.m_mipSliceMax = static_cast(mipLevel); + downsampledDepthAttachmentBinding.m_unifiedScopeDesc.SetAsImage(downsampledDepthOutputViewDesc); + downsampledDepthAttachmentBinding.SetAttachment(downsampledDepthImageAttachment); + attachmentIndex++; } diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h index b7ea98ae25..9548665c8a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h @@ -29,12 +29,8 @@ namespace AZ //! Creates a new pass without a PassTemplate static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); - //! Returns the frame buffer image attachment used by the ReflectionFrameBufferCopy pass - //! to store the previous frame image - Data::Instance& GetFrameBufferImageAttachment() { return m_frameBufferImageAttachment; } - - //! Returns the number of mip levels in the blur - uint32_t GetNumBlurMips() const { return m_numBlurMips; } + //! The total number of mip levels in the blur (including mip0) + static const uint32_t NumMipLevels = 5; private: explicit ReflectionScreenSpaceBlurPass(const RPI::PassDescriptor& descriptor); @@ -47,9 +43,6 @@ namespace AZ AZStd::vector> m_verticalBlurChildPasses; AZStd::vector> m_horizontalBlurChildPasses; - - Data::Instance m_frameBufferImageAttachment; - uint32_t m_numBlurMips = 0; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp index 1362191691..d27d4d90c9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.cpp @@ -26,6 +26,19 @@ namespace AZ { } + bool ReflectionScreenSpaceCompositePass::IsEnabled() const + { + // delay for a few frames to ensure that the previous frame texture is populated + static const uint32_t FrameDelay = 10; + if (m_frameDelayCount < FrameDelay) + { + m_frameDelayCount++; + return false; + } + + return true; + } + void ReflectionScreenSpaceCompositePass::CompileResources([[maybe_unused]] const RHI::FrameGraphCompileContext& context) { if (!m_shaderResourceGroup) @@ -33,22 +46,8 @@ namespace AZ return; } - RPI::PassFilter passFilter = RPI::PassFilter::CreateWithPassName(AZ::Name("ReflectionScreenSpaceBlurPass"), GetRenderPipeline()); - - RPI::PassSystemInterface::Get()->ForEachPass(passFilter, [this](RPI::Pass* pass) -> RPI::PassFilterExecutionFlow - { - Render::ReflectionScreenSpaceBlurPass* blurPass = azrtti_cast(pass); - - // compute the max mip level based on the available mips in the previous frame image, and capping it - // to stay within a range that has reasonable data - const uint32_t MaxNumRoughnessMips = 8; - uint32_t maxMipLevel = AZStd::min(MaxNumRoughnessMips, blurPass->GetNumBlurMips()) - 1; - - auto constantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_maxMipLevel")); - m_shaderResourceGroup->SetConstant(constantIndex, maxMipLevel); - - return RPI::PassFilterExecutionFlow::StopVisitingPasses; - }); + auto constantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_maxMipLevel")); + m_shaderResourceGroup->SetConstant(constantIndex, ReflectionScreenSpaceBlurPass::NumMipLevels - 1); FullscreenTrianglePass::CompileResources(context); } diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h index c70a21cd1e..03b2834633 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceCompositePass.h @@ -34,6 +34,9 @@ namespace AZ // Pass Overrides... void CompileResources(const RHI::FrameGraphCompileContext& context) override; + bool IsEnabled() const override; + + mutable uint32_t m_frameDelayCount = 0; }; } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp new file mode 100644 index 0000000000..7f6bce8a00 --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp @@ -0,0 +1,58 @@ +/* + * 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 "ReflectionScreenSpaceTracePass.h" +#include +#include +#include +#include +#include + +namespace AZ +{ + namespace Render + { + RPI::Ptr ReflectionScreenSpaceTracePass::Create(const RPI::PassDescriptor& descriptor) + { + RPI::Ptr pass = aznew ReflectionScreenSpaceTracePass(descriptor); + return AZStd::move(pass); + } + + ReflectionScreenSpaceTracePass::ReflectionScreenSpaceTracePass(const RPI::PassDescriptor& descriptor) + : RPI::FullscreenTrianglePass(descriptor) + { + } + + void ReflectionScreenSpaceTracePass::BuildInternal() + { + Data::Instance pool = RPI::ImageSystemInterface::Get()->GetSystemAttachmentPool(); + + // retrieve the previous frame image attachment from the pass + AZ_Assert(m_ownedAttachments.size() == 3, "ReflectionScreenSpaceTracePass must have the following attachment images defined: ReflectionImage, DownSampledDepthImage, and PreviousFrameImage"); + RPI::Ptr previousFrameImageAttachment = m_ownedAttachments[2]; + + // update the image attachment descriptor to sync up size and format + previousFrameImageAttachment->Update(); + + // change the lifetime since we want it to live between frames + previousFrameImageAttachment->m_lifetime = RHI::AttachmentLifetimeType::Imported; + + // set the bind flags + RHI::ImageDescriptor& imageDesc = previousFrameImageAttachment->m_descriptor.m_image; + imageDesc.m_bindFlags |= RHI::ImageBindFlags::Color | RHI::ImageBindFlags::ShaderReadWrite; + + // create the image attachment + RHI::ClearValue clearValue = RHI::ClearValue::CreateVector4Float(0, 0, 0, 0); + m_previousFrameImageAttachment = RPI::AttachmentImage::Create(*pool.get(), imageDesc, Name(previousFrameImageAttachment->m_path.GetCStr()), &clearValue, nullptr); + + previousFrameImageAttachment->m_path = m_previousFrameImageAttachment->GetAttachmentId(); + previousFrameImageAttachment->m_importedResource = m_previousFrameImageAttachment; + } + + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h new file mode 100644 index 0000000000..b03418bbac --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h @@ -0,0 +1,43 @@ +/* + * 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 + +#include +#include +#include +#include + +namespace AZ +{ + namespace Render + { + //! This pass traces screenspace reflections from the previous frame image. + class ReflectionScreenSpaceTracePass + : public RPI::FullscreenTrianglePass + { + AZ_RPI_PASS(DiffuseProbeGridDownsamplePass); + + public: + AZ_RTTI(Render::ReflectionScreenSpaceTracePass, "{70FD45E9-8363-4AA1-A514-3C24AC975E53}", FullscreenTrianglePass); + AZ_CLASS_ALLOCATOR(Render::ReflectionScreenSpaceTracePass, SystemAllocator, 0); + + //! Creates a new pass without a PassTemplate + static RPI::Ptr Create(const RPI::PassDescriptor& descriptor); + + Data::Instance& GetPreviousFrameImageAttachment() { return m_previousFrameImageAttachment; } + + private: + explicit ReflectionScreenSpaceTracePass(const RPI::PassDescriptor& descriptor); + + // Pass behavior overrides... + virtual void BuildInternal() override; + + Data::Instance m_previousFrameImageAttachment; + }; + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp index 70ccaa5702..c0cc93d7e0 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.cpp @@ -155,8 +155,9 @@ namespace AZ::Render { AZ_Assert(id.IsValid(), "Invalid ShadowId passed to ProjectedShadowFeatureProcessor::SetNormalShadowBias()."); - ShadowProperty& shadowProperty = GetShadowPropertyFromShadowId(id); - shadowProperty.m_normalShadowBias = normalShadowBias; + ShadowData& shadowData = m_shadowData.GetElement(id.GetIndex()); + shadowData.m_normalShadowBias = normalShadowBias; + m_deviceBufferNeedsUpdate = true; } void ProjectedShadowFeatureProcessor::SetShadowmapMaxResolution(ShadowId id, ShadowmapSize size) diff --git a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h index 8939f1845d..a892e77b7f 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Source/Shadows/ProjectedShadowFeatureProcessor.h @@ -68,7 +68,7 @@ namespace AZ::Render uint32_t m_filteringSampleCount = 0; AZStd::array m_unprojectConstants = { {0, 0} }; float m_bias; - float m_normalShadowBias; + float m_normalShadowBias = 0; float m_esmExponent = 87.0f; float m_padding[3]; }; @@ -79,7 +79,6 @@ namespace AZ::Render ProjectedShadowDescriptor m_desc; RPI::ViewPtr m_shadowmapView; float m_bias = 0.1f; - float m_normalShadowBias = 0.0f; ShadowId m_shadowId; }; diff --git a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp index 8bf518e277..87fb46a7c6 100644 --- a/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/SkinnedMesh/SkinnedMeshOutputStreamManager.cpp @@ -98,7 +98,12 @@ namespace AZ } m_needsInit = false; - const AZ::u64 sizeInMb = r_skinnedMeshInstanceMemoryPoolSize; + AZ::u64 sizeInMb{}; + if (auto console = AZ::Interface::Get(); console != nullptr) + { + console->GetCvarValue("r_skinnedMeshInstanceMemoryPoolSize", sizeInMb); + } + m_sizeInBytes = sizeInMb * (1024u * 1024u); CalculateAlignment(); diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp index 63c2fc7150..d636fde2fe 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/EditorModelPreset.cpp @@ -29,7 +29,6 @@ namespace AZ ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_displayName, "Display Name", "Identifier used for display and selection") ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_modelAsset, "Model Asset", "Model asset reference") - ->DataElement(AZ::Edit::UIHandlers::Default, &ModelPreset::m_previewImageAsset, "Preview Image Asset", "Preview image asset reference") ; } } diff --git a/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp b/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp index c684b3cc89..ce8a1680a9 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Utils/ModelPreset.cpp @@ -24,10 +24,9 @@ namespace AZ if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(3) + ->Version(4) ->Field("displayName", &ModelPreset::m_displayName) ->Field("modelAsset", &ModelPreset::m_modelAsset) - ->Field("previewImageAsset", &ModelPreset::m_previewImageAsset) ; } @@ -41,7 +40,6 @@ namespace AZ ->Constructor() ->Property("displayName", BehaviorValueProperty(&ModelPreset::m_displayName)) ->Property("modelAsset", BehaviorValueProperty(&ModelPreset::m_modelAsset)) - ->Property("previewImageAsset", BehaviorValueProperty(&ModelPreset::m_previewImageAsset)) ; } } diff --git a/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp b/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp index a9cb6e2621..88e67538c5 100644 --- a/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp +++ b/Gems/Atom/Feature/Common/Code/Tests/IndexedDataVectorTests.cpp @@ -8,338 +8,218 @@ #include #include -#include +#include #include #include - namespace UnitTest { using namespace AZ; using namespace AZ::Render; - + class IndexedDataVectorTests - : public ::testing::Test + : public UnitTest::AllocatorsTestFixture { public: void SetUp() override { - CreateAllocator(); + UnitTest::AllocatorsTestFixture::SetUp(); } void TearDown() override { - DestroyAllocator(); + UnitTest::AllocatorsTestFixture::TearDown(); } - - private: - void CreateAllocator() + template + IndexedDataVector SetupIndexedDataVector(size_t size, T initialValue = T(0), T incrementAmount = T(1), AZStd::vector* indices = nullptr) { - static constexpr size_t NumMBToAllocate = 1; - SystemAllocator::Descriptor desc; - desc.m_heap.m_numFixedMemoryBlocks = 1; - desc.m_heap.m_fixedMemoryBlocksByteSize[0] = NumMBToAllocate * 1024 * 1024; - m_memBlock = AZ_OS_MALLOC( - desc.m_heap.m_fixedMemoryBlocksByteSize[0], - desc.m_heap.m_memoryBlockAlignment); - desc.m_heap.m_fixedMemoryBlocks[0] = m_memBlock; - - AllocatorInstance::Create(desc); + IndexedDataVector data; + T value = initialValue; + for (size_t i = 0; i < size; ++i) + { + uint16_t index = data.GetFreeSlotIndex(); + EXPECT_NE(index, IndexedDataVector::NoFreeSlot); + if (indices) + { + indices->push_back(index); + } + if (index != IndexedDataVector::NoFreeSlot) + { + data.GetData(index) = value; + value += incrementAmount; + } + } + return data; } - void DestroyAllocator() + template + void ShuffleIndexedDataVector(IndexedDataVector& dataVector, AZStd::vector& indices) { - AllocatorInstance::Destroy(); - AZ_OS_FREE(m_memBlock); - m_memBlock = nullptr; - } + AZStd::vector values; - void* m_memBlock = nullptr; - }; - - TEST_F(IndexedDataVectorTests, TestInsert) - { - enum Types - { - IntType = 0, - DoubleType = 1, - }; - - MultiIndexedDataVector myVec; - constexpr int NumToInsert = 5; - - AZStd::vector indices; + // remove every other element and store it + for (size_t i = 0; i < indices.size(); ++i) + { + values.push_back(dataVector.GetData(indices.at(i))); + dataVector.RemoveIndex(indices.at(i)); + indices.erase(&indices.at(i)); + } - for (int i = 0; i < NumToInsert; ++i) - { - auto index = myVec.GetFreeSlotIndex(); - indices.push_back(index); - myVec.GetData(index) = i; - myVec.GetData(index) = (double)i; + for (T value : values) + { + uint16_t index = dataVector.GetFreeSlotIndex(); + indices.push_back(index); + dataVector.GetData(index) = value; + } } - for (size_t i = 0; i < NumToInsert; ++i) - { - auto index = indices[i]; - EXPECT_EQ(i, myVec.GetData(index)); - EXPECT_EQ((double)i, myVec.GetData(index)); - } + }; + + TEST_F(IndexedDataVectorTests, Construction) + { + IndexedDataVector testVector; + uint16_t index = testVector.GetFreeSlotIndex(); + EXPECT_NE(index, IndexedDataVector::NoFreeSlot); } - - TEST_F(IndexedDataVectorTests, TestSize) + + TEST_F(IndexedDataVectorTests, TestInsertGetBasic) { - enum Types - { - IntType = 0, - }; + constexpr size_t count = 16; + constexpr int initialValue = 0; + constexpr int increment = 1; - MultiIndexedDataVector myVec; - constexpr int NumToInsert = 5; - for (int i = 0; i < NumToInsert; ++i) + AZStd::vector indices; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); + + int value = initialValue; + for (size_t i = 0; i < count; ++i) { - auto index = myVec.GetFreeSlotIndex(); - myVec.GetData(index) = i; + EXPECT_EQ(testVector.GetData(indices.at(i)), value); + value += increment; } - EXPECT_EQ(NumToInsert, myVec.GetDataCount()); - EXPECT_EQ(NumToInsert, myVec.GetDataVector().size()); - - myVec.Clear(); - - EXPECT_EQ(0, myVec.GetDataCount()); - EXPECT_EQ(0, myVec.GetDataVector().size()); } - - TEST_F(IndexedDataVectorTests, TestErase) + + TEST_F(IndexedDataVectorTests, TestInsertGetComplex) { - enum Types - { - IntType = 0, - }; + constexpr size_t count = 16; + constexpr int initialValue = 0; + constexpr int increment = 1; - MultiIndexedDataVector myVec; - constexpr int NumToInsert = 200; - AZStd::unordered_map valueToIndex; + AZStd::vector indices; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); - for (int i = 0; i < NumToInsert; ++i) + // Create a set of the data that should be in the IndexedDataVector + AZStd::set values; + for (int i = 0; i < count; ++i) { - auto index = myVec.GetFreeSlotIndex(); - valueToIndex[i] = index; - myVec.GetData(index) = i; + values.emplace(initialValue + i * increment); } - // erase every even number - for (int i = 0; i < NumToInsert; i += 2) - { - uint16_t index = valueToIndex[i]; - auto previousRawIndex = myVec.GetRawIndex(index); - auto movedIndex = myVec.RemoveIndex(index); - if (movedIndex != MultiIndexedDataVector::NoFreeSlot) - { - auto newRawIndex = myVec.GetRawIndex(movedIndex); - - // RemoveIndex() returns the index of the item that moves into its spot if any, so check - // to make sure the Raw index of the old matches the raw index of the new - EXPECT_EQ(previousRawIndex, newRawIndex); - } - valueToIndex.erase(i); - } + // Add and remove items to shuffle the underlying data + ShuffleIndexedDataVector(testVector, indices); - for (const auto& iter : valueToIndex) + // Check to make sure all the data is still there + AZStd::vector& underlyingVector = testVector.GetDataVector(); + for (size_t i = 0; i < underlyingVector.size(); ++i) { - int val = iter.first; - uint16_t index = iter.second; - EXPECT_EQ(val, myVec.GetData(index)); + EXPECT_TRUE(values.contains(underlyingVector.at(i))); } } - TEST_F(IndexedDataVectorTests, TestManyTypes) + TEST_F(IndexedDataVectorTests, TestSize) { - enum Types - { - IntType = 0, - StringType = 1, - DoubleType = 2, - FloatType = 3, - CharType = 4, - }; + constexpr size_t count = 32; - MultiIndexedDataVector myVec; - auto index = myVec.GetFreeSlotIndex(); - - constexpr int TestIntVal = INT_MIN; - constexpr double TestDoubleVal = -DBL_MIN; - const AZStd::string TestStringVal = "This is an AZStd::string."; - constexpr float TestFloatVal = FLT_MAX; - const char* TestConstPointerVal = "This is a C array."; - - myVec.GetData(index) = TestIntVal; - myVec.GetData(index) = TestStringVal; - myVec.GetData(index) = TestDoubleVal; - myVec.GetData(index) = TestFloatVal; - myVec.GetData(index) = TestConstPointerVal; + IndexedDataVector testVector = SetupIndexedDataVector(count); + EXPECT_EQ(testVector.GetDataCount(), count); + } - EXPECT_EQ(TestIntVal, static_cast(myVec.GetData(index))); - EXPECT_EQ(TestStringVal, static_cast(myVec.GetData(index))); - EXPECT_EQ(TestDoubleVal, static_cast(myVec.GetData(index))); - EXPECT_EQ(TestFloatVal, static_cast(myVec.GetData(index))); - EXPECT_STREQ(TestConstPointerVal, static_cast(myVec.GetData(index))); + TEST_F(IndexedDataVectorTests, TestClear) + { + constexpr size_t count = 32; + IndexedDataVector testVector = SetupIndexedDataVector(count); + testVector.Clear(); + EXPECT_EQ(testVector.GetDataCount(), 0); } - MultiIndexedDataVector CreateTestVector(AZStd::vector& indices) + TEST_F(IndexedDataVectorTests, TestRemove) { - enum Types - { - IntType = 0, - FloatType = 1, - }; + constexpr size_t count = 8; + constexpr int initialValue = 0; + constexpr int increment = 8; - MultiIndexedDataVector myVec; - constexpr int32_t Count = 10; - int32_t startInt = 10; - float startFloat = 2.0f; - - // Create some initial values - for (uint32_t i = 0; i < Count; ++i) + AZStd::vector indices; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); + + // Remove every other element by index + for (uint16_t i = 0; i < count; i += 2) { - uint16_t index = myVec.GetFreeSlotIndex(); - indices.push_back(index); - myVec.GetData(index) = startInt; - myVec.GetData(index) = startFloat; - startInt += 1; - startFloat += 1.0f; + testVector.RemoveIndex(i); } + + EXPECT_EQ(testVector.GetDataCount(), count / 2); - return myVec; - } - - void CheckIndexedData(MultiIndexedDataVector& data, AZStd::vector& indices) - { - enum Types + // Make sure the rest of the data is still there + AZStd::vector remainingIndices; + for (size_t i = 1; i < count; i += 2) { - IntType = 0, - FloatType = 1, - }; + int value = testVector.GetData(indices.at(i)); + EXPECT_EQ(value, initialValue + increment * i); + remainingIndices.push_back(indices.at(i)); + } - // For each index, get its data and make sure GetIndexForData returns the same - // index used to retrieve the data - for (uint32_t i = 0; i < data.GetDataCount(); ++i) + // remove the rest of the valus by value + for (uint16_t index : remainingIndices) { - int32_t& intData = data.GetData(indices.at(i)); - uint16_t indexForData = data.GetIndexForData(&intData); - EXPECT_EQ(indices.at(i), indexForData); - - float& floatData = data.GetData(indices.at(i)); - indexForData = data.GetIndexForData(&floatData); - EXPECT_EQ(indices.at(i), indexForData); + int* valuePtr = &testVector.GetData(index); + testVector.RemoveData(valuePtr); } - } - TEST_F(IndexedDataVectorTests, GetIndexForDataSimple) - { - AZStd::vector indices; - MultiIndexedDataVector myVec = CreateTestVector(indices); - CheckIndexedData(myVec, indices); + EXPECT_EQ(testVector.GetDataCount(), 0); } - TEST_F(IndexedDataVectorTests, GetIndexForDataComplex) + TEST_F(IndexedDataVectorTests, TestIndexForData) { - enum Types - { - IntType = 0, - FloatType = 1, - }; + constexpr size_t count = 8; + constexpr int initialValue = 0; + constexpr int increment = 8; AZStd::vector indices; - MultiIndexedDataVector myVec = CreateTestVector(indices); - - // remove every other value to shuffle the data around - for (uint32_t i = 0; i < myVec.GetDataCount(); i += 2) - { - myVec.RemoveIndex(indices.at(i)); - } + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); - int32_t startInt = 100; - float startFloat = 20.0f; - - // Add some data back in - const size_t count = myVec.GetDataCount(); - for (uint32_t i = 0; i < count; i += 2) + // Add and remove items to shuffle the underlying data + ShuffleIndexedDataVector(testVector, indices); + + AZStd::vector& underlyingVector = testVector.GetDataVector(); + for (size_t i = 0; i < underlyingVector.size(); ++i) { - uint16_t index = myVec.GetFreeSlotIndex(); - indices.at(i) = index; - myVec.GetData(index) = startInt; - myVec.GetData(index) = startFloat; - startInt += 1; - startFloat += 1.0f; - } + int value = underlyingVector.at(i); + uint16_t index = testVector.GetIndexForData(&underlyingVector.at(i)); - CheckIndexedData(myVec, indices); + // The data from GetData(index) should match for the index retrieved using GetIndexForData() for the same data. + EXPECT_EQ(testVector.GetData(index), value); + } } - - TEST_F(IndexedDataVectorTests, ForEach) + + TEST_F(IndexedDataVectorTests, TestRawIndex) { - enum Types - { - IntType = 0, - FloatType = 1, - }; - - MultiIndexedDataVector myVec; - constexpr int32_t Count = 10; - int32_t startInt = 10; - float startFloat = 2.0f; + constexpr size_t count = 8; + constexpr int initialValue = 0; + constexpr int increment = 8; AZStd::vector indices; - AZStd::set intValues; - AZStd::set floatValues; + IndexedDataVector testVector = SetupIndexedDataVector(count, initialValue, increment, &indices); - // Create some initial values - for (uint32_t i = 0; i < Count; ++i) - { - uint16_t index = myVec.GetFreeSlotIndex(); - indices.push_back(index); - myVec.GetData(index) = startInt; - myVec.GetData(index) = startFloat; - intValues.insert(startInt); - floatValues.insert(startFloat); - startInt += 1; - startFloat += 1.0f; - } - - uint32_t visitCount = 0; - myVec.ForEach([&](int32_t value) -> bool - { - intValues.erase(value); - ++visitCount; - return true; // keep iterating - }); - - // All ints should have been visited and found in the set - EXPECT_EQ(visitCount, Count); - EXPECT_EQ(intValues.size(), 0); - - visitCount = 0; - myVec.ForEach([&](float value) -> bool - { - floatValues.erase(value); - ++visitCount; - return true; // keep iterating - }); - - // All floats should have been visited and found in the set - EXPECT_EQ(visitCount, Count); - EXPECT_EQ(floatValues.size(), 0); + // Add and remove items to shuffle the underlying data + ShuffleIndexedDataVector(testVector, indices); - visitCount = 0; - myVec.ForEach([&]([[maybe_unused]] int32_t value) -> bool + AZStd::vector& underlyingVector = testVector.GetDataVector(); + for (size_t i = 0; i < indices.size(); ++i) { - ++visitCount; - return false; // stop iterating - }); - - // Since false is immediately returned, only one element should have been visited. - EXPECT_EQ(visitCount, 1); + // Check that the data retrieved from GetData for a given index matches the data in the underlying vector for the raw index. + EXPECT_EQ(testVector.GetData(indices.at(i)), underlyingVector.at(testVector.GetRawIndex(indices.at(i)))); + } } } diff --git a/Gems/Atom/Feature/Common/Code/Tests/MultiIndexedDataVectorTests.cpp b/Gems/Atom/Feature/Common/Code/Tests/MultiIndexedDataVectorTests.cpp new file mode 100644 index 0000000000..5a317c41aa --- /dev/null +++ b/Gems/Atom/Feature/Common/Code/Tests/MultiIndexedDataVectorTests.cpp @@ -0,0 +1,320 @@ +/* + * 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 +#include +#include +#include +#include + + +namespace UnitTest +{ + using namespace AZ; + using namespace AZ::Render; + + class MultiIndexedDataVectorTests + : public UnitTest::AllocatorsTestFixture + { + public: + void SetUp() override + { + UnitTest::AllocatorsTestFixture::SetUp(); + } + + void TearDown() override + { + UnitTest::AllocatorsTestFixture::TearDown(); + } + }; + + TEST_F(MultiIndexedDataVectorTests, TestInsert) + { + enum Types + { + IntType = 0, + DoubleType = 1, + }; + + MultiIndexedDataVector myVec; + constexpr int NumToInsert = 5; + + AZStd::vector indices; + + for (int i = 0; i < NumToInsert; ++i) + { + auto index = myVec.GetFreeSlotIndex(); + indices.push_back(index); + myVec.GetData(index) = i; + myVec.GetData(index) = (double)i; + } + + for (size_t i = 0; i < NumToInsert; ++i) + { + auto index = indices[i]; + EXPECT_EQ(i, myVec.GetData(index)); + EXPECT_EQ((double)i, myVec.GetData(index)); + } + } + + TEST_F(MultiIndexedDataVectorTests, TestSize) + { + enum Types + { + IntType = 0, + }; + + MultiIndexedDataVector myVec; + constexpr int NumToInsert = 5; + for (int i = 0; i < NumToInsert; ++i) + { + auto index = myVec.GetFreeSlotIndex(); + myVec.GetData(index) = i; + } + EXPECT_EQ(NumToInsert, myVec.GetDataCount()); + EXPECT_EQ(NumToInsert, myVec.GetDataVector().size()); + + myVec.Clear(); + + EXPECT_EQ(0, myVec.GetDataCount()); + EXPECT_EQ(0, myVec.GetDataVector().size()); + } + + TEST_F(MultiIndexedDataVectorTests, TestErase) + { + enum Types + { + IntType = 0, + }; + + MultiIndexedDataVector myVec; + constexpr int NumToInsert = 200; + AZStd::unordered_map valueToIndex; + + for (int i = 0; i < NumToInsert; ++i) + { + auto index = myVec.GetFreeSlotIndex(); + valueToIndex[i] = index; + myVec.GetData(index) = i; + } + + // erase every even number + for (int i = 0; i < NumToInsert; i += 2) + { + uint16_t index = valueToIndex[i]; + auto previousRawIndex = myVec.GetRawIndex(index); + auto movedIndex = myVec.RemoveIndex(index); + if (movedIndex != MultiIndexedDataVector::NoFreeSlot) + { + auto newRawIndex = myVec.GetRawIndex(movedIndex); + + // RemoveIndex() returns the index of the item that moves into its spot if any, so check + // to make sure the Raw index of the old matches the raw index of the new + EXPECT_EQ(previousRawIndex, newRawIndex); + } + valueToIndex.erase(i); + } + + for (const auto& iter : valueToIndex) + { + int val = iter.first; + uint16_t index = iter.second; + EXPECT_EQ(val, myVec.GetData(index)); + } + } + + TEST_F(MultiIndexedDataVectorTests, TestManyTypes) + { + enum Types + { + IntType = 0, + StringType = 1, + DoubleType = 2, + FloatType = 3, + CharType = 4, + }; + + MultiIndexedDataVector myVec; + auto index = myVec.GetFreeSlotIndex(); + + constexpr int TestIntVal = INT_MIN; + constexpr double TestDoubleVal = -DBL_MIN; + const AZStd::string TestStringVal = "This is an AZStd::string."; + constexpr float TestFloatVal = FLT_MAX; + const char* TestConstPointerVal = "This is a C array."; + + myVec.GetData(index) = TestIntVal; + myVec.GetData(index) = TestStringVal; + myVec.GetData(index) = TestDoubleVal; + myVec.GetData(index) = TestFloatVal; + myVec.GetData(index) = TestConstPointerVal; + + EXPECT_EQ(TestIntVal, static_cast(myVec.GetData(index))); + EXPECT_EQ(TestStringVal, static_cast(myVec.GetData(index))); + EXPECT_EQ(TestDoubleVal, static_cast(myVec.GetData(index))); + EXPECT_EQ(TestFloatVal, static_cast(myVec.GetData(index))); + EXPECT_STREQ(TestConstPointerVal, static_cast(myVec.GetData(index))); + } + + MultiIndexedDataVector CreateTestVector(AZStd::vector& indices) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + MultiIndexedDataVector myVec; + constexpr int32_t Count = 10; + int32_t startInt = 10; + float startFloat = 2.0f; + + // Create some initial values + for (uint32_t i = 0; i < Count; ++i) + { + uint16_t index = myVec.GetFreeSlotIndex(); + indices.push_back(index); + myVec.GetData(index) = startInt; + myVec.GetData(index) = startFloat; + startInt += 1; + startFloat += 1.0f; + } + + return myVec; + } + + void CheckIndexedData(MultiIndexedDataVector& data, AZStd::vector& indices) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + // For each index, get its data and make sure GetIndexForData returns the same + // index used to retrieve the data + for (uint32_t i = 0; i < data.GetDataCount(); ++i) + { + int32_t& intData = data.GetData(indices.at(i)); + uint16_t indexForData = data.GetIndexForData(&intData); + EXPECT_EQ(indices.at(i), indexForData); + + float& floatData = data.GetData(indices.at(i)); + indexForData = data.GetIndexForData(&floatData); + EXPECT_EQ(indices.at(i), indexForData); + } + } + + TEST_F(MultiIndexedDataVectorTests, GetIndexForDataSimple) + { + AZStd::vector indices; + MultiIndexedDataVector myVec = CreateTestVector(indices); + CheckIndexedData(myVec, indices); + } + + TEST_F(MultiIndexedDataVectorTests, GetIndexForDataComplex) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + AZStd::vector indices; + MultiIndexedDataVector myVec = CreateTestVector(indices); + + // remove every other value to shuffle the data around + for (uint32_t i = 0; i < myVec.GetDataCount(); i += 2) + { + myVec.RemoveIndex(indices.at(i)); + } + + int32_t startInt = 100; + float startFloat = 20.0f; + + // Add some data back in + const size_t count = myVec.GetDataCount(); + for (uint32_t i = 0; i < count; i += 2) + { + uint16_t index = myVec.GetFreeSlotIndex(); + indices.at(i) = index; + myVec.GetData(index) = startInt; + myVec.GetData(index) = startFloat; + startInt += 1; + startFloat += 1.0f; + } + + CheckIndexedData(myVec, indices); + } + + TEST_F(MultiIndexedDataVectorTests, ForEach) + { + enum Types + { + IntType = 0, + FloatType = 1, + }; + + MultiIndexedDataVector myVec; + constexpr int32_t Count = 10; + int32_t startInt = 10; + float startFloat = 2.0f; + + AZStd::vector indices; + AZStd::set intValues; + AZStd::set floatValues; + + // Create some initial values + for (uint32_t i = 0; i < Count; ++i) + { + uint16_t index = myVec.GetFreeSlotIndex(); + indices.push_back(index); + myVec.GetData(index) = startInt; + myVec.GetData(index) = startFloat; + intValues.insert(startInt); + floatValues.insert(startFloat); + startInt += 1; + startFloat += 1.0f; + } + + uint32_t visitCount = 0; + myVec.ForEach([&](int32_t value) -> bool + { + intValues.erase(value); + ++visitCount; + return true; // keep iterating + }); + + // All ints should have been visited and found in the set + EXPECT_EQ(visitCount, Count); + EXPECT_EQ(intValues.size(), 0); + + visitCount = 0; + myVec.ForEach([&](float value) -> bool + { + floatValues.erase(value); + ++visitCount; + return true; // keep iterating + }); + + // All floats should have been visited and found in the set + EXPECT_EQ(visitCount, Count); + EXPECT_EQ(floatValues.size(), 0); + + visitCount = 0; + myVec.ForEach([&]([[maybe_unused]] int32_t value) -> bool + { + ++visitCount; + return false; // stop iterating + }); + + // Since false is immediately returned, only one element should have been visited. + EXPECT_EQ(visitCount, 1); + + } +} diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake index 184460b210..3ed2ec8755 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_files.cmake @@ -275,6 +275,8 @@ set(FILES Source/RayTracing/RayTracingPassData.h Source/ReflectionProbe/ReflectionProbeFeatureProcessor.cpp Source/ReflectionProbe/ReflectionProbe.cpp + Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.cpp + Source/ReflectionScreenSpace/ReflectionScreenSpaceTracePass.h Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.cpp Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurPass.h Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp diff --git a/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake b/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake index 1d94a2ae9e..99f3cf8e1a 100644 --- a/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake +++ b/Gems/Atom/Feature/Common/Code/atom_feature_common_tests_files.cmake @@ -11,6 +11,7 @@ set(FILES Tests/CommonTest.cpp Tests/CoreLights/ShadowmapAtlasTest.cpp Tests/IndexedDataVectorTests.cpp + Tests/MultiIndexedDataVectorTests.cpp Tests/IndexableListTests.cpp Tests/SparseVectorTests.cpp Tests/SkinnedMesh/SkinnedMeshDispatchItemTests.cpp diff --git a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py index d500d6e09c..7e244dcfb2 100644 --- a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py +++ b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/__init__.py @@ -163,6 +163,7 @@ _LOGGER.debug('Invoking __init__.py for {0}.'.format({_PACKAGENAME})) # ------------------------------------------------------------------------- +# ------------------------------------------------------------------------- def get_datadir() -> pathlib.Path: """ persistent application data. diff --git a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapperpassthrough.py b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapper.py similarity index 65% rename from Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapperpassthrough.py rename to Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapper.py index 76cdd8450a..bfcdf4c79e 100644 --- a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapperpassthrough.py +++ b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/capture_displaymapper.py @@ -10,9 +10,7 @@ """Frame capture of the Displaymapper Passthrough (outputs .dds image)""" # ------------------------------------------------------------------------ import logging as _logging -from env_bool import env_bool -# ------------------------------------------------------------------------ _MODULENAME = 'ColorGrading.capture_displaymapperpassthrough' import ColorGrading.initialize @@ -27,25 +25,35 @@ _LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) import azlmbr.bus import azlmbr.atom -default_passtree = ["Root", +# This requires the level to have the DisplayMapper component added +# and configured to 'Passthrough' +# but now we can capture the parent input +# so this is here for reference for how it previously worked +passtree_displaymapperpassthrough = ["Root", + "MainPipeline_0", + "MainPipeline", + "PostProcessPass", + "LightAdaptation", + "DisplayMapperPass", + "DisplayMapperPassthrough"] + +# we can grad the parent pass input to the displaymapper directly +passtree_default = ["Root", "MainPipeline_0", "MainPipeline", "PostProcessPass", "LightAdaptation", - "DisplayMapperPass", - "DisplayMapperPassthrough"] - -default_path = "FrameCapture\DisplayMapperPassthrough.dds" + "DisplayMapperPass"] -# To Do: we should try to set display mapper to passthrough, -# then back after capture? +default_path = "FrameCapture\DisplayMappeInput.dds" # To Do: we can wrap this, to call from a PySide2 GUI def capture(command="CapturePassAttachment", - passtree=default_passtree, - pass_type="Output", + passtree=passtree_default, + pass_type="Input", output_path=default_path): + """Writes frame capture into project cache""" azlmbr.atom.FrameCaptureRequestBus(azlmbr.bus.Broadcast, command, passtree, diff --git a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py index ac64ade322..24fcd08f02 100644 --- a/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py +++ b/Gems/Atom/Feature/Common/Editor/Scripts/ColorGrading/initialize.py @@ -32,10 +32,7 @@ if DCCSI_GDEBUG: DCCSI_LOGLEVEL = int(10) # set up logger with both console and file _logging -if DCCSI_GDEBUG: - _LOGGER = initialize_logger(_PACKAGENAME, log_to_file=True, default_log_level=DCCSI_LOGLEVEL) -else: - _LOGGER = initialize_logger(_PACKAGENAME, log_to_file=False, default_log_level=DCCSI_LOGLEVEL) +_LOGGER = initialize_logger(_PACKAGENAME, log_to_file=DCCSI_GDEBUG, default_log_level=DCCSI_LOGLEVEL) _LOGGER.debug('Initializing: {0}.'.format({_MODULENAME})) @@ -46,7 +43,7 @@ if DCCSI_DEV_MODE: APPDATA = get_datadir() # os APPDATA APPDATA_WING = Path(APPDATA, f"Wing Pro {DCCSI_WING_VERSION_MAJOR}").resolve() if APPDATA_WING.exists(): - site.addsitedir(pathlib.PureWindowsPath(APPDATA_WING).as_posix()) + site.addsitedir(APPDATA_WING.resolve()) import wingdbstub as debugger try: debugger.Ensure() @@ -75,8 +72,7 @@ def start(): try: _O3DE_DEV = Path(os.getenv('O3DE_DEV')) - _O3DE_DEV = _O3DE_DEV.resolve() - os.environ['O3DE_DEV'] = pathlib.PureWindowsPath(_O3DE_DEV).as_posix() + os.environ['O3DE_DEV'] = _O3DE_DEV.as_posix() _LOGGER.debug(f'O3DE_DEV is: {_O3DE_DEV}') except EnvironmentError as e: _LOGGER.error('O3DE engineroot not set or found') @@ -86,23 +82,22 @@ def start(): _TAG_LY_BUILD_PATH = os.getenv('TAG_LY_BUILD_PATH', 'build') _DEFAULT_BIN_PATH = Path(str(_O3DE_DEV), _TAG_LY_BUILD_PATH, 'bin', 'profile') _O3DE_BIN_PATH = Path(os.getenv('O3DE_BIN_PATH', _DEFAULT_BIN_PATH)) - _O3DE_BIN_PATH = _O3DE_BIN_PATH.resolve() - os.environ['O3DE_BIN_PATH'] = pathlib.PureWindowsPath(_O3DE_BIN_PATH).as_posix() + os.environ['O3DE_BIN_PATH'] = _O3DE_BIN_PATH.as_posix() _LOGGER.debug(f'O3DE_BIN_PATH is: {_O3DE_BIN_PATH}') - site.addsitedir(pathlib.PureWindowsPath(_O3DE_BIN_PATH).as_posix()) + site.addsitedir(_O3DE_BIN_PATH.resolve()) except EnvironmentError as e: _LOGGER.error('O3DE bin folder not set or found') raise e if running_editor: _O3DE_DEV = Path(os.getenv('O3DE_DEV', Path(azlmbr.paths.engroot))) - os.environ['O3DE_DEV'] = pathlib.PureWindowsPath(_O3DE_DEV).as_posix() + os.environ['O3DE_DEV'] = _O3DE_DEV.as_posix() _LOGGER.debug(_O3DE_DEV) _O3DE_BIN_PATH = Path(str(_O3DE_DEV),Path(azlmbr.paths.executableFolder)) _O3DE_BIN = Path(os.getenv('O3DE_BIN', _O3DE_BIN_PATH.resolve())) - os.environ['O3DE_BIN'] = pathlib.PureWindowsPath(_O3DE_BIN).as_posix() + os.environ['O3DE_BIN'] = _O3DE_BIN_PATH.as_posix() _LOGGER.debug(_O3DE_BIN) diff --git a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat index 56021c0801..89dd86be80 100644 --- a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat +++ b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/CMD_ColorGradingTools.bat @@ -34,15 +34,15 @@ SETLOCAL ENABLEDELAYEDEXPANSION IF EXIST "%~dp0User_Env.bat" CALL %~dp0User_Env.bat :: Initialize env -echo +echo. echo ... calling Env_Core.bat CALL %~dp0\Env_Core.bat -echo +echo. echo ... calling Env_Python.bat CALL %~dp0\Env_Python.bat -echo +echo. echo ... calling Env_Tools.bat CALL %~dp0\Env_Tools.bat diff --git a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat index fc4afc964e..ffb34b06e5 100644 --- a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat +++ b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/Env_Python.bat @@ -27,37 +27,19 @@ echo ~ O3DE Color Grading Python Env ... echo _____________________________________________________________________ echo. -:: Python Version -:: Ideally these are set to match the O3DE python distribution -:: \python\runtime -IF "%DCCSI_PY_VERSION_MAJOR%"=="" (set DCCSI_PY_VERSION_MAJOR=3) -echo DCCSI_PY_VERSION_MAJOR = %DCCSI_PY_VERSION_MAJOR% - -:: PY version Major -IF "%DCCSI_PY_VERSION_MINOR%"=="" (set DCCSI_PY_VERSION_MINOR=7) -echo DCCSI_PY_VERSION_MINOR = %DCCSI_PY_VERSION_MINOR% - -IF "%DCCSI_PY_VERSION_RELEASE%"=="" (set DCCSI_PY_VERSION_RELEASE=10) -echo DCCSI_PY_VERSION_RELEASE = %DCCSI_PY_VERSION_RELEASE% - -:: shared location for 64bit python 3.7 DEV location -:: this defines a DCCsi sandbox for lib site-packages by version -:: \Gems\AtomLyIntegration\TechnicalArt\DccScriptingInterface\3rdParty\Python\Lib -set DCCSI_PYTHON_PATH=%DCCSIG_PATH%\3rdParty\Python -echo DCCSI_PYTHON_PATH = %DCCSI_PYTHON_PATH% - -:: add access to a Lib location that matches the py version (example: 3.7.x) -:: switch this for other python versions like maya (2.7.x) -IF "%DCCSI_PYTHON_LIB_PATH%"=="" (set DCCSI_PYTHON_LIB_PATH=%DCCSI_PYTHON_PATH%\Lib\%DCCSI_PY_VERSION_MAJOR%.x\%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.x\site-packages) -echo DCCSI_PYTHON_LIB_PATH = %DCCSI_PYTHON_LIB_PATH% - -:: add to the PATH -SET PATH=%DCCSI_PYTHON_LIB_PATH%;%PATH% - :: shared location for default O3DE python location set DCCSI_PYTHON_INSTALL=%O3DE_DEV%\Python echo DCCSI_PYTHON_INSTALL = %DCCSI_PYTHON_INSTALL% +:: Warning, many DCC tools (like Maya) include thier own versioned python interpretter. +:: Some apps may not operate correctly if PYTHONHOME is set/propogated. +:: This is definitely the case with Maya, doing so causes Maya to not boot. +FOR /F "tokens=* USEBACKQ" %%F IN (`%DCCSI_PYTHON_INSTALL%\python.cmd %DCCSI_PYTHON_INSTALL%\get_python_path.py`) DO (SET PYTHONHOME=%%F) +echo PYTHONHOME - is now the folder containing O3DE python executable +echo PYTHONHOME = %PYTHONHOME% + +SET PYTHON=%PYTHONHOME%\python.exe + :: location for O3DE python 3.7 location set DCCSI_PY_BASE=%DCCSI_PYTHON_INSTALL%\python.cmd echo DCCSI_PY_BASE = %DCCSI_PY_BASE% @@ -65,10 +47,7 @@ echo DCCSI_PY_BASE = %DCCSI_PY_BASE% :: ide and debugger plug set DCCSI_PY_DEFAULT=%DCCSI_PY_BASE% -IF "%DCCSI_PY_REV%"=="" (set DCCSI_PY_REV=rev2) -IF "%DCCSI_PY_PLATFORM%"=="" (set DCCSI_PY_PLATFORM=windows) - -set DCCSI_PY_IDE=%DCCSI_PYTHON_INSTALL%\runtime\python-%DCCSI_PY_VERSION_MAJOR%.%DCCSI_PY_VERSION_MINOR%.%DCCSI_PY_VERSION_RELEASE%-%DCCSI_PY_REV%-%DCCSI_PY_PLATFORM%\python +set DCCSI_PY_IDE=%PYTHONHOME% echo DCCSI_PY_IDE = %DCCSI_PY_IDE% :: Wing and other IDEs probably prefer access directly to the python.exe @@ -91,11 +70,6 @@ SET PATH=%DCCSI_PYTHON_INSTALL%;%DCCSI_PY_IDE%;%DCCSI_PY_IDE_PACKAGES%;%DCCSI_PY set PYTHONPATH=%DCCSIG_PATH%;%DCCSI_PYTHON_LIB_PATH%;%O3DE_BIN_PATH%;%DCCSI_COLORGRADING_SCRIPTS%;%DCCSI_FEATURECOMMON_SCRIPTS%;%PYTHONPATH% echo PYTHONPATH = %PYTHONPATH% -:: used for debugging in WingIDE (but needs to be here) -IF "%TAG_USERNAME%"=="" (set TAG_USERNAME=NOT_SET) -echo TAG_USERNAME = %TAG_USERNAME% -IF "%TAG_USERNAME%"=="NOT_SET" (echo Add TAG_USERNAME to User_Env.bat) - :: Set flag so we don't initialize dccsi environment twice SET O3DE_ENV_PY_INIT=1 GOTO END_OF_FILE diff --git a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template index 973d6d5afd..7ab970c98e 100644 --- a/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template +++ b/Gems/Atom/Feature/Common/Tools/ColorGrading/cmdline/User_Env.bat.template @@ -25,11 +25,6 @@ SET TAG_LY_BUILD_PATH=build SET DCCSI_GDEBUG=True SET DCCSI_DEV_MODE=True -:: set the your user name here for windows path -SET TAG_USERNAME=NOT_SET -SET DCCSI_PY_REV=rev1 -SET DCCSI_PY_PLATFORM=windows - :: Set flag so we don't initialize dccsi environment twice SET O3DE_USER_ENV_INIT=1 GOTO END_OF_FILE diff --git a/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp b/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp index 5f85d3ad03..fc80cc50d6 100644 --- a/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp +++ b/Gems/Atom/RHI/DX12/Code/Source/RHI/AsyncUploadQueue.cpp @@ -33,12 +33,20 @@ namespace AZ ID3D12DeviceX* dx12Device = device.GetDevice(); m_copyQueue = CommandQueue::Create(); - + + // The async upload queue should always use the primary copy queue, + // but because this change is being made in the stabilization branch + // we will put it behind a define out of an abundance of caution, and + // change it to always do this once the change gets back to development. + #if defined(AZ_DX12_USE_PRIMARY_COPY_QUEUE_FOR_ASYNC_UPLOAD_QUEUE) + m_copyQueue = &device.GetCommandQueueContext().GetCommandQueue(RHI::HardwareQueueClass::Copy); + #else // Make a secondary Copy queue, the primary queue is owned by the CommandQueueContext CommandQueueDescriptor commandQueueDesc; commandQueueDesc.m_hardwareQueueClass = RHI::HardwareQueueClass::Copy; commandQueueDesc.m_hardwareQueueSubclass = HardwareQueueSubclass::Secondary; m_copyQueue->Init(device, commandQueueDesc); + #endif // defined(AZ_DX12_ASYNC_UPLOAD_QUEUE_USE_PRIMARY_COPY_QUEUE) m_uploadFence.Init(dx12Device, RHI::FenceState::Signaled); for (size_t i = 0; i < descriptor.m_frameCount; ++i) diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/DefaultFallback.png b/Gems/Atom/RPI/Assets/Textures/Defaults/DefaultFallback.png new file mode 100644 index 0000000000..1352d14edf --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/DefaultFallback.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb91c050a829ff03b972202cf8c90034e4f252d972332224791d135c07d9d528 +size 796 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png new file mode 100644 index 0000000000..198d034892 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7028c8db4f935f23aa4396668278a67691d92fe345cc9d417a9f47bd9a4af32b +size 8130 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png.assetinfo b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png.assetinfo new file mode 100644 index 0000000000..264a7f2a25 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Missing.png.assetinfo @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png new file mode 100644 index 0000000000..14c3ec76b0 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7d94b9c0a77741736b93d8ed4d2b22bc9ae4cf649f3d8b3f10cbaf595a3ed31 +size 8336 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png.assetinfo b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png.assetinfo new file mode 100644 index 0000000000..4a234ef9f3 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/Processing.png.assetinfo @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png new file mode 100644 index 0000000000..aafdcc2681 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3bbd45e3ef81850da81d1cc01775930a53c424e64e287b00990af3e7e6a682ba +size 9701 diff --git a/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png.assetinfo b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png.assetinfo new file mode 100644 index 0000000000..747ce3e0e2 --- /dev/null +++ b/Gems/Atom/RPI/Assets/Textures/Defaults/ProcessingFailed.png.assetinfo @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Assets/seedList.seed b/Gems/Atom/RPI/Assets/seedList.seed index 300092e6c3..622638d698 100644 --- a/Gems/Atom/RPI/Assets/seedList.seed +++ b/Gems/Atom/RPI/Assets/seedList.seed @@ -24,6 +24,22 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h index bd11965ffa..f758019cfb 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h @@ -12,6 +12,7 @@ #include #include +#include namespace AZ { @@ -21,21 +22,24 @@ namespace AZ { // Declarations... - Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId); + // Note that these functions default to TraceLevel::Error to preserve legacy behavior of these APIs. It would be nice to make the default match + // RPI.Reflect/Asset/AssetUtils.h which is TraceLevel::Warning, but we are close to a release so it isn't worth the risk at this time. - Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId); + Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId, TraceLevel reporting = TraceLevel::Error); + + Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId = 0); + Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId = 0, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId = 0); + Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId = 0, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId, const char* sourcePathForDebug); + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, const char* sourcePathForDebug, TraceLevel reporting = TraceLevel::Error); template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId); + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, TraceLevel reporting = TraceLevel::Error); //! Attempts to resolve the full path to a product asset given its ID AZStd::string GetProductPathByAssetId(const AZ::Data::AssetId& assetId); @@ -65,12 +69,12 @@ namespace AZ // Definitions... template - Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId) + Outcome> LoadAsset(const AZStd::string& sourcePath, uint32_t productSubId, TraceLevel reporting) { - auto assetId = MakeAssetId(sourcePath, productSubId); + auto assetId = MakeAssetId(sourcePath, productSubId, reporting); if (assetId.IsSuccess()) { - return LoadAsset(assetId.GetValue(), sourcePath.c_str()); + return LoadAsset(assetId.GetValue(), sourcePath.c_str(), reporting); } else { @@ -79,20 +83,20 @@ namespace AZ } template - Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId) + Outcome> LoadAsset(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId, TraceLevel reporting) { AZStd::string resolvedPath = ResolvePathReference(originatingSourcePath, referencedSourceFilePath); - return LoadAsset(resolvedPath, productSubId); + return LoadAsset(resolvedPath, productSubId, reporting); } template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId) + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, TraceLevel reporting) { - return LoadAsset(assetId, nullptr); + return LoadAsset(assetId, nullptr, reporting); } template - Outcome> LoadAsset(const AZ::Data::AssetId& assetId, [[maybe_unused]] const char* sourcePathForDebug) + Outcome> LoadAsset(const AZ::Data::AssetId& assetId, [[maybe_unused]] const char* sourcePathForDebug, TraceLevel reporting) { if (nullptr == AZ::IO::FileIOBase::GetInstance()->GetAlias("@products@")) { @@ -111,11 +115,11 @@ namespace AZ } else { - AZ_Error("AssetUtils", false, "Could not load %s [Source='%s' Cache='%s' AssetID=%s] ", + AssetUtilsInternal::ReportIssue(reporting, AZStd::string::format("Could not load %s [Source='%s' Cache='%s' AssetID=%s] ", AzTypeInfo::Name(), sourcePathForDebug ? sourcePathForDebug : "", asset.GetHint().empty() ? "" : asset.GetHint().c_str(), - assetId.ToString().c_str()); + assetId.ToString().c_str()).c_str()); return AZ::Failure(); } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h index d12e848a02..c1183c7aa1 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Material/MaterialUtils.h @@ -28,7 +28,18 @@ namespace AZ namespace MaterialUtils { - Outcome> GetImageAssetReference(AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath); + enum class GetImageAssetResult + { + Empty, //! No image was actually requested, the path was empty + Found, //! The requested asset was found + Missing //! The requested asset was not found, and a placeholder asset was used instead + }; + + //! Finds an ImageAsset referenced by a material file (or a placeholder) + //! @param imageAsset the resulting ImageAsset + //! @param materialSourceFilePath the full path to a material source file that is referenfing an image file + //! @param imageFilePath the path to an image source file, which could be relative to the asset root or relative to the material file + GetImageAssetResult GetImageAssetReference(Data::Asset& imageAsset, AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath); //! Resolve an enum to a uint32_t given its name and definition array (in MaterialPropertyDescriptor). //! @param propertyDescriptor it contains the definition of all enum names in an array. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h index fd069f21e0..488bfb09f8 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Shader/ShaderVariantAssetCreator.h @@ -40,7 +40,7 @@ namespace AZ //! Set the timestamp value when the ProcessJob() started. //! This is needed to synchronize between the ShaderAsset and ShaderVariantAsset when hot-reloading shaders. //! The idea is that this timestamp must be greater or equal than the ShaderAsset. - void SetBuildTimestamp(AZStd::sys_time_t buildTimestamp); + void SetBuildTimestamp(AZ::u64 buildTimestamp); //! Assigns a shaderStageFunction, which contains the byte code, to the slot dictated by the shader stage. void SetShaderFunction(RHI::ShaderStage shaderStage, RHI::Ptr shaderStageFunction); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h index 474d0d5b9e..29b127407e 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/AuxGeom/AuxGeomDraw.h @@ -147,6 +147,30 @@ namespace AZ //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused virtual void DrawSphere( const AZ::Vector3& center, float radius, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw a sphere. + //! @param center The center of the sphere. + //! @param direction The direction vector. The Pole of the hemisphere will point along this vector. + //! @param radius The radius. + //! @param color The color to draw the sphere. + //! @param style The draw style (point, wireframe, solid, shaded etc). + //! @param depthTest If depth testing should be enabled + //! @param depthWrite If depth writing should be enabled + //! @param faceCull Which (if any) facing triangles should be culled + //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused + virtual void DrawSphere(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + + //! Draw a hemisphere. + //! @param center The center of the sphere. + //! @param direction The direction vector. The Pole of the hemisphere will point along this vector. + //! @param radius The radius. + //! @param color The color to draw the sphere. + //! @param style The draw style (point, wireframe, solid, shaded etc). + //! @param depthTest If depth testing should be enabled + //! @param depthWrite If depth writing should be enabled + //! @param faceCull Which (if any) facing triangles should be culled + //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused + virtual void DrawHemisphere( const AZ::Vector3& center, const AZ::Vector3& direction, float radius, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw a disk. //! @param center The center of the disk. //! @param direction The direction vector. The disk will be orthogonal this vector. @@ -172,7 +196,7 @@ namespace AZ //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused virtual void DrawCone(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; - //! Draw a cylinder. + //! Draw a cylinder (with flat disks on the end). //! @param center The center of the base circle. //! @param direction The direction vector. The top end cap of the cylinder will face along this vector. //! @param radius The radius. @@ -185,6 +209,19 @@ namespace AZ //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused virtual void DrawCylinder(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw a cylinder without flat disk on the end. + //! @param center The center of the base circle. + //! @param direction The direction vector. The top end cap of the cylinder will face along this vector. + //! @param radius The radius. + //! @param height The height of the cylinder. + //! @param color The color to draw the cylinder. + //! @param style The draw style (point, wireframe, solid, shaded etc). + //! @param depthTest If depth testing should be enabled + //! @param depthWrite If depth writing should be enabled + //! @param faceCull Which (if any) facing triangles should be culled + //! @param viewProjOverrideIndex Which view projection override entry to use, -1 if unused + virtual void DrawCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& direction, float radius, float height, const AZ::Color& color, DrawStyle style = DrawStyle::Shaded, DepthTest depthTest = DepthTest::On, DepthWrite depthWrite = DepthWrite::On, FaceCullMode faceCull = FaceCullMode::Back, int32_t viewProjOverrideIndex = -1) = 0; + //! Draw an axis-aligned bounding box with no transform. //! @param aabb The AABB (typically the bounding box of a set of world space points). //! @param color The color to draw the box. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h index f567881c50..920b763bc3 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Image/ImageSystemInterface.h @@ -29,6 +29,14 @@ namespace AZ Count }; + namespace DefaultImageAssetPaths + { + static constexpr char DefaultFallback[] = "textures/defaults/defaultfallback.png.streamingimage"; + static constexpr char Processing[] = "textures/defaults/processing.png.streamingimage"; + static constexpr char ProcessingFailed[] = "textures/defaults/processingfailed.png.streamingimage"; + static constexpr char Missing[] = "textures/defaults/missing.png.streamingimage"; + } + class ImageSystemInterface { public: diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h index 9138c0b418..57f595ccba 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/RPISystem.h @@ -97,7 +97,7 @@ namespace AZ // SystemTickBus::OnTick void OnSystemTick() override; - float GetCurrentTime(); + float GetCurrentTime() const; // The set of core asset handlers registered by the system. AZStd::vector> m_assetHandlers; @@ -123,7 +123,6 @@ namespace AZ // The job policy used for feature processor's rendering prepare RHI::JobPolicy m_prepareRenderJobPolicy = RHI::JobPolicy::Parallel; - ScriptTimePoint m_startTime; float m_currentSimulationTime = 0.0f; RPISystemDescriptor m_descriptor; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h index cdaf59ff75..eb3592944d 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/View.h @@ -92,6 +92,8 @@ namespace AZ const AZ::Matrix4x4& GetViewToWorldMatrix() const; const AZ::Matrix4x4& GetViewToClipMatrix() const; const AZ::Matrix4x4& GetWorldToClipMatrix() const; + const AZ::Matrix4x4& GetClipToWorldMatrix() const; + //! Get the camera's world transform, converted from the viewToWorld matrix's native y-up to z-up AZ::Transform GetCameraTransform() const; @@ -130,17 +132,22 @@ namespace AZ //! Returns the masked occlusion culling interface MaskedOcclusionCulling* GetMaskedOcclusionCulling(); + //! This is called by RenderPipeline when this view is added to the pipeline. + void OnAddToRenderPipeline(); + private: View() = delete; View(const AZ::Name& name, UsageFlags usage); - //! Sorts the finalized draw lists in this view void SortFinalizedDrawLists(); //! Sorts a drawList using the sort function from a pass with the corresponding drawListTag void SortDrawList(RHI::DrawList& drawList, RHI::DrawListTag tag); + //! Attempt to create a shader resource group. + void TryCreateShaderResourceGroup(); + AZ::Name m_name; UsageFlags m_usageFlags; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h index 0b53172ba2..2b83903dd1 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextBus.h @@ -67,6 +67,9 @@ namespace AZ virtual ViewportContextPtr GetViewportContextByName(const Name& contextName) const = 0; //! Gets the registered ViewportContext with the corresponding ID, if any. virtual ViewportContextPtr GetViewportContextById(AzFramework::ViewportId id) const = 0; + //! Gets the registered ViewportContext with matching RPI::Scene, if any. + //! This function will return the first result. + virtual ViewportContextPtr GetViewportContextByScene(const Scene* scene) const = 0; //! Maps a ViewportContext to a new name, inheriting the View stack (if any) registered to that context name. //! This can be used to switch "default" viewports by registering a viewport with the default ViewportContext name //! but note that only one ViewportContext can be mapped to a context name at a time. diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h index 65576f97d3..2672ede9f5 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/ViewportContextManager.h @@ -41,6 +41,7 @@ namespace AZ bool PopView(const Name& contextName, ViewPtr view) override; ViewPtr GetCurrentView(const Name& contextName) const override; ViewportContextPtr GetDefaultViewportContext() const override; + ViewportContextPtr GetViewportContextByScene(const Scene* scene) const override; private: void RegisterViewportContext(const Name& contextName, ViewportContextPtr viewportContext); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h index 3f4e15744a..b3b62cbc31 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Image/StreamingImageAssetHandler.h @@ -25,6 +25,9 @@ namespace AZ const Data::Asset& asset, AZStd::shared_ptr stream, const Data::AssetFilterCB& assetLoadFilterCB) override; + + // Return a default fallback image if an asset is missing + Data::AssetId AssetMissingInCatalog(const Data::Asset& /*asset*/) override; }; } } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h index 711ebb61a7..70451bd055 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderAsset.h @@ -294,7 +294,7 @@ namespace AZ Name m_drawListName; //! Use to synchronize versions of the ShaderAsset and ShaderVariantTreeAsset, especially during hot-reload. - AZStd::sys_time_t m_buildTimestamp = 0; + AZ::u64 m_buildTimestamp = 0; /////////////////////////////////////////////////////////////////// diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h index 66bbd7b188..5146ae370a 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Shader/ShaderVariantAsset.h @@ -61,7 +61,7 @@ namespace AZ //! Return the timestamp when this asset was built, and it must be >= than the timestamp of the main ShaderAsset. //! This is used to synchronize versions of the ShaderAsset and ShaderVariantAsset, especially during hot-reload. - AZStd::sys_time_t GetBuildTimestamp() const; + AZ::u64 GetBuildTimestamp() const; bool IsRootVariant() const { return m_stableId == RPI::RootShaderVariantStableId; } @@ -80,7 +80,7 @@ namespace AZ AZStd::array, RHI::ShaderStageCount> m_functionsByStage; //! Used to synchronize versions of the ShaderAsset and ShaderVariantAsset, especially during hot-reload. - AZStd::sys_time_t m_buildTimestamp = 0; + AZ::u64 m_buildTimestamp = 0; }; class ShaderVariantAssetHandler final diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp index e9cebf29c7..f11b2f94ac 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp @@ -63,11 +63,21 @@ namespace AZ { BusDisconnect(); } + + bool MaterialBuilder::ReportMaterialAssetWarningsAsErrors() const + { + bool warningsAsErrors = false; + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + settingsRegistry->Get(warningsAsErrors, "/O3DE/Atom/RPI/MaterialBuilder/WarningsAsErrors"); + } + return warningsAsErrors; + } //! Adds all relevant dependencies for a referenced source file, considering that the path might be relative to the original file location or a full asset path. //! This will usually include multiple source dependencies and a single job dependency, but will include only source dependencies if the file is not found. //! Note the AssetBuilderSDK::JobDependency::m_platformIdentifier will not be set by this function. The calling code must set this value before passing back - //! to the AssetBuilderSDK::CreateJobsResponse. If isOrderedOnceForMaterialTypes is true and the dependency is a materialtype file, the job dependency type + //! to the AssetBuilderSDK::CreateJobsResponse. If isOrderedOnceForMaterialTypes is true and the dependency is a .materialtype file, the job dependency type //! will be set to JobDependencyType::OrderOnce. void AddPossibleDependencies(AZStd::string_view currentFilePath, AZStd::string_view referencedParentPath, @@ -277,8 +287,8 @@ namespace AZ return materialTypeAssetOutcome.GetValue(); } - - AZ::Data::Asset CreateMaterialAsset(AZStd::string_view materialSourceFilePath, const rapidjson::Value& json) + + AZ::Data::Asset MaterialBuilder::CreateMaterialAsset(AZStd::string_view materialSourceFilePath, const rapidjson::Value& json) const { auto material = LoadSourceData(json, materialSourceFilePath); @@ -292,7 +302,7 @@ namespace AZ return {}; } - auto materialAssetOutcome = material.GetValue().CreateMaterialAsset(Uuid::CreateRandom(), materialSourceFilePath, true); + auto materialAssetOutcome = material.GetValue().CreateMaterialAsset(Uuid::CreateRandom(), materialSourceFilePath, ReportMaterialAssetWarningsAsErrors()); if (!materialAssetOutcome.IsSuccess()) { return {}; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h index afb0789dcf..4fa5f3cf10 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.h @@ -9,6 +9,8 @@ #pragma once #include +#include +#include namespace AZ { @@ -37,6 +39,9 @@ namespace AZ private: + AZ::Data::Asset CreateMaterialAsset(AZStd::string_view materialSourceFilePath, const rapidjson::Value& json) const; + bool ReportMaterialAssetWarningsAsErrors() const; + bool m_isShuttingDown = false; }; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h index ee4bce634d..de4e1a0fe5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.h @@ -25,7 +25,7 @@ namespace AZ namespace RPI { /** - * This is the central component that drive the process of exporting a scene to Model + * This is the central component that drive the process of exporting a scene to Model * and Material assets. It delegates asset-build duties to other components like * ModelAssetBuilderComponent and MaterialAssetBuilderComponent via export events. */ @@ -55,7 +55,7 @@ namespace AZ AZStd::string_view m_relativeFileName; AZStd::string_view m_extension; - const Uuid m_sourceUuid; + const Uuid m_sourceUuid = Uuid::CreateNull(); const DataStream::StreamType m_dataStreamType = DataStream::ST_BINARY; }; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp index c940ef808b..e2877aa163 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace AZ { @@ -46,6 +47,12 @@ namespace AZ AZStd::string ResolvePathReference(const AZStd::string& originatingSourceFilePath, const AZStd::string& referencedSourceFilePath) { + // The IsAbsolute part prevents "second join parameter is an absolute path" warnings in StringFunc::Path::Join below + if (referencedSourceFilePath.empty() || AZ::IO::PathView{referencedSourceFilePath}.IsAbsolute()) + { + return referencedSourceFilePath; + } + AZStd::string normalizedReferencedPath = referencedSourceFilePath; AzFramework::StringFunc::Path::Normalize(normalizedReferencedPath); @@ -113,7 +120,7 @@ namespace AZ return results; } - Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId) + Outcome MakeAssetId(const AZStd::string& sourcePath, uint32_t productSubId, TraceLevel reporting) { bool assetFound = false; AZ::Data::AssetInfo sourceInfo; @@ -122,7 +129,7 @@ namespace AZ if (!assetFound) { - AZ_Error("AssetUtils", false, "Could not find asset [%s]", sourcePath.c_str()); + AssetUtilsInternal::ReportIssue(reporting, AZStd::string::format("Could not find asset [%s]", sourcePath.c_str()).c_str()); return AZ::Failure(); } else @@ -131,10 +138,10 @@ namespace AZ } } - Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId) + Outcome MakeAssetId(const AZStd::string& originatingSourcePath, const AZStd::string& referencedSourceFilePath, uint32_t productSubId, TraceLevel reporting) { AZStd::string resolvedPath = ResolvePathReference(originatingSourcePath, referencedSourceFilePath); - return MakeAssetId(resolvedPath, productSubId); + return MakeAssetId(resolvedPath, productSubId, reporting); } } // namespace AssetUtils } // namespace RPI diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp index d6308ec655..4351213c22 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialSourceData.cpp @@ -116,10 +116,11 @@ namespace AZ { m_properties = AZStd::move(newPropertyGroups); - AZ_Warning("MaterialSourceData", false, + AZ_Warning( + "MaterialSourceData", false, "This material is based on version '%u' of '%s', but the material type is now at version '%u'. " - "Automatic updates are available. Consider updating the .material source file.", - m_materialTypeVersion, m_materialType.c_str(), materialTypeSourceData.m_version); + "Automatic updates are available. Consider updating the .material source file: '%s'.", + m_materialTypeVersion, materialTypeFullPath.c_str(), materialTypeSourceData.m_version, materialSourceFilePath.data()); } m_materialTypeVersion = materialTypeSourceData.m_version; @@ -303,7 +304,7 @@ namespace AZ MaterialPropertyId propertyId{ group.first, property.first }; if (!property.second.m_value.IsValid()) { - AZ_Warning("Material source data", false, "Source data for material property value is invalid."); + materialAssetCreator.ReportWarning("Source data for material property value is invalid."); } else { @@ -317,22 +318,20 @@ namespace AZ { case MaterialPropertyDataType::Image: { - Outcome> imageAssetResult = MaterialUtils::GetImageAssetReference( - materialSourceFilePath, property.second.m_value.GetValue()); + Data::Asset imageAsset; - if (imageAssetResult.IsSuccess()) + MaterialUtils::GetImageAssetResult result = MaterialUtils::GetImageAssetReference( + imageAsset, materialSourceFilePath, property.second.m_value.GetValue()); + + if (result == MaterialUtils::GetImageAssetResult::Missing) { - auto& imageAsset = imageAssetResult.GetValue(); - // Load referenced images when load material - imageAsset.SetAutoLoadBehavior(Data::AssetLoadBehavior::PreLoad); - materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAsset); - } - else - { - materialAssetCreator.ReportError( + materialAssetCreator.ReportWarning( "Material property '%s': Could not find the image '%s'", propertyId.GetFullName().GetCStr(), property.second.m_value.GetValue().data()); } + + imageAsset.SetAutoLoadBehavior(Data::AssetLoadBehavior::PreLoad); + materialAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAsset); } break; case MaterialPropertyDataType::Enum: diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp index d5551e89ae..d8e6c156be 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialTypeSourceData.cpp @@ -451,20 +451,21 @@ namespace AZ { case MaterialPropertyDataType::Image: { - auto imageAssetResult = MaterialUtils::GetImageAssetReference( - materialTypeSourceFilePath, property.m_value.GetValue()); + Data::Asset imageAsset; - if (imageAssetResult) - { - auto imageAsset = imageAssetResult.GetValue(); - materialTypeAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAsset); - } - else + MaterialUtils::GetImageAssetResult result = MaterialUtils::GetImageAssetReference( + imageAsset, materialTypeSourceFilePath, property.m_value.GetValue()); + + if (result == MaterialUtils::GetImageAssetResult::Missing) { materialTypeAssetCreator.ReportError( "Material property '%s': Could not find the image '%s'", propertyId.GetFullName().GetCStr(), property.m_value.GetValue().data()); } + else + { + materialTypeAssetCreator.SetPropertyValue(propertyId.GetFullName(), imageAsset); + } } break; case MaterialPropertyDataType::Enum: diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp index 90ce9e66ce..7fff8d81bc 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Material/MaterialUtils.cpp @@ -28,25 +28,36 @@ namespace AZ { namespace MaterialUtils { - Outcome> GetImageAssetReference(AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath) + GetImageAssetResult GetImageAssetReference(Data::Asset& imageAsset, AZStd::string_view materialSourceFilePath, const AZStd::string imageFilePath) { + imageAsset = {}; + if (imageFilePath.empty()) { // The image value was present but specified an empty string, meaning the texture asset should be explicitly cleared. - return AZ::Success(Data::Asset()); + return GetImageAssetResult::Empty; } else { - Outcome imageAssetId = AssetUtils::MakeAssetId(materialSourceFilePath, imageFilePath, StreamingImageAsset::GetImageAssetSubId()); + // We use TraceLevel::None because fallback textures are available and we'll return GetImageAssetResult::Missing below in that case. + // Callers of GetImageAssetReference will be responsible for logging warnings or errors as needed. + + Outcome imageAssetId = AssetUtils::MakeAssetId(materialSourceFilePath, imageFilePath, StreamingImageAsset::GetImageAssetSubId(), AssetUtils::TraceLevel::None); + if (!imageAssetId.IsSuccess()) { - return AZ::Failure(); - } - else - { - Data::Asset unloadedImageAssetReference(imageAssetId.GetValue(), azrtti_typeid(), imageFilePath); - return AZ::Success(unloadedImageAssetReference); + // When the AssetId cannot be found, we don't want to outright fail, because the runtime has mechanisms for displaying fallback textures which gives the + // user a better recovery workflow. On the other hand we can't just provide an empty/invalid Asset because that would be interpreted as simply + // no value was present and result in using no texture, and this would amount to a silent failure. + // So we use a randomly generated (well except for the "BADA55E7" bit ;) UUID which the runtime and tools will interpret as a missing asset and represent + // it as such. + static const Uuid InvalidAssetPlaceholderId = "{BADA55E7-1A1D-4940-B655-9D08679BD62F}"; + imageAsset = Data::Asset{InvalidAssetPlaceholderId, azrtti_typeid(), imageFilePath}; + return GetImageAssetResult::Missing; } + + imageAsset = Data::Asset{imageAssetId.GetValue(), azrtti_typeid(), imageFilePath}; + return GetImageAssetResult::Found; } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp index e0e83cfce2..5b32edc0bf 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Shader/ShaderVariantAssetCreator.cpp @@ -92,7 +92,7 @@ namespace AZ ///////////////////////////////////////////////////////////////////// // Methods for all shader variant types - void ShaderVariantAssetCreator::SetBuildTimestamp(AZStd::sys_time_t buildTimestamp) + void ShaderVariantAssetCreator::SetBuildTimestamp(AZ::u64 buildTimestamp) { if (ValidateIsReady()) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp index 2b32503838..4465b8594f 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/RPISystem.cpp @@ -33,6 +33,7 @@ #include #include +#include #include @@ -276,15 +277,10 @@ namespace AZ } } - float RPISystem::GetCurrentTime() + float RPISystem::GetCurrentTime() const { - ScriptTimePoint timeAtCurrentTick; - AZ::TickRequestBus::BroadcastResult(timeAtCurrentTick, &AZ::TickRequestBus::Events::GetTimeAtCurrentTick); - - // We subtract the start time to maximize precision of the time value, since we will be converting it to a float. - double currentTime = timeAtCurrentTick.GetSeconds() - m_startTime.GetSeconds(); - - return aznumeric_cast(currentTime); + const AZ::TimeUs currentSimulationTimeUs = AZ::GetRealElapsedTimeUs(); + return AZ::TimeUsToSeconds(currentSimulationTimeUs); } void RPISystem::RenderTick() diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp index 8d4303f187..062eaf02bd 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/RenderPipeline.cpp @@ -178,6 +178,10 @@ namespace AZ pipelineViews.m_views.resize(1); } ViewPtr previousView = pipelineViews.m_views[0]; + if (view) + { + view->OnAddToRenderPipeline(); + } pipelineViews.m_views[0] = view; if (previousView) @@ -238,6 +242,7 @@ namespace AZ pipelineViews.m_type = PipelineViewType::Transient; } view->SetPassesByDrawList(&pipelineViews.m_passesByDrawList); + view->OnAddToRenderPipeline(); pipelineViews.m_views.push_back(view); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp index 337eaa5455..b1ae460af6 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Shader/Shader.cpp @@ -202,17 +202,17 @@ namespace AZ return; } AZ_Assert(m_asset->m_buildTimestamp == m_reloadedRootShaderVariantAsset->GetBuildTimestamp(), - "shaderAsset timeStamp=%lld, but Root ShaderVariantAsset timeStamp=%lld", + "shaderAsset '%s' timeStamp=%lld, but Root ShaderVariantAsset timeStamp=%lld", m_asset.GetHint().c_str(), m_asset->m_buildTimestamp, m_reloadedRootShaderVariantAsset->GetBuildTimestamp()); m_asset->UpdateRootShaderVariantAsset(m_supervariantIndex, m_reloadedRootShaderVariantAsset); m_reloadedRootShaderVariantAsset = {}; // Clear the temporary reference. if (ShaderReloadDebugTracker::IsEnabled()) { - auto makeTimeString = [](AZStd::sys_time_t timestamp, AZStd::sys_time_t now) + auto makeTimeString = [](AZ::u64 timestamp, AZ::u64 now) { - AZStd::sys_time_t elapsedMicroseconds = now - timestamp; - double elapsedSeconds = aznumeric_cast(elapsedMicroseconds / 1'000'000); + AZ::u64 elapsedMillis = now - timestamp; + double elapsedSeconds = aznumeric_cast(elapsedMillis / 1'000); AZStd::string timeString = AZStd::string::format("%lld (%f seconds ago)", timestamp, elapsedSeconds); return timeString; }; diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp index 8c1e38ba58..4ad8dae41c 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp @@ -47,18 +47,14 @@ namespace AZ { AZ_Assert(!name.IsEmpty(), "invalid name"); - // Set default matrixes. + // Set default matrices SetWorldToViewMatrix(AZ::Matrix4x4::CreateIdentity()); AZ::Matrix4x4 viewToClipMatrix; AZ::MakePerspectiveFovMatrixRH(viewToClipMatrix, AZ::Constants::HalfPi, 1, 0.1f, 1000.f, true); SetViewToClipMatrix(viewToClipMatrix); - Data::Asset viewSrgShaderAsset = RPISystemInterface::Get()->GetCommonShaderAssetForSrgs(); + TryCreateShaderResourceGroup(); - if (viewSrgShaderAsset.IsReady()) - { - m_shaderResourceGroup = ShaderResourceGroup::Create(viewSrgShaderAsset, RPISystemInterface::Get()->GetViewSrgLayout()->GetName()); - } #if AZ_TRAIT_MASKED_OCCLUSION_CULLING_SUPPORTED m_maskedOcclusionCulling = MaskedOcclusionCulling::Create(); m_maskedOcclusionCulling->SetResolution(MaskedSoftwareOcclusionCullingWidth, MaskedSoftwareOcclusionCullingHeight); @@ -125,6 +121,7 @@ namespace AZ m_worldToViewMatrix = worldToView; m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix; + m_clipToWorldMatrix = m_worldToClipMatrix.GetInverseFull(); m_onWorldToViewMatrixChange.Signal(m_worldToViewMatrix); m_onWorldToClipMatrixChange.Signal(m_worldToClipMatrix); @@ -162,6 +159,7 @@ namespace AZ m_worldToViewMatrix = m_viewToWorldMatrix.GetInverseFast(); m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix; + m_clipToWorldMatrix = m_worldToClipMatrix.GetInverseFull(); // Only signal an update when there is a change, otherwise this might block // user input from changing the value. @@ -177,6 +175,7 @@ namespace AZ m_viewToClipMatrix = viewToClip; m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix; + m_clipToWorldMatrix = m_worldToClipMatrix.GetInverseFull(); // Update z depth constant simultaneously // zNear -> n, zFar -> f @@ -227,6 +226,11 @@ namespace AZ return m_worldToClipMatrix; } + const AZ::Matrix4x4& View::GetClipToWorldMatrix() const + { + return m_clipToWorldMatrix; + } + bool View::HasDrawListTag(RHI::DrawListTag drawListTag) { return drawListTag.IsValid() && m_drawListMask[drawListTag.GetIndex()]; @@ -361,16 +365,19 @@ namespace AZ { if (m_clipSpaceOffset.IsZero()) { - Matrix4x4 worldToClipPrevMatrix = m_viewToClipPrevMatrix * m_worldToViewPrevMatrix; - m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, worldToClipPrevMatrix); - m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, m_worldToClipMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, m_viewToClipMatrix); - m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, m_clipToWorldMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, m_viewToClipMatrix.GetInverseFull()); + if (m_shaderResourceGroup) + { + Matrix4x4 worldToClipPrevMatrix = m_viewToClipPrevMatrix * m_worldToViewPrevMatrix; + m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, worldToClipPrevMatrix); + m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, m_worldToClipMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, m_viewToClipMatrix); + m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, m_clipToWorldMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, m_viewToClipMatrix.GetInverseFull()); + } } else { - // Offset the current and previous frame clip matricies + // Offset the current and previous frame clip matrices Matrix4x4 offsetViewToClipMatrix = m_viewToClipMatrix; offsetViewToClipMatrix.SetElement(0, 2, m_clipSpaceOffset.GetX()); offsetViewToClipMatrix.SetElement(1, 2, m_clipSpaceOffset.GetY()); @@ -379,27 +386,33 @@ namespace AZ offsetViewToClipPrevMatrix.SetElement(0, 2, m_clipSpaceOffset.GetX()); offsetViewToClipPrevMatrix.SetElement(1, 2, m_clipSpaceOffset.GetY()); - // Build other matricies dependent on the view to clip matricies + // Build other matrices dependent on the view to clip matrices Matrix4x4 offsetWorldToClipMatrix = offsetViewToClipMatrix * m_worldToViewMatrix; Matrix4x4 offsetWorldToClipPrevMatrix = offsetViewToClipPrevMatrix * m_worldToViewPrevMatrix; Matrix4x4 offsetClipToViewMatrix = offsetViewToClipMatrix.GetInverseFull(); Matrix4x4 offsetClipToWorldMatrix = m_viewToWorldMatrix * offsetClipToViewMatrix; - - m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, offsetWorldToClipPrevMatrix); - m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, offsetWorldToClipMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, offsetViewToClipMatrix); - m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, offsetClipToWorldMatrix); - m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, offsetViewToClipMatrix.GetInverseFull()); + + if (m_shaderResourceGroup) + { + m_shaderResourceGroup->SetConstant(m_worldToClipPrevMatrixConstantIndex, offsetWorldToClipPrevMatrix); + m_shaderResourceGroup->SetConstant(m_viewProjectionMatrixConstantIndex, offsetWorldToClipMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixConstantIndex, offsetViewToClipMatrix); + m_shaderResourceGroup->SetConstant(m_clipToWorldMatrixConstantIndex, offsetClipToWorldMatrix); + m_shaderResourceGroup->SetConstant(m_projectionMatrixInverseConstantIndex, offsetViewToClipMatrix.GetInverseFull()); + } } - m_shaderResourceGroup->SetConstant(m_worldPositionConstantIndex, m_position); - m_shaderResourceGroup->SetConstant(m_viewMatrixConstantIndex, m_worldToViewMatrix); - m_shaderResourceGroup->SetConstant(m_viewMatrixInverseConstantIndex, m_worldToViewMatrix.GetInverseFull()); - m_shaderResourceGroup->SetConstant(m_zConstantsConstantIndex, m_nearZ_farZ_farZTimesNearZ_farZMinusNearZ); - m_shaderResourceGroup->SetConstant(m_unprojectionConstantsIndex, m_unprojectionConstants); + if (m_shaderResourceGroup) + { + m_shaderResourceGroup->SetConstant(m_worldPositionConstantIndex, m_position); + m_shaderResourceGroup->SetConstant(m_viewMatrixConstantIndex, m_worldToViewMatrix); + m_shaderResourceGroup->SetConstant(m_viewMatrixInverseConstantIndex, m_worldToViewMatrix.GetInverseFull()); + m_shaderResourceGroup->SetConstant(m_zConstantsConstantIndex, m_nearZ_farZ_farZTimesNearZ_farZMinusNearZ); + m_shaderResourceGroup->SetConstant(m_unprojectionConstantsIndex, m_unprojectionConstants); - m_shaderResourceGroup->Compile(); + m_shaderResourceGroup->Compile(); + } m_viewToClipPrevMatrix = m_viewToClipMatrix; m_worldToViewPrevMatrix = m_worldToViewMatrix; @@ -418,5 +431,30 @@ namespace AZ { return m_maskedOcclusionCulling; } + + void View::TryCreateShaderResourceGroup() + { + if (!m_shaderResourceGroup) + { + if (auto rpiSystemInterface = RPISystemInterface::Get()) + { + if (Data::Asset viewSrgShaderAsset = rpiSystemInterface->GetCommonShaderAssetForSrgs(); + viewSrgShaderAsset.IsReady()) + { + m_shaderResourceGroup = + ShaderResourceGroup::Create(viewSrgShaderAsset, rpiSystemInterface->GetViewSrgLayout()->GetName()); + } + } + } + } + + void View::OnAddToRenderPipeline() + { + TryCreateShaderResourceGroup(); + if (!m_shaderResourceGroup) + { + AZ_Warning("RPI::View", false, "Shader Resource Group failed to initialize"); + } + } } // namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp index 6ea2491a0f..bba9ae7cf6 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/ViewportContextManager.cpp @@ -176,6 +176,20 @@ namespace AZ return {}; } + ViewportContextPtr ViewportContextManager::GetViewportContextByScene(const Scene* scene) const + { + AZStd::lock_guard lock(m_containerMutex); + for (const auto& viewportData : m_viewportContexts) + { + ViewportContextPtr viewportContext = viewportData.second.context.lock(); + if (viewportContext && viewportContext->GetRenderScene().get() == scene) + { + return viewportContext; + } + } + return {}; + } + void ViewportContextManager::RenameViewportContext(ViewportContextPtr viewportContext, const Name& newContextName) { auto currentAssignedViewportContext = GetViewportContextByName(newContextName); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp index fa39820329..dd16c565e7 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Image/StreamingImageAssetHandler.cpp @@ -7,6 +7,9 @@ */ #include +#include +#include +#include namespace AZ { @@ -40,5 +43,56 @@ namespace AZ return loadResult; } - } -} + + Data::AssetId StreamingImageAssetHandler::AssetMissingInCatalog(const Data::Asset& asset) + { + // Find out if the asset is missing completely, or just still processing + // and escalate the asset to the top of the list + AzFramework::AssetSystem::AssetStatus missingAssetStatus; + AzFramework::AssetSystemRequestBus::BroadcastResult( + missingAssetStatus, &AzFramework::AssetSystem::AssetSystemRequests::GetAssetStatusById, asset.GetId().m_guid); + + // Determine which fallback image to use + const char* relativePath = DefaultImageAssetPaths::DefaultFallback; + + bool useDebugFallbackImages = true; + if (auto settingsRegistry = AZ::SettingsRegistry::Get(); settingsRegistry != nullptr) + { + settingsRegistry->GetObject(useDebugFallbackImages, "/O3DE/Atom/RPI/UseDebugFallbackImages"); + } + + if (useDebugFallbackImages) + { + switch (missingAssetStatus) + { + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Queued: + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Compiling: + relativePath = DefaultImageAssetPaths::Processing; + break; + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Failed: + relativePath = DefaultImageAssetPaths::ProcessingFailed; + break; + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Missing: + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Unknown: + case AzFramework::AssetSystem::AssetStatus::AssetStatus_Compiled: + relativePath = DefaultImageAssetPaths::Missing; + break; + } + } + + // Make sure the fallback image has been processed + AzFramework::AssetSystem::AssetStatus status = AzFramework::AssetSystem::AssetStatus_Unknown; + AzFramework::AssetSystemRequestBus::BroadcastResult( + status, &AzFramework::AssetSystemRequestBus::Events::CompileAssetSync, relativePath); + + // Return the asset id of the fallback image + Data::AssetId assetId{}; + bool autoRegisterIfNotFound = false; + Data::AssetCatalogRequestBus::BroadcastResult( + assetId, &Data::AssetCatalogRequestBus::Events::GetAssetIdByPath, relativePath, + azrtti_typeid(), autoRegisterIfNotFound); + + return assetId; + } + } // namespace RPI +} // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp index ac90333842..3c6947b83d 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialAsset.cpp @@ -226,10 +226,12 @@ namespace AZ if (changesWereApplied) { - AZ_Warning("MaterialAsset", false, + AZ_Warning( + "MaterialAsset", false, "This material is based on version '%u' of %s, but the material type is now at version '%u'. " - "Automatic updates are available. Consider updating the .material source file.", - originalVersion, m_materialTypeAsset.ToString().c_str(), m_materialTypeAsset->GetVersion()); + "Automatic updates are available. Consider updating the .material source file for '%s'.", + originalVersion, m_materialTypeAsset.ToString().c_str(), m_materialTypeAsset->GetVersion(), + GetId().ToString().c_str()); } m_materialTypeVersion = m_materialTypeAsset->GetVersion(); diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp index d1017139fc..b74305613e 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Material/MaterialPropertyValue.cpp @@ -118,12 +118,16 @@ namespace AZ else if (value.is>()) { result.m_value = Data::Asset( - AZStd::any_cast>(value).GetId(), azrtti_typeid()); + AZStd::any_cast>(value).GetId(), + azrtti_typeid(), + AZStd::any_cast>(value).GetHint()); } else if (value.is>()) { result.m_value = Data::Asset( - AZStd::any_cast>(value).GetId(), azrtti_typeid()); + AZStd::any_cast>(value).GetId(), + azrtti_typeid(), + AZStd::any_cast>(value).GetHint()); } else if (value.is>()) { diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp index 442fc6a79f..ec1a65a6d5 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Shader/ShaderVariantAsset.cpp @@ -60,7 +60,7 @@ namespace AZ } } - AZStd::sys_time_t ShaderVariantAsset::GetBuildTimestamp() const + AZ::u64 ShaderVariantAsset::GetBuildTimestamp() const { return m_buildTimestamp; } diff --git a/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp b/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp index 5343c295d8..8c685656ba 100644 --- a/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp +++ b/Gems/Atom/RPI/Code/Tests/Common/RPITestFixture.cpp @@ -69,6 +69,19 @@ namespace UnitTest assetPath /= "Cache"; AZ::IO::FileIOBase::GetInstance()->SetAlias("@products@", assetPath.c_str()); + // Remark, AZ::Utils::GetProjectPath() is not used when defining "user" folder, + // instead We use AZ::Test::GetEngineRootPath();. + // Reason: + // When running unit tests, using AZ::Utils::GetProjectPath() will resolve to something like: + // "/data/workspace/o3de/build/linux/External/Atom-9a4d112b/RPI/Code/Cache" + // The ShaderMetricSystem.cpp writes to the @user@ folder and the following runtime error occurs: + // "You may not alter data inside the asset cache. Please check the call stack and consider writing into the source asset folder instead." + // "Attempted write location: /data/workspace/o3de/build/linux/External/Atom-9a4d112b/RPI/Code/Cache/user/shadermetrics.json" + // To avoid the error We use AZ::Test::GetEngineRootPath(); + AZ::IO::Path userPath = AZ::Test::GetEngineRootPath(); + userPath /= "user"; + AZ::IO::FileIOBase::GetInstance()->SetAlias("@user@", userPath.c_str()); + m_jsonRegistrationContext = AZStd::make_unique(); m_jsonSystemComponent = AZStd::make_unique(); m_jsonSystemComponent->Reflect(m_jsonRegistrationContext.get()); diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp index fa8eed35de..d4bf3e5eaa 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialSourceDataTests.cpp @@ -625,23 +625,6 @@ namespace UnitTest // We use local functions to easily start a new MaterialAssetCreator for each test case because // the AssetCreator would just skip subsequent operations after the first failure is detected. - auto expectError = [](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 2) - { - MaterialSourceData sourceData; - - sourceData.m_materialType = "@exefolder@/Temp/test.materialtype"; - - AddPropertyGroup(sourceData, "general"); - - setOneBadInput(sourceData); - - AZ_TEST_START_ASSERTTEST; - auto materialAssetOutcome = sourceData.CreateMaterialAsset(Uuid::CreateRandom(), "", false); - AZ_TEST_STOP_ASSERTTEST(expectedAsserts); // Usually one for the initial error, and one for when End() is called - - EXPECT_FALSE(materialAssetOutcome.IsSuccess()); - }; - auto expectWarning = [](AZStd::function setOneBadInput, [[maybe_unused]] uint32_t expectedAsserts = 1) { MaterialSourceData sourceData; @@ -692,10 +675,10 @@ namespace UnitTest }); // Missing image reference - expectError([](MaterialSourceData& materialSourceData) + expectWarning([](MaterialSourceData& materialSourceData) { AddProperty(materialSourceData, "general", "MyImage", AZStd::string("doesNotExist.streamingimage")); - }, 3); // Expect a 3rd error because AssetUtils reports its own assertion failure + }); } diff --git a/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp b/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp index 9c3e08ee08..61999d808e 100644 --- a/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp +++ b/Gems/Atom/RPI/Code/Tests/Material/MaterialTests.cpp @@ -888,4 +888,43 @@ namespace UnitTest EXPECT_EQ(indexFromOldName, indexFromNewName); } + template + void CheckPropertyValueRoundTrip(const T& value) + { + AZ::RPI::MaterialPropertyValue materialPropertyValue{value}; + AZStd::any anyValue{value}; + AZ::RPI::MaterialPropertyValue materialPropertyValueFromAny = MaterialPropertyValue::FromAny(anyValue); + AZ::RPI::MaterialPropertyValue materialPropertyValueFromRoundTrip = MaterialPropertyValue::FromAny(MaterialPropertyValue::ToAny(materialPropertyValue)); + + EXPECT_EQ(materialPropertyValue, materialPropertyValueFromAny); + EXPECT_EQ(materialPropertyValue, materialPropertyValueFromRoundTrip); + + if (materialPropertyValue.Is>()) + { + EXPECT_EQ(materialPropertyValue.GetValue>().GetHint(), materialPropertyValueFromAny.GetValue>().GetHint()); + EXPECT_EQ(materialPropertyValue.GetValue>().GetHint(), materialPropertyValueFromRoundTrip.GetValue>().GetHint()); + } + } + + TEST_F(MaterialTests, TestMaterialPropertyValueAsAny) + { + CheckPropertyValueRoundTrip(true); + CheckPropertyValueRoundTrip(false); + CheckPropertyValueRoundTrip(7); + CheckPropertyValueRoundTrip(8u); + CheckPropertyValueRoundTrip(9.0f); + CheckPropertyValueRoundTrip(AZ::Vector2(1.0f, 2.0f)); + CheckPropertyValueRoundTrip(AZ::Vector3(1.0f, 2.0f, 3.0f)); + CheckPropertyValueRoundTrip(AZ::Vector4(1.0f, 2.0f, 3.0f, 4.0f)); + CheckPropertyValueRoundTrip(AZ::Color(1.0f, 2.0f, 3.0f, 4.0f)); + CheckPropertyValueRoundTrip(Data::Asset{}); + CheckPropertyValueRoundTrip(Data::Asset{}); + CheckPropertyValueRoundTrip(Data::Asset{}); + CheckPropertyValueRoundTrip(Data::Asset{Uuid::CreateRandom(), azrtti_typeid(), "TestAssetPath.png"}); + CheckPropertyValueRoundTrip(Data::Asset{Uuid::CreateRandom(), azrtti_typeid(), "TestAssetPath.png"}); + CheckPropertyValueRoundTrip(Data::Asset{Uuid::CreateRandom(), azrtti_typeid(), "TestAssetPath.png"}); + CheckPropertyValueRoundTrip(m_testImageAsset); + CheckPropertyValueRoundTrip(Data::Instance{m_testImage}); + CheckPropertyValueRoundTrip(AZStd::string{"hello"}); + } } diff --git a/Gems/Atom/RPI/Registry/atom_rpi.release.setreg b/Gems/Atom/RPI/Registry/atom_rpi.release.setreg new file mode 100644 index 0000000000..72fb4f01e8 --- /dev/null +++ b/Gems/Atom/RPI/Registry/atom_rpi.release.setreg @@ -0,0 +1,9 @@ +{ + "O3DE": { + "Atom": { + "RPI": { + "UseDebugFallbackImages": false + } + } + } +} diff --git a/Gems/Atom/RPI/Registry/atom_rpi.setreg b/Gems/Atom/RPI/Registry/atom_rpi.setreg index 16ce8b3bd7..fa3c13a81e 100644 --- a/Gems/Atom/RPI/Registry/atom_rpi.setreg +++ b/Gems/Atom/RPI/Registry/atom_rpi.setreg @@ -17,7 +17,8 @@ "DynamicDrawSystemDescriptor": { "DynamicBufferPoolSize": 50331648 // 3 * 16 * 1024 * 1024 (for 3 frames) } - } + }, + "UseDebugFallbackImages": true } } } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt b/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt index 40c8d7956e..e7e8208722 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/CMakeLists.txt @@ -42,6 +42,7 @@ ly_add_target( Gem::Atom_RHI.Reflect Gem::Atom_Feature_Common.Static Gem::Atom_Bootstrap.Headers + Gem::ImageProcessingAtom.Headers ) ly_add_target( @@ -60,6 +61,8 @@ ly_add_target( BUILD_DEPENDENCIES PRIVATE Gem::AtomToolsFramework.Static + RUNTIME_DEPENDENCIES + Gem::ImageProcessingAtom.Editor ) ################################################################################ @@ -80,6 +83,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) PRIVATE AZ::AzTest AZ::AzTestShared + AZ::AzFrameworkTestShared Gem::AtomToolsFramework.Static Gem::Atom_Utils.TestUtils.Static ) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h index 96a8728a43..fc19aea2d3 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Debug/TraceRecorder.h @@ -26,6 +26,21 @@ namespace AtomToolsFramework //! Get the combined output of all messages AZStd::string GetDump() const; + //! Return the number of OnAssert calls + size_t GetAssertCount() const; + + //! Return the number of OnException calls + size_t GetExceptionCount() const; + + //! Return the number of OnError calls, and includes OnAssert and OnException if @includeHigher is true + size_t GetErrorCount(bool includeHigher = false) const; + + //! Return the number of OnWarning calls, and includes higher categories if @includeHigher is true + size_t GetWarningCount(bool includeHigher = false) const; + + //! Return the number of OnPrintf calls, and includes higher categories if @includeHigher is true + size_t GetPrintfCount(bool includeHigher = false) const; + private: ////////////////////////////////////////////////////////////////////////// // AZ::Debug::TraceMessageBus::Handler overrides... @@ -38,5 +53,11 @@ namespace AtomToolsFramework size_t m_maxMessageCount = std::numeric_limits::max(); AZStd::list m_messages; + + size_t m_assertCount = 0; + size_t m_exceptionCount = 0; + size_t m_errorCount = 0; + size_t m_warningCount = 0; + size_t m_printfCount = 0; }; } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h index 08f59f9e0b..d27f2403a1 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/MaterialPropertyUtil.h @@ -49,6 +49,7 @@ namespace AtomToolsFramework //! @param propertyValue the value being converted before saving bool ConvertToExportFormat( const AZStd::string& exportPath, + [[maybe_unused]] const AZ::Name& propertyId, const AZ::RPI::MaterialTypeSourceData::PropertyDefinition& propertyDefinition, AZ::RPI::MaterialPropertyValue& propertyValue); diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h index 1ad6f69961..ab2b8b46c0 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Util/Util.h @@ -8,8 +8,9 @@ #pragma once -#include #include +#include +#include #include AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT @@ -18,11 +19,24 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnin #include AZ_POP_DISABLE_WARNING +class QImage; + namespace AtomToolsFramework { + template + T GetSettingOrDefault(AZStd::string_view path, const T& defaultValue) + { + T result; + auto settingsRegistry = AZ::SettingsRegistry::Get(); + return (settingsRegistry && settingsRegistry->Get(result, path)) ? result : defaultValue; + } + + using LoadImageAsyncCallback = AZStd::function; + void LoadImageAsync(const AZStd::string& path, LoadImageAsyncCallback callback); + QFileInfo GetSaveFileInfo(const QString& initialPath); QFileInfo GetOpenFileInfo(const AZStd::vector& assetTypes); QFileInfo GetUniqueFileInfo(const QString& initialPath); QFileInfo GetDuplicationFileInfo(const QString& initialPath); bool LaunchTool(const QString& baseName, const QString& extension, const QStringList& arguments); -} +} // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h index 1200cb3d79..45c5394fd8 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h @@ -112,15 +112,16 @@ namespace AtomToolsFramework void UpdateViewport(const AzFramework::ViewportControllerUpdateEvent& event) override; // ModularViewportCameraControllerRequestBus overrides ... - void InterpolateToTransform(const AZ::Transform& worldFromLocal) override; - AZ::Transform GetReferenceFrame() const override; - void SetReferenceFrame(const AZ::Transform& worldFromLocal) override; - void ClearReferenceFrame() override; + bool InterpolateToTransform(const AZ::Transform& worldFromLocal) override; + bool IsInterpolating() const override; + void StartTrackingTransform(const AZ::Transform& worldFromLocal) override; + void StopTrackingTransform() override; + bool IsTrackingTransform() const override; private: - //! Update the reference frame after a change has been made to the camera - //! view without updating the internal camera via user input. - void RefreshReferenceFrame(); + //! Combine the current camera transform with any potential roll from the tracked + //! transform (this is usually zero). + AZ::Transform CombinedCameraTransform() const; //! The current mode the camera controller is in. enum class CameraMode @@ -141,21 +142,21 @@ namespace AtomToolsFramework AzFramework::Camera m_camera; //!< The current camera state (pitch/yaw/position/look-distance). AzFramework::Camera m_targetCamera; //!< The target (next) camera state that m_camera is catching up to. AzFramework::Camera m_previousCamera; //!< The state of the camera from the previous frame. - AZStd::optional m_storedCamera; //!< A potentially stored camera for when a custom reference frame is set. + AZStd::optional m_storedCamera; //!< A potentially stored camera for when a transform is being tracked. AzFramework::CameraSystem m_cameraSystem; //!< The camera system responsible for managing all CameraInputs. AzFramework::CameraProps m_cameraProps; //!< Camera properties to control rotate and translate smoothness. CameraControllerPriorityFn m_priorityFn; //!< Controls at what priority the camera controller should respond to events. CameraAnimation m_cameraAnimation; //!< Camera animation state (used during CameraMode::Animation). CameraMode m_cameraMode = CameraMode::Control; //!< The current mode the camera is operating in. - //! An additional reference frame the camera can operate in (identity has no effect). - AZ::Transform m_referenceFrameOverride = AZ::Transform::CreateIdentity(); - //! Flag to prevent circular updates of the camera transform (while the viewport transform is being updated internally). - bool m_updatingTransformInternally = false; + float m_roll = 0.0f; //!< The current amount of roll to be applied to the camera. + float m_targetRoll = 0.0f; //!< The target amount of roll to be applied to the camera (current will move towards this). //! Listen for camera view changes outside of the camera controller. AZ::RPI::ViewportContext::MatrixChangedEvent::Handler m_cameraViewMatrixChangeHandler; //! The current instance of the modular camera viewport context. AZStd::unique_ptr m_modularCameraViewportContext; + //! Flag to prevent circular updates of the camera transform (while the viewport transform is being updated internally). + bool m_updatingTransformInternally = false; }; //! Placeholder implementation for ModularCameraViewportContext (useful for verifying the interface). diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h index ab397692e4..4422751d6b 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h @@ -23,23 +23,31 @@ namespace AtomToolsFramework class ModularViewportCameraControllerRequests : public AZ::EBusTraits { public: + static inline constexpr float InterpolateToTransformDuration = 1.0f; + using BusIdType = AzFramework::ViewportId; static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById; static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single; //! Begin a smooth transition of the camera to the requested transform. //! @param worldFromLocal The transform of where the camera should end up. - virtual void InterpolateToTransform(const AZ::Transform& worldFromLocal) = 0; + //! @return Returns true if the call began an interpolation and false otherwise. Calls to InterpolateToTransform + //! will have no effect if an interpolation is currently in progress. + virtual bool InterpolateToTransform(const AZ::Transform& worldFromLocal) = 0; + + //! Returns if the camera is currently interpolating to a new transform. + virtual bool IsInterpolating() const = 0; - //! Return the current reference frame. - //! @note If a reference frame has not been set or a frame has been cleared, this is just the identity. - virtual AZ::Transform GetReferenceFrame() const = 0; + //! Start tracking a transform. + //! Store the current camera transform and move to the next camera transform. + virtual void StartTrackingTransform(const AZ::Transform& worldFromLocal) = 0; - //! Set a new reference frame other than the identity for the camera controller. - virtual void SetReferenceFrame(const AZ::Transform& worldFromLocal) = 0; + //! Stop tracking the set transform. + //! The previously stored camera transform is restored. + virtual void StopTrackingTransform() = 0; - //! Clear the current reference frame to restore the identity. - virtual void ClearReferenceFrame() = 0; + //! Return if the tracking transform is set. + virtual bool IsTrackingTransform() const = 0; protected: ~ModularViewportCameraControllerRequests() = default; diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h index 8233658ded..5216f511cb 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/RenderViewportWidget.h @@ -21,6 +21,7 @@ #include #include #include +#include namespace AtomToolsFramework { @@ -30,8 +31,8 @@ namespace AtomToolsFramework //! @see AZ::RPI::ViewportContext for Atom's API for setting up class RenderViewportWidget : public QWidget - , public AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler , public AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler + , public AzToolsFramework::ViewportInteraction::ViewportInteractionRequests , public AzFramework::WindowRequestBus::Handler , protected AzFramework::InputChannelEventListener , protected AZ::TickBus::Handler @@ -90,11 +91,11 @@ namespace AtomToolsFramework //! Input processing is enabled by default. void SetInputProcessingEnabled(bool enabled); - // AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler overrides ... + // ViewportInteractionRequests overrides ... AzFramework::CameraState GetCameraState() override; AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) override; - AZStd::optional ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) override; - AZStd::optional ViewportScreenToWorldRay( + AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) override; + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) override; float DeviceScalingFactor() override; @@ -149,5 +150,7 @@ namespace AtomToolsFramework AZ::ScriptTimePoint m_time; // Maps our internal Qt events into AzFramework InputChannels for our ViewportControllerList. AzToolsFramework::QtEventToAzInputMapper* m_inputChannelMapper = nullptr; + // Implementation of ViewportInteractionRequests (handles viewport picking operations). + AZStd::unique_ptr m_viewportInteractionImpl; }; } //namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h new file mode 100644 index 0000000000..b6ad6e17d1 --- /dev/null +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h @@ -0,0 +1,48 @@ +/* + * 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 + +#include +#include +#include +#include +#include + +namespace AtomToolsFramework +{ + //! A concrete implementation of the ViewportInteractionRequestBus. + //! Primarily concerned with picking (screen to world and world to screen transformations). + class ViewportInteractionImpl + : public AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler + , private AZ::RPI::ViewportContextIdNotificationBus::Handler + { + public: + explicit ViewportInteractionImpl(AZ::RPI::ViewPtr viewPtr); + + void Connect(AzFramework::ViewportId viewportId); + void Disconnect(); + + // ViewportInteractionRequestBus overrides ... + AzFramework::CameraState GetCameraState() override; + AzFramework::ScreenPoint ViewportWorldToScreen(const AZ::Vector3& worldPosition) override; + AZ::Vector3 ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) override; + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportScreenToWorldRay( + const AzFramework::ScreenPoint& screenPosition) override; + float DeviceScalingFactor() override; + + AZStd::function m_screenSizeFn; //! Callback to determine the screen size. + AZStd::function m_deviceScalingFactorFn; //! Callback to determine the device scaling factor. + + private: + // ViewportContextIdNotificationBus overrides ... + void OnViewportDefaultViewChanged(AZ::RPI::ViewPtr view) override; + + AZ::RPI::ViewPtr m_viewPtr; + }; +} // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp index a63a5e6b46..0f21dcb70e 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Application/AtomToolsApplication.cpp @@ -79,12 +79,18 @@ namespace AtomToolsFramework m_styleManager.reset(new AzQtComponents::StyleManager(this)); m_styleManager->initialize(this, engineRootPath); - connect(&m_timer, &QTimer::timeout, this, [&]() + m_timer.setInterval(1); + connect(&m_timer, &QTimer::timeout, this, [this]() { this->PumpSystemEventLoopUntilEmpty(); this->Tick(); }); + connect(this, &QGuiApplication::applicationStateChanged, this, [this]() + { + // Limit the update interval when not in focus to reduce power consumption and interference with other applications + this->m_timer.setInterval((applicationState() & Qt::ApplicationActive) ? 1 : 32); + }); } AtomToolsApplication ::~AtomToolsApplication() diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp index 3fd069ff0b..5f8c8b9004 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Debug/TraceRecorder.cpp @@ -31,6 +31,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnAssert(const char* message) { + ++m_assertCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Assert: %s", message)); @@ -40,6 +41,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnException(const char* message) { + ++m_exceptionCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Exception: %s", message)); @@ -49,6 +51,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnError(const char* /*window*/, const char* message) { + ++m_errorCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Error: %s", message)); @@ -58,6 +61,7 @@ namespace AtomToolsFramework bool TraceRecorder::OnWarning(const char* /*window*/, const char* message) { + ++m_warningCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("Warning: %s", message)); @@ -67,11 +71,58 @@ namespace AtomToolsFramework bool TraceRecorder::OnPrintf(const char* /*window*/, const char* message) { + ++m_printfCount; if (m_messages.size() < m_maxMessageCount) { m_messages.push_back(AZStd::string::format("%s", message)); } return false; +} + + size_t TraceRecorder::GetAssertCount() const + { + return m_assertCount; + } + + size_t TraceRecorder::GetExceptionCount() const + { + return m_exceptionCount; + } + + size_t TraceRecorder::GetErrorCount(bool includeHigher) const + { + if (includeHigher) + { + return m_errorCount + GetAssertCount() + GetExceptionCount(); + } + else + { + return m_errorCount; + } + } + + size_t TraceRecorder::GetWarningCount(bool includeHigher) const + { + if (includeHigher) + { + return m_warningCount + GetErrorCount(true); + } + else + { + return m_warningCount; + } + } + + size_t TraceRecorder::GetPrintfCount(bool includeHigher) const + { + if (includeHigher) + { + return m_printfCount + GetWarningCount(true); + } + else + { + return m_printfCount; + } } } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp index 00de2a7c4c..3a392c1413 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Document/AtomToolsDocumentSystemComponent.cpp @@ -495,8 +495,6 @@ namespace AtomToolsFramework return AZ::Uuid::CreateNull(); } - traceRecorder.GetDump().clear(); - bool openResult = false; AtomToolsDocumentRequestBus::EventResult(openResult, documentId, &AtomToolsDocumentRequestBus::Events::Open, requestedPath); if (!openResult) @@ -507,6 +505,12 @@ namespace AtomToolsFramework AtomToolsDocumentSystemRequestBus::Broadcast(&AtomToolsDocumentSystemRequestBus::Events::DestroyDocument, documentId); return AZ::Uuid::CreateNull(); } + else if (traceRecorder.GetWarningCount(true) > 0) + { + QMessageBox::warning( + QApplication::activeWindow(), QString("Document opened with warnings"), + QString("Warnings encountered: \n%1\n\n%2").arg(requestedPath.c_str()).arg(traceRecorder.GetDump().c_str())); + } return documentId; } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp index d46e7b27be..28bd196a1d 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/PreviewRenderer/PreviewRendererSystemComponent.cpp @@ -10,6 +10,7 @@ #include #include #include +#include namespace AtomToolsFramework { @@ -53,10 +54,15 @@ namespace AtomToolsFramework AZ::TickBus::QueueFunction( [this]() { - if (!m_previewRenderer) + // Only create a preview renderer if the RPI interface is fully initialized. Otherwise the constructor will leave things + // in a bad state that can lead to crashing. + if (AZ::RPI::RPISystemInterface::Get()->IsInitialized()) { - m_previewRenderer.reset(aznew AtomToolsFramework::PreviewRenderer( - "PreviewRendererSystemComponent Preview Scene", "PreviewRendererSystemComponent Preview Pipeline")); + if (!m_previewRenderer) + { + m_previewRenderer.reset(aznew AtomToolsFramework::PreviewRenderer( + "PreviewRendererSystemComponent Preview Scene", "PreviewRendererSystemComponent Preview Pipeline")); + } } }); } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp index c49cd3fafb..3ffd8efa6e 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/MaterialPropertyUtil.cpp @@ -167,6 +167,7 @@ namespace AtomToolsFramework bool ConvertToExportFormat( const AZStd::string& exportPath, + [[maybe_unused]] const AZ::Name& propertyId, const AZ::RPI::MaterialTypeSourceData::PropertyDefinition& propertyDefinition, AZ::RPI::MaterialPropertyValue& propertyValue) { @@ -175,7 +176,7 @@ namespace AtomToolsFramework const uint32_t index = propertyValue.GetValue(); if (index >= propertyDefinition.m_enumValues.size()) { - AZ_Error("AtomToolsFramework", false, "Invalid value for material enum property: '%s'.", propertyDefinition.m_name.c_str()); + AZ_Error("AtomToolsFramework", false, "Invalid value for material enum property: '%s'.", propertyId.GetCStr()); return false; } @@ -186,18 +187,33 @@ namespace AtomToolsFramework // Image asset references must be converted from asset IDs to a relative source file path if (propertyDefinition.m_dataType == AZ::RPI::MaterialPropertyDataType::Image) { + AZStd::string imagePath; + AZ::Data::AssetId imageAssetId; + if (propertyValue.Is>()) { const auto& imageAsset = propertyValue.GetValue>(); - const auto& imagePath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(imageAsset.GetId()); - propertyValue = GetExteralReferencePath(exportPath, imagePath); - return true; + imageAssetId = imageAsset.GetId(); } if (propertyValue.Is>()) { const auto& image = propertyValue.GetValue>(); - const auto& imagePath = image ? AZ::RPI::AssetUtils::GetSourcePathByAssetId(image->GetAssetId()) : ""; + if (image) + { + imageAssetId = image->GetAssetId(); + } + } + + imagePath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(imageAssetId); + + if (imageAssetId.IsValid() && imagePath.empty()) + { + AZ_Error("AtomToolsFramework", false, "Image asset could not be found for property: '%s'.", propertyId.GetCStr()); + return false; + } + else + { propertyValue = GetExteralReferencePath(exportPath, imagePath); return true; } diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp index d3bce34af3..cd50c10e23 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Util/Util.cpp @@ -6,15 +6,18 @@ * */ +#include +#include #include #include +#include #include #include #include #include +#include #include #include -#include AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") // disable warnings spawned by QT #include @@ -24,6 +27,36 @@ AZ_POP_DISABLE_WARNING namespace AtomToolsFramework { + void LoadImageAsync(const AZStd::string& path, LoadImageAsyncCallback callback) + { + AZ::Job* job = AZ::CreateJobFunction( + [path, callback]() + { + ImageProcessingAtom::IImageObjectPtr imageObject; + ImageProcessingAtom::ImageProcessingRequestBus::BroadcastResult( + imageObject, &ImageProcessingAtom::ImageProcessingRequests::LoadImagePreview, path); + + if (imageObject) + { + AZ::u8* imageBuf = nullptr; + AZ::u32 pitch = 0; + AZ::u32 mip = 0; + imageObject->GetImagePointer(mip, imageBuf, pitch); + const AZ::u32 width = imageObject->GetWidth(mip); + const AZ::u32 height = imageObject->GetHeight(mip); + + QImage image(imageBuf, width, height, pitch, QImage::Format_RGBA8888); + + if (callback) + { + callback(image); + } + } + }, + true); + job->Start(); + } + QFileInfo GetSaveFileInfo(const QString& initialPath) { const QFileInfo initialFileInfo(initialPath); diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp index a92bfdbcdb..179ccd9fd8 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ModularViewportCameraController.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -175,16 +176,12 @@ namespace AtomToolsFramework // ignore these updates if the camera is being updated internally if (!m_updatingTransformInternally) { - if (m_storedCamera.has_value()) - { - // if an external change occurs ensure we update the stored reference frame if one is set - RefreshReferenceFrame(); - return; - } - m_previousCamera = m_targetCamera; - UpdateCameraFromTransform(m_targetCamera, m_modularCameraViewportContext->GetCameraTransform()); - m_camera = m_targetCamera; + + const AZ::Transform transform = m_modularCameraViewportContext->GetCameraTransform(); + const AZ::Vector3 eulerAngles = AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromTransform(transform)); + UpdateCameraFromTranslationAndRotation(m_targetCamera, transform.GetTranslation(), eulerAngles); + m_targetRoll = eulerAngles.GetY(); } }; @@ -227,7 +224,9 @@ namespace AtomToolsFramework { m_targetCamera = m_cameraSystem.StepCamera(m_targetCamera, event.m_deltaTime.count()); m_camera = AzFramework::SmoothCamera(m_camera, m_targetCamera, m_cameraProps, event.m_deltaTime.count()); - m_modularCameraViewportContext->SetCameraTransform(m_referenceFrameOverride * m_camera.Transform()); + m_roll = AzFramework::SmoothValue(m_targetRoll, m_roll, m_cameraProps.m_rotateSmoothnessFn(), event.m_deltaTime.count()); + + m_modularCameraViewportContext->SetCameraTransform(CombinedCameraTransform()); } else if (m_cameraMode == CameraMode::Animation) { @@ -236,7 +235,10 @@ namespace AtomToolsFramework return t * t * t * (t * (t * 6.0f - 15.0f) + 10.0f); }; - m_cameraAnimation.m_time = AZ::GetClamp(m_cameraAnimation.m_time + event.m_deltaTime.count(), 0.0f, 1.0f); + m_cameraAnimation.m_time = AZ::GetClamp( + m_cameraAnimation.m_time + + (event.m_deltaTime.count() / ModularViewportCameraControllerRequests::InterpolateToTransformDuration), + 0.0f, 1.0f); const auto& [transformStart, transformEnd, animationTime] = m_cameraAnimation; @@ -250,6 +252,7 @@ namespace AtomToolsFramework m_camera.m_yaw = eulerAngles.GetZ(); m_camera.m_pivot = current.GetTranslation(); m_camera.m_offset = AZ::Vector3::CreateZero(); + m_targetRoll = eulerAngles.GetY(); m_targetCamera = m_camera; m_modularCameraViewportContext->SetCameraTransform(current); @@ -257,55 +260,59 @@ namespace AtomToolsFramework if (animationTime >= 1.0f) { m_cameraMode = CameraMode::Control; - RefreshReferenceFrame(); } } m_updatingTransformInternally = false; } - void ModularViewportCameraControllerInstance::InterpolateToTransform(const AZ::Transform& worldFromLocal) + bool ModularViewportCameraControllerInstance::InterpolateToTransform(const AZ::Transform& worldFromLocal) { - m_cameraMode = CameraMode::Animation; - m_cameraAnimation = CameraAnimation{ m_referenceFrameOverride * m_camera.Transform(), worldFromLocal, 0.0f }; + if (!IsInterpolating()) + { + m_cameraMode = CameraMode::Animation; + m_cameraAnimation = CameraAnimation{ CombinedCameraTransform(), worldFromLocal, 0.0f }; + + return true; + } + + return false; } - AZ::Transform ModularViewportCameraControllerInstance::GetReferenceFrame() const + bool ModularViewportCameraControllerInstance::IsInterpolating() const { - return m_referenceFrameOverride; + return m_cameraMode == CameraMode::Animation; } - void ModularViewportCameraControllerInstance::SetReferenceFrame(const AZ::Transform& worldFromLocal) + void ModularViewportCameraControllerInstance::StartTrackingTransform(const AZ::Transform& worldFromLocal) { if (!m_storedCamera.has_value()) { m_storedCamera = m_previousCamera; } - m_referenceFrameOverride = worldFromLocal; - m_targetCamera.m_pitch = 0.0f; - m_targetCamera.m_yaw = 0.0f; + const auto angles = AzFramework::EulerAngles(AZ::Matrix3x3::CreateFromQuaternion(worldFromLocal.GetRotation())); + m_targetCamera.m_pitch = angles.GetX(); + m_targetCamera.m_yaw = angles.GetZ(); m_targetCamera.m_offset = AZ::Vector3::CreateZero(); - m_targetCamera.m_pivot = AZ::Vector3::CreateZero(); - m_camera = m_targetCamera; + m_targetCamera.m_pivot = worldFromLocal.GetTranslation(); + m_targetRoll = angles.GetY(); } - void ModularViewportCameraControllerInstance::ClearReferenceFrame() + void ModularViewportCameraControllerInstance::StopTrackingTransform() { - m_referenceFrameOverride = AZ::Transform::CreateIdentity(); - if (m_storedCamera.has_value()) { m_targetCamera = m_storedCamera.value(); - m_camera = m_targetCamera; + m_targetRoll = 0.0f; } m_storedCamera.reset(); } - void ModularViewportCameraControllerInstance::RefreshReferenceFrame() + bool ModularViewportCameraControllerInstance::IsTrackingTransform() const { - m_referenceFrameOverride = m_modularCameraViewportContext->GetCameraTransform() * m_camera.Transform().GetInverse(); + return m_storedCamera.has_value(); } AZ::Transform PlaceholderModularCameraViewportContextImpl::GetCameraTransform() const @@ -324,4 +331,9 @@ namespace AtomToolsFramework { handler.Connect(m_viewMatrixChangedEvent); } + + AZ::Transform ModularViewportCameraControllerInstance::CombinedCameraTransform() const + { + return m_camera.Transform() * AZ::Transform::CreateFromMatrix3x3(AZ::Matrix3x3::CreateRotationY(m_targetRoll)); + } } // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp index bed4778e8e..759f939382 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/RenderViewportWidget.cpp @@ -75,7 +75,11 @@ namespace AtomToolsFramework m_defaultCamera = AZ::RPI::View::CreateView(cameraName, AZ::RPI::View::UsageFlags::UsageCamera); AZ::Interface::Get()->PushView(m_viewportContext->GetName(), m_defaultCamera); - AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(GetId()); + m_viewportInteractionImpl = AZStd::make_unique(m_defaultCamera); + m_viewportInteractionImpl->m_deviceScalingFactorFn = [this] { return aznumeric_cast(devicePixelRatioF()); }; + m_viewportInteractionImpl->m_screenSizeFn = [this] { return AzFramework::ScreenSize(width(), height()); }; + m_viewportInteractionImpl->Connect(id); + AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler::BusConnect(GetId()); AzFramework::InputChannelEventListener::Connect(); AZ::TickBus::Handler::BusConnect(); @@ -107,7 +111,7 @@ namespace AtomToolsFramework AZ::TickBus::Handler::BusDisconnect(); AzFramework::InputChannelEventListener::Disconnect(); AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler::BusDisconnect(); - AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusDisconnect(); + m_viewportInteractionImpl->Disconnect(); } void RenderViewportWidget::LockRenderTargetSize(uint32_t width, uint32_t height) @@ -290,77 +294,23 @@ namespace AtomToolsFramework AzFramework::CameraState RenderViewportWidget::GetCameraState() { - AZ::RPI::ViewPtr currentView = m_viewportContext->GetDefaultView(); - if (currentView == nullptr) - { - return {}; - } - - // Build camera state from Atom camera transforms - AzFramework::CameraState cameraState = AzFramework::CreateCameraFromWorldFromViewMatrix( - currentView->GetViewToWorldMatrix(), - AZ::Vector2{aznumeric_cast(width()), aznumeric_cast(height())} - ); - AzFramework::SetCameraClippingVolumeFromPerspectiveFovMatrixRH(cameraState, currentView->GetViewToClipMatrix()); - - // Convert from Z-up - AZStd::swap(cameraState.m_forward, cameraState.m_up); - cameraState.m_forward = -cameraState.m_forward; - - return cameraState; + return m_viewportInteractionImpl->GetCameraState(); } AzFramework::ScreenPoint RenderViewportWidget::ViewportWorldToScreen(const AZ::Vector3& worldPosition) { - if (AZ::RPI::ViewPtr currentView = m_viewportContext->GetDefaultView(); - currentView == nullptr) - { - return AzFramework::ScreenPoint(0, 0); - } - - return AzFramework::WorldToScreen(worldPosition, GetCameraState()); + return m_viewportInteractionImpl->ViewportWorldToScreen(worldPosition); } - AZStd::optional RenderViewportWidget::ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition, float depth) + AZ::Vector3 RenderViewportWidget::ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) { - const auto& cameraProjection = m_viewportContext->GetCameraProjectionMatrix(); - const auto& cameraView = m_viewportContext->GetCameraViewMatrix(); - - const AZ::Vector4 normalizedScreenPosition { - screenPosition.m_x * 2.f / width() - 1.0f, - (height() - screenPosition.m_y) * 2.f / height() - 1.0f, - 1.f - depth, // [GFX TODO] [ATOM-1501] Currently we always assume reverse depth - 1.f - }; - - AZ::Matrix4x4 worldFromScreen = cameraProjection * cameraView; - worldFromScreen.InvertFull(); - - const AZ::Vector4 projectedPosition = worldFromScreen * normalizedScreenPosition; - if (projectedPosition.GetW() == 0.0f) - { - return {}; - } - - return projectedPosition.GetAsVector3() / projectedPosition.GetW(); + return m_viewportInteractionImpl->ViewportScreenToWorld(screenPosition); } - AZStd::optional RenderViewportWidget::ViewportScreenToWorldRay( + AzToolsFramework::ViewportInteraction::ProjectedViewportRay RenderViewportWidget::ViewportScreenToWorldRay( const AzFramework::ScreenPoint& screenPosition) { - auto pos0 = ViewportScreenToWorld(screenPosition, 0.f); - auto pos1 = ViewportScreenToWorld(screenPosition, 1.f); - if (!pos0.has_value() || !pos1.has_value()) - { - return {}; - } - - pos0 = m_viewportContext->GetDefaultView()->GetViewToWorldMatrix().GetTranslation(); - AZ::Vector3 rayOrigin = pos0.value(); - AZ::Vector3 rayDirection = pos1.value() - pos0.value(); - rayDirection.Normalize(); - - return AzToolsFramework::ViewportInteraction::ProjectedViewportRay{rayOrigin, rayDirection}; + return m_viewportInteractionImpl->ViewportScreenToWorldRay(screenPosition); } float RenderViewportWidget::DeviceScalingFactor() diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp new file mode 100644 index 0000000000..1a015c167c --- /dev/null +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Viewport/ViewportInteractionImpl.cpp @@ -0,0 +1,68 @@ +/* + * 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 +#include + +namespace AtomToolsFramework +{ + ViewportInteractionImpl::ViewportInteractionImpl(AZ::RPI::ViewPtr viewPtr) + : m_viewPtr(AZStd::move(viewPtr)) + { + } + + void ViewportInteractionImpl::Connect(const AzFramework::ViewportId viewportId) + { + AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(viewportId); + AZ::RPI::ViewportContextIdNotificationBus::Handler::BusConnect(viewportId); + } + + void ViewportInteractionImpl::Disconnect() + { + AZ::RPI::ViewportContextIdNotificationBus::Handler::BusDisconnect(); + AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusDisconnect(); + } + + AzFramework::CameraState ViewportInteractionImpl::GetCameraState() + { + // build camera state from atom camera transforms + AzFramework::CameraState cameraState = + AzFramework::CreateDefaultCamera(m_viewPtr->GetCameraTransform(), AzFramework::Vector2FromScreenSize(m_screenSizeFn())); + AzFramework::SetCameraClippingVolumeFromPerspectiveFovMatrixRH(cameraState, m_viewPtr->GetViewToClipMatrix()); + return cameraState; + } + + AzFramework::ScreenPoint ViewportInteractionImpl::ViewportWorldToScreen(const AZ::Vector3& worldPosition) + { + return AzFramework::WorldToScreen(worldPosition, GetCameraState()); + } + + AZ::Vector3 ViewportInteractionImpl::ViewportScreenToWorld(const AzFramework::ScreenPoint& screenPosition) + { + return AzFramework::ScreenToWorld(screenPosition, GetCameraState()); + } + + AzToolsFramework::ViewportInteraction::ProjectedViewportRay ViewportInteractionImpl::ViewportScreenToWorldRay( + const AzFramework::ScreenPoint& screenPosition) + { + const AzFramework::CameraState cameraState = GetCameraState(); + const AZ::Vector3 rayOrigin = AzFramework::ScreenToWorld(screenPosition, cameraState); + const AZ::Vector3 rayDirection = (rayOrigin - cameraState.m_position).GetNormalized(); + return AzToolsFramework::ViewportInteraction::ProjectedViewportRay{ rayOrigin, rayDirection }; + } + + float ViewportInteractionImpl::DeviceScalingFactor() + { + return m_deviceScalingFactorFn(); + } + + void ViewportInteractionImpl::OnViewportDefaultViewChanged(AZ::RPI::ViewPtr view) + { + m_viewPtr = AZStd::move(view); + } +} // namespace AtomToolsFramework diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp index aeca51230a..f07fd9c536 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Source/Window/AtomToolsMainWindow.cpp @@ -50,8 +50,9 @@ namespace AtomToolsFramework void AtomToolsMainWindow::ActivateWindow() { - activateWindow(); + show(); raise(); + activateWindow(); } bool AtomToolsMainWindow::AddDockWidget(const AZStd::string& name, QWidget* widget, uint32_t area, uint32_t orientation) diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp index df16cfbc43..3124372bd2 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/AtomToolsFrameworkTest.cpp @@ -12,16 +12,25 @@ namespace UnitTest { + class AtomToolsFrameworkTestEnvironment : public AZ::Test::ITestEnvironment + { + protected: + void SetupEnvironment() override + { + AZ::AllocatorInstance::Create(); + } + + void TeardownEnvironment() override + { + AZ::AllocatorInstance::Destroy(); + } + }; + class AtomToolsFrameworkTest : public ::testing::Test { protected: void SetUp() override { - if (!AZ::AllocatorInstance::IsReady()) - { - AZ::AllocatorInstance::Create(AZ::SystemAllocator::Descriptor()); - } - m_assetSystemStub.Activate(); RegisterSourceAsset("objects/upgrades/materials/supercondor.material"); @@ -38,11 +47,6 @@ namespace UnitTest void TearDown() override { m_assetSystemStub.Deactivate(); - - if (AZ::AllocatorInstance::IsReady()) - { - AZ::AllocatorInstance::Destroy(); - } } void RegisterSourceAsset(const AZStd::string& path) @@ -73,5 +77,5 @@ namespace UnitTest ASSERT_EQ(AtomToolsFramework::GetExteralReferencePath("d:/project/assets/objects/upgrades/materials/supercondor.material", "d:/project/assets/materials/condor.material", 0), "materials/condor.material"); } - AZ_UNIT_TEST_HOOK(DEFAULT_UNIT_TEST_ENV); + AZ_UNIT_TEST_HOOK(new AtomToolsFrameworkTestEnvironment); } // namespace UnitTest diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/ViewportInteractionImplTests.cpp b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/ViewportInteractionImplTests.cpp new file mode 100644 index 0000000000..2dfe4f7c29 --- /dev/null +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/Tests/ViewportInteractionImplTests.cpp @@ -0,0 +1,209 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace UnitTest +{ + class ViewportInteractionImplFixture : public ::testing::Test + { + public: + static inline constexpr AzFramework::ViewportId TestViewportId = 1234; + static inline constexpr AzFramework::ScreenSize ScreenDimensions = AzFramework::ScreenSize(1280, 720); + + static AzFramework::ScreenPoint ScreenCenter() + { + const auto halfScreenDimensions = ScreenDimensions * 0.5f; + return AzFramework::ScreenPoint(halfScreenDimensions.m_width, halfScreenDimensions.m_height); + } + + void SetUp() override + { + AZ::NameDictionary::Create(); + + m_view = AZ::RPI::View::CreateView(AZ::Name("TestView"), AZ::RPI::View::UsageCamera); + + const auto aspectRatio = aznumeric_cast(ScreenDimensions.m_width) / aznumeric_cast(ScreenDimensions.m_height); + + AZ::Matrix4x4 viewToClipMatrix; + AZ::MakePerspectiveFovMatrixRH(viewToClipMatrix, AZ::DegToRad(60.0f), aspectRatio, 0.1f, 1000.f, true); + m_view->SetViewToClipMatrix(viewToClipMatrix); + + m_viewportInteractionImpl = AZStd::make_unique(m_view); + + m_viewportInteractionImpl->m_deviceScalingFactorFn = [] + { + return 1.0f; + }; + m_viewportInteractionImpl->m_screenSizeFn = [] + { + return ScreenDimensions; + }; + + m_viewportInteractionImpl->Connect(TestViewportId); + } + + void TearDown() override + { + m_viewportInteractionImpl->Disconnect(); + m_viewportInteractionImpl.reset(); + + m_view.reset(); + + AZ::NameDictionary::Destroy(); + } + + AZ::RPI::ViewPtr m_view; + AZStd::unique_ptr m_viewportInteractionImpl; + }; + + // transform a point from screen space to world space, and then from world space back to screen space + AzFramework::ScreenPoint ScreenToWorldToScreen( + const AzFramework::ScreenPoint& screenPoint, + AzToolsFramework::ViewportInteraction::ViewportInteractionRequests& viewportInteractionRequests) + { + const auto worldResult = viewportInteractionRequests.ViewportScreenToWorld(screenPoint); + return viewportInteractionRequests.ViewportWorldToScreen(worldResult); + } + + TEST_F(ViewportInteractionImplFixture, ViewportInteractionRequestsMapsFromScreenToWorldAndBack) + { + using AzFramework::ScreenPoint; + + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(90.0f)), AZ::Vector3(10.0f, 0.0f, 5.0f))); + + { + const auto expectedScreenPoint = ScreenPoint{ 600, 450 }; + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + + { + auto expectedScreenPoint = ScreenCenter(); + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + + { + const auto expectedScreenPoint = ScreenPoint{ 0, 0 }; + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + + { + const auto expectedScreenPoint = ScreenPoint{ ScreenDimensions.m_width, ScreenDimensions.m_height }; + const auto resultScreenPoint = ScreenToWorldToScreen(expectedScreenPoint, *m_viewportInteractionImpl); + EXPECT_EQ(resultScreenPoint, expectedScreenPoint); + } + } + + TEST_F(ViewportInteractionImplFixture, ScreenToWorldReturnsPositionOnNearClipPlaneInWorldSpace) + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(-90.0f)), AZ::Vector3(20.0f, 0.0f, 0.0f))); + + const auto worldResult = m_viewportInteractionImpl->ViewportScreenToWorld(ScreenCenter()); + EXPECT_THAT(worldResult, IsClose(AZ::Vector3(20.1f, 0.0f, 0.0f))); + } + + // note: values produced by reproducing in the editor viewport + TEST_F(ViewportInteractionImplFixture, WorldToScreenGivesExpectedScreenCoordinates) + { + using AzFramework::ScreenPoint; + + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(160.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-18.0f)), + AZ::Vector3(-21.0f, 2.5f, 6.0f))); + + const auto screenResult = m_viewportInteractionImpl->ViewportWorldToScreen(AZ::Vector3(-21.0f, -1.5f, 5.0f)); + EXPECT_EQ(screenResult, ScreenPoint(420, 326)); + } + + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(175.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-90.0f)), + AZ::Vector3(-10.0f, -11.0f, 2.5f))); + + const auto screenResult = m_viewportInteractionImpl->ViewportWorldToScreen(AZ::Vector3(-10.0f, -10.5f, 0.5f)); + EXPECT_EQ(screenResult, ScreenPoint(654, 515)); + } + + { + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(70.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(65.0f)), + AZ::Vector3(-22.5f, -10.0f, 1.5f))); + + const auto screenResult = m_viewportInteractionImpl->ViewportWorldToScreen(AZ::Vector3(-23.0f, -9.5f, 3.0f)); + EXPECT_EQ(screenResult, ScreenPoint(754, 340)); + } + } + + TEST_F(ViewportInteractionImplFixture, ScreenToWorldRayGivesGivesExpectedOriginAndDirection) + { + using AzFramework::ScreenPoint; + + m_view->SetCameraTransform(AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(34.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-24.0f)), + AZ::Vector3(-9.3f, -9.8f, 4.0f))); + + const auto ray = m_viewportInteractionImpl->ViewportScreenToWorldRay(ScreenPoint(832, 226)); + + float unused; + auto intersection = AZ::Intersect::IntersectRaySphere(ray.origin, ray.direction, AZ::Vector3(-14.0f, 5.7f, 0.75f), 0.5f, unused); + + EXPECT_EQ(intersection, AZ::Intersect::SphereIsectTypes::ISECT_RAY_SPHERE_ISECT); + } + + TEST_F(ViewportInteractionImplFixture, ViewportInteractionRequestsReturnsNewViewWhenItIsChanged) + { + // Given + const auto primaryViewTransform = AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(90.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(-45.0f)), + AZ::Vector3(-10.0f, -15.0f, 20.0f)); + + m_view->SetCameraTransform(primaryViewTransform); + + AZ::RPI::ViewPtr secondaryView = AZ::RPI::View::CreateView(AZ::Name("SecondaryView"), AZ::RPI::View::UsageCamera); + + const auto secondaryViewTransform = AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateRotationZ(AZ::DegToRad(-90.0f)) * AZ::Matrix3x3::CreateRotationX(AZ::DegToRad(30.0f)), + AZ::Vector3(-50.0f, -25.0f, 10.0f)); + + secondaryView->SetCameraTransform(secondaryViewTransform); + + // When + AZ::RPI::ViewportContextIdNotificationBus::Event( + TestViewportId, &AZ::RPI::ViewportContextIdNotificationBus::Events::OnViewportDefaultViewChanged, secondaryView); + + // retrieve updated camera transform + AzFramework::CameraState cameraState; + AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::EventResult( + cameraState, TestViewportId, &AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Events::GetCameraState); + + const auto cameraMatrix = AzFramework::CameraTransform(cameraState); + const auto cameraTransform = AZ::Matrix3x4::CreateFromMatrix3x3AndTranslation( + AZ::Matrix3x3::CreateFromMatrix4x4(cameraMatrix), cameraMatrix.GetTranslation()); + + // Then + // camera transform matches that of the secondary view + EXPECT_THAT(cameraTransform, IsClose(secondaryViewTransform)); + } +} // namespace UnitTest diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake index a2446cebcc..3ddcc05245 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_files.cmake @@ -28,6 +28,7 @@ set(FILES Include/AtomToolsFramework/Util/MaterialPropertyUtil.h Include/AtomToolsFramework/Util/Util.h Include/AtomToolsFramework/Viewport/RenderViewportWidget.h + Include/AtomToolsFramework/Viewport/ViewportInteractionImpl.h Include/AtomToolsFramework/Viewport/ModularViewportCameraController.h Include/AtomToolsFramework/Viewport/ModularViewportCameraControllerRequestBus.h Include/AtomToolsFramework/Window/AtomToolsMainWindow.h @@ -55,6 +56,7 @@ set(FILES Source/Util/Util.cpp Source/Viewport/RenderViewportWidget.cpp Source/Viewport/ModularViewportCameraController.cpp + Source/Viewport/ViewportInteractionImpl.cpp Source/Window/AtomToolsMainWindow.cpp Source/Window/AtomToolsMainWindowSystemComponent.cpp Source/Window/AtomToolsMainWindowSystemComponent.h diff --git a/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_tests_files.cmake b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_tests_files.cmake index bd9ad9b3d8..a071d29f47 100644 --- a/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_tests_files.cmake +++ b/Gems/Atom/Tools/AtomToolsFramework/Code/atomtoolsframework_tests_files.cmake @@ -8,4 +8,5 @@ set(FILES Tests/AtomToolsFrameworkTest.cpp + Tests/ViewportInteractionImplTests.cpp ) \ No newline at end of file diff --git a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt index d585e81162..99beb721d6 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt +++ b/Gems/Atom/Tools/MaterialEditor/Code/CMakeLists.txt @@ -60,7 +60,6 @@ ly_add_target( Gem::AtomToolsFramework.Editor Gem::Atom_RPI.Public Gem::Atom_Feature_Common.Public - Gem::ImageProcessingAtom.Headers ) ly_add_target( @@ -113,7 +112,6 @@ ly_add_target( RUNTIME_DEPENDENCIES Gem::AtomToolsFramework.Editor Gem::EditorPythonBindings.Editor - Gem::ImageProcessingAtom.Editor ) ly_set_gem_variant_to_load(TARGETS MaterialEditor VARIANTS Tools) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h b/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h index e859d6a433..e37512127c 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Include/Atom/Viewport/MaterialViewportRequestBus.h @@ -62,15 +62,6 @@ namespace MaterialEditor //! Get set of lighting preset names virtual MaterialViewportPresetNameSet GetLightingPresetNames() const = 0; - //! Set lighting preset preview image - //! @param preset used to set preview image - //! @param preview image - virtual void SetLightingPresetPreview(AZ::Render::LightingPresetPtr preset, const QImage& image) = 0; - - //! Get lighting preset preview image - //! @param preset used to find preview image - virtual QImage GetLightingPresetPreview(AZ::Render::LightingPresetPtr preset) const = 0; - //! Get model preset last save path //! @param preset to lookup last save path virtual AZStd::string GetLightingPresetLastSavePath(AZ::Render::LightingPresetPtr preset) const = 0; @@ -108,15 +99,6 @@ namespace MaterialEditor //! Get set of model preset names virtual MaterialViewportPresetNameSet GetModelPresetNames() const = 0; - //! Set model preset preview image - //! @param preset used to set preview image - //! @param preview image - virtual void SetModelPresetPreview(AZ::Render::ModelPresetPtr preset, const QImage& image) = 0; - - //! Get model preset preview image - //! @param preset used to find preview image - virtual QImage GetModelPresetPreview(AZ::Render::ModelPresetPtr preset) const = 0; - //! Get model preset last save path //! @param preset to lookup last save path virtual AZStd::string GetModelPresetLastSavePath(AZ::Render::ModelPresetPtr preset) const = 0; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp index 8635d1eb3e..2d7768feec 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Document/MaterialDocument.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -594,7 +595,7 @@ namespace MaterialEditor MaterialPropertyValue propertyValue = AtomToolsFramework::ConvertToRuntimeType(it->second.GetValue()); if (propertyValue.IsValid()) { - if (!AtomToolsFramework::ConvertToExportFormat(exportPath, propertyDefinition, propertyValue)) + if (!AtomToolsFramework::ConvertToExportFormat(exportPath, propertyId.GetFullName(), propertyDefinition, propertyValue)) { AZ_Error("MaterialDocument", false, "Material document property could not be converted: '%s' in '%s'.", propertyId.GetFullName().GetCStr(), m_absolutePath.c_str()); result = false; @@ -708,6 +709,8 @@ namespace MaterialEditor AZ_Error("MaterialDocument", false, "Material document extension not supported: '%s'.", m_absolutePath.c_str()); return false; } + + const bool elevateWarnings = false; // In order to support automation, general usability, and 'save as' functionality, the user must not have to wait // for their JSON file to be cooked by the asset processor before opening or editing it. @@ -716,7 +719,7 @@ namespace MaterialEditor // Long term, the material document should not be concerned with assets at all. The viewport window should be the // only thing concerned with assets or instances. auto materialAssetResult = - m_materialSourceData.CreateMaterialAssetFromSourceData(Uuid::CreateRandom(), m_absolutePath, true, true, &m_sourceDependencies); + m_materialSourceData.CreateMaterialAssetFromSourceData(Uuid::CreateRandom(), m_absolutePath, elevateWarnings, true, &m_sourceDependencies); if (!materialAssetResult) { AZ_Error("MaterialDocument", false, "Material asset could not be created from source data: '%s'.", m_absolutePath.c_str()); @@ -754,7 +757,7 @@ namespace MaterialEditor AZ_Error("MaterialDocument", false, "Material parent asset ID could not be created: '%s'.", m_materialSourceData.m_parentMaterial.c_str()); return false; } - + auto parentMaterialAssetResult = parentMaterialSourceData.CreateMaterialAssetFromSourceData( parentMaterialAssetIdResult.GetValue(), m_materialSourceData.m_parentMaterial, true, true); if (!parentMaterialAssetResult) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp index a8f41917f9..c8df123d0d 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.cpp @@ -6,61 +6,26 @@ * */ +#include +#include +#include +#include +#include +#include #include -#include -#include #include -#include - +#include +#include +#include #include -#include #include +#include #include #include - #include -#include -#include - -#include -#include - -#include - -#include -#include -#include -#include namespace MaterialEditor { - using LoadImageAsyncCallback = AZStd::function; - void LoadImageAsync(const AZStd::string& path, LoadImageAsyncCallback callback) - { - AZ::Job* job = AZ::CreateJobFunction([path, callback]() { - ImageProcessingAtom::IImageObjectPtr imageObject; - ImageProcessingAtom::ImageProcessingRequestBus::BroadcastResult(imageObject, &ImageProcessingAtom::ImageProcessingRequests::LoadImagePreview, path); - - if (imageObject) - { - AZ::u8* imageBuf = nullptr; - AZ::u32 pitch = 0; - AZ::u32 mip = 0; - imageObject->GetImagePointer(mip, imageBuf, pitch); - const AZ::u32 width = imageObject->GetWidth(mip); - const AZ::u32 height = imageObject->GetHeight(mip); - - QImage image(imageBuf, width, height, pitch, QImage::Format_RGBA8888); - - if (callback) - { - callback(image); - } - } - }, true); - job->Start(); - } - MaterialViewportComponent::MaterialViewportComponent() { } @@ -162,12 +127,6 @@ namespace MaterialEditor m_viewportSettings = AZ::UserSettings::CreateFind(AZ::Crc32("MaterialViewportSettings"), AZ::UserSettings::CT_GLOBAL); - m_lightingPresetPreviewImageDefault = QImage(180, 90, QImage::Format::Format_RGBA8888); - m_lightingPresetPreviewImageDefault.fill(Qt::GlobalColor::black); - - m_modelPresetPreviewImageDefault = QImage(90, 90, QImage::Format::Format_RGBA8888); - m_modelPresetPreviewImageDefault.fill(Qt::GlobalColor::black); - MaterialViewportRequestBus::Handler::BusConnect(); AzFramework::AssetCatalogEventBus::Handler::BusConnect(); } @@ -177,12 +136,10 @@ namespace MaterialEditor AzFramework::AssetCatalogEventBus::Handler::BusDisconnect(); MaterialViewportRequestBus::Handler::BusDisconnect(); - m_lightingPresetPreviewImages.clear(); m_lightingPresetVector.clear(); m_lightingPresetLastSavePathMap.clear(); m_lightingPresetSelection.reset(); - m_modelPresetPreviewImages.clear(); m_modelPresetVector.clear(); m_modelPresetLastSavePathMap.clear(); m_modelPresetSelection.reset(); @@ -286,14 +243,6 @@ namespace MaterialEditor SelectLightingPreset(presetPtr); } - const auto& imagePath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(presetPtr->m_skyboxImageAsset.GetId()); - LoadImageAsync(imagePath, [presetPtr](const QImage& image) { - QImage imageScaled = image.scaled(180, 90, Qt::AspectRatioMode::KeepAspectRatio); - AZ::TickBus::QueueFunction([presetPtr, imageScaled]() { - MaterialViewportRequestBus::Broadcast(&MaterialViewportRequestBus::Events::SetLightingPresetPreview, presetPtr, imageScaled); - }); - }); - return presetPtr; } @@ -353,17 +302,6 @@ namespace MaterialEditor return names; } - void MaterialViewportComponent::SetLightingPresetPreview(AZ::Render::LightingPresetPtr preset, const QImage& image) - { - m_lightingPresetPreviewImages[preset] = image; - } - - QImage MaterialViewportComponent::GetLightingPresetPreview(AZ::Render::LightingPresetPtr preset) const - { - auto imageItr = m_lightingPresetPreviewImages.find(preset); - return imageItr != m_lightingPresetPreviewImages.end() ? imageItr->second : m_lightingPresetPreviewImageDefault; - } - AZStd::string MaterialViewportComponent::GetLightingPresetLastSavePath(AZ::Render::LightingPresetPtr preset) const { auto pathItr = m_lightingPresetLastSavePathMap.find(preset); @@ -382,14 +320,6 @@ namespace MaterialEditor SelectModelPreset(presetPtr); } - const auto& imagePath = AZ::RPI::AssetUtils::GetSourcePathByAssetId(presetPtr->m_previewImageAsset.GetId()); - LoadImageAsync(imagePath, [presetPtr](const QImage& image) { - QImage imageScaled = image.scaled(90, 90, Qt::AspectRatioMode::KeepAspectRatio); - AZ::TickBus::QueueFunction([presetPtr, imageScaled]() { - MaterialViewportRequestBus::Broadcast(&MaterialViewportRequestBus::Events::SetModelPresetPreview, presetPtr, imageScaled); - }); - }); - return presetPtr; } @@ -449,17 +379,6 @@ namespace MaterialEditor return names; } - void MaterialViewportComponent::SetModelPresetPreview(AZ::Render::ModelPresetPtr preset, const QImage& image) - { - m_modelPresetPreviewImages[preset] = image; - } - - QImage MaterialViewportComponent::GetModelPresetPreview(AZ::Render::ModelPresetPtr preset) const - { - auto imageItr = m_modelPresetPreviewImages.find(preset); - return imageItr != m_modelPresetPreviewImages.end() ? imageItr->second : m_modelPresetPreviewImageDefault; - } - AZStd::string MaterialViewportComponent::GetModelPresetLastSavePath(AZ::Render::ModelPresetPtr preset) const { auto pathItr = m_modelPresetLastSavePathMap.find(preset); diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h index 12475bb113..a4f94c3546 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/MaterialViewportComponent.h @@ -58,8 +58,6 @@ namespace MaterialEditor void SelectLightingPreset(AZ::Render::LightingPresetPtr preset) override; void SelectLightingPresetByName(const AZStd::string& name) override; MaterialViewportPresetNameSet GetLightingPresetNames() const override; - void SetLightingPresetPreview(AZ::Render::LightingPresetPtr preset, const QImage& image) override; - QImage GetLightingPresetPreview(AZ::Render::LightingPresetPtr preset) const override; AZStd::string GetLightingPresetLastSavePath(AZ::Render::LightingPresetPtr preset) const override; AZ::Render::ModelPresetPtr AddModelPreset(const AZ::Render::ModelPreset& preset) override; @@ -70,8 +68,6 @@ namespace MaterialEditor void SelectModelPreset(AZ::Render::ModelPresetPtr preset) override; void SelectModelPresetByName(const AZStd::string& name) override; MaterialViewportPresetNameSet GetModelPresetNames() const override; - void SetModelPresetPreview(AZ::Render::ModelPresetPtr preset, const QImage& image) override; - QImage GetModelPresetPreview(AZ::Render::ModelPresetPtr preset) const override; AZStd::string GetModelPresetLastSavePath(AZ::Render::ModelPresetPtr preset) const override; void SetShadowCatcherEnabled(bool enable) override; @@ -97,12 +93,6 @@ namespace MaterialEditor AZ::Render::ModelPresetPtrVector m_modelPresetVector; AZ::Render::ModelPresetPtr m_modelPresetSelection; - AZStd::map m_lightingPresetPreviewImages; - AZStd::map m_modelPresetPreviewImages; - - QImage m_lightingPresetPreviewImageDefault; - QImage m_modelPresetPreviewImageDefault; - mutable AZStd::map m_lightingPresetLastSavePathMap; mutable AZStd::map m_modelPresetLastSavePathMap; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp index 72bf7fe003..f8ad038a85 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/LightingPresetBrowserDialog.cpp @@ -7,6 +7,7 @@ */ #include +#include #include #include #include @@ -27,13 +28,16 @@ namespace MaterialEditor MaterialViewportRequestBus::BroadcastResult(presets, &MaterialViewportRequestBus::Events::GetLightingPresets); AZStd::sort(presets.begin(), presets.end(), [](const auto& a, const auto& b) { return a->m_displayName < b->m_displayName; }); + const int itemSize = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/LightingItemSize", 180)); + QListWidgetItem* selectedItem = nullptr; for (const auto& preset : presets) { - QImage image; - MaterialViewportRequestBus::BroadcastResult(image, &MaterialViewportRequestBus::Events::GetLightingPresetPreview, preset); - - QListWidgetItem* item = CreateListItem(preset->m_displayName.c_str(), image); + AZStd::string path; + MaterialViewportRequestBus::BroadcastResult(path, &MaterialViewportRequestBus::Events::GetLightingPresetLastSavePath, preset); + QListWidgetItem* item = CreateListItem( + preset->m_displayName.c_str(), AZ::RPI::AssetUtils::MakeAssetId(path, 0).GetValue(), QSize(itemSize, itemSize)); m_listItemToPresetMap[item] = preset; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp index c1936cde35..f5a1677462 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/ModelPresetBrowserDialog.cpp @@ -27,13 +27,13 @@ namespace MaterialEditor MaterialViewportRequestBus::BroadcastResult(presets, &MaterialViewportRequestBus::Events::GetModelPresets); AZStd::sort(presets.begin(), presets.end(), [](const auto& a, const auto& b) { return a->m_displayName < b->m_displayName; }); + const int itemSize = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/ModelItemSize", 90)); + QListWidgetItem* selectedItem = nullptr; for (const auto& preset : presets) { - QImage image; - MaterialViewportRequestBus::BroadcastResult(image, &MaterialViewportRequestBus::Events::GetModelPresetPreview, preset); - - QListWidgetItem* item = CreateListItem(preset->m_displayName.c_str(), image); + QListWidgetItem* item = CreateListItem(preset->m_displayName.c_str(), preset->m_modelAsset.GetId(), QSize(itemSize, itemSize)); m_listItemToPresetMap[item] = preset; diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp index d3aa6350f0..f2bb84dff6 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.cpp @@ -12,11 +12,16 @@ #include #include #include +#include +#include +#include +#include #include #include #include #include +#include namespace MaterialEditor { @@ -41,35 +46,51 @@ namespace MaterialEditor m_ui->m_presetList->setGridSize(QSize(0, 0)); m_ui->m_presetList->setWrapping(true); - QObject::connect(m_ui->m_presetList, &QListWidget::currentItemChanged, [this]() { SelectCurrentPreset(); }); + QObject::connect(m_ui->m_presetList, &QListWidget::currentItemChanged, [this](){ SelectCurrentPreset(); }); } - QListWidgetItem* PresetBrowserDialog::CreateListItem(const QString& title, const QImage& image) + QListWidgetItem* PresetBrowserDialog::CreateListItem(const QString& title, const AZ::Data::AssetId& assetId, const QSize& size) { + const int itemBorder = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/ItemBorder", 4)); + const int itemSpacing = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/ItemSpacing", 10)); + const int headerHeight = aznumeric_cast( + AtomToolsFramework::GetSettingOrDefault("/O3DE/Atom/MaterialEditor/PresetBrowserDialog/HeaderHeight", 15)); + const QSize gridSize = m_ui->m_presetList->gridSize(); - m_ui->m_presetList->setGridSize( - QSize(AZStd::max(gridSize.width(), image.width() + 10), AZStd::max(gridSize.height(), image.height() + 10))); + m_ui->m_presetList->setGridSize(QSize( + AZStd::max(gridSize.width(), size.width() + itemSpacing), + AZStd::max(gridSize.height(), size.height() + itemSpacing + headerHeight))); QListWidgetItem* item = new QListWidgetItem(m_ui->m_presetList); item->setData(Qt::UserRole, title); - item->setSizeHint(image.size() + QSize(4, 4)); + item->setSizeHint(size + QSize(itemBorder, itemBorder + headerHeight)); m_ui->m_presetList->addItem(item); - QLabel* previewImage = new QLabel(m_ui->m_presetList); - previewImage->setFixedSize(image.size()); - previewImage->setMargin(0); - previewImage->setPixmap(QPixmap::fromImage(image)); - previewImage->updateGeometry(); - - AzQtComponents::ElidingLabel* previewLabel = new AzQtComponents::ElidingLabel(previewImage); - previewLabel->setText(title); - previewLabel->setFixedSize(QSize(image.width(), 15)); - previewLabel->setMargin(0); - previewLabel->setStyleSheet("background-color: rgb(35, 35, 35)"); - AzQtComponents::Text::addPrimaryStyle(previewLabel); - AzQtComponents::Text::addLabelStyle(previewLabel); - - m_ui->m_presetList->setItemWidget(item, previewImage); + QWidget* itemWidget = new QWidget(m_ui->m_presetList); + itemWidget->setLayout(new QVBoxLayout(itemWidget)); + itemWidget->layout()->setSpacing(0); + itemWidget->layout()->setMargin(0); + + AzQtComponents::ElidingLabel* header = new AzQtComponents::ElidingLabel(itemWidget); + header->setText(title); + header->setFixedSize(QSize(size.width(), headerHeight)); + header->setMargin(0); + header->setStyleSheet("background-color: rgb(35, 35, 35)"); + AzQtComponents::Text::addPrimaryStyle(header); + AzQtComponents::Text::addLabelStyle(header); + itemWidget->layout()->addWidget(header); + + AzToolsFramework::Thumbnailer::ThumbnailWidget* thumbnail = new AzToolsFramework::Thumbnailer::ThumbnailWidget(itemWidget); + thumbnail->setFixedSize(size); + thumbnail->SetThumbnailKey( + MAKE_TKEY(AzToolsFramework::AssetBrowser::ProductThumbnailKey, assetId), + AzToolsFramework::Thumbnailer::ThumbnailContext::DefaultContext); + thumbnail->updateGeometry(); + itemWidget->layout()->addWidget(thumbnail); + + m_ui->m_presetList->setItemWidget(item, itemWidget); return item; } @@ -79,15 +100,15 @@ namespace MaterialEditor m_ui->m_searchWidget->setReadOnly(false); m_ui->m_searchWidget->setContextMenuPolicy(Qt::CustomContextMenu); AzQtComponents::LineEdit::applySearchStyle(m_ui->m_searchWidget); - connect(m_ui->m_searchWidget, &QLineEdit::textChanged, this, [this]() { ApplySearchFilter(); }); - connect(m_ui->m_searchWidget, &QWidget::customContextMenuRequested, this, [this](const QPoint& pos) { ShowSearchMenu(pos); }); + connect(m_ui->m_searchWidget, &QLineEdit::textChanged, this, [this](){ ApplySearchFilter(); }); + connect(m_ui->m_searchWidget, &QWidget::customContextMenuRequested, this, [this](const QPoint& pos){ ShowSearchMenu(pos); }); } void PresetBrowserDialog::SetupDialogButtons() { connect(m_ui->m_buttonBox, &QDialogButtonBox::accepted, this, &QDialog::accept); connect(m_ui->m_buttonBox, &QDialogButtonBox::rejected, this, &QDialog::reject); - connect(this, &QDialog::rejected, this, [this]() { SelectInitialPreset(); }); + connect(this, &QDialog::rejected, this, [this](){ SelectInitialPreset(); }); } void PresetBrowserDialog::ApplySearchFilter() diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h index ee01737352..20e049f6f8 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Window/PresetBrowserDialogs/PresetBrowserDialog.h @@ -9,12 +9,12 @@ #pragma once #if !defined(Q_MOC_RUN) +#include #include - #include #endif -#include +#include class QImage; class QListWidgetItem; @@ -32,7 +32,7 @@ namespace MaterialEditor protected: void SetupPresetList(); - QListWidgetItem* CreateListItem(const QString& title, const QImage& image); + QListWidgetItem* CreateListItem(const QString& title, const AZ::Data::AssetId& assetId, const QSize& size); void SetupSearchWidget(); void SetupDialogButtons(); diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index 12e4ccd8ad..39cc2f63b2 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -1016,6 +1016,55 @@ namespace AZ::AtomBridge } } + void AtomDebugDisplayViewportInterface::DrawWireCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) + { + if (m_auxGeomPtr) + { + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + const AZ::Vector3 worldCenter = ToWorldSpacePosition(center); + const AZ::Vector3 worldAxis = ToWorldSpaceVector(axis); + m_auxGeomPtr->DrawCylinderNoEnds( + worldCenter, + worldAxis, + scale * radius, + scale * height, + m_rendState.m_color, + AZ::RPI::AuxGeomDraw::DrawStyle::Line, + m_rendState.m_depthTest, + m_rendState.m_depthWrite, + m_rendState.m_faceCullMode, + m_rendState.m_viewProjOverrideIndex + ); + } + } + + void AtomDebugDisplayViewportInterface::DrawSolidCylinderNoEnds( + const AZ::Vector3& center, + const AZ::Vector3& axis, + float radius, + float height, + bool drawShaded) + { + if (m_auxGeomPtr) + { + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + const AZ::Vector3 worldCenter = ToWorldSpacePosition(center); + const AZ::Vector3 worldAxis = ToWorldSpaceVector(axis); + m_auxGeomPtr->DrawCylinderNoEnds( + worldCenter, + worldAxis, + scale * radius, + scale * height, + m_rendState.m_color, + drawShaded ? AZ::RPI::AuxGeomDraw::DrawStyle::Shaded : AZ::RPI::AuxGeomDraw::DrawStyle::Solid, + m_rendState.m_depthTest, + m_rendState.m_depthWrite, + m_rendState.m_faceCullMode, + m_rendState.m_viewProjOverrideIndex + ); + } + } + void AtomDebugDisplayViewportInterface::DrawWireCapsule( const AZ::Vector3& center, const AZ::Vector3& axis, @@ -1025,83 +1074,24 @@ namespace AZ::AtomBridge if (m_auxGeomPtr && radius > FLT_EPSILON && axis.GetLengthSq() > FLT_EPSILON) { AZ::Vector3 axisNormalized = axis.GetNormalizedEstimate(); - SingleColorStaticSizeLineHelper<(16+1) * 5> lines; // 360/22.5 = 16, 5 possible calls to CreateArbitraryAxisArc - AZ::Vector3 radiusV3 = AZ::Vector3(radius); - float stepAngle = DegToRad(22.5f); - float Deg0 = DegToRad(0.0f); + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + const AZ::Vector3 worldCenter = ToWorldSpacePosition(center); + const AZ::Vector3 worldAxis = ToWorldSpaceVector(axis); - // Draw cylinder part (or just a circle around the middle) + // Draw cylinder part (if cylinder height is too small, ignore cylinder and just draw both hemispheres) if (heightStraightSection > FLT_EPSILON) { - DrawWireCylinder(center, axis, radius, heightStraightSection); - } - else - { - float Deg360 = DegToRad(360.0f); - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg0, - Deg360, - center, - radiusV3, - axisNormalized - ); + DrawWireCylinderNoEnds(worldCenter, worldAxis, scale * radius, scale * heightStraightSection); } - float Deg90 = DegToRad(90.0f); - float Deg180 = DegToRad(180.0f); - - AZ::Vector3 ortho1Normalized, ortho2Normalized; - CalcBasisVectors(axisNormalized, ortho1Normalized, ortho2Normalized); AZ::Vector3 centerToTopCircleCenter = axisNormalized * heightStraightSection * 0.5f; - AZ::Vector3 topCenter = center + centerToTopCircleCenter; - AZ::Vector3 bottomCenter = center - centerToTopCircleCenter; - - // Draw top cap as two criss-crossing 180deg arcs - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg90, - Deg90 + Deg180, - topCenter, - radiusV3, - ortho1Normalized - ); - - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg180, - Deg180 + Deg180, - topCenter, - radiusV3, - ortho2Normalized - ); - // Draw bottom cap - CreateArbitraryAxisArc( - lines, - stepAngle, - -Deg90, - -Deg90 + Deg180, - bottomCenter, - radiusV3, - ortho1Normalized - ); - - CreateArbitraryAxisArc( - lines, - stepAngle, - Deg0, - Deg0 + Deg180, - bottomCenter, - radiusV3, - ortho2Normalized - ); + // Top hemisphere + DrawWireHemisphere(center + centerToTopCircleCenter, worldAxis, scale * radius); - lines.Draw(m_auxGeomPtr, m_rendState); + // Bottom hemisphere + DrawWireHemisphere(center - centerToTopCircleCenter, -worldAxis, scale * radius); } } @@ -1148,6 +1138,25 @@ namespace AZ::AtomBridge } } + void AtomDebugDisplayViewportInterface::DrawWireHemisphere(const AZ::Vector3& pos, const AZ::Vector3& axis, float radius) + { + if (m_auxGeomPtr) + { + const float scale = GetCurrentTransform().RetrieveScale().GetMaxElement(); + m_auxGeomPtr->DrawHemisphere( + ToWorldSpacePosition(pos), + axis, + scale * radius, + m_rendState.m_color, + AZ::RPI::AuxGeomDraw::DrawStyle::Line, + m_rendState.m_depthTest, + m_rendState.m_depthWrite, + m_rendState.m_faceCullMode, + m_rendState.m_viewProjOverrideIndex + ); + } + } + void AtomDebugDisplayViewportInterface::DrawWireDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) { if (m_auxGeomPtr) @@ -1353,9 +1362,8 @@ namespace AZ::AtomBridge // if 2d draw need to project pos to screen first AzFramework::TextDrawParameters params; AZ::RPI::ViewportContextPtr viewportContext = GetViewportContext(); - const auto dpiScaleFactor = viewportContext->GetDpiScalingFactor(); params.m_drawViewportId = viewportContext->GetId(); // get the viewport ID so default viewport works - params.m_position = AZ::Vector3(x * dpiScaleFactor, y * dpiScaleFactor, 1.0f); + params.m_position = AZ::Vector3(x, y, 1.0f); params.m_color = m_rendState.m_color; params.m_scale = AZ::Vector2(size); params.m_hAlign = center ? AzFramework::TextHorizontalAlignment::Center : AzFramework::TextHorizontalAlignment::Left; //! Horizontal text alignment diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h index 5f902c5884..7f7af9bbcb 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h @@ -168,9 +168,12 @@ namespace AZ::AtomBridge void DrawSolidCone(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius, float height, bool drawShaded) override; void DrawWireCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) override; void DrawSolidCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded) override; + void DrawWireCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) override; + void DrawSolidCylinderNoEnds(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded) override; void DrawWireCapsule(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float heightStraightSection) override; void DrawWireSphere(const AZ::Vector3& pos, float radius) override; void DrawWireSphere(const AZ::Vector3& pos, const AZ::Vector3 radius) override; + void DrawWireHemisphere(const AZ::Vector3& pos, const AZ::Vector3& axis, float radius) override; void DrawWireDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) override; void DrawBall(const AZ::Vector3& pos, float radius, bool drawShaded) override; void DrawDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) override; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h index 72c4ef97a8..b9c62e6fe2 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightBus.h @@ -132,6 +132,13 @@ namespace AZ //! Sets the Esm exponent. Higher values produce a steeper falloff between light and shadow. virtual void SetEsmExponent(float exponent) = 0; + //! Reduces acne by biasing the shadowmap lookup along the geometric normal. + //! @return Returns the amount of bias to apply. + virtual float GetNormalShadowBias() const = 0; + + //! Reduces acne by biasing the shadowmap lookup along the geometric normal. + //! @param normalShadowBias Sets the amount of normal shadow bias to apply. + virtual void SetNormalShadowBias(float normalShadowBias) = 0; }; //! The EBus for requests to for setting and getting light component properties. diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h index c76c922385..130e066e1a 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/CoreLights/AreaLightComponentConfig.h @@ -57,6 +57,7 @@ namespace AZ // Shadows (only used for supported shapes) bool m_enableShadow = false; float m_bias = 0.1f; + float m_normalShadowBias = 0.0f; ShadowmapSize m_shadowmapMaxSize = ShadowmapSize::Size256; ShadowFilterMethod m_shadowFilterMethod = ShadowFilterMethod::None; uint16_t m_filteringSampleCount = 12; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp index f0418a5024..91f8f1aa36 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentConfig.cpp @@ -34,6 +34,7 @@ namespace AZ // Shadows ->Field("Enable Shadow", &AreaLightComponentConfig::m_enableShadow) ->Field("Shadow Bias", &AreaLightComponentConfig::m_bias) + ->Field("Normal Shadow Bias", &AreaLightComponentConfig::m_normalShadowBias) ->Field("Shadowmap Max Size", &AreaLightComponentConfig::m_shadowmapMaxSize) ->Field("Shadow Filter Method", &AreaLightComponentConfig::m_shadowFilterMethod) ->Field("Filtering Sample Count", &AreaLightComponentConfig::m_filteringSampleCount) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp index 36cb2a7f5a..7668477690 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.cpp @@ -70,6 +70,8 @@ namespace AZ::Render ->Event("SetEnableShadow", &AreaLightRequestBus::Events::SetEnableShadow) ->Event("GetShadowBias", &AreaLightRequestBus::Events::GetShadowBias) ->Event("SetShadowBias", &AreaLightRequestBus::Events::SetShadowBias) + ->Event("GetNormalShadowBias", &AreaLightRequestBus::Events::GetNormalShadowBias) + ->Event("SetNormalShadowBias", &AreaLightRequestBus::Events::SetNormalShadowBias) ->Event("GetShadowmapMaxSize", &AreaLightRequestBus::Events::GetShadowmapMaxSize) ->Event("SetShadowmapMaxSize", &AreaLightRequestBus::Events::SetShadowmapMaxSize) ->Event("GetShadowFilterMethod", &AreaLightRequestBus::Events::GetShadowFilterMethod) @@ -91,6 +93,7 @@ namespace AZ::Render ->VirtualProperty("ShadowsEnabled", "GetEnableShadow", "SetEnableShadow") ->VirtualProperty("ShadowBias", "GetShadowBias", "SetShadowBias") + ->VirtualProperty("NormalShadowBias", "GetNormalShadowBias", "SetNormalShadowBias") ->VirtualProperty("ShadowmapMaxSize", "GetShadowmapMaxSize", "SetShadowmapMaxSize") ->VirtualProperty("ShadowFilterMethod", "GetShadowFilterMethod", "SetShadowFilterMethod") ->VirtualProperty("FilteringSampleCount", "GetFilteringSampleCount", "SetFilteringSampleCount") @@ -302,6 +305,7 @@ namespace AZ::Render if (m_configuration.m_enableShadow) { m_lightShapeDelegate->SetShadowBias(m_configuration.m_bias); + m_lightShapeDelegate->SetNormalShadowBias(m_configuration.m_normalShadowBias); m_lightShapeDelegate->SetShadowmapMaxSize(m_configuration.m_shadowmapMaxSize); m_lightShapeDelegate->SetShadowFilterMethod(m_configuration.m_shadowFilterMethod); m_lightShapeDelegate->SetFilteringSampleCount(m_configuration.m_filteringSampleCount); @@ -474,6 +478,20 @@ namespace AZ::Render } } + void AreaLightComponentController::SetNormalShadowBias(float bias) + { + m_configuration.m_normalShadowBias = bias; + if (m_lightShapeDelegate) + { + m_lightShapeDelegate->SetNormalShadowBias(bias); + } + } + + float AreaLightComponentController::GetNormalShadowBias() const + { + return m_configuration.m_normalShadowBias; + } + ShadowmapSize AreaLightComponentController::GetShadowmapMaxSize() const { return m_configuration.m_shadowmapMaxSize; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h index cc6223e7e5..81299a0372 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/AreaLightComponentController.h @@ -86,6 +86,8 @@ namespace AZ void SetFilteringSampleCount(uint32_t count) override; float GetEsmExponent() const override; void SetEsmExponent(float exponent) override; + float GetNormalShadowBias() const override; + void SetNormalShadowBias(float bias) override; void HandleDisplayEntityViewport( const AzFramework::ViewportInfo& viewportInfo, diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp index dfb6cf6946..f060018099 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.cpp @@ -138,6 +138,14 @@ namespace AZ::Render } } + void DiskLightDelegate::SetNormalShadowBias(float bias) + { + if (GetShadowsEnabled() && GetLightHandle().IsValid()) + { + GetFeatureProcessor()->SetNormalShadowBias(GetLightHandle(), bias); + } + } + void DiskLightDelegate::SetShadowmapMaxSize(ShadowmapSize size) { if (GetShadowsEnabled() && GetLightHandle().IsValid()) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h index 2be782c69c..c19a8d37ae 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/DiskLightDelegate.h @@ -46,6 +46,7 @@ namespace AZ void SetShadowFilterMethod(ShadowFilterMethod method) override; void SetFilteringSampleCount(uint32_t count) override; void SetEsmExponent(float exponent) override; + void SetNormalShadowBias(float bias) override; private: diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp index db46434d9a..02c9f77436 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/EditorAreaLightComponent.cpp @@ -136,7 +136,7 @@ namespace AZ ->Attribute(Edit::Attributes::Min, 0.0f) ->Attribute(Edit::Attributes::Max, 100.0f) ->Attribute(Edit::Attributes::SoftMin, 0.0f) - ->Attribute(Edit::Attributes::SoftMax, 2.0f) + ->Attribute(Edit::Attributes::SoftMax, 10.0f) ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShadowsDisabled) @@ -171,7 +171,16 @@ namespace AZ ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::IsEsmDisabled) - ; + ->DataElement( + Edit::UIHandlers::Slider, &AreaLightComponentConfig::m_normalShadowBias, "Normal Shadow Bias\n", + "Reduces acne by biasing the shadowmap lookup along the geometric normal.\n" + "If this is 0, no biasing is applied.") + ->Attribute(Edit::Attributes::Min, 0.f) + ->Attribute(Edit::Attributes::Max, 10.0f) + ->Attribute(Edit::Attributes::ChangeNotify, Edit::PropertyRefreshLevels::ValuesOnly) + ->Attribute(Edit::Attributes::Visibility, &AreaLightComponentConfig::SupportsShadows) + ->Attribute(Edit::Attributes::ReadOnly, &AreaLightComponentConfig::ShadowsDisabled) + ; } } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h index 336c67f55d..8b096b0367 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateBase.h @@ -58,7 +58,8 @@ namespace AZ void SetShadowFilterMethod([[maybe_unused]] ShadowFilterMethod method) override {}; void SetFilteringSampleCount([[maybe_unused]] uint32_t count) override {}; void SetEsmExponent([[maybe_unused]] float esmExponent) override{}; - + void SetNormalShadowBias([[maybe_unused]] float bias) override{}; + protected: void InitBase(EntityId entityId); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h index 9bb8188898..40ffaf392d 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/LightDelegateInterface.h @@ -79,6 +79,8 @@ namespace AZ virtual void SetFilteringSampleCount(uint32_t count) = 0; //! Sets the Esm exponent to use. Higher values produce a steeper falloff between light and shadow. virtual void SetEsmExponent(float exponent) = 0; + //! Sets the normal bias. Reduces acne by biasing the shadowmap lookup along the geometric normal. + virtual void SetNormalShadowBias(float bias) = 0; }; } // namespace Render } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp index 661b0c6b25..f2e1f41008 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.cpp @@ -107,4 +107,13 @@ namespace AZ::Render GetFeatureProcessor()->SetEsmExponent(GetLightHandle(), esmExponent); } } + + void SphereLightDelegate::SetNormalShadowBias(float bias) + { + if (GetShadowsEnabled() && GetLightHandle().IsValid()) + { + GetFeatureProcessor()->SetNormalShadowBias(GetLightHandle(), bias); + } + } + } // namespace AZ::Render diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h index 8bdee2442a..bad00e597c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/CoreLights/SphereLightDelegate.h @@ -36,6 +36,7 @@ namespace AZ void SetShadowFilterMethod(ShadowFilterMethod method) override; void SetFilteringSampleCount(uint32_t count) override; void SetEsmExponent(float esmExponent) override; + void SetNormalShadowBias(float bias) override; private: diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp index 6ea7580fc6..73cfd53c21 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/ImageBasedLights/ImageBasedLightComponentController.cpp @@ -163,8 +163,6 @@ namespace AZ return true; } } - // If this asset didn't load or isn't a cubemap, release it. - configAsset.Release(); return false; } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp index 0fd7b7164d..d3e125426c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentUtil.cpp @@ -134,7 +134,7 @@ namespace AZ propertyValue = AZ::RPI::MaterialPropertyValue::FromAny(propertyOverrideItr->second); } - if (!AtomToolsFramework::ConvertToExportFormat(path, propertyDefinition, propertyValue)) + if (!AtomToolsFramework::ConvertToExportFormat(path, propertyId.GetFullName(), propertyDefinition, propertyValue)) { AZ_Error("AZ::Render::EditorMaterialComponentUtil", false, "Failed to export: %s", path.c_str()); result = false; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp index 91b6d2b02a..8bc9c5ac7d 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.cpp @@ -163,9 +163,9 @@ namespace AZ m_modelAsset->GetAabb().GetAsSphere(center, radius); } - const auto distance = radius + NearDist; - const auto cameraRotation = Quaternion::CreateFromAxisAngle(Vector3::CreateAxisZ(), CameraRotationAngle); - const auto cameraPosition = center + cameraRotation.TransformVector(Vector3(0.0f, distance, 0.0f)); + const auto distance = fabsf(radius / sinf(FieldOfView)) + NearDist; + const auto cameraRotation = Quaternion::CreateFromAxisAngle(Vector3::CreateAxisX(), -CameraRotationAngle); + const auto cameraPosition = center + cameraRotation.TransformVector(-Vector3::CreateAxisY() * distance); const auto cameraTransform = Transform::CreateLookAt(cameraPosition, center); m_view->SetCameraTransform(Matrix3x4::CreateFromTransform(cameraTransform)); } diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h index 7308aa19bc..dfab7a8630 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewContent.h @@ -51,7 +51,7 @@ namespace AZ static constexpr float NearDist = 0.001f; static constexpr float FarDist = 100.0f; static constexpr float FieldOfView = Constants::HalfPi; - static constexpr float CameraRotationAngle = Constants::QuarterPi / 2.0f; + static constexpr float CameraRotationAngle = Constants::QuarterPi / 3.0f; RPI::ScenePtr m_scene; RPI::ViewPtr m_view; diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp index c2988cf53d..d0e288d239 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.cpp @@ -9,9 +9,11 @@ #include #include #include +#include #include #include #include +#include #include namespace AZ @@ -20,45 +22,64 @@ namespace AZ { namespace SharedPreviewUtils { - Data::AssetId GetAssetId( - AzToolsFramework::Thumbnailer::SharedThumbnailKey key, - const Data::AssetType& assetType, - const Data::AssetId& defaultAssetId) + AZStd::unordered_set GetSupportedAssetTypes() + { + return { RPI::AnyAsset::RTTI_Type(), RPI::MaterialAsset::RTTI_Type(), RPI::ModelAsset::RTTI_Type() }; + } + + bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) { + return GetSupportedAssetInfo(key).m_assetId.IsValid(); + } + + AZ::Data::AssetInfo GetSupportedAssetInfo(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) + { + const auto& supportedTypeIds = GetSupportedAssetTypes(); + // if it's a source thumbnail key, find first product with a matching asset type auto sourceKey = azrtti_cast(key.data()); if (sourceKey) { bool foundIt = false; - AZStd::vector productsAssetInfo; + AZStd::vector productsAssetInfo; AzToolsFramework::AssetSystemRequestBus::BroadcastResult( foundIt, &AzToolsFramework::AssetSystemRequestBus::Events::GetAssetsProducedBySourceUUID, sourceKey->GetSourceUuid(), productsAssetInfo); - if (!foundIt) + + for (const auto& assetInfo : productsAssetInfo) { - return defaultAssetId; - } - auto assetInfoIt = AZStd::find_if( - productsAssetInfo.begin(), productsAssetInfo.end(), - [&assetType](const Data::AssetInfo& assetInfo) + if (supportedTypeIds.find(assetInfo.m_assetType) != supportedTypeIds.end()) { - return assetInfo.m_assetType == assetType; - }); - if (assetInfoIt == productsAssetInfo.end()) - { - return defaultAssetId; + return assetInfo; + } } - - return assetInfoIt->m_assetId; + return AZ::Data::AssetInfo(); } // if it's a product thumbnail key just return its assetId + AZ::Data::AssetInfo assetInfo; auto productKey = azrtti_cast(key.data()); - if (productKey && productKey->GetAssetType() == assetType) + if (productKey && supportedTypeIds.find(productKey->GetAssetType()) != supportedTypeIds.end()) { - return productKey->GetAssetId(); + AZ::Data::AssetCatalogRequestBus::BroadcastResult( + assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, productKey->GetAssetId()); } - return defaultAssetId; + return assetInfo; + } + + AZ::Data::AssetId GetSupportedAssetId(AzToolsFramework::Thumbnailer::SharedThumbnailKey key, const AZ::Data::AssetId& defaultAssetId) + { + const AZ::Data::AssetInfo assetInfo = GetSupportedAssetInfo(key); + return assetInfo.m_assetId.IsValid() ? assetInfo.m_assetId : defaultAssetId; + } + + AZ::Data::AssetId GetAssetIdForProductPath(const AZStd::string_view productPath) + { + if (!productPath.empty()) + { + return AZ::RPI::AssetUtils::GetAssetIdForProductPath(productPath.data()); + } + return AZ::Data::AssetId(); } QString WordWrap(const QString& string, int maxLength) @@ -85,32 +106,6 @@ namespace AZ } return result; } - - AZStd::unordered_set GetSupportedAssetTypes() - { - return { RPI::AnyAsset::RTTI_Type(), RPI::MaterialAsset::RTTI_Type(), RPI::ModelAsset::RTTI_Type() }; - } - - bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) - { - for (const AZ::Uuid& typeId : SharedPreviewUtils::GetSupportedAssetTypes()) - { - const AZ::Data::AssetId& assetId = SharedPreviewUtils::GetAssetId(key, typeId); - if (assetId.IsValid()) - { - if (typeId == RPI::AnyAsset::RTTI_Type()) - { - AZ::Data::AssetInfo assetInfo; - AZ::Data::AssetCatalogRequestBus::BroadcastResult( - assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); - return AzFramework::StringFunc::EndsWith(assetInfo.m_relativePath.c_str(), "lightingpreset.azasset"); - } - return true; - } - } - - return false; - } } // namespace SharedPreviewUtils } // namespace LyIntegration } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h index 6c5d83d22a..28c9809d6d 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedPreviewUtils.h @@ -8,9 +8,9 @@ #pragma once -#include - #if !defined(Q_MOC_RUN) +#include +#include #include #endif @@ -20,21 +20,25 @@ namespace AZ { namespace SharedPreviewUtils { - //! Get assetId by assetType that belongs to either source or product thumbnail key - Data::AssetId GetAssetId( - AzToolsFramework::Thumbnailer::SharedThumbnailKey key, - const Data::AssetType& assetType, - const Data::AssetId& defaultAssetId = {}); - - //! Word wrap function for previewer QLabel, since by default it does not break long words such as filenames, so manual word - //! wrap needed - QString WordWrap(const QString& string, int maxLength); - //! Get the set of all asset types supported by the shared preview AZStd::unordered_set GetSupportedAssetTypes(); //! Determine if a thumbnail key has an asset supported by the shared preview bool IsSupportedAssetType(AzToolsFramework::Thumbnailer::SharedThumbnailKey key); + + //! Get assetInfo of source or product thumbnail key if asset type is supported by the shared preview + AZ::Data::AssetInfo GetSupportedAssetInfo(AzToolsFramework::Thumbnailer::SharedThumbnailKey key); + + //! Get assetId of source or product thumbnail key if asset type is supported by the shared preview + AZ::Data::AssetId GetSupportedAssetId( + AzToolsFramework::Thumbnailer::SharedThumbnailKey key, const AZ::Data::AssetId& defaultAssetId = {}); + + //! Wraps AZ::RPI::AssetUtils::GetAssetIdForProductPath to handle empty productPath + AZ::Data::AssetId GetAssetIdForProductPath(const AZStd::string_view productPath); + + //! Inserts new line characters into a string whenever the maximum number of characters per line is exceeded + QString WordWrap(const QString& string, int maxLength); + } // namespace SharedPreviewUtils } // namespace LyIntegration } // namespace AZ diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp index 5d82bac139..d07c4577e8 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.cpp @@ -22,18 +22,13 @@ namespace AZ ////////////////////////////////////////////////////////////////////////// SharedThumbnail::SharedThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey key) : Thumbnail(key) + , m_assetInfo(SharedPreviewUtils::GetSupportedAssetInfo(key)) { - for (const AZ::Uuid& typeId : SharedPreviewUtils::GetSupportedAssetTypes()) + if (m_assetInfo.m_assetId.IsValid()) { - const AZ::Data::AssetId& assetId = SharedPreviewUtils::GetAssetId(key, typeId); - if (assetId.IsValid()) - { - m_assetId = assetId; - m_typeId = typeId; - AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Handler::BusConnect(key); - AzFramework::AssetCatalogEventBus::Handler::BusConnect(); - return; - } + AzToolsFramework::Thumbnailer::ThumbnailerRendererNotificationBus::Handler::BusConnect(key); + AzFramework::AssetCatalogEventBus::Handler::BusConnect(); + return; } AZ_Error("SharedThumbnail", false, "Failed to find matching assetId for the thumbnailKey."); @@ -43,7 +38,9 @@ namespace AZ void SharedThumbnail::LoadThread() { AzToolsFramework::Thumbnailer::ThumbnailerRendererRequestBus::QueueEvent( - m_typeId, &AzToolsFramework::Thumbnailer::ThumbnailerRendererRequests::RenderThumbnail, m_key, SharedThumbnailSize); + m_assetInfo.m_assetType, &AzToolsFramework::Thumbnailer::ThumbnailerRendererRequests::RenderThumbnail, m_key, + SharedThumbnailSize); + // wait for response from thumbnail renderer m_renderWait.acquire(); } @@ -68,7 +65,7 @@ namespace AZ void SharedThumbnail::OnCatalogAssetChanged([[maybe_unused]] const AZ::Data::AssetId& assetId) { - if (m_assetId == assetId && m_state == State::Ready) + if (m_assetInfo.m_assetId == assetId && m_state == State::Ready) { m_state = State::Unloaded; Load(); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h index dee433e0bb..2d4b17a09e 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnail.h @@ -43,8 +43,7 @@ namespace AZ void OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) override; AZStd::binary_semaphore m_renderWait; - Data::AssetId m_assetId; - AZ::Uuid m_typeId; + Data::AssetInfo m_assetInfo; }; //! Cache configuration for shared thumbnails diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp index c43ba5f1cf..4ee75e3436 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -20,9 +21,9 @@ namespace AZ { SharedThumbnailRenderer::SharedThumbnailRenderer() { - m_defaultModelAsset.Create(DefaultModelAssetId, true); - m_defaultMaterialAsset.Create(DefaultMaterialAssetId, true); - m_defaultLightingPresetAsset.Create(DefaultLightingPresetAssetId, true); + m_defaultModelAsset.Create(SharedPreviewUtils::GetAssetIdForProductPath(DefaultModelPath), true); + m_defaultMaterialAsset.Create(SharedPreviewUtils::GetAssetIdForProductPath(DefaultMaterialPath), true); + m_defaultLightingPresetAsset.Create(SharedPreviewUtils::GetAssetIdForProductPath(DefaultLightingPresetPath), true); for (const AZ::Uuid& typeId : SharedPreviewUtils::GetSupportedAssetTypes()) { @@ -37,17 +38,66 @@ namespace AZ SystemTickBus::Handler::BusDisconnect(); } + SharedThumbnailRenderer::ThumbnailConfig SharedThumbnailRenderer::GetThumbnailConfig( + AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey) + { + ThumbnailConfig thumbnailConfig; + + const auto assetInfo = SharedPreviewUtils::GetSupportedAssetInfo(thumbnailKey); + if (assetInfo.m_assetType == RPI::ModelAsset::RTTI_Type()) + { + static constexpr const char* MaterialAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/ModelAssetType/MaterialAssetPath"; + static constexpr const char* LightingAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/ModelAssetType/LightingAssetPath"; + + thumbnailConfig.m_modelId = assetInfo.m_assetId; + thumbnailConfig.m_materialId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(MaterialAssetPathSetting, DefaultMaterialPath)); + thumbnailConfig.m_lightingId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(LightingAssetPathSetting, DefaultLightingPresetPath)); + } + else if (assetInfo.m_assetType == RPI::MaterialAsset::RTTI_Type()) + { + static constexpr const char* ModelAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/MaterialAssetType/ModelAssetPath"; + static constexpr const char* LightingAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/MaterialAssetType/LightingAssetPath"; + + thumbnailConfig.m_modelId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(ModelAssetPathSetting, DefaultModelPath)); + thumbnailConfig.m_materialId = assetInfo.m_assetId; + thumbnailConfig.m_lightingId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(LightingAssetPathSetting, DefaultLightingPresetPath)); + } + else if (assetInfo.m_assetType == RPI::AnyAsset::RTTI_Type()) + { + static constexpr const char* ModelAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/LightingAssetType/ModelAssetPath"; + static constexpr const char* MaterialAssetPathSetting = + "/O3DE/Atom/CommonFeature/SharedPreview/LightingAssetType/MaterialAssetPath"; + + thumbnailConfig.m_modelId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(ModelAssetPathSetting, DefaultModelPath)); + thumbnailConfig.m_materialId = SharedPreviewUtils::GetAssetIdForProductPath( + AtomToolsFramework::GetSettingOrDefault(MaterialAssetPathSetting, "materials/reflectionprobe/reflectionprobevisualization.azmaterial")); + thumbnailConfig.m_lightingId = assetInfo.m_assetId; + } + + return thumbnailConfig; + } + void SharedThumbnailRenderer::RenderThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize) { if (auto previewRenderer = AZ::Interface::Get()) { + const auto& thumbnailConfig = GetThumbnailConfig(thumbnailKey); + previewRenderer->AddCaptureRequest( { thumbnailSize, AZStd::make_shared( previewRenderer->GetScene(), previewRenderer->GetView(), previewRenderer->GetEntityContextId(), - SharedPreviewUtils::GetAssetId(thumbnailKey, RPI::ModelAsset::RTTI_Type(), DefaultModelAssetId), - SharedPreviewUtils::GetAssetId(thumbnailKey, RPI::MaterialAsset::RTTI_Type(), DefaultMaterialAssetId), - SharedPreviewUtils::GetAssetId(thumbnailKey, RPI::AnyAsset::RTTI_Type(), DefaultLightingPresetAssetId), + thumbnailConfig.m_modelId, thumbnailConfig.m_materialId, thumbnailConfig.m_lightingId, Render::MaterialPropertyOverrideMap()), [thumbnailKey]() { diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h index 4db7728109..2166ac49e7 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SharedPreview/SharedThumbnailRenderer.h @@ -33,6 +33,15 @@ namespace AZ ~SharedThumbnailRenderer(); private: + struct ThumbnailConfig + { + Data::AssetId m_modelId; + Data::AssetId m_materialId; + Data::AssetId m_lightingId; + }; + + ThumbnailConfig GetThumbnailConfig(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey); + //! ThumbnailerRendererRequestsBus::Handler interface overrides... void RenderThumbnail(AzToolsFramework::Thumbnailer::SharedThumbnailKey thumbnailKey, int thumbnailSize) override; bool Installed() const override; @@ -42,15 +51,12 @@ namespace AZ // Default assets to be kept loaded and used for rendering if not overridden static constexpr const char* DefaultLightingPresetPath = "lightingpresets/thumbnail.lightingpreset.azasset"; - const Data::AssetId DefaultLightingPresetAssetId = AZ::RPI::AssetUtils::GetAssetIdForProductPath(DefaultLightingPresetPath); Data::Asset m_defaultLightingPresetAsset; static constexpr const char* DefaultModelPath = "models/sphere.azmodel"; - const Data::AssetId DefaultModelAssetId = AZ::RPI::AssetUtils::GetAssetIdForProductPath(DefaultModelPath); Data::Asset m_defaultModelAsset; static constexpr const char* DefaultMaterialPath = ""; - const Data::AssetId DefaultMaterialAssetId; Data::Asset m_defaultMaterialAsset; }; } // namespace LyIntegration diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp index 171c5e417f..7bf6237c1a 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/SkyBox/HDRiSkyboxComponentController.cpp @@ -196,8 +196,6 @@ namespace AZ } else { - // If this asset didn't load or isn't a cubemap, release it. - m_configuration.m_cubemapAsset.Release(); m_featureProcessorInterface->SetCubemap(nullptr); } } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp index 698dd4cd75..a6dc818fc5 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.cpp @@ -6,10 +6,13 @@ * */ +#include + #include #include #include #include +#include #include #include @@ -24,6 +27,7 @@ namespace AZ::Render { AtomActorDebugDraw::AtomActorDebugDraw(AZ::EntityId entityId) + : m_entityId(entityId) { m_auxGeomFeatureProcessor = RPI::Scene::GetFeatureProcessorForEntity(entityId); } @@ -41,7 +45,11 @@ namespace AZ::Render return; } + const RPI::Scene* scene = RPI::Scene::GetSceneForEntityId(m_entityId); + const RPI::ViewportContextPtr viewport = AZ::Interface::Get()->GetViewportContextByScene(scene); + AzFramework::DebugDisplayRequests* debugDisplay = GetDebugDisplay(viewport->GetId()); const AZ::Render::RenderActorSettings& renderActorSettings = EMotionFX::GetRenderActorSettings(); + const float scaleMultiplier = CalculateScaleMultiplier(instance); // Render aabb if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_AABB]) @@ -55,18 +63,29 @@ namespace AZ::Render RenderLineSkeleton(instance, renderActorSettings.m_lineSkeletonColor); } - // Render advance skeleton + // Render advanced skeleton if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_SKELETON]) { RenderSkeleton(instance, renderActorSettings.m_skeletonColor); } + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_NODENAMES]) + { + RenderJointNames(instance, viewport, renderActorSettings.m_jointNameColor); + } + // Render internal EMFX debug lines. if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_EMFX_DEBUG]) { RenderEMFXDebugDraw(instance); } + // Render + if (renderFlags[EMotionFX::ActorRenderFlag::RENDER_NODEORIENTATION]) + { + RenderNodeOrientations(instance, debugDisplay, renderActorSettings.m_nodeOrientationScale * scaleMultiplier); + } + // Render vertex normal, face normal, tagent and wireframe. const bool renderVertexNormals = renderFlags[EMotionFX::ActorRenderFlag::RENDER_VERTEXNORMALS]; const bool renderFaceNormals = renderFlags[EMotionFX::ActorRenderFlag::RENDER_FACENORMALS]; @@ -79,7 +98,6 @@ namespace AZ::Render const EMotionFX::Pose* pose = instance->GetTransformData()->GetCurrentPose(); const size_t geomLODLevel = instance->GetLODLevel(); const size_t numEnabled = instance->GetNumEnabledNodes(); - const float scaleMultiplier = CalculateScaleMultiplier(instance); for (size_t i = 0; i < numEnabled; ++i) { EMotionFX::Node* node = instance->GetActor()->GetSkeleton()->GetNode(instance->GetEnabledNode(i)); @@ -167,6 +185,13 @@ namespace AZ::Render } } + AzFramework::DebugDisplayRequests* AtomActorDebugDraw::GetDebugDisplay(AzFramework::ViewportId viewportId) + { + AzFramework::DebugDisplayRequestBus::BusPtr debugDisplayBus; + AzFramework::DebugDisplayRequestBus::Bind(debugDisplayBus, viewportId); + return AzFramework::DebugDisplayRequestBus::FindFirstHandler(debugDisplayBus); + } + void AtomActorDebugDraw::RenderAABB(EMotionFX::ActorInstance* instance, const AZ::Color& aabbColor) { RPI::AuxGeomDrawPtr auxGeom = m_auxGeomFeatureProcessor->GetDrawQueue(); @@ -552,4 +577,139 @@ namespace AZ::Render auxGeom->DrawLines(lineArgs); } } + + void AtomActorDebugDraw::RenderJointNames(EMotionFX::ActorInstance* actorInstance, + RPI::ViewportContextPtr viewportContext, const AZ::Color& jointNameColor) + { + if (!m_fontDrawInterface) + { + auto fontQueryInterface = AZ::Interface::Get(); + if (!fontQueryInterface) + { + return; + } + m_fontDrawInterface = fontQueryInterface->GetDefaultFontDrawInterface(); + } + + if (!m_fontDrawInterface || !viewportContext || !viewportContext->GetRenderScene() || + !AZ::Interface::Get()) + { + return; + } + + const EMotionFX::Actor* actor = actorInstance->GetActor(); + const EMotionFX::Skeleton* skeleton = actor->GetSkeleton(); + const EMotionFX::TransformData* transformData = actorInstance->GetTransformData(); + const EMotionFX::Pose* pose = transformData->GetCurrentPose(); + const size_t numEnabledNodes = actorInstance->GetNumEnabledNodes(); + + m_drawParams.m_drawViewportId = viewportContext->GetId(); + AzFramework::WindowSize viewportSize = viewportContext->GetViewportSize(); + m_drawParams.m_position = AZ::Vector3(static_cast(viewportSize.m_width), 0.0f, 1.0f) + + TopRightBorderPadding * viewportContext->GetDpiScalingFactor(); + m_drawParams.m_color = jointNameColor; + m_drawParams.m_scale = AZ::Vector2(BaseFontSize); + m_drawParams.m_hAlign = AzFramework::TextHorizontalAlignment::Right; + m_drawParams.m_monospace = false; + m_drawParams.m_depthTest = false; + m_drawParams.m_virtual800x600ScreenSize = false; + m_drawParams.m_scaleWithWindow = false; + m_drawParams.m_multiline = true; + m_drawParams.m_lineSpacing = 0.5f; + + for (size_t i = 0; i < numEnabledNodes; ++i) + { + const EMotionFX::Node* joint = skeleton->GetNode(actorInstance->GetEnabledNode(i)); + const size_t jointIndex = joint->GetNodeIndex(); + const AZ::Vector3 worldPos = pose->GetWorldSpaceTransform(jointIndex).m_position; + + m_drawParams.m_position = worldPos; + m_fontDrawInterface->DrawScreenAlignedText3d(m_drawParams, joint->GetName()); + } + } + + void AtomActorDebugDraw::RenderNodeOrientations(EMotionFX::ActorInstance* actorInstance, + AzFramework::DebugDisplayRequests* debugDisplay, float scale) + { + // Get the actor and the transform data + const float unitScale = + 1.0f / (float)MCore::Distance::ConvertValue(1.0f, MCore::Distance::UNITTYPE_METERS, EMotionFX::GetEMotionFX().GetUnitType()); + const EMotionFX::Actor* actor = actorInstance->GetActor(); + const EMotionFX::Skeleton* skeleton = actor->GetSkeleton(); + const EMotionFX::TransformData* transformData = actorInstance->GetTransformData(); + const EMotionFX::Pose* pose = transformData->GetCurrentPose(); + const float constPreScale = scale * unitScale * 3.0f; + + const size_t numEnabled = actorInstance->GetNumEnabledNodes(); + for (size_t i = 0; i < numEnabled; ++i) + { + EMotionFX::Node* joint = skeleton->GetNode(actorInstance->GetEnabledNode(i)); + const size_t jointIndex = joint->GetNodeIndex(); + + static const float axisBoneScale = 50.0f; + const float size = CalculateBoneScale(actorInstance, joint) * constPreScale * axisBoneScale; + AZ::Transform worldTM = pose->GetWorldSpaceTransform(jointIndex).ToAZTransform(); + RenderLineAxis(debugDisplay, worldTM, size, false /*selected*/); + } + } + + void AtomActorDebugDraw::RenderLineAxis( + AzFramework::DebugDisplayRequests* debugDisplay, + AZ::Transform worldTM, + float size, + bool selected, + bool renderAxisName) + { + const float axisHeight = size * 0.7f; + const float frontSize = size * 5.0f + 0.2f; + const AZ::Vector3 position = worldTM.GetTranslation(); + + // Render x axis + { + AZ::Color xSelectedColor = selected ? AZ::Colors::Orange : AZ::Colors::Red; + + const AZ::Vector3 xAxisDir = (worldTM.TransformPoint(AZ::Vector3(size, 0.0f, 0.0f)) - position).GetNormalized(); + const AZ::Vector3 xAxisArrowStart = position + xAxisDir * axisHeight; + debugDisplay->SetColor(xSelectedColor); + debugDisplay->DrawArrow(position, xAxisArrowStart, size); + + if (renderAxisName) + { + const AZ::Vector3 xNamePos = position + xAxisDir * (size * 1.15f); + debugDisplay->DrawTextLabel(xNamePos, frontSize, "X"); + } + } + + // Render y axis + { + AZ::Color ySelectedColor = selected ? AZ::Colors::Orange : AZ::Colors::Blue; + + const AZ::Vector3 yAxisDir = (worldTM.TransformPoint(AZ::Vector3(0.0f, size, 0.0f)) - position).GetNormalized(); + const AZ::Vector3 yAxisArrowStart = position + yAxisDir * axisHeight; + debugDisplay->SetColor(ySelectedColor); + debugDisplay->DrawArrow(position, yAxisArrowStart, size); + + if (renderAxisName) + { + const AZ::Vector3 yNamePos = position + yAxisDir * (size * 1.15f); + debugDisplay->DrawTextLabel(yNamePos, frontSize, "Y"); + } + } + + // Render z axis + { + AZ::Color zSelectedColor = selected ? AZ::Colors::Orange : AZ::Colors::Green; + + const AZ::Vector3 zAxisDir = (worldTM.TransformPoint(AZ::Vector3(0.0f, 0.0f, size)) - position).GetNormalized(); + const AZ::Vector3 zAxisArrowStart = position + zAxisDir * axisHeight; + debugDisplay->SetColor(zSelectedColor); + debugDisplay->DrawArrow(position, zAxisArrowStart, size); + + if (renderAxisName) + { + const AZ::Vector3 zNamePos = position + zAxisDir * (size * 1.15f); + debugDisplay->DrawTextLabel(zNamePos, frontSize, "Z"); + } + } + } } // namespace AZ::Render diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h index 60db07cd8e..d3a6bc44f3 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorDebugDraw.h @@ -10,8 +10,15 @@ #include #include +#include #include #include +#include + +namespace AzFramework +{ + class DebugDisplayRequests; +} namespace EMotionFX { @@ -40,6 +47,7 @@ namespace AZ::Render float CalculateBoneScale(EMotionFX::ActorInstance* actorInstance, EMotionFX::Node* node); float CalculateScaleMultiplier(EMotionFX::ActorInstance* instance) const; void PrepareForMesh(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM); + AzFramework::DebugDisplayRequests* GetDebugDisplay(AzFramework::ViewportId viewportId); void RenderAABB(EMotionFX::ActorInstance* instance, const AZ::Color& aabbColor); void RenderLineSkeleton(EMotionFX::ActorInstance* instance, const AZ::Color& skeletonColor); @@ -60,14 +68,29 @@ namespace AZ::Render const AZ::Color& tangentsColor, const AZ::Color& mirroredBitangentsColor, const AZ::Color& bitangentsColor); void RenderWireframe(EMotionFX::Mesh* mesh, const AZ::Transform& worldTM, float wireframeScale, float scaleMultiplier, const AZ::Color& wireframeColor); + void RenderJointNames(EMotionFX::ActorInstance* actorInstance, RPI::ViewportContextPtr viewportContext, const AZ::Color& jointNameColor); + void RenderNodeOrientations(EMotionFX::ActorInstance* actorInstance, AzFramework::DebugDisplayRequests* debugDisplay, float scale = 1.0f); + void RenderLineAxis( + AzFramework::DebugDisplayRequests* debugDisplay, + AZ::Transform worldTM, //!< The world space transformation matrix to visualize. */ + float size, //!< The size value in units is used to control the scaling of the axis. */ + bool selected, //!< Set to true if you want to render the axis using the selection color. */ + bool renderAxisName = false); - EMotionFX::Mesh* m_currentMesh = nullptr; /**< A pointer to the mesh whose world space positions are in the pre-calculated positions buffer. - NULL in case we haven't pre-calculated any positions yet. */ - AZStd::vector m_worldSpacePositions; /**< The buffer used to store world space positions for rendering normals - tangents and the wireframe. */ + EMotionFX::Mesh* m_currentMesh = nullptr; //!< A pointer to the mesh whose world space positions are in the pre-calculated positions buffer. + //!< NULL in case we haven't pre-calculated any positions yet. + AZStd::vector m_worldSpacePositions; //!< The buffer used to store world space positions for rendering normals + //!< tangents and the wireframe. + + static constexpr float BaseFontSize = 0.7f; + const Vector3 TopRightBorderPadding = AZ::Vector3(-40.0f, 22.0f, 0.0f); RPI::AuxGeomFeatureProcessorInterface* m_auxGeomFeatureProcessor = nullptr; AZStd::vector m_auxVertices; AZStd::vector m_auxColors; + EntityId m_entityId; + + AzFramework::TextDrawParameters m_drawParams; + AzFramework::FontDrawInterface* m_fontDrawInterface = nullptr; }; } diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp index b95e82a090..7bb8d49418 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportToolBar.cpp @@ -34,8 +34,9 @@ namespace EMStudio CreateViewOptionEntry(contextMenu, "Solid", EMotionFX::ActorRenderFlag::RENDER_SOLID); CreateViewOptionEntry(contextMenu, "Wireframe", EMotionFX::ActorRenderFlag::RENDER_WIREFRAME); - CreateViewOptionEntry(contextMenu, "Lighting", EMotionFX::ActorRenderFlag::RENDER_LIGHTING); - CreateViewOptionEntry(contextMenu, "Backface Culling", EMotionFX::ActorRenderFlag::RENDER_BACKFACECULLING); + // [EMFX-TODO] Add those option once implemented. + // CreateViewOptionEntry(contextMenu, "Lighting", EMotionFX::ActorRenderFlag::RENDER_LIGHTING); + // CreateViewOptionEntry(contextMenu, "Backface Culling", EMotionFX::ActorRenderFlag::RENDER_BACKFACECULLING); contextMenu->addSeparator(); CreateViewOptionEntry(contextMenu, "Vertex Normals", EMotionFX::ActorRenderFlag::RENDER_VERTEXNORMALS); CreateViewOptionEntry(contextMenu, "Face Normals", EMotionFX::ActorRenderFlag::RENDER_FACENORMALS); @@ -46,7 +47,8 @@ namespace EMStudio CreateViewOptionEntry(contextMenu, "Solid Skeleton", EMotionFX::ActorRenderFlag::RENDER_SKELETON); CreateViewOptionEntry(contextMenu, "Joint Names", EMotionFX::ActorRenderFlag::RENDER_NODENAMES); CreateViewOptionEntry(contextMenu, "Joint Orientations", EMotionFX::ActorRenderFlag::RENDER_NODEORIENTATION); - CreateViewOptionEntry(contextMenu, "Actor Bind Pose", EMotionFX::ActorRenderFlag::RENDER_ACTORBINDPOSE); + // [EMFX-TODO] Add those option once implemented. + // CreateViewOptionEntry(contextMenu, "Actor Bind Pose", EMotionFX::ActorRenderFlag::RENDER_ACTORBINDPOSE); contextMenu->addSeparator(); CreateViewOptionEntry(contextMenu, "Hit Detection Colliders", EMotionFX::ActorRenderFlag::RENDER_HITDETECTION_COLLIDERS); CreateViewOptionEntry(contextMenu, "Ragdoll Colliders", EMotionFX::ActorRenderFlag::RENDER_RAGDOLL_COLLIDERS); diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp index 86529d16ec..43d8483a6b 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Tools/EMStudio/AnimViewportWidget.cpp @@ -55,13 +55,13 @@ namespace EMStudio void AnimViewportWidget::Reinit(bool resetCamera) { + m_renderer->Reinit(); + m_renderer->UpdateActorRenderFlag(m_renderFlags); + if (resetCamera) { ResetCamera(); } - - m_renderer->Reinit(); - m_renderer->UpdateActorRenderFlag(m_renderFlags); } EMotionFX::ActorRenderFlagBitset AnimViewportWidget::GetRenderFlags() const diff --git a/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp b/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp index f80261f4b5..7f99e4c55f 100644 --- a/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp +++ b/Gems/AtomTressFX/Code/Builders/HairBuilderComponent.cpp @@ -46,14 +46,6 @@ namespace AZ { m_hairAssetBuilder.RegisterBuilder(); m_hairAssetHandler.Register(); - - // Add asset types and extensions to AssetCatalog. - auto assetCatalog = AZ::Data::AssetCatalogRequestBus::FindFirstHandler(); - if (assetCatalog) - { - assetCatalog->EnableCatalogForAsset(azrtti_typeid()); - assetCatalog->AddExtension(AMD::TFXCombinedFileExtension); - } } void HairBuilderComponent::Deactivate() diff --git a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp index dc091db9e5..eb1fd9890c 100644 --- a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp +++ b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow.cpp @@ -7,14 +7,14 @@ */ #include "ViewportCameraSelectorWindow.h" #include "ViewportCameraSelectorWindow_Internals.h" -#include -#include +#include +#include +#include #include +#include #include #include -#include -#include -#include +#include namespace Qt { @@ -64,12 +64,14 @@ namespace Camera CameraListModel::CameraListModel(QWidget* myParent) : QAbstractListModel(myParent) { + m_lastActiveCamera = AZ::EntityId(); m_cameraItems.push_back(AZ::EntityId()); CameraNotificationBus::Handler::BusConnect(); } CameraListModel::~CameraListModel() { + m_firstEntry = true; // set the view entity id back to Invalid, thus enabling the editor camera EditorCameraRequests::Bus::Broadcast(&EditorCameraRequests::SetViewFromEntityPerspective, AZ::EntityId()); @@ -98,11 +100,13 @@ namespace Camera { // If the camera entity is not an editor camera entity, don't add it to the list. // This occurs when we're in simulation mode. + + //We reset the m_firstEntry value so we can update m_lastActiveCamera when we remove from the cameras list + m_firstEntry = true; + bool isEditorEntity = false; AzToolsFramework::EditorEntityContextRequestBus::BroadcastResult( - isEditorEntity, - &AzToolsFramework::EditorEntityContextRequests::IsEditorEntity, - cameraId); + isEditorEntity, &AzToolsFramework::EditorEntityContextRequests::IsEditorEntity, cameraId); if (!isEditorEntity) { return; @@ -111,11 +115,25 @@ namespace Camera beginInsertRows(QModelIndex(), rowCount(), rowCount()); m_cameraItems.push_back(cameraId); endInsertRows(); + + if (m_lastActiveCamera.IsValid() && m_lastActiveCamera == cameraId) + { + Camera::CameraRequestBus::Event(cameraId, &Camera::CameraRequestBus::Events::MakeActiveView); + } } void CameraListModel::OnCameraRemoved(const AZ::EntityId& cameraId) { - auto cameraIt = AZStd::find_if(m_cameraItems.begin(), m_cameraItems.end(), + //Check it is the first time we remove a camera from the list before any other addition + //So we don't end up with the wrong camera ID. + if (m_firstEntry) + { + CameraSystemRequestBus::BroadcastResult(m_lastActiveCamera, &CameraSystemRequestBus::Events::GetActiveCamera); + m_firstEntry = false; + } + + auto cameraIt = AZStd::find_if( + m_cameraItems.begin(), m_cameraItems.end(), [&cameraId](const CameraListItem& entry) { return entry.m_cameraId == cameraId; @@ -162,7 +180,12 @@ namespace Camera // use the stylesheet for elements in a set where one item must be selected at all times setProperty("class", "SingleRequiredSelection"); - connect(m_cameraList, &CameraListModel::rowsInserted, this, [sortedProxyModel](const QModelIndex&, int, int) { sortedProxyModel->sortColumn(); }); + connect( + m_cameraList, &CameraListModel::rowsInserted, this, + [sortedProxyModel](const QModelIndex&, int, int) + { + sortedProxyModel->sortColumn(); + }); // highlight the current selected camera entity AZ::EntityId currentSelection; @@ -188,7 +211,8 @@ namespace Camera QScopedValueRollback rb(m_ignoreViewportViewEntityChanged, true); AZ::EntityId entityId = selectionModel()->currentIndex().data(Qt::CameraIdRole).value(); - EditorCameraRequests::Bus::Broadcast(&EditorCameraRequests::SetViewAndMovementLockFromEntityPerspective, entityId, lockCameraMovement); + EditorCameraRequests::Bus::Broadcast( + &EditorCameraRequests::SetViewAndMovementLockFromEntityPerspective, entityId, lockCameraMovement); } } @@ -220,7 +244,9 @@ namespace Camera } // swallow mouse move events so we can disable sloppy selection - void ViewportCameraSelectorWindow::mouseMoveEvent(QMouseEvent*) {} + void ViewportCameraSelectorWindow::mouseMoveEvent(QMouseEvent*) + { + } // double click selects the entity void ViewportCameraSelectorWindow::mouseDoubleClickEvent([[maybe_unused]] QMouseEvent* event) @@ -228,11 +254,13 @@ namespace Camera AZ::EntityId entityId = selectionModel()->currentIndex().data(Qt::CameraIdRole).value(); if (entityId.IsValid()) { - AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList { entityId }); + AzToolsFramework::ToolsApplicationRequestBus::Broadcast( + &AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList{ entityId }); } else { - AzToolsFramework::ToolsApplicationRequestBus::Broadcast(&AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList {}); + AzToolsFramework::ToolsApplicationRequestBus::Broadcast( + &AzToolsFramework::ToolsApplicationRequestBus::Events::SetSelectedEntities, AzToolsFramework::EntityIdList{}); } } @@ -290,7 +318,10 @@ namespace Camera : QWidget(parent) { setLayout(new QVBoxLayout(this)); - auto label = new QLabel("Select the camera you wish to view and navigate through. Closing this window will return you to the default editor camera.", this); + auto label = new QLabel( + "Select the camera you wish to view and navigate through. Closing this window will return you to the default editor " + "camera.", + this); label->setWordWrap(true); layout()->addWidget(label); layout()->addWidget(new ViewportCameraSelectorWindow(this)); @@ -309,6 +340,8 @@ namespace Camera viewOptions.isPreview = true; viewOptions.showInMenu = true; viewOptions.preferedDockingArea = Qt::DockWidgetArea::LeftDockWidgetArea; - AzToolsFramework::EditorRequestBus::Broadcast(&AzToolsFramework::EditorRequestBus::Events::RegisterViewPane, s_viewportCameraSelectorName, "Viewport", viewOptions, &Internal::CreateNewSelectionWindow); + AzToolsFramework::EditorRequestBus::Broadcast( + &AzToolsFramework::EditorRequestBus::Events::RegisterViewPane, s_viewportCameraSelectorName, "Viewport", viewOptions, + &Internal::CreateNewSelectionWindow); } } // namespace Camera diff --git a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h index b07ae7789f..21f316b83d 100644 --- a/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h +++ b/Gems/Camera/Code/Source/ViewportCameraSelectorWindow_Internals.h @@ -58,6 +58,11 @@ namespace Camera private: AZStd::vector m_cameraItems; AZ::EntityId m_sequenceCameraEntityId; + AZ::EntityId m_lastActiveCamera; + + //Value to check that is the first time that we remove a camera before adding a new one. + //So we can update m_lastActiveCamera properly + bool m_firstEntry = true; }; struct ViewportCameraSelectorWindow diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp index 6ced6152e1..50f3a1f73f 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/NonUniformMotionData.cpp @@ -78,7 +78,6 @@ namespace EMotionFX { const Actor* actor = settings.m_actorInstance->GetActor(); const MotionLinkData* motionLinkData = FindMotionLinkData(actor); - const Skeleton* skeleton = actor->GetSkeleton(); const size_t jointDataIndex = motionLinkData->GetJointDataLinks()[jointSkeletonIndex]; if (m_additive && jointDataIndex == InvalidIndex) @@ -88,7 +87,7 @@ namespace EMotionFX // Sample the interpolated data. Transform result; - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(jointSkeletonIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && jointSkeletonIndex == actor->GetMotionExtractionNodeIndex()); if (jointDataIndex != InvalidIndex && !inPlace) { const JointData& jointData = m_jointData[jointDataIndex]; @@ -139,14 +138,13 @@ namespace EMotionFX const MotionLinkData* motionLinkData = FindMotionLinkData(actor); const ActorInstance* actorInstance = settings.m_actorInstance; - const Skeleton* skeleton = actor->GetSkeleton(); const Pose* bindPose = actorInstance->GetTransformData()->GetBindPose(); const size_t numNodes = actorInstance->GetNumEnabledNodes(); for (size_t i = 0; i < numNodes; ++i) { const uint16 jointIndex = actorInstance->GetEnabledNode(i); const size_t jointDataIndex = motionLinkData->GetJointDataLinks()[jointIndex]; - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(jointIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && jointIndex == actor->GetMotionExtractionNodeIndex()); // Sample the interpolated data. Transform result; diff --git a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp index c4451ff902..881604c7ff 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Source/MotionData/UniformMotionData.cpp @@ -147,8 +147,7 @@ namespace EMotionFX size_t indexB; CalculateInterpolationIndicesUniform(settings.m_sampleTime, m_sampleSpacing, m_duration, m_numSamples, indexA, indexB, t); - const Skeleton* skeleton = actor->GetSkeleton(); - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(jointSkeletonIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && jointSkeletonIndex == actor->GetMotionExtractionNodeIndex()); // Sample the interpolated data. Transform result; @@ -210,13 +209,12 @@ namespace EMotionFX const AZStd::vector& jointLinks = motionLinkData->GetJointDataLinks(); const ActorInstance* actorInstance = settings.m_actorInstance; - const Skeleton* skeleton = actor->GetSkeleton(); const Pose* bindPose = actorInstance->GetTransformData()->GetBindPose(); const size_t numNodes = actorInstance->GetNumEnabledNodes(); for (size_t i = 0; i < numNodes; ++i) { const size_t skeletonJointIndex = actorInstance->GetEnabledNode(i); - const bool inPlace = (settings.m_inPlace && skeleton->GetNode(skeletonJointIndex)->GetIsRootNode()); + const bool inPlace = (settings.m_inPlace && skeletonJointIndex == actor->GetMotionExtractionNodeIndex()); // Sample the interpolated data. Transform result; diff --git a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp index 3d1b0e3150..241412c6c8 100644 --- a/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp +++ b/Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/RenderPlugin/RenderOptions.cpp @@ -1063,6 +1063,7 @@ namespace EMStudio settings.m_vertexNormalsScale = m_vertexNormalsScale; settings.m_faceNormalsScale = m_faceNormalsScale; settings.m_tangentsScale = m_tangentsScale; + settings.m_nodeOrientationScale = m_nodeOrientationScale; settings.m_vertexNormalsColor = m_vertexNormalsColor; settings.m_faceNormalsColor = m_faceNormalsColor; @@ -1083,6 +1084,7 @@ namespace EMStudio settings.m_selectedClothColliderColor = m_selectedClothColliderColor; settings.m_simulatedObjectColliderColor = m_simulatedObjectColliderColor; settings.m_selectedSimulatedObjectColliderColor = m_selectedSimulatedObjectColliderColor; + settings.m_jointNameColor = m_nodeNameColor; } void RenderOptions::OnGridUnitSizeChangedCallback() const @@ -1111,6 +1113,7 @@ namespace EMStudio void RenderOptions::OnNodeOrientationScaleChangedCallback() const { PluginOptionsNotificationsBus::Event(s_nodeOrientationScaleOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_nodeOrientationScaleOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnScaleBonesOnLengthChangedCallback() const @@ -1285,6 +1288,7 @@ namespace EMStudio void RenderOptions::OnNodeNameColorChangedCallback() const { PluginOptionsNotificationsBus::Event(s_nodeNameColorOptionName, &PluginOptionsNotificationsBus::Events::OnOptionChanged, s_nodeNameColorOptionName); + CopyToRenderActorSettings(EMotionFX::GetRenderActorSettings()); } void RenderOptions::OnGridColorChangedCallback() const diff --git a/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp b/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp index dd82385092..527407aaa8 100644 --- a/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp +++ b/Gems/EMotionFX/Code/MCore/Source/Algorithms.cpp @@ -293,7 +293,7 @@ namespace MCore // check if the test point is inside the polygon AZ::Vector2 ClosestPointToPoly(const AZ::Vector2* polyPoints, size_t numPoints, const AZ::Vector2& testPoint) { - AZ::Vector2 result; + AZ::Vector2 result = AZ::Vector2::CreateZero(); float closestDist = FLT_MAX; for (size_t i = 0; i < numPoints; ++i) { diff --git a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp index 5e9cf66fa7..30d54c6b7b 100644 --- a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp +++ b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.cpp @@ -71,8 +71,6 @@ namespace MysticQt setWidget(m_rootSplitter); } - - // destructor DialogStack::~DialogStack() { } @@ -81,6 +79,14 @@ namespace MysticQt // get rid of all dialogs and their allocated memory void DialogStack::Clear() { + for (Dialog& dialog : m_dialogs) + { + if (dialog.m_dialogWidget) + { + dialog.m_dialogWidget->deleteLater(); + } + } + // destroy the dialogs m_dialogs.clear(); @@ -679,6 +685,4 @@ namespace MysticQt return; } } -} // namespace MysticQt - -#include +} // namespace MysticQt diff --git a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h index bf93b5d23f..64a48fb392 100644 --- a/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h +++ b/Gems/EMotionFX/Code/MysticQt/Source/DialogStack.h @@ -6,10 +6,8 @@ * */ -#ifndef __MYSTICQT_DIALOGSTACK_H -#define __MYSTICQT_DIALOGSTACK_H +#pragma once -// #if !defined(Q_MOC_RUN) #include "MysticQtConfig.h" #include @@ -30,14 +28,10 @@ namespace MysticQt { class DialogStackSplitter; - /** - * - * - */ class MYSTICQT_API DialogStack : public QScrollArea { - Q_OBJECT + Q_OBJECT // AUTOMOC public: DialogStack(QWidget* parent = nullptr); @@ -89,5 +83,3 @@ namespace MysticQt int32 m_prevMouseY; }; } // namespace MysticQt - -#endif diff --git a/Gems/EMotionFX/Code/Source/Integration/Rendering/RenderActorSettings.h b/Gems/EMotionFX/Code/Source/Integration/Rendering/RenderActorSettings.h index c397690b16..0260d1aae5 100644 --- a/Gems/EMotionFX/Code/Source/Integration/Rendering/RenderActorSettings.h +++ b/Gems/EMotionFX/Code/Source/Integration/Rendering/RenderActorSettings.h @@ -26,6 +26,7 @@ namespace AZ::Render float m_faceNormalsScale = 1.0f; float m_tangentsScale = 1.0f; float m_wireframeScale = 1.0f; + float m_nodeOrientationScale = 1.0f; AZ::Color m_hitDetectionColliderColor{0.44f, 0.44f, 0.44f, 1.0f}; AZ::Color m_selectedHitDetectionColliderColor{ 0.3f, 0.56f, 0.88f, 1.0f }; @@ -46,5 +47,6 @@ namespace AZ::Render AZ::Color m_staticAABBColor{ 0.0f, 0.7f, 0.7f, 1.0f }; AZ::Color m_lineSkeletonColor{ 0.33333f, 1.0f, 0.0f, 1.0f }; AZ::Color m_skeletonColor{ 0.19f, 0.58f, 0.19f, 1.0f }; + AZ::Color m_jointNameColor{ 1.0f, 1.0f, 1.0f, 1.0f }; }; } // namespace AZ::Render diff --git a/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp b/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp index a377495d6c..efff992564 100644 --- a/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp +++ b/Gems/EMotionFX/Code/Tests/AnimGraphMotionNodeTests.cpp @@ -161,6 +161,8 @@ namespace EMotionFX // Make sure all nodes exist. ASSERT_TRUE(rootNode && pelvisNode && lHandNode && lLoArmNode && lLoLegNode && lAnkleNode && rHandNode && rLoArmNode && rLoLegNode && rAnkleNode) << "All nodes used should exist."; + + m_actor->SetMotionExtractionNodeIndex(m_jackRootIndex); } void SetupMirrorNodes() diff --git a/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp b/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp index 38936dc302..57de6f776a 100644 --- a/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/GradientTransformComponent.cpp @@ -324,8 +324,6 @@ namespace GradientSignal void GradientTransformComponent::TransformPositionToUVW(const AZ::Vector3& inPosition, AZ::Vector3& outUVW, const bool shouldNormalizeOutput, bool& wasPointRejected) const { - AZ_PROFILE_FUNCTION(Entity); - AZStd::lock_guard lock(m_cacheMutex); //transforming coordinate into "local" relative space of shape bounds diff --git a/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp b/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp index 6fe8d32484..021e083ea6 100644 --- a/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp +++ b/Gems/GradientSignal/Code/Source/Components/ImageGradientComponent.cpp @@ -191,8 +191,6 @@ namespace GradientSignal float ImageGradientComponent::GetValue(const GradientSampleParams& sampleParams) const { - AZ_PROFILE_FUNCTION(Entity); - AZ::Vector3 uvw = sampleParams.m_position; bool wasPointRejected = false; diff --git a/Gems/GradientSignal/Code/Source/ImageAsset.cpp b/Gems/GradientSignal/Code/Source/ImageAsset.cpp index c67f86c6b8..7e73dc32d6 100644 --- a/Gems/GradientSignal/Code/Source/ImageAsset.cpp +++ b/Gems/GradientSignal/Code/Source/ImageAsset.cpp @@ -153,8 +153,6 @@ namespace GradientSignal float GetValueFromImageAsset(const AZ::Data::Asset& imageAsset, const AZ::Vector3& uvw, float tilingX, float tilingY, float defaultValue) { - AZ_PROFILE_FUNCTION(Entity); - if (imageAsset.IsReady()) { const auto& image = imageAsset.Get(); diff --git a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h index 84963c7997..ce8ea4c8a9 100644 --- a/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h +++ b/Gems/GraphCanvas/Code/Source/Components/Nodes/General/GeneralNodeTitleComponent.h @@ -19,7 +19,6 @@ #include #include #include -#include #include namespace GraphCanvas diff --git a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp index f51c2c1272..dfcb106777 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.cpp @@ -58,7 +58,6 @@ #include #include -#include #include #include @@ -386,6 +385,16 @@ namespace GraphCanvas AZ::Data::AssetCatalogRequestBus::Broadcast(&AZ::Data::AssetCatalogRequestBus::Events::EnumerateAssets, nullptr, collectAssetsCb, postEnumerateCb); } + void GraphCanvasSystemComponent::OnCatalogAssetChanged(const AZ::Data::AssetId& assetId) + { + AZ::Data::AssetInfo assetInfo; + AZ::Data::AssetCatalogRequestBus::BroadcastResult(assetInfo, &AZ::Data::AssetCatalogRequestBus::Events::GetAssetInfoById, assetId); + if (assetInfo.m_assetType == azrtti_typeid()) + { + GraphCanvas::TranslationRequestBus::Broadcast(&GraphCanvas::TranslationRequests::Restore); + } + } + void GraphCanvasSystemComponent::UnregisterAssetHandler() { if (m_assetHandler) diff --git a/Gems/GraphCanvas/Code/Source/GraphCanvas.h b/Gems/GraphCanvas/Code/Source/GraphCanvas.h index 7a4d9677ab..0b47e9010a 100644 --- a/Gems/GraphCanvas/Code/Source/GraphCanvas.h +++ b/Gems/GraphCanvas/Code/Source/GraphCanvas.h @@ -77,7 +77,10 @@ namespace GraphCanvas AZ::EntityId CreateVirtualChild(const AZ::EntityId& real, const AZStd::string& virtualChildElement) const override; //// + // AzFramework::AssetCatalogEventBus::Handler void OnCatalogLoaded(const char* /*catalogFile*/) override; + void OnCatalogAssetChanged(const AZ::Data::AssetId&) override; + //// AZStd::unique_ptr m_assetHandler; diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h index 653aac3afc..b31bf25851 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationAsset.h @@ -59,14 +59,14 @@ namespace GraphCanvas //! //! Requirements: //! - Must have a top level array called "entries" - //! - Must provide a "key" element for any entry added + //! - Must provide a "base" element for any entry added //! //! Example: //! //! { //! "entries": [ //! { - //! "key": "Globals", + //! "base": "Globals", //! "details": { //! "name": "My Name", //! "tooltip": "My Tooltip" @@ -90,21 +90,21 @@ namespace GraphCanvas //! Globals.details.somearray.0.name //! Globals.details.somearray.1.name //! - //! There is one important aspect however, if an element in an array has a "key" value, the value of this key + //! There is one important aspect however, if an element in an array has a "base" value, the value of this key //! will replace the index. This is useful when the index and/or ordering of an entry is not relevant or may //! change. //! //! "somearray": [ { //! "name": "First one" - //! "key": "a_key" + //! "base": "a_key" //! }, { //! "name": "Second one", - //! "key": "b_key" + //! "base": "b_key" //! } ] //! - //! Globals.details.somearray.0.key == "a_key" + //! Globals.details.somearray.0.base == "a_key" //! Globals.details.somearray.0.name == "First one" - //! Globals.details.somearray.1.key == "b_key" + //! Globals.details.somearray.1.base == "b_key" //! Globals.details.somearray.1.name == "Second one" //! class TranslationAssetHandler diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp index bb42f77c49..1f76b53b27 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.cpp @@ -11,17 +11,6 @@ namespace GraphCanvas { - namespace Schema - { - namespace Field - { - static constexpr char key[] = "key"; - static constexpr char context[] = "context"; - static constexpr char variant[] = "variant"; - static constexpr char entries[] = "entries"; - } - } - AZ_CLASS_ALLOCATOR_IMPL(TranslationFormatSerializer, AZ::SystemAllocator, 0); void AddEntryToDatabase(const AZStd::string& baseKey, const AZStd::string& name, const rapidjson::Value& it, TranslationFormat* translationFormat) @@ -76,11 +65,15 @@ namespace GraphCanvas const rapidjson::Value& array = it; for (rapidjson::SizeType i = 0; i < array.Size(); ++i) { - // so, here, I need to go in and if there is a "key" member within the object, then I need to use that, - // if there isn't, I can use the %d + // if there is a "base" member within the object, then use it, otherwise use the index if (array[i].IsObject()) { - if (array[i].HasMember(Schema::Field::key)) + if (array[i].HasMember(Schema::Field::deprecated_key)) + { + AZStd::string innerKey = array[i].FindMember(Schema::Field::deprecated_key)->value.GetString(); + itemKey.append(AZStd::string::format(".%s", innerKey.c_str())); + } + else if (array[i].HasMember(Schema::Field::key)) { AZStd::string innerKey = array[i].FindMember(Schema::Field::key)->value.GetString(); itemKey.append(AZStd::string::format(".%s", innerKey.c_str())); @@ -133,7 +126,12 @@ namespace GraphCanvas AZStd::string keyStr; rapidjson::Value::ConstMemberIterator keyValue; - if (entry.HasMember(Schema::Field::key)) + if (entry.HasMember(Schema::Field::deprecated_key)) + { + keyValue = entry.FindMember(Schema::Field::deprecated_key); + keyStr = keyValue->value.GetString(); + } + else if (entry.HasMember(Schema::Field::key)) { keyValue = entry.FindMember(Schema::Field::key); keyStr = keyValue->value.GetString(); diff --git a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h index fa7e6e64e1..605e06a76b 100644 --- a/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h +++ b/Gems/GraphCanvas/Code/Source/Translation/TranslationSerializer.h @@ -23,4 +23,17 @@ namespace GraphCanvas AZ::JsonSerializationResult::Result Store(rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, const AZ::Uuid& valueTypeId, AZ::JsonSerializerContext& context) override; }; + + namespace Schema + { + namespace Field + { + // Moved away from "key" due to some strict filtering on secrets + static constexpr char deprecated_key[] = "key"; + static constexpr char key[] = "base"; + static constexpr char context[] = "context"; + static constexpr char variant[] = "variant"; + static constexpr char entries[] = "entries"; + } + } } diff --git a/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h b/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h index 4e52218721..3fbd934909 100644 --- a/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h +++ b/Gems/GraphCanvas/Code/Source/Widgets/GraphCanvasLabel.h @@ -16,7 +16,6 @@ AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option") AZ_POP_DISABLE_WARNING #include -#include namespace GraphCanvas { diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h index 513400b470..d5b8a7ff57 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeBus.h @@ -15,7 +15,6 @@ #include #include #include -#include #include diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h index 88846739d0..6470ebfbd1 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Nodes/NodeTitleBus.h @@ -11,7 +11,6 @@ #include #include -#include #include #include diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h index a3f8bfb757..8df36232fe 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Components/Slots/SlotBus.h @@ -16,7 +16,6 @@ #include #include -#include class QGraphicsLayoutItem; diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/TranslationTypes.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/TranslationTypes.h deleted file mode 100644 index 7205be7c00..0000000000 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Types/TranslationTypes.h +++ /dev/null @@ -1,116 +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 - -#include - -#include - -namespace GraphCanvas -{ - struct TranslationKeyedString - { - public: - AZ_TYPE_INFO(TranslationKeyedString, "{B796685C-0335-4E74-9EF8-A1933E8B2142}"); - AZ_CLASS_ALLOCATOR(TranslationKeyedString, AZ::SystemAllocator, 0); - - static void Reflect(AZ::ReflectContext* context) - { - AZ::SerializeContext* serializeContext = azrtti_cast(context); - if (!serializeContext) - { - return; - } - - serializeContext->Class() - ->Version(1) - ->Field("Fallback", &TranslationKeyedString::m_fallback) - ->Field("Context", &TranslationKeyedString::m_context) - ->Field("Key", &TranslationKeyedString::m_key) - ; - } - - TranslationKeyedString() - : m_dirtyText(true) - { - } - - ~TranslationKeyedString() = default; - - TranslationKeyedString(const AZStd::string& fallback, const AZStd::string& context = AZStd::string(), const AZStd::string& key = AZStd::string()) - : m_fallback(fallback) - , m_context(context) - , m_key(key) - , m_dirtyText(true) - { - } - - const AZStd::string GetDisplayString() const - { - if (m_dirtyText) - { - const_cast(this)->TranslateString(); - } - - return m_display; - } - - void TranslateString() - { - m_display = m_fallback; - - if (!m_context.empty() && !m_key.empty()) - { - AZStd::string translatedText = QCoreApplication::translate(m_context.c_str(), m_key.c_str()).toUtf8().data(); - - if (translatedText != m_key) - { - m_display = translatedText; - } - } - - m_dirtyText = false; - } - - bool empty() const - { - return m_fallback.empty() && (m_context.empty() || m_key.empty()); - } - - bool operator==(const TranslationKeyedString& other) const - { - return m_fallback == other.m_fallback - && m_context == other.m_context - && m_key == other.m_key - ; - } - - void Clear() - { - m_key.clear(); - m_context.clear(); - m_fallback.clear(); - } - - void SetFallback(const AZStd::string& fallback) - { - m_fallback = fallback; - m_dirtyText = true; - } - - AZStd::string m_context; - AZStd::string m_key; - AZStd::string m_display; - - private: - AZStd::string m_fallback; - - bool m_dirtyText; - }; -} diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp index cbdfbfcf0c..bce17c6348 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.cpp @@ -9,6 +9,10 @@ #include +AZ_PUSH_DISABLE_WARNING(4244 4251 4800, "-Wunknown-warning-option") +#include +AZ_POP_DISABLE_WARNING + namespace GraphCanvas { //////////////////////// @@ -19,7 +23,6 @@ namespace GraphCanvas NodePaletteTreeItem::NodePaletteTreeItem(AZStd::string_view name, EditorId editorId) : GraphCanvas::GraphCanvasTreeItem() - , m_errorIcon(":/GraphCanvasEditorResources/toast_error_icon.png") , m_editorId(editorId) , m_name(QString::fromUtf8(name.data(), static_cast(name.size()))) , m_selected(false) @@ -88,7 +91,7 @@ namespace GraphCanvas case Qt::DecorationRole: if (HasError()) { - return m_errorIcon; + return QIcon(":/GraphCanvasEditorResources/toast_error_icon.png"); } break; default: diff --git a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h index 3dad6fed0a..4259caf69b 100644 --- a/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h +++ b/Gems/GraphCanvas/Code/StaticLib/GraphCanvas/Widgets/NodePalette/TreeItems/NodePaletteTreeItem.h @@ -9,10 +9,6 @@ #include -AZ_PUSH_DISABLE_WARNING(4244 4251 4800, "-Wunknown-warning-option") -#include -AZ_POP_DISABLE_WARNING - #include #include #include @@ -117,7 +113,6 @@ namespace GraphCanvas private: // Error Display - QIcon m_errorIcon; QString m_errorString; AZStd::string m_styleOverride; diff --git a/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake b/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake index b62ff303a6..455b5673d3 100644 --- a/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake +++ b/Gems/GraphCanvas/Code/graphcanvas_staticlib_files.cmake @@ -102,8 +102,7 @@ set(FILES StaticLib/GraphCanvas/Types/GraphCanvasGraphData.h StaticLib/GraphCanvas/Types/GraphCanvasGraphSerialization.cpp StaticLib/GraphCanvas/Types/GraphCanvasGraphSerialization.h - StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h - StaticLib/GraphCanvas/Types/TranslationTypes.h + StaticLib/GraphCanvas/Types/SceneMemberComponentSaveData.h StaticLib/GraphCanvas/Types/Types.h StaticLib/GraphCanvas/Types/QtMetaTypes.h StaticLib/GraphCanvas/Widgets/Resources/default_style.json diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/AxisAlignedBoxShape.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/AxisAlignedBoxShape.svg new file mode 100644 index 0000000000..0f3982d713 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/AxisAlignedBoxShape.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg new file mode 100644 index 0000000000..51f0be0572 --- /dev/null +++ b/Gems/LmbrCentral/Assets/Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp index f723918cf3..ed707ee9b3 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationAreaComponent.cpp @@ -47,6 +47,7 @@ namespace LmbrCentral { editContext->Class("Navigation Area", "Navigation Area configuration") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->Attribute(AZ::Edit::Attributes::AddableByUser, false) ->Attribute(AZ::Edit::Attributes::Category, "AI") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/NavigationArea.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/NavigationArea.svg") diff --git a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp index 47999dbd4b..8d8727e314 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Ai/EditorNavigationSeedComponent.cpp @@ -32,6 +32,7 @@ namespace LmbrCentral editContext->Class("Navigation Seed", "Determines reachable navigation nodes") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) + ->Attribute(AZ::Edit::Attributes::AddableByUser, false) ->Attribute(AZ::Edit::Attributes::Category, "AI") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/NavigationSeed.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/NavigationSeed.svg") diff --git a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp index 500d5c17da..9798307d51 100644 --- a/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Ai/NavigationComponent.cpp @@ -120,6 +120,7 @@ namespace LmbrCentral editContext->Class( "Navigation", "The Navigation component provides basic pathfinding and pathfollowing services to an entity") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->Attribute(AZ::Edit::Attributes::AddableByUser, false) ->Attribute(AZ::Edit::Attributes::Category, "AI") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Navigation.svg") ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/Navigation.svg") diff --git a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp b/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp deleted file mode 100644 index 48973b2779..0000000000 --- a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp +++ /dev/null @@ -1,612 +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 "MaterialBuilderComponent.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace MaterialBuilder -{ - [[maybe_unused]] const char s_materialBuilder[] = "MaterialBuilder"; - - namespace Internal - { - const char g_nodeNameMaterial[] = "Material"; - const char g_nodeNameSubmaterial[] = "SubMaterials"; - const char g_nodeNameTexture[] = "Texture"; - const char g_nodeNameTextures[] = "Textures"; - const char g_attributeFileName[] = "File"; - - const int g_numSourceImageFormats = 9; - const char* g_sourceImageFormats[g_numSourceImageFormats] = { ".tif", ".tiff", ".bmp", ".gif", ".jpg", ".jpeg", ".tga", ".png", ".dds" }; - bool IsSupportedImageExtension(const AZStd::string& extension) - { - for (const char* format : g_sourceImageFormats) - { - if (extension == format) - { - return true; - } - } - return false; - } - - // Cleans up legacy pathing from older materials - const char* CleanLegacyPathingFromTexturePath(const char* texturePath) - { - // Copied from MaterialHelpers::SetTexturesFromXml, line 459 - // legacy. Some textures used to be referenced using "engine\\" or "engine/" - this is no longer valid - if ( - (strlen(texturePath) > 7) && - (azstrnicmp(texturePath, "engine", 6) == 0) && - ((texturePath[6] == '\\') || (texturePath[6] == '/')) - ) - { - texturePath = texturePath + 7; - } - - // legacy: Files were saved into a mtl with many leading forward or back slashes, we eat them all here. We want it to start with a relative path. - const char* actualFileName = texturePath; - while ((actualFileName[0]) && ((actualFileName[0] == '\\') || (actualFileName[0] == '/'))) - { - ++actualFileName; - } - return actualFileName; - } - - // Parses the material XML for all texture paths - AZ::Outcome GetTexturePathsFromMaterial(AZ::rapidxml::xml_node* materialNode, AZStd::vector& paths) - { - AZ::Outcome resultOutcome = AZ::Failure(AZStd::string("")); - AZStd::string success_with_warning_message; - - // check if this material has a set of textures defined, and if so, grab all the paths from the textures - AZ::rapidxml::xml_node* texturesNode = materialNode->first_node(g_nodeNameTextures); - if (texturesNode) - { - AZ::rapidxml::xml_node* textureNode = texturesNode->first_node(g_nodeNameTexture); - // it is possible for an empty node to exist for things like collision materials, so check - // to make sure that there is at least one child node before starting to iterate. - if (textureNode) - { - do - { - AZ::rapidxml::xml_attribute* fileAttribute = textureNode->first_attribute(g_attributeFileName); - if (!fileAttribute) - { - success_with_warning_message = "Texture node exists but does not have a file attribute defined"; - } - else - { - const char* rawTexturePath = fileAttribute->value(); - // do an initial clean-up of the path taken from the file, similar to MaterialHelpers::SetTexturesFromXml - AZStd::string texturePath = CleanLegacyPathingFromTexturePath(rawTexturePath); - paths.emplace_back(AZStd::move(texturePath)); - } - - textureNode = textureNode->next_sibling(g_nodeNameTexture); - } while (textureNode); - } - } - - // check to see if this material has sub materials defined. If so, recurse into this function for each sub material - AZ::rapidxml::xml_node* subMaterialsNode = materialNode->first_node(g_nodeNameSubmaterial); - if (subMaterialsNode) - { - AZ::rapidxml::xml_node* subMaterialNode = subMaterialsNode->first_node(g_nodeNameMaterial); - if (subMaterialNode == nullptr) - { - // this is a malformed material as there is no material node child in the SubMaterials node, so error out - return AZ::Failure(AZStd::string("SubMaterials node exists but does not have any child Material nodes.")); - } - - do - { - // grab the texture paths from the submaterial, or error out if necessary - AZ::Outcome subMaterialTexturePathsResult = GetTexturePathsFromMaterial(subMaterialNode, paths); - if (!subMaterialTexturePathsResult.IsSuccess()) - { - return subMaterialTexturePathsResult; - } - else if (!subMaterialTexturePathsResult.GetValue().empty()) - { - success_with_warning_message = subMaterialTexturePathsResult.GetValue(); - } - - subMaterialNode = subMaterialNode->next_sibling(g_nodeNameMaterial); - } while (subMaterialNode); - } - - if (texturesNode == nullptr && subMaterialsNode == nullptr) - { - return AZ::Failure(AZStd::string("Failed to find a Textures node or SubMaterials node in this material. At least one of these must exist to be able to gather texture dependencies.")); - } - - if (!success_with_warning_message.empty()) - { - return AZ::Success(success_with_warning_message); - } - return AZ::Success(AZStd::string()); - } - - // find a sequence of digits with a string starting from lastDigitIndex, and try to parse that sequence to and int - // and store it in outAnimIndex. - bool ParseFilePathForCompleteNumber(const AZStd::string& filePath, int& lastDigitIndex, int& outAnimIndex) - { - int firstAnimIndexDigit = lastDigitIndex; - while (isdigit(static_cast(filePath[lastDigitIndex]))) - { - ++lastDigitIndex; - } - if (!AzFramework::StringFunc::LooksLikeInt(filePath.substr(firstAnimIndexDigit, lastDigitIndex - firstAnimIndexDigit).c_str(), &outAnimIndex)) - { - return false; - } - return true; - } - - // Parse the texture path for a texture animation to determine the actual names of the textures to resolve that - // make up the entire sequence. - AZ::Outcome GetAllTexturesInTextureSequence(const AZStd::string& path, AZStd::vector& texturesInSequence) - { - // Taken from CShaderMan::mfReadTexSequence - // All comments next to variable declarations in this function are the original variable names in - // CShaderMan::mfReadTexSequence, to help keep track of how these variables relate to the original function - AZStd::string prefix; - AZStd::string postfix; - - AZStd::string filePath = path; // name - AZStd::string extension; // ext - AzFramework::StringFunc::Path::GetExtension(filePath.c_str(), extension); - AzFramework::StringFunc::Path::StripExtension(filePath); - - // unsure if it is actually possible to enter here or the original version with '$' as the indicator - // for texture sequences, but they check for both just in case, so this will match the behavior. - char separator = '#'; // chSep - int firstSeparatorIndex = static_cast(filePath.find(separator)); - if (firstSeparatorIndex == AZStd::string::npos) - { - firstSeparatorIndex = static_cast(filePath.find('$')); - if (firstSeparatorIndex == AZStd::string::npos) - { - return AZ::Failure(AZStd::string("Failed to find separator '#' or '$' in texture path.")); - } - separator = '$'; - } - - // we don't actually care about getting the speed of the animation, so just remove everything from the - // end of the string starting with the last open parenthesis - size_t speedStartIndex = filePath.find_last_of('('); - if (speedStartIndex != AZStd::string::npos) - { - AzFramework::StringFunc::LKeep(filePath, speedStartIndex); - AzFramework::StringFunc::Append(filePath, '\0'); - } - - // try to find where the digits start after the separator (there can be any number of separators - // between the texture name prefix and where the digit range starts) - int firstAnimIndexDigit = -1; // m - int numSeparators = 0; // j - for (int stringIndex = firstSeparatorIndex; stringIndex < filePath.length(); ++stringIndex) - { - if (filePath[stringIndex] == separator) - { - ++numSeparators; - if (firstSeparatorIndex == -1) - { - firstSeparatorIndex = stringIndex; - } - } - else if (firstSeparatorIndex > 0 && firstAnimIndexDigit < 0) - { - firstAnimIndexDigit = stringIndex; - break; - } - } - if (numSeparators == 0) - { - return AZ::Failure(AZStd::string("Failed to find separator '#' or '$' in texture path.")); - } - - // store off everything before the separator - prefix = AZStd::move(filePath.substr(0, firstSeparatorIndex)); - - int startAnimIndex = 0; // startn - int endAnimIndex = 0; // endn - // we only found the separator, but no indexes, so just assume its 0 - 999 - if (firstAnimIndexDigit < 0) - { - startAnimIndex = 0; - endAnimIndex = 999; - } - else - { - // find the length of the first index, then parse that to an int - int lastDigitIndex = firstAnimIndexDigit; - if (!ParseFilePathForCompleteNumber(filePath, lastDigitIndex, startAnimIndex)) - { - return AZ::Failure(AZStd::string("Failed to determine first index of the sequence after the separators in texture path.")); - } - - // reset to the start of the next index - ++lastDigitIndex; - - // find the length of the end index, then parse that to an int - if (!ParseFilePathForCompleteNumber(filePath, lastDigitIndex, endAnimIndex)) - { - return AZ::Failure(AZStd::string("Failed to determine last index of the sequence after the first index of the sequence in texture path.")); - } - - // save off the rest of the string - postfix = AZStd::move(filePath.substr(lastDigitIndex)); - } - - int numTextures = endAnimIndex - startAnimIndex + 1; - const char* textureNameFormat = "%s%.*d%s%s"; // prefix, num separators (number of digits), sequence index, postfix, extension) - for (int sequenceIndex = 0; sequenceIndex < numTextures; ++sequenceIndex) - { - texturesInSequence.emplace_back(AZStd::move(AZStd::string::format(textureNameFormat, prefix.c_str(), numSeparators, startAnimIndex + sequenceIndex, postfix.c_str(), extension.c_str()))); - } - - return AZ::Success(); - } - - // Determine which product path to use based on the path stored in the texture, and make it relative to - // the cache. - bool ResolveMaterialTexturePath(const AZStd::string& path, AZStd::string& outPath) - { - AZStd::string aliasedPath = path; - - //if its a source image format try to load the dds - AZStd::string extension; - bool hasExtension = AzFramework::StringFunc::Path::GetExtension(path.c_str(), extension); - - // Replace all supported extensions with DDS if it has an extension. If the extension exists but is not supported, fail out. - if (hasExtension && IsSupportedImageExtension(extension)) - { - AzFramework::StringFunc::Path::ReplaceExtension(aliasedPath, ".dds"); - } - else if (hasExtension) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve texture path %s as the path is not to a supported texture format. Please make sure that textures in materials are formats supported by Open 3D Engine.", aliasedPath.c_str()); - return false; - } - - AZStd::to_lower(aliasedPath.begin(), aliasedPath.end()); - AzFramework::StringFunc::Path::Normalize(aliasedPath); - - AZStd::string currentFolderSpecifier = AZStd::string::format(".%c", AZ_CORRECT_FILESYSTEM_SEPARATOR); - if (AzFramework::StringFunc::StartsWith(aliasedPath, currentFolderSpecifier)) - { - AzFramework::StringFunc::Strip(aliasedPath, currentFolderSpecifier.c_str(), false, true); - } - - AZStd::string resolvedPath; - char fullPathBuffer[AZ_MAX_PATH_LEN] = {}; - // if there is an alias already at the front of the path, resolve it, and try to make it relative to the - // cache (@products@). If it can't, then error out. - // This case handles the possibility of aliases existing in texture paths in materials that is still supported - // by the legacy loading code, however it is not currently used, so the else path is always taken. - if (aliasedPath[0] == '@') - { - if (!AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(aliasedPath.c_str(), fullPathBuffer, AZ_MAX_PATH_LEN)) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve the alias in texture path %s. Please make sure all aliases are registered with the engine.", aliasedPath.c_str()); - return false; - } - resolvedPath = fullPathBuffer; - AzFramework::StringFunc::Path::Normalize(resolvedPath); - if (!AzFramework::StringFunc::Replace(resolvedPath, AZ::IO::FileIOBase::GetDirectInstance()->GetAlias("@products@"), "")) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve aliased texture path %s to be relative to the asset cache. Please make sure this alias resolves to a path within the asset cache.", aliasedPath.c_str()); - return false; - } - } - else - { - resolvedPath = AZStd::move(aliasedPath); - } - - // AP deferred path resolution requires UNIX separators and no leading separators, so clean up and convert here - if (AzFramework::StringFunc::StartsWith(resolvedPath, AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING)) - { - AzFramework::StringFunc::Strip(resolvedPath, AZ_CORRECT_FILESYSTEM_SEPARATOR, false, true); - } - AzFramework::StringFunc::Replace(resolvedPath, AZ_CORRECT_FILESYSTEM_SEPARATOR_STRING, "/"); - - outPath = AZStd::move(resolvedPath); - return true; - } - - } - - BuilderPluginComponent::BuilderPluginComponent() - { - } - - BuilderPluginComponent::~BuilderPluginComponent() - { - } - - void BuilderPluginComponent::Init() - { - } - - void BuilderPluginComponent::Activate() - { - // Register material builder - AssetBuilderSDK::AssetBuilderDesc builderDescriptor; - builderDescriptor.m_name = "MaterialBuilderWorker"; - builderDescriptor.m_patterns.push_back(AssetBuilderSDK::AssetBuilderPattern("*.mtl", AssetBuilderSDK::AssetBuilderPattern::PatternType::Wildcard)); - builderDescriptor.m_busId = MaterialBuilderWorker::GetUUID(); - builderDescriptor.m_version = 5; - builderDescriptor.m_createJobFunction = AZStd::bind(&MaterialBuilderWorker::CreateJobs, &m_materialBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - builderDescriptor.m_processJobFunction = AZStd::bind(&MaterialBuilderWorker::ProcessJob, &m_materialBuilder, AZStd::placeholders::_1, AZStd::placeholders::_2); - - // (optimization) this builder does not emit source dependencies: - builderDescriptor.m_flags |= AssetBuilderSDK::AssetBuilderDesc::BF_EmitsNoDependencies; - - m_materialBuilder.BusConnect(builderDescriptor.m_busId); - - EBUS_EVENT(AssetBuilderSDK::AssetBuilderBus, RegisterBuilderInformation, builderDescriptor); - } - - void BuilderPluginComponent::Deactivate() - { - m_materialBuilder.BusDisconnect(); - } - - void BuilderPluginComponent::Reflect([[maybe_unused]] AZ::ReflectContext* context) - { - if (AZ::SerializeContext* serializeContext = azrtti_cast(context)) - { - serializeContext->Class() - ->Version(1) - ->Attribute(AZ::Edit::Attributes::SystemComponentTags, AZStd::vector({ AssetBuilderSDK::ComponentTags::AssetBuilder })); - } - } - - MaterialBuilderWorker::MaterialBuilderWorker() - { - } - MaterialBuilderWorker::~MaterialBuilderWorker() - { - } - - void MaterialBuilderWorker::ShutDown() - { - // This will be called on a different thread than the process job thread - m_isShuttingDown = true; - } - - // This happens early on in the file scanning pass. - // This function should always create the same jobs and not do any checking whether the job is up to date. - void MaterialBuilderWorker::CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response) - { - if (m_isShuttingDown) - { - response.m_result = AssetBuilderSDK::CreateJobsResultCode::ShuttingDown; - return; - } - - for (const AssetBuilderSDK::PlatformInfo& info : request.m_enabledPlatforms) - { - AssetBuilderSDK::JobDescriptor descriptor; - descriptor.m_jobKey = "Material Builder Job"; - descriptor.SetPlatformIdentifier(info.m_identifier.c_str()); - descriptor.m_priority = 8; // meshes are more important (at 10) but mats are still pretty important. - response.m_createJobOutputs.push_back(descriptor); - } - - response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; - } - - // The request will contain the CreateJobResponse you constructed earlier, including any keys and - // values you placed into the hash table - void MaterialBuilderWorker::ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response) - { - AZ_TracePrintf(AssetBuilderSDK::InfoWindow, "Starting Job.\n"); - AZStd::string fileName; - AzFramework::StringFunc::Path::GetFullFileName(request.m_fullPath.c_str(), fileName); - AZStd::string destPath; - - // Do all work inside the tempDirPath. - AzFramework::StringFunc::Path::ConstructFull(request.m_tempDirPath.c_str(), fileName.c_str(), destPath, true); - - AZ::IO::LocalFileIO fileIO; - if (!m_isShuttingDown && fileIO.Copy(request.m_fullPath.c_str(), destPath.c_str()) == AZ::IO::ResultCode::Success) - { - // Push assets back into the response's product list - // Assets you created in your temp path can be specified using paths relative to the temp path - // since that is assumed where you're writing stuff. - AZStd::string relPath = destPath; - AssetBuilderSDK::ProductPathDependencySet dependencyPaths; - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Success; - AssetBuilderSDK::JobProduct jobProduct(fileName); - - bool dependencyResult = GatherProductDependencies(request.m_fullPath, dependencyPaths); - if (dependencyResult) - { - jobProduct.m_pathDependencies = AZStd::move(dependencyPaths); - jobProduct.m_dependenciesHandled = true; // We've output the dependencies immediately above so it's OK to tell the AP we've handled dependencies - } - else - { - AZ_Error(s_materialBuilder, false, "Dependency gathering for %s failed.", request.m_fullPath.c_str()); - } - response.m_outputProducts.push_back(jobProduct); - } - else - { - if (m_isShuttingDown) - { - AZ_TracePrintf(AssetBuilderSDK::ErrorWindow, "Cancelled job %s because shutdown was requested.\n", request.m_fullPath.c_str()); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Cancelled; - } - else - { - AZ_TracePrintf(AssetBuilderSDK::ErrorWindow, "Error during processing job %s.\n", request.m_fullPath.c_str()); - response.m_resultCode = AssetBuilderSDK::ProcessJobResult_Failed; - } - } - } - - bool MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial(const AZStd::string& path, AZStd::vector& resolvedPaths) - { - if (!AZ::IO::SystemFile::Exists(path.c_str())) - { - AZ_Error(s_materialBuilder, false, "Failed to find material at path %s. Please make sure this material exists on disk.", path.c_str()); - return false; - } - - uint64_t fileSize = AZ::IO::SystemFile::Length(path.c_str()); - if (fileSize == 0) - { - AZ_Error(s_materialBuilder, false, "Material at path %s is an empty file. Please make sure this material was properly saved to disk.", path.c_str()); - return false; - } - - AZStd::vector buffer(fileSize + 1); - buffer[fileSize] = 0; - if (!AZ::IO::SystemFile::Read(path.c_str(), buffer.data())) - { - AZ_Error(s_materialBuilder, false, "Failed to read material at path %s. Please make sure the file is not open or being edited by another program.", path.c_str()); - return false; - } - - AZ::rapidxml::xml_document* xmlDoc = azcreate(AZ::rapidxml::xml_document, (), AZ::SystemAllocator, "Mtl builder temp XML Reader"); - if (!xmlDoc->parse(buffer.data())) - { - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - AZ_Error(s_materialBuilder, false, "Failed to parse material at path %s into XML. Please make sure that the material was properly saved to disk.", path.c_str()); - return false; - } - - // if the first node in this file isn't a material, this must not actually be a material so it can't have deps - AZ::rapidxml::xml_node* rootNode = xmlDoc->first_node(Internal::g_nodeNameMaterial); - if (!rootNode) - { - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - AZ_Error(s_materialBuilder, false, "Failed to find root material node for material at path %s. Please make sure that the material was properly saved to disk.", path.c_str()); - return false; - } - - AZStd::vector texturePaths; - // gather all textures in the material file - AZ::Outcome texturePathsResult = Internal::GetTexturePathsFromMaterial(rootNode, texturePaths); - if (!texturePathsResult.IsSuccess()) - { - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - AZ_Error(s_materialBuilder, false, "Failed to gather dependencies for %s as the material file is malformed. %s", path.c_str(), texturePathsResult.GetError().c_str()); - return false; - } - else if (!texturePathsResult.GetValue().empty()) - { - AZ_Warning(s_materialBuilder, false, "Some nodes in material %s could not be read as the material is malformed. %s. Some dependencies might not be reported correctly. Please make sure that the material was properly saved to disk.", path.c_str(), texturePathsResult.GetValue().c_str()); - } - azdestroy(xmlDoc, AZ::SystemAllocator, AZ::rapidxml::xml_document); - - // fail this if there are absolute paths. - for (const AZStd::string& texPath : texturePaths) - { - if (AZ::IO::PathView(texPath).IsAbsolute()) - { - AZ_Warning(s_materialBuilder, false, "Skipping resolving of texture path %s in material %s as the texture path is an absolute path. Please update the texture path to be relative to the asset cache.", texPath.c_str(), path.c_str()); - texturePaths.erase(AZStd::find(texturePaths.begin(), texturePaths.end(), texPath)); - } - } - - // for each path in the array, split any texture animation entry up into the individual files and add each to the list. - for (const AZStd::string& texPath : texturePaths) - { - if (texPath.find('#') != AZStd::string::npos) - { - AZStd::vector actualTexturePaths; - AZ::Outcome parseTextureSequenceResult = Internal::GetAllTexturesInTextureSequence(texPath, actualTexturePaths); - if (parseTextureSequenceResult.IsSuccess()) - { - texturePaths.erase(AZStd::find(texturePaths.begin(), texturePaths.end(), texPath)); - texturePaths.insert(texturePaths.end(), actualTexturePaths.begin(), actualTexturePaths.end()); - } - else - { - texturePaths.erase(AZStd::find(texturePaths.begin(), texturePaths.end(), texPath)); - AZ_Warning(s_materialBuilder, false, "Failed to parse texture sequence %s when trying to gather dependencies for %s. %s Please make sure the texture sequence path is formatted correctly. Registering dependencies for the texture sequence will be skipped.", texPath.c_str(), path.c_str(), parseTextureSequenceResult.GetError().c_str()); - } - } - } - - // for each texture in the file - for (const AZStd::string& texPath : texturePaths) - { - // if the texture path starts with a '$' then it is a special runtime defined texture, so it it doesn't have - // an actual asset on disk to depend on. If the texture path doesn't have an extension, then it is a texture - // that is determined at runtime (such as 'nearest_cubemap'), so also ignore those, as other things pull in - // those dependencies. - if (AzFramework::StringFunc::StartsWith(texPath, "$") || !AzFramework::StringFunc::Path::HasExtension(texPath.c_str())) - { - continue; - } - - // resolve the path in the file. - AZStd::string resolvedPath; - if (!Internal::ResolveMaterialTexturePath(texPath, resolvedPath)) - { - AZ_Warning(s_materialBuilder, false, "Failed to resolve texture path %s to a product path when gathering dependencies for %s. Registering dependencies on this texture path will be skipped.", texPath.c_str(), path.c_str()); - continue; - } - - resolvedPaths.emplace_back(AZStd::move(resolvedPath)); - } - - return true; - } - - bool MaterialBuilderWorker::PopulateProductDependencyList(AZStd::vector& resolvedPaths, AssetBuilderSDK::ProductPathDependencySet& dependencies) - { - for (const AZStd::string& texturePath : resolvedPaths) - { - if (texturePath.empty()) - { - AZ_Warning(s_materialBuilder, false, "Resolved path is empty.\n"); - return false; - } - - dependencies.emplace(texturePath, AssetBuilderSDK::ProductPathDependencyType::ProductFile); - } - return true; - } - - bool MaterialBuilderWorker::GatherProductDependencies(const AZStd::string& path, AssetBuilderSDK::ProductPathDependencySet& dependencies) - { - AZStd::vector resolvedTexturePaths; - if (!GetResolvedTexturePathsFromMaterial(path, resolvedTexturePaths)) - { - return false; - } - - if (!PopulateProductDependencyList(resolvedTexturePaths, dependencies)) - { - AZ_Warning(s_materialBuilder, false, "Failed to populate dependency list for material %s with possible variants for textures.", path.c_str()); - } - - return true; - } - - AZ::Uuid MaterialBuilderWorker::GetUUID() - { - return AZ::Uuid::CreateString("{258D34AC-12F8-4196-B535-3206D8E7287B}"); - } -} diff --git a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.h b/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.h deleted file mode 100644 index a7813cf0bd..0000000000 --- a/Gems/LmbrCentral/Code/Source/Builders/MaterialBuilder/MaterialBuilderComponent.h +++ /dev/null @@ -1,65 +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 - -#include -#include -#include - -namespace MaterialBuilder -{ - //! Material builder is responsible for building material files - class MaterialBuilderWorker - : public AssetBuilderSDK::AssetBuilderCommandBus::Handler - { - public: - MaterialBuilderWorker(); - ~MaterialBuilderWorker(); - - //! Asset Builder Callback Functions - void CreateJobs(const AssetBuilderSDK::CreateJobsRequest& request, AssetBuilderSDK::CreateJobsResponse& response); - void ProcessJob(const AssetBuilderSDK::ProcessJobRequest& request, AssetBuilderSDK::ProcessJobResponse& response); - - //!AssetBuilderSDK::AssetBuilderCommandBus interface - void ShutDown() override; - - //! Returns the UUID for this builder - static AZ::Uuid GetUUID(); - - bool GetResolvedTexturePathsFromMaterial(const AZStd::string& path, AZStd::vector& resolvedPaths); - bool PopulateProductDependencyList(AZStd::vector& resolvedPaths, AssetBuilderSDK::ProductPathDependencySet& dependencies); - - private: - bool GatherProductDependencies(const AZStd::string& path, AssetBuilderSDK::ProductPathDependencySet& dependencies); - - bool m_isShuttingDown = false; - }; - - class BuilderPluginComponent - : public AZ::Component - { - public: - AZ_COMPONENT(BuilderPluginComponent, "{4D1A4B0C-54CE-4397-B8AE-ADD08898C2CD}") - static void Reflect(AZ::ReflectContext* context); - - BuilderPluginComponent(); - - ////////////////////////////////////////////////////////////////////////// - // AZ::Component - virtual void Init(); // create objects, allocate memory and initialize yourself without reaching out to the outside world - virtual void Activate(); // reach out to the outside world and connect up to what you need to, register things, etc. - virtual void Deactivate(); // unregister things, disconnect from the outside world - ////////////////////////////////////////////////////////////////////////// - - virtual ~BuilderPluginComponent(); // free memory an uninitialize yourself. - - private: - MaterialBuilderWorker m_materialBuilder; - }; -} diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp index 027d19fdef..ad90c16f43 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentral.cpp @@ -38,9 +38,6 @@ #include "Geometry/GeometrySystemComponent.h" #include -// Unhandled asset types -// Material -#include "Unhandled/Material/MaterialAssetTypeInfo.h" // Other #include "Unhandled/Other/AudioAssetTypeInfo.h" #include "Unhandled/Other/CharacterPhysicsAssetTypeInfo.h" @@ -353,8 +350,6 @@ namespace LmbrCentral // Add asset types and extensions to AssetCatalog. Uses "AssetCatalogService". if (auto assetCatalog = AZ::Data::AssetCatalogRequestBus::FindFirstHandler(); assetCatalog) { - assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); - assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); assetCatalog->EnableCatalogForAsset(AZ::AzTypeInfo::Uuid()); @@ -364,24 +359,12 @@ namespace LmbrCentral assetCatalog->AddExtension("dds"); assetCatalog->AddExtension("caf"); assetCatalog->AddExtension("xml"); - assetCatalog->AddExtension("mtl"); - assetCatalog->AddExtension("dccmtl"); assetCatalog->AddExtension("sprite"); assetCatalog->AddExtension("cax"); } AZ::Data::AssetManagerNotificationBus::Handler::BusConnect(); - - // Register unhandled asset type info - // Material - auto materialAssetTypeInfo = aznew MaterialAssetTypeInfo(); - materialAssetTypeInfo->Register(); - m_unhandledAssetInfo.emplace_back(materialAssetTypeInfo); - // DCC Material - auto dccMaterialAssetTypeInfo = aznew DccMaterialAssetTypeInfo(); - dccMaterialAssetTypeInfo->Register(); - m_unhandledAssetInfo.emplace_back(dccMaterialAssetTypeInfo); // Other auto audioAssetTypeInfo = aznew AudioAssetTypeInfo(); audioAssetTypeInfo->Register(); diff --git a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp index 511bf98582..61b8c8f73d 100644 --- a/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp +++ b/Gems/LmbrCentral/Code/Source/LmbrCentralEditor.cpp @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include "Builders/CopyDependencyBuilder/CopyDependencyBuilderComponent.h" @@ -84,7 +83,6 @@ namespace LmbrCentral CopyDependencyBuilder::CopyDependencyBuilderComponent::CreateDescriptor(), DependencyBuilder::DependencyBuilderComponent::CreateDescriptor(), LevelBuilder::LevelBuilderComponent::CreateDescriptor(), - MaterialBuilder::BuilderPluginComponent::CreateDescriptor(), SliceBuilder::BuilderPluginComponent::CreateDescriptor(), TranslationBuilder::BuilderPluginComponent::CreateDescriptor(), LuaBuilder::BuilderPluginComponent::CreateDescriptor(), diff --git a/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp b/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp index f2701473f3..7eb3c62b5d 100644 --- a/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Scripting/TagComponent.cpp @@ -92,7 +92,7 @@ namespace LmbrCentral ; behaviorContext->EBus("TagGlobalRequestBus") - ->Event("RequestTaggedEntities", &TagGlobalRequestBus::Events::RequestTaggedEntities) + ->Event("Get Entity By Tag", &TagGlobalRequestBus::Events::RequestTaggedEntities, "RequestTaggedEntities") ; behaviorContext->EBus("TagComponentNotificationsBus") diff --git a/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp b/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp index c833677b1d..f78f2f048d 100644 --- a/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp +++ b/Gems/LmbrCentral/Code/Source/Shape/EditorAxisAlignedBoxShapeComponent.cpp @@ -36,8 +36,8 @@ namespace LmbrCentral "Axis Aligned Box Shape", "The Axis Aligned Box Shape component creates a box around the associated entity") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "Shape") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/Box_Shape.svg") - ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/Box_Shape.svg") + ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/AxisAlignedBoxShape.svg") + ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/AxisAlignedBoxShape.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) ->Attribute(AZ::Edit::Attributes::AutoExpand, true) ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/shape/axis-aligned-box-shape/") diff --git a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.cpp b/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.cpp deleted file mode 100644 index 24bc43740d..0000000000 --- a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.cpp +++ /dev/null @@ -1,88 +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 "MaterialAssetTypeInfo.h" - -#include - -namespace LmbrCentral -{ - // MaterialAssetTypeInfo - - MaterialAssetTypeInfo::~MaterialAssetTypeInfo() - { - Unregister(); - } - - void MaterialAssetTypeInfo::Register() - { - AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo::Uuid()); - } - - void MaterialAssetTypeInfo::Unregister() - { - AZ::AssetTypeInfoBus::Handler::BusDisconnect(AZ::AzTypeInfo::Uuid()); - } - - AZ::Data::AssetType MaterialAssetTypeInfo::GetAssetType() const - { - return AZ::AzTypeInfo::Uuid(); - } - - const char* MaterialAssetTypeInfo::GetAssetTypeDisplayName() const - { - return "Material"; - } - - const char* MaterialAssetTypeInfo::GetGroup() const - { - return "Material"; - } - - const char* MaterialAssetTypeInfo::GetBrowserIcon() const - { - return "Icons/Components/Decal.svg"; - } - - // DccMaterialAssetTypeInfo - - DccMaterialAssetTypeInfo::~DccMaterialAssetTypeInfo() - { - Unregister(); - } - - void DccMaterialAssetTypeInfo::Register() - { - AZ::AssetTypeInfoBus::Handler::BusConnect(AZ::AzTypeInfo::Uuid()); - } - - void DccMaterialAssetTypeInfo::Unregister() - { - AZ::AssetTypeInfoBus::Handler::BusDisconnect(AZ::AzTypeInfo::Uuid()); - } - - AZ::Data::AssetType DccMaterialAssetTypeInfo::GetAssetType() const - { - return AZ::AzTypeInfo::Uuid(); - } - - const char* DccMaterialAssetTypeInfo::GetAssetTypeDisplayName() const - { - return "DccMaterial"; - } - - const char* DccMaterialAssetTypeInfo::GetGroup() const - { - return "DccMaterial"; - } - - const char* DccMaterialAssetTypeInfo::GetBrowserIcon() const - { - return "Icons/Components/Decal.svg"; - } -} // namespace LmbrCentral diff --git a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.h b/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.h deleted file mode 100644 index 2eafa31b41..0000000000 --- a/Gems/LmbrCentral/Code/Source/Unhandled/Material/MaterialAssetTypeInfo.h +++ /dev/null @@ -1,55 +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 - -#include - -namespace LmbrCentral -{ - class MaterialAssetTypeInfo - : public AZ::AssetTypeInfoBus::Handler - { - public: - - AZ_CLASS_ALLOCATOR(MaterialAssetTypeInfo, AZ::SystemAllocator, 0); - - ~MaterialAssetTypeInfo() override; - - ////////////////////////////////////////////////////////////////////////////////////////////// - // AZ::AssetTypeInfoBus::Handler - AZ::Data::AssetType GetAssetType() const override; - const char* GetAssetTypeDisplayName() const override; - const char* GetGroup() const override; - const char* GetBrowserIcon() const override; - ////////////////////////////////////////////////////////////////////////////////////////////// - - void Register(); - void Unregister(); - }; - - class DccMaterialAssetTypeInfo - : public AZ::AssetTypeInfoBus::Handler - { - public: - - AZ_CLASS_ALLOCATOR(DccMaterialAssetTypeInfo, AZ::SystemAllocator, 0); - - ~DccMaterialAssetTypeInfo() override; - - ////////////////////////////////////////////////////////////////////////////////////////////// - // AZ::AssetTypeInfoBus::Handler - AZ::Data::AssetType GetAssetType() const override; - const char* GetAssetTypeDisplayName() const override; - const char* GetGroup() const override; - const char* GetBrowserIcon() const override; - ////////////////////////////////////////////////////////////////////////////////////////////// - - void Register(); - void Unregister(); - }; -} // namespace LmbrCentral diff --git a/Gems/LmbrCentral/Code/Tests/Builders/MaterialBuilderTests.cpp b/Gems/LmbrCentral/Code/Tests/Builders/MaterialBuilderTests.cpp deleted file mode 100644 index 3786ef7565..0000000000 --- a/Gems/LmbrCentral/Code/Tests/Builders/MaterialBuilderTests.cpp +++ /dev/null @@ -1,261 +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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace UnitTest -{ - using namespace MaterialBuilder; - using namespace AZ; - - class MaterialBuilderTests - : public UnitTest::AllocatorsTestFixture - , public UnitTest::TraceBusRedirector - { - protected: - void SetUp() override - { - UnitTest::AllocatorsTestFixture::SetUp(); - - m_app.reset(aznew AzToolsFramework::ToolsApplication); - m_app->Start(AZ::ComponentApplication::Descriptor()); - // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is - // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash - // in the unit tests. - AZ::UserSettingsComponentRequestBus::Broadcast(&AZ::UserSettingsComponentRequests::DisableSaveOnFinalize); - AZ::Debug::TraceMessageBus::Handler::BusConnect(); - - const AZStd::string engineRoot = AZ::Test::GetEngineRootPath(); - AZ::IO::FileIOBase::GetInstance()->SetAlias("@engroot@", engineRoot.c_str()); - - AZ::IO::Path assetRoot(AZ::Utils::GetProjectPath()); - assetRoot /= "Cache"; - AZ::IO::FileIOBase::GetInstance()->SetAlias("@products@", assetRoot.c_str()); - } - - void TearDown() override - { - AZ::Debug::TraceMessageBus::Handler::BusDisconnect(); - m_app->Stop(); - m_app.reset(); - - UnitTest::AllocatorsTestFixture::TearDown(); - } - - AZStd::string GetTestFileAliasedPath(AZStd::string_view fileName) - { - constexpr char testFileFolder[] = "@engroot@/Gems/LmbrCentral/Code/Tests/Materials/"; - return AZStd::string::format("%s%.*s", testFileFolder, aznumeric_cast(fileName.size()), fileName.data()); - } - - AZStd::string GetTestFileFullPath(AZStd::string_view fileName) - { - AZStd::string aliasedPath = GetTestFileAliasedPath(fileName); - char resolvedPath[AZ_MAX_PATH_LEN]; - AZ::IO::FileIOBase::GetInstance()->ResolvePath(aliasedPath.c_str(), resolvedPath, AZ_MAX_PATH_LEN); - return AZStd::string(resolvedPath); - } - - void TestFailureCase(AZStd::string_view fileName, [[maybe_unused]] int expectedErrorCount) - { - MaterialBuilderWorker worker; - AZStd::vector resolvedPaths; - - AZStd::string absoluteMatPath = GetTestFileFullPath(fileName); - - AZ_TEST_START_ASSERTTEST; - ASSERT_FALSE(worker.GetResolvedTexturePathsFromMaterial(absoluteMatPath, resolvedPaths)); - AZ_TEST_STOP_ASSERTTEST(expectedErrorCount * 2); // The assert tests double count AZ errors, so just multiply expected count by 2 - ASSERT_EQ(resolvedPaths.size(), 0); - } - - void TestSuccessCase(AZStd::string_view fileName, AZStd::vector& expectedTextures) - { - MaterialBuilderWorker worker; - AZStd::vector resolvedPaths; - size_t texturesInMaterialFile = expectedTextures.size(); - - AZStd::string absoluteMatPath = GetTestFileFullPath(fileName); - ASSERT_TRUE(worker.GetResolvedTexturePathsFromMaterial(absoluteMatPath, resolvedPaths)); - ASSERT_EQ(resolvedPaths.size(), texturesInMaterialFile); - if (texturesInMaterialFile > 0) - { - ASSERT_THAT(resolvedPaths, testing::ElementsAreArray(expectedTextures)); - - AssetBuilderSDK::ProductPathDependencySet dependencies; - ASSERT_TRUE(worker.PopulateProductDependencyList(resolvedPaths, dependencies)); - ASSERT_EQ(dependencies.size(), texturesInMaterialFile); - } - } - - void TestSuccessCase(AZStd::string_view fileName, const char* expectedTexture) - { - AZStd::vector expectedTextures; - expectedTextures.push_back(expectedTexture); - TestSuccessCase(fileName, expectedTextures); - } - - void TestSuccessCaseNoDependencies(AZStd::string_view fileName) - { - AZStd::vector expectedTextures; - TestSuccessCase(fileName, expectedTextures); - } - - AZStd::unique_ptr m_app; - }; - - TEST_F(MaterialBuilderTests, MaterialBuilder_EmptyFile_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial, when checking for the size of the file. - TestFailureCase("test_mat1.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_NoChildren_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial after calling - // Internal::GetTexturePathsFromMaterial, which should return an AZ::Failure when both a Textures node and a - // SubMaterials node are not found. No other AZ_Errors should be generated. - TestFailureCase("test_mat2.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyTexturesNode_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat3.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptySubMaterialNode_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial after calling - // Internal::GetTexturePathsFromMaterial, which should return an AZ::Failure when a SubMaterials node is present, - // but has no children Material node. No other AZ_Errors should be generated. - TestFailureCase("test_mat4.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyTextureNode_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat5.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyMaterialInSubMaterial_ExpectFailure) - { - // Should fail in MaterialBuilderWorker::GetResolvedTexturePathsFromMaterial after calling - // Internal::GetTexturePathsFromMaterial, which should return an AZ::Failure when a SubMaterials node is present, - // but a child Material node has no child Textures node and no child SubMaterials node. No other AZ_Errors should - // be generated. - TestFailureCase("test_mat6.mtl", 1); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_EmptyTextureNodeInSubMaterial_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat7.mtl"); - } - -#if AZ_TRAIT_OS_USE_WINDOWS_FILE_PATHS // The following test file 'test_mat8.mtl' has a windows-specific absolute path, so this test is only valid on windows - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureAbsolutePath_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat8.mtl"); - } -#endif - - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureRuntimeAlias_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat9.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureRuntimeTexture_NoDependencies) - { - TestSuccessCaseNoDependencies("test_mat10.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialSingleTexture_ValidSourceFormat) - { - // texture referenced is textures/natural/terrain/am_floor_tile_ddn.png - const char* expectedPath = "textures/natural/terrain/am_floor_tile_ddn.dds"; - TestSuccessCase("test_mat11.mtl", expectedPath); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialSingleTexture_ValidProductFormat) - { - // texture referenced is textures/natural/terrain/am_floor_tile_ddn.dds - const char* expectedPath = "textures/natural/terrain/am_floor_tile_ddn.dds"; - TestSuccessCase("test_mat12.mtl", expectedPath); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialSingleTexture_InvalidSourceFormat_NoDependenices) - { - // texture referenced is textures/natural/terrain/am_floor_tile_ddn.txt - TestSuccessCaseNoDependencies("test_mat13.mtl"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_TextureAnimSequence) - { - AZStd::vector expectedPaths = { - "path/to/my/textures/test_anim_sequence_01_texture000.dds", - "path/to/my/textures/test_anim_sequence_01_texture001.dds", - "path/to/my/textures/test_anim_sequence_01_texture002.dds", - "path/to/my/textures/test_anim_sequence_01_texture003.dds", - "path/to/my/textures/test_anim_sequence_01_texture004.dds", - "path/to/my/textures/test_anim_sequence_01_texture005.dds" - }; - TestSuccessCase("test_mat14.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialMultipleTexture) - { - AZStd::vector expectedPaths = { - "engineassets/textures/hex.dds", - "engineassets/textures/hex_ddn.dds" - }; - TestSuccessCase("test_mat15.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_MalformedMaterial_MultipleTextures_OneEmptyTexture) - { - TestSuccessCase("test_mat16.mtl", "engineassets/textures/hex_ddn.dds"); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SingleMaterialMultipleTexture_ResolveLeadingSeparatorsAndAliases) - { - AZStd::vector expectedPaths = { - "engineassets/textures/hex.dds", // resolved from "/engineassets/textures/hex.dds" - "engineassets/textures/hex_ddn.dds", // resolved from "./engineassets/textures/hex_ddn.dds" - "engineassets/textures/hex_spec.dds" // resolved from "@products@/engineassets/textures/hex_spec.dds" - }; - TestSuccessCase("test_mat17.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SubMaterialSingleTexture) - { - AZStd::vector expectedPaths = { - "engineassets/textures/scratch.dds", - "engineassets/textures/perlinnoise2d.dds" - }; - TestSuccessCase("test_mat18.mtl", expectedPaths); - } - - TEST_F(MaterialBuilderTests, MaterialBuilder_SubMaterialMultipleTexture) - { - AZStd::vector expectedPaths = { - "engineassets/textures/scratch.dds", - "engineassets/textures/scratch_ddn.dds", - "engineassets/textures/perlinnoise2d.dds", - "engineassets/textures/perlinnoisenormal_ddn.dds" - }; - TestSuccessCase("test_mat19.mtl", expectedPaths); - } -} diff --git a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake index 5c77888922..aea2f493c7 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_editor_files.cmake @@ -116,8 +116,6 @@ set(FILES Source/Builders/LevelBuilder/LevelBuilderComponent.h Source/Builders/LevelBuilder/LevelBuilderWorker.cpp Source/Builders/LevelBuilder/LevelBuilderWorker.h - Source/Builders/MaterialBuilder/MaterialBuilderComponent.cpp - Source/Builders/MaterialBuilder/MaterialBuilderComponent.h Source/Builders/SliceBuilder/SliceBuilderComponent.cpp Source/Builders/SliceBuilder/SliceBuilderComponent.h Source/Builders/SliceBuilder/SliceBuilderWorker.cpp diff --git a/Gems/LmbrCentral/Code/lmbrcentral_editor_tests_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_editor_tests_files.cmake index 0f0cf484d1..afba79e566 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_editor_tests_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_editor_tests_files.cmake @@ -21,7 +21,6 @@ set(FILES Tests/Builders/CopyDependencyBuilderTest.cpp Tests/Builders/SliceBuilderTests.cpp Tests/Builders/LevelBuilderTest.cpp - Tests/Builders/MaterialBuilderTests.cpp Tests/Builders/LuaBuilderTests.cpp Tests/Builders/SeedBuilderTests.cpp Source/LmbrCentral.cpp diff --git a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake index 18412e2a38..20a366b5f7 100644 --- a/Gems/LmbrCentral/Code/lmbrcentral_files.cmake +++ b/Gems/LmbrCentral/Code/lmbrcentral_files.cmake @@ -145,8 +145,6 @@ set(FILES Source/Shape/ShapeComponentConverters.inl Source/Shape/ShapeGeometryUtil.h Source/Shape/ShapeGeometryUtil.cpp - Source/Unhandled/Material/MaterialAssetTypeInfo.cpp - Source/Unhandled/Material/MaterialAssetTypeInfo.h Source/Unhandled/Other/AudioAssetTypeInfo.cpp Source/Unhandled/Other/AudioAssetTypeInfo.h Source/Unhandled/Other/CharacterPhysicsAssetTypeInfo.cpp diff --git a/Gems/LyShine/Code/Editor/EditorWindow.cpp b/Gems/LyShine/Code/Editor/EditorWindow.cpp index a4ad4d7043..7b60474ed5 100644 --- a/Gems/LyShine/Code/Editor/EditorWindow.cpp +++ b/Gems/LyShine/Code/Editor/EditorWindow.cpp @@ -8,6 +8,7 @@ #include "EditorCommon.h" #include "CanvasHelpers.h" #include "AssetDropHelpers.h" +#include #include #include #include @@ -697,15 +698,36 @@ bool EditorWindow::SaveCanvasToXml(UiCanvasMetadata& canvasMetadata, bool forceA else if (recentFiles.size() > 0) { dir = Path::GetPath(recentFiles.front()); - dir.append(canvasMetadata.m_canvasDisplayName.c_str()); } // Else go to the default canvas directory else { dir = FileHelpers::GetAbsoluteDir(UICANVASEDITOR_CANVAS_DIRECTORY); - dir.append(canvasMetadata.m_canvasDisplayName.c_str()); } + // Make sure the directory exists. If not, walk up the directory path until we find one that does + // so that we will have a consistent 'starting folder' in the 'AzQtComponents::FileDialog::GetSaveFileName' call + // across different platforms. + AZ::IO::FixedMaxPath dirPath(dir.toUtf8().constData()); + + while (!AZ::IO::SystemFile::IsDirectory(dirPath.c_str())) + { + AZ::IO::PathView parentPath = dirPath.ParentPath(); + if (parentPath == dirPath) + { + // We've reach the root path, need to break out whether or not + // the root path exists + break; + } + else + { + dirPath = parentPath; + } + } + // Append the default filename + dirPath /= canvasMetadata.m_canvasDisplayName; + dir = QString::fromUtf8(dirPath.c_str(), static_cast(dirPath.Native().size())); + QString filename = AzQtComponents::FileDialog::GetSaveFileName(nullptr, QString(), dir, diff --git a/Gems/LyShine/Code/Source/Draw2d.cpp b/Gems/LyShine/Code/Source/Draw2d.cpp index 3476c530b2..9a97f27592 100644 --- a/Gems/LyShine/Code/Source/Draw2d.cpp +++ b/Gems/LyShine/Code/Source/Draw2d.cpp @@ -497,7 +497,7 @@ void CDraw2d::SetSortKey(int64_t key) AZ::Vector2 CDraw2d::Align(AZ::Vector2 position, AZ::Vector2 size, HAlign horizontalAlignment, VAlign verticalAlignment) { - AZ::Vector2 result; + AZ::Vector2 result = AZ::Vector2::CreateZero(); switch (horizontalAlignment) { case HAlign::Left: diff --git a/Gems/LyShine/Code/Source/UiTextComponent.cpp b/Gems/LyShine/Code/Source/UiTextComponent.cpp index e18a9cefe2..698dcc2b5e 100644 --- a/Gems/LyShine/Code/Source/UiTextComponent.cpp +++ b/Gems/LyShine/Code/Source/UiTextComponent.cpp @@ -4936,7 +4936,7 @@ AZStd::string UiTextComponent::GetLocalizedText([[maybe_unused]] const AZStd::st //////////////////////////////////////////////////////////////////////////////////////////////////// AZ::Vector2 UiTextComponent::CalculateAlignedPositionWithYOffset(const UiTransformInterface::RectPoints& points) { - AZ::Vector2 pos; + AZ::Vector2 pos = AZ::Vector2::CreateZero(); const DrawBatchLines& drawBatchLines = GetDrawBatchLines(); size_t numLinesOfText = drawBatchLines.batchLines.size(); diff --git a/Gems/Multiplayer/Code/CMakeLists.txt b/Gems/Multiplayer/Code/CMakeLists.txt index 559fa23553..afe40408ab 100644 --- a/Gems/Multiplayer/Code/CMakeLists.txt +++ b/Gems/Multiplayer/Code/CMakeLists.txt @@ -86,44 +86,24 @@ ly_create_alias(NAME Multiplayer.Servers NAMESPACE Gem TARGETS Gem::Multiplayer if (PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( - NAME Multiplayer.Builders.Static STATIC + NAME Multiplayer.Tools.Static STATIC NAMESPACE Gem FILES_CMAKE multiplayer_tools_files.cmake - COMPILE_DEFINITIONS - PUBLIC - MULTIPLAYER_TOOLS INCLUDE_DIRECTORIES PRIVATE - . - Source ${pal_source_dir} - PUBLIC - Include - BUILD_DEPENDENCIES - PUBLIC - AZ::AzToolsFramework - Gem::Multiplayer.Static - ) - - # by naming this target Multiplayer.Builders it ensures that it is loaded - # in any pipeline tools (Like Asset Processor, AssetBuilder, etc) - ly_add_target( - NAME Multiplayer.Builders GEM_MODULE - NAMESPACE Gem - FILES_CMAKE - multiplayer_tools_files.cmake - INCLUDE_DIRECTORIES - PRIVATE + AZ::AzNetworking Source . PUBLIC Include BUILD_DEPENDENCIES - PRIVATE - Gem::Multiplayer.Builders.Static - RUNTIME_DEPENDENCIES - Gem::Multiplayer.Editor + PUBLIC + AZ::AzCore + AZ::AzFramework + AZ::AzNetworking + AZ::AzToolsFramework ) ly_add_target( @@ -152,11 +132,12 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) Gem::Atom_RPI.Public Gem::Atom_RHI.Reflect Gem::Multiplayer.Static - Gem::Multiplayer.Builders + Gem::Multiplayer.Tools.Static ) - + + ly_create_alias(NAME Multiplayer.Builders NAMESPACE Gem TARGETS Gem::Multiplayer.Editor) # use the Multiplayer.Editor module in tools like the Editor: Such tools also get the visual debug view: - ly_create_alias(NAME Multiplayer.Tools NAMESPACE Gem TARGETS Gem::Multiplayer.Editor Gem::Multiplayer.Debug Gem::Multiplayer.Builders) + ly_create_alias(NAME Multiplayer.Tools NAMESPACE Gem TARGETS Gem::Multiplayer.Debug Gem::Multiplayer.Builders) endif() if (PAL_TRAIT_BUILD_TESTS_SUPPORTED) @@ -207,7 +188,8 @@ if (PAL_TRAIT_BUILD_TESTS_SUPPORTED) AZ::AzTest AZ::AzTestShared AZ::AzToolsFrameworkTestCommon - Gem::Multiplayer.Builders.Static + Gem::Multiplayer.Static + Gem::Multiplayer.Tools.Static ) ly_add_googletest( NAME Gem::Multiplayer.Builders.Tests diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja b/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja index e9bc21875b..d0b77159f8 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja +++ b/Gems/Multiplayer/Code/Include/Multiplayer/AutoGen/AutoComponent_Source.jinja @@ -308,13 +308,21 @@ void {{ ClassName }}::Set{{ UpperFirst(Property.attrib['Name']) }}(const {{ Prop {% endmacro %} {# +#} +{% macro PrintRpcParameters(printPrefix, paramDefines) %} +{% if paramDefines|count > 0 %} +{{ printPrefix }}{{ ', '.join(paramDefines) }} +{% endif %} +{% endmacro %} +{# + #} {% macro DefineRpcInvocation(Component, ClassName, Property, InvokeFrom, HandleOn) %} {% set paramNames = [] %} {% set paramTypes = [] %} {% set paramDefines = [] %} {{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} -void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramDefines) }}) +void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ PrintRpcParameters('', paramDefines) }}) { constexpr Multiplayer::RpcIndex rpcId = static_cast({{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure::{{ UpperFirst(Property.attrib['Name']) }}); {% if Property.attrib['IsReliable']|booleanTrue %} @@ -358,7 +366,7 @@ void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(par {% set paramTypes = [] %} {% set paramDefines = [] %} {{ AutoComponentMacros.ParseRpcParams(Property, paramNames, paramTypes, paramDefines) }} - ->Method("{{ UpperFirst(Property.attrib['Name']) }}", []({{ ClassName }}* self, {{ ', '.join(paramDefines) }}) { + ->Method("{{ UpperFirst(Property.attrib['Name']) }}", []({{ ClassName }}* self{{ PrintRpcParameters(', ', paramDefines) }}) { {% if (InvokeFrom == 'Server') %} self->{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(paramNames) }}); {% elif (InvokeFrom == 'Authority') or (InvokeFrom == 'Autonomous') %} @@ -372,7 +380,7 @@ void {{ ClassName }}::{{ UpperFirst(Property.attrib['Name']) }}({{ ', '.join(par } {% endif %} }) - ->Method("{{ UpperFirst(Property.attrib['Name']) }}ByEntityId", [](AZ::EntityId id, {{ ', '.join(paramDefines) }}) { + ->Method("{{ UpperFirst(Property.attrib['Name']) }}ByEntityId", [](AZ::EntityId id{{ PrintRpcParameters(', ', paramDefines) }}) { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) @@ -497,9 +505,9 @@ case {{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure::{{ Upp if (m_controller) { AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Authority, "Entity proxy does not have authority"); - m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); + m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection{{ PrintRpcParameters(', ', rpcParamList) }}); {% if (Property.attrib['GenerateEventBindings']|booleanTrue == true) %} - m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ ', '.join(rpcParamList) }}); + m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ PrintRpcParameters('', rpcParamList) }}); {% endif %} } else // Note that this rpc is marked reliable, trigger the appropriate rpc event so it can be forwarded @@ -513,15 +521,15 @@ case {{ UpperFirst(Component.attrib['Name']) }}Internal::RemoteProcedure::{{ Upp if (m_controller) { AZ_Assert(GetNetBindComponent()->GetNetEntityRole() == Multiplayer::NetEntityRole::Autonomous, "Entity proxy does not have autonomy"); - m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); + m_controller->Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection{{ PrintRpcParameters(', ', rpcParamList) }}); {% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} - m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ ', '.join(rpcParamList) }}); + m_controller->Get{{ UpperFirst(Property.attrib['Name']) }}Event().Signal({{ PrintRpcParameters('', rpcParamList) }}); {% endif %} } {% elif HandleOn == 'Client' %} - Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection, {{ ', '.join(rpcParamList) }}); + Handle{{ UpperFirst(Property.attrib['Name']) }}(invokingConnection{{ PrintRpcParameters(', ', rpcParamList) }}); {% if Property.attrib['GenerateEventBindings']|booleanTrue == true %} - m_{{ UpperFirst(Property.attrib['Name']) }}Event.Signal({{ ', '.join(rpcParamList) }}); + m_{{ UpperFirst(Property.attrib['Name']) }}Event.Signal({{ PrintRpcParameters('', rpcParamList) }}); {% endif %} {% endif %} } diff --git a/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp b/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp index 030964d81c..830f0e2ef4 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerGem.cpp @@ -6,10 +6,9 @@ * */ +#include #include #include -#include -#include #include #include #include @@ -20,25 +19,32 @@ namespace Multiplayer MultiplayerModule::MultiplayerModule() : AZ::Module() { - m_descriptors.insert(m_descriptors.end(), { - AzNetworking::NetworkingSystemComponent::CreateDescriptor(), - MultiplayerSystemComponent::CreateDescriptor(), - NetBindComponent::CreateDescriptor(), - NetworkSpawnableHolderComponent::CreateDescriptor(), - }); + m_descriptors.insert( + m_descriptors.end(), + { + AzNetworking::NetworkingSystemComponent::CreateDescriptor(), + MultiplayerSystemComponent::CreateDescriptor(), + NetBindComponent::CreateDescriptor(), + NetworkSpawnableHolderComponent::CreateDescriptor(), +#ifdef MULTIPLAYER_EDITOR + MultiplayerToolsSystemComponent::CreateDescriptor(), +#endif + }); CreateComponentDescriptors(m_descriptors); } AZ::ComponentTypeList MultiplayerModule::GetRequiredSystemComponents() const { - return AZ::ComponentTypeList - { + return AZ::ComponentTypeList{ azrtti_typeid(), azrtti_typeid(), +#ifdef MULTIPLAYER_EDITOR + azrtti_typeid(), +#endif }; } -} +} // namespace Multiplayer #if !defined(MULTIPLAYER_EDITOR) AZ_DECLARE_MODULE_CLASS(Gem_Multiplayer, Multiplayer::MultiplayerModule); diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.cpp b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp similarity index 66% rename from Gems/Multiplayer/Code/Source/MultiplayerToolsModule.cpp rename to Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp index ecda82a31b..058517d5dc 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.cpp +++ b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.cpp @@ -6,7 +6,7 @@ * */ -#include +#include #include #include @@ -39,22 +39,4 @@ namespace Multiplayer { m_didProcessNetPrefabs = didProcessNetPrefabs; } - - MultiplayerToolsModule::MultiplayerToolsModule() - : AZ::Module() - { - m_descriptors.insert(m_descriptors.end(), { - MultiplayerToolsSystemComponent::CreateDescriptor(), - }); - } - - AZ::ComponentTypeList MultiplayerToolsModule::GetRequiredSystemComponents() const - { - return AZ::ComponentTypeList - { - azrtti_typeid(), - }; - } } // namespace Multiplayer - -AZ_DECLARE_MODULE_CLASS(Gem_Multiplayer_Tools, Multiplayer::MultiplayerToolsModule); diff --git a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.h b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.h similarity index 72% rename from Gems/Multiplayer/Code/Source/MultiplayerToolsModule.h rename to Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.h index d0a6a81afb..3c4f8ea7a3 100644 --- a/Gems/Multiplayer/Code/Source/MultiplayerToolsModule.h +++ b/Gems/Multiplayer/Code/Source/MultiplayerToolsSystemComponent.h @@ -37,19 +37,5 @@ namespace Multiplayer bool m_didProcessNetPrefabs = false; }; - - class MultiplayerToolsModule - : public AZ::Module - { - public: - - AZ_RTTI(MultiplayerToolsModule, "{3F726172-21FC-48FA-8CFA-7D87EBA07E55}", AZ::Module); - AZ_CLASS_ALLOCATOR(MultiplayerToolsModule, AZ::SystemAllocator, 0); - - MultiplayerToolsModule(); - ~MultiplayerToolsModule() override = default; - - AZ::ComponentTypeList GetRequiredSystemComponents() const override; - }; } // namespace Multiplayer diff --git a/Gems/Multiplayer/Code/multiplayer_tools_files.cmake b/Gems/Multiplayer/Code/multiplayer_tools_files.cmake index aa948f4e75..b180e239a2 100644 --- a/Gems/Multiplayer/Code/multiplayer_tools_files.cmake +++ b/Gems/Multiplayer/Code/multiplayer_tools_files.cmake @@ -10,6 +10,6 @@ set(FILES Include/Multiplayer/IMultiplayerTools.h Source/Pipeline/NetworkPrefabProcessor.cpp Source/Pipeline/NetworkPrefabProcessor.h - Source/MultiplayerToolsModule.h - Source/MultiplayerToolsModule.cpp + Source/MultiplayerToolsSystemComponent.cpp + Source/MultiplayerToolsSystemComponent.h ) diff --git a/Gems/PhysX/Assets/Editor/Icons/Components/PhysXHeightfieldCollider.svg b/Gems/PhysX/Assets/Editor/Icons/Components/PhysXHeightfieldCollider.svg new file mode 100644 index 0000000000..f616a26381 --- /dev/null +++ b/Gems/PhysX/Assets/Editor/Icons/Components/PhysXHeightfieldCollider.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/PhysX/Assets/Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg b/Gems/PhysX/Assets/Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg new file mode 100644 index 0000000000..fbfed18e46 --- /dev/null +++ b/Gems/PhysX/Assets/Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/PhysX/Code/CMakeLists.txt b/Gems/PhysX/Code/CMakeLists.txt index bb3d7c08a2..fcb2f8ab20 100644 --- a/Gems/PhysX/Code/CMakeLists.txt +++ b/Gems/PhysX/Code/CMakeLists.txt @@ -182,14 +182,6 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED) Gem::LmbrCentral ) - if(PAL_TRAIT_JOINTS_TYPED_TEST_CASE) - ly_add_source_properties( - SOURCES Tests/PhysXJointsTest.cpp - PROPERTY COMPILE_DEFINITIONS - VALUES ENABLE_JOINTS_TYPED_TEST_CASE - ) - endif() - ly_add_googletest( NAME Gem::PhysX.Tests ) diff --git a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp index 5de625f679..e5e75d88a3 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp +++ b/Gems/PhysX/Code/Editor/ColliderComponentMode.cpp @@ -7,20 +7,20 @@ */ #include "ColliderComponentMode.h" +#include "ColliderAssetScaleMode.h" +#include "ColliderBoxMode.h" +#include "ColliderCapsuleMode.h" #include "ColliderOffsetMode.h" #include "ColliderRotationMode.h" -#include "ColliderBoxMode.h" #include "ColliderSphereMode.h" -#include "ColliderCapsuleMode.h" -#include "ColliderAssetScaleMode.h" #include #include #include +#include #include #include -#include namespace PhysX { @@ -31,7 +31,7 @@ namespace PhysX const AZ::Crc32 SetOffsetSubModeActionUri = AZ_CRC("com.o3de.action.physx.setoffsetsubmode", 0xc06132e5); const AZ::Crc32 SetRotationSubModeActionUri = AZ_CRC("com.o3de.action.physx.setrotationsubmode", 0xc4225918); const AZ::Crc32 ResetSubModeActionUri = AZ_CRC("com.o3de.action.physx.resetsubmode", 0xb70b120e); - } + } // namespace AZ_CLASS_ALLOCATOR_IMPL(ColliderComponentMode, AZ::SystemAllocator, 0); @@ -39,19 +39,17 @@ namespace PhysX : AzToolsFramework::ComponentModeFramework::EditorBaseComponentMode(entityComponentIdPair, componentType) { CreateSubModes(); + CreateSubModeSelectionCluster(); ColliderComponentModeRequestBus::Handler::BusConnect(entityComponentIdPair); ColliderComponentModeUiRequestBus::Handler::BusConnect(entityComponentIdPair); - - CreateSubModeSelectionCluster(); } ColliderComponentMode::~ColliderComponentMode() { - RemoveSubModeSelectionCluster(); - ColliderComponentModeUiRequestBus::Handler::BusDisconnect(); ColliderComponentModeRequestBus::Handler::BusDisconnect(); + RemoveSubModeSelectionCluster(); m_subModes[m_subMode]->Teardown(GetEntityComponentIdPair()); } @@ -62,39 +60,41 @@ namespace PhysX AZStd::vector ColliderComponentMode::PopulateActionsImpl() { - - AzToolsFramework::ActionOverride setDimensionsModeAction; - setDimensionsModeAction.SetUri(SetDimensionsSubModeActionUri); - setDimensionsModeAction.SetKeySequence(QKeySequence(Qt::Key_1)); - setDimensionsModeAction.SetTitle("Set Resize Mode"); - setDimensionsModeAction.SetTip("Set resize mode"); - setDimensionsModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - setDimensionsModeAction.SetCallback([this]() - { - SetCurrentMode(SubMode::Dimensions); - }); - AzToolsFramework::ActionOverride setOffsetModeAction; setOffsetModeAction.SetUri(SetOffsetSubModeActionUri); - setOffsetModeAction.SetKeySequence(QKeySequence(Qt::Key_2)); + setOffsetModeAction.SetKeySequence(QKeySequence(Qt::Key_1)); setOffsetModeAction.SetTitle("Set Offset Mode"); setOffsetModeAction.SetTip("Set offset mode"); setOffsetModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - setOffsetModeAction.SetCallback([this]() - { - SetCurrentMode(SubMode::Offset); - }); + setOffsetModeAction.SetCallback( + [this]() + { + SetCurrentMode(SubMode::Offset); + }); AzToolsFramework::ActionOverride setRotationModeAction; setRotationModeAction.SetUri(SetRotationSubModeActionUri); - setRotationModeAction.SetKeySequence(QKeySequence(Qt::Key_3)); + setRotationModeAction.SetKeySequence(QKeySequence(Qt::Key_2)); setRotationModeAction.SetTitle("Set Rotation Mode"); setRotationModeAction.SetTip("Set rotation mode"); setRotationModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - setRotationModeAction.SetCallback([this]() - { - SetCurrentMode(SubMode::Rotation); - }); + setRotationModeAction.SetCallback( + [this]() + { + SetCurrentMode(SubMode::Rotation); + }); + + AzToolsFramework::ActionOverride setDimensionsModeAction; + setDimensionsModeAction.SetUri(SetDimensionsSubModeActionUri); + setDimensionsModeAction.SetKeySequence(QKeySequence(Qt::Key_3)); + setDimensionsModeAction.SetTitle("Set Resize Mode"); + setDimensionsModeAction.SetTip("Set resize mode"); + setDimensionsModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); + setDimensionsModeAction.SetCallback( + [this]() + { + SetCurrentMode(SubMode::Dimensions); + }); AzToolsFramework::ActionOverride resetModeAction; resetModeAction.SetUri(ResetSubModeActionUri); @@ -102,12 +102,13 @@ namespace PhysX resetModeAction.SetTitle("Reset Current Mode"); resetModeAction.SetTip("Reset current mode"); resetModeAction.SetEntityComponentIdPair(GetEntityComponentIdPair()); - resetModeAction.SetCallback([this]() - { - ResetCurrentMode(); - }); + resetModeAction.SetCallback( + [this]() + { + ResetCurrentMode(); + }); - return {setDimensionsModeAction, setOffsetModeAction, setRotationModeAction, resetModeAction }; + return { setDimensionsModeAction, setOffsetModeAction, setRotationModeAction, resetModeAction }; } void ColliderComponentMode::CreateSubModes() @@ -141,7 +142,7 @@ namespace PhysX if (mouseInteraction.m_mouseEvent == AzToolsFramework::ViewportInteraction::MouseEvent::Wheel && mouseInteraction.m_mouseInteraction.m_keyboardModifiers.Ctrl()) { - int direction = MouseWheelDelta(mouseInteraction) > 0.0f ? 1 : -1; + const int direction = MouseWheelDelta(mouseInteraction) > 0.0f ? -1 : 1; AZ::u32 currentModeIndex = static_cast(m_subMode); AZ::u32 numSubModes = static_cast(SubMode::NumModes); AZ::u32 nextModeIndex = (currentModeIndex + numSubModes + direction) % m_subModes.size(); @@ -159,10 +160,17 @@ namespace PhysX void ColliderComponentMode::SetCurrentMode(SubMode newMode) { - AZ_Assert(m_subModes.count(newMode) > 0, "Submode not found:%d", newMode); + AZ_Assert(m_subModes.find(newMode) != m_subModes.end(), "Submode not found:%d", newMode); m_subModes[m_subMode]->Teardown(GetEntityComponentIdPair()); m_subMode = newMode; m_subModes[m_subMode]->Setup(GetEntityComponentIdPair()); + + const auto modeIndex = static_cast(newMode); + AZ_Assert(modeIndex < m_buttonIds.size(), "Invalid mode index %i.", modeIndex); + AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterActiveButton, m_modeSelectionClusterId, + m_buttonIds[modeIndex]); } AzToolsFramework::ViewportUi::ClusterId ColliderComponentMode::GetClusterId() const @@ -172,36 +180,40 @@ namespace PhysX AzToolsFramework::ViewportUi::ButtonId ColliderComponentMode::GetOffsetButtonId() const { - return m_offsetModeButtonId; + return m_buttonIds[static_cast(SubMode::Offset)]; } AzToolsFramework::ViewportUi::ButtonId ColliderComponentMode::GetRotationButtonId() const { - return m_rotationModeButtonId; + return m_buttonIds[static_cast(SubMode::Rotation)]; } AzToolsFramework::ViewportUi::ButtonId ColliderComponentMode::GetDimensionsButtonId() const { - return m_dimensionsModeButtonId; + return m_buttonIds[static_cast(SubMode::Dimensions)]; + } + + AZStd::string ColliderComponentMode::GetComponentModeName() const + { + return "Collider Edit Mode"; } void RefreshUI() { /// The reason this is in a free function is because ColliderComponentMode /// privately inherits from ToolsApplicationNotificationBus. Trying to invoke - /// the bus inside the class scope causes the compiler to complain it's not accessible - /// to due private inheritence. - /// Using the global namespace operator :: should have fixed that, except there + /// the bus inside the class scope causes the compiler to complain it's not accessible + /// to due private inheritence. + /// Using the global namespace operator :: should have fixed that, except there /// is a bug in the microsoft compiler meaning it doesn't work. So this is a work around. AzToolsFramework::ToolsApplicationNotificationBus::Broadcast( - &AzToolsFramework::ToolsApplicationNotificationBus::Events::InvalidatePropertyDisplay, - AzToolsFramework::Refresh_Values); + &AzToolsFramework::ToolsApplicationNotificationBus::Events::InvalidatePropertyDisplay, AzToolsFramework::Refresh_Values); } void ColliderComponentMode::ResetCurrentMode() { m_subModes[m_subMode]->ResetValues(GetEntityComponentIdPair()); - m_subModes[m_subMode]->Refresh(GetEntityComponentIdPair()); + m_subModes[m_subMode]->Refresh(GetEntityComponentIdPair()); RefreshUI(); } @@ -225,8 +237,8 @@ namespace PhysX void ColliderComponentMode::RemoveSubModeSelectionCluster() { AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, m_modeSelectionClusterId); + AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, + m_modeSelectionClusterId); } void ColliderComponentMode::CreateSubModeSelectionCluster() @@ -237,29 +249,37 @@ namespace PhysX &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, AzToolsFramework::ViewportUi::Alignment::TopLeft); // create and register the buttons - m_dimensionsModeButtonId = RegisterClusterButton(m_modeSelectionClusterId, "Scale"); - m_offsetModeButtonId = RegisterClusterButton(m_modeSelectionClusterId, "Move"); - m_rotationModeButtonId = RegisterClusterButton(m_modeSelectionClusterId, "Rotate"); + m_buttonIds.resize(static_cast(SubMode::NumModes)); + m_buttonIds[static_cast(SubMode::Offset)] = RegisterClusterButton(m_modeSelectionClusterId, "Move"); + m_buttonIds[static_cast(SubMode::Rotation)] = RegisterClusterButton(m_modeSelectionClusterId, "Rotate"); + m_buttonIds[static_cast(SubMode::Dimensions)] = RegisterClusterButton(m_modeSelectionClusterId, "Scale"); - const auto onButtonClicked = [this](AzToolsFramework::ViewportUi::ButtonId buttonId) { - if (buttonId == m_dimensionsModeButtonId) - { - SetCurrentMode(SubMode::Dimensions); - } - else if (buttonId == m_offsetModeButtonId) + SetCurrentMode(SubMode::Offset); + + const auto onButtonClicked = [this](AzToolsFramework::ViewportUi::ButtonId buttonId) + { + if (buttonId == m_buttonIds[static_cast(SubMode::Offset)]) { SetCurrentMode(SubMode::Offset); } - else if (buttonId == m_rotationModeButtonId) + else if (buttonId == m_buttonIds[static_cast(SubMode::Rotation)]) { SetCurrentMode(SubMode::Rotation); } + else if (buttonId == m_buttonIds[static_cast(SubMode::Dimensions)]) + { + SetCurrentMode(SubMode::Dimensions); + } + else + { + AZ_Error("PhysX Collider Component Mode", false, "Unrecognized button ID."); + } }; - + m_modeSelectionHandler = AZ::Event::Handler(onButtonClicked); AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, - m_modeSelectionClusterId, m_modeSelectionHandler); + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, m_modeSelectionClusterId, + m_modeSelectionHandler); } -} +} // namespace PhysX diff --git a/Gems/PhysX/Code/Editor/ColliderComponentMode.h b/Gems/PhysX/Code/Editor/ColliderComponentMode.h index b4ca060065..a756075513 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentMode.h +++ b/Gems/PhysX/Code/Editor/ColliderComponentMode.h @@ -31,21 +31,23 @@ namespace PhysX ColliderComponentMode(const AZ::EntityComponentIdPair& entityComponentIdPair, AZ::Uuid componentType); ~ColliderComponentMode(); - // EditorBaseComponentMode ... + // EditorBaseComponentMode overrides ... void Refresh() override; AZStd::vector PopulateActionsImpl() override; AZStd::vector PopulateViewportUiImpl() override; - // ColliderComponentModeBus ... + // ColliderComponentModeBus overrides ... SubMode GetCurrentMode() override; void SetCurrentMode(SubMode index) override; - // ColliderComponentModeUiBus ... + // ColliderComponentModeUiBus overrides ... AzToolsFramework::ViewportUi::ButtonId GetOffsetButtonId() const override; AzToolsFramework::ViewportUi::ButtonId GetRotationButtonId() const override; AzToolsFramework::ViewportUi::ClusterId GetClusterId() const override; AzToolsFramework::ViewportUi::ButtonId GetDimensionsButtonId() const override; + // ComponentMode overrides ... + AZStd::string GetComponentModeName() const override; private: // AzToolsFramework::ViewportInteraction::ViewportSelectionRequests ... @@ -63,12 +65,9 @@ namespace PhysX AzToolsFramework::ViewportUi::ClusterId m_modeSelectionClusterId; //!< Viewport UI cluster for changing sub mode. - AzToolsFramework::ViewportUi::ButtonId - m_dimensionsModeButtonId; //!< Id of the Viewport UI button for resize/dimensions mode. - AzToolsFramework::ViewportUi::ButtonId - m_offsetModeButtonId; //!< Id of the Viewport UI button for offset mode. - AzToolsFramework::ViewportUi::ButtonId - m_rotationModeButtonId; //!< Id of the Viewport UI button for rotation mode. + + AZStd::vector m_buttonIds; //!< Ids for the Viewport UI buttons for each mode. + AZ::Event::Handler m_modeSelectionHandler; //!< Event handler for sub mode changes. }; diff --git a/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h b/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h index 289215067a..05072f699a 100644 --- a/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h +++ b/Gems/PhysX/Code/Editor/ColliderComponentModeBus.h @@ -19,9 +19,9 @@ namespace PhysX public: enum class SubMode : AZ::u32 { - Dimensions, Offset, Rotation, + Dimensions, NumModes }; diff --git a/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp b/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp index 02e684de63..166c44de22 100644 --- a/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp +++ b/Gems/PhysX/Code/Editor/EditorJointConfiguration.cpp @@ -11,6 +11,7 @@ #include #include #include +#include namespace { @@ -213,7 +214,7 @@ namespace PhysX if (auto* serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(4, &EditorJointConfig::VersionConverter) + ->Version(5, &EditorJointConfig::VersionConverter) ->Field("Local Position", &EditorJointConfig::m_localPosition) ->Field("Local Rotation", &EditorJointConfig::m_localRotation) ->Field("Parent Entity", &EditorJointConfig::m_leadEntity) @@ -228,6 +229,12 @@ namespace PhysX if (auto* editContext = serializeContext->GetEditContext()) { + editContext->Enum("Joint Display Setup State", "Options for displaying joint setup.") + ->Value("Never", EditorJointConfig::DisplaySetupState::Never) + ->Value("Selected", EditorJointConfig::DisplaySetupState::Selected) + ->Value("Always", EditorJointConfig::DisplaySetupState::Always) + ; + editContext->Class( "PhysX Joint Configuration", "") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") @@ -244,8 +251,11 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::ChangeNotify, &EditorJointConfig::ValidateLeadEntityId) ->DataElement(0, &PhysX::EditorJointConfig::m_selfCollide, "Lead-Follower Collide" , "When active, the lead and follower pair will collide with each other.") - ->DataElement(0, &PhysX::EditorJointConfig::m_displayJointSetup, "Display Setup in Viewport" - , "Display joint setup in the viewport.") + ->DataElement( + AZ::Edit::UIHandlers::ComboBox, &PhysX::EditorJointConfig::m_displayJointSetup, "Display Setup in Viewport" + , "Never = Not shown." + "Select = Show setup display when entity is selected." + "Always = Always show setup display.") ->Attribute(AZ::Edit::Attributes::ReadOnly, &EditorJointConfig::IsInComponentMode) ->DataElement(0, &PhysX::EditorJointConfig::m_selectLeadOnSnap, "Select Lead on Snap" , "Select lead entity on snap to position in component mode.") @@ -306,6 +316,23 @@ namespace PhysX m_followerEntity); } + bool EditorJointConfig::ShowSetupDisplay() const + { + switch(m_displayJointSetup) + { + case DisplaySetupState::Always: + return true; + case DisplaySetupState::Selected: + { + bool showSetup = false; + AzToolsFramework::EditorEntityInfoRequestBus::EventResult( + showSetup, m_followerEntity, &AzToolsFramework::EditorEntityInfoRequests::IsSelected); + return showSetup; + } + } + return false; + } + bool EditorJointConfig::IsInComponentMode() const { return m_inComponentMode; @@ -343,6 +370,31 @@ namespace PhysX } } + // convert m_displayJointSetup from a bool to the enum with the option Never,Selected,Always show joint setup helpers. + if (classElement.GetVersion() <= 4) + { + // get the current bool setting and remove it. + bool oldSetting = false; + const int displayJointSetupIndex = classElement.FindElement(AZ_CRC_CE("Display Debug")); + if (displayJointSetupIndex >= 0) + { + AZ::SerializeContext::DataElementNode& elementNode = classElement.GetSubElement(displayJointSetupIndex); + elementNode.GetData(oldSetting); + classElement.RemoveElement(displayJointSetupIndex); + } + + //if the old setting was on set it to 'Selected'. otherwise 'Never' + if (oldSetting) + { + classElement.AddElementWithData(context, "Display Debug", EditorJointConfig::DisplaySetupState::Selected); + } + else + { + classElement.AddElementWithData(context, "Display Debug", EditorJointConfig::DisplaySetupState::Never); + } + } + + return result; } diff --git a/Gems/PhysX/Code/Editor/EditorJointConfiguration.h b/Gems/PhysX/Code/Editor/EditorJointConfiguration.h index 89ab31e4a7..f3dcd4afed 100644 --- a/Gems/PhysX/Code/Editor/EditorJointConfiguration.h +++ b/Gems/PhysX/Code/Editor/EditorJointConfiguration.h @@ -100,12 +100,21 @@ namespace PhysX AZ_TYPE_INFO(EditorJointConfig, "{8A966D65-CA97-4786-A13C-ACAA519D97EA}"); static void Reflect(AZ::ReflectContext* context); + enum class DisplaySetupState : AZ::u8 + { + Never = 0, + Selected, + Always + }; + void SetLeadEntityId(AZ::EntityId leadEntityId); JointGenericProperties ToGenericProperties() const; JointComponentConfiguration ToGameTimeConfig() const; + bool ShowSetupDisplay() const; + bool m_breakable = false; - bool m_displayJointSetup = false; + DisplaySetupState m_displayJointSetup = DisplaySetupState::Selected; bool m_inComponentMode = false; bool m_selectLeadOnSnap = true; bool m_selfCollide = false; @@ -129,3 +138,8 @@ namespace PhysX }; } // namespace PhysX + +namespace AZ +{ + AZ_TYPE_INFO_SPECIALIZE(PhysX::EditorJointConfig::DisplaySetupState, "{17EBE6BD-289A-4326-8A24-DCE3B7FEC51E}"); +} // namespace AZ diff --git a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp index ce95e27db3..08e31a89f0 100644 --- a/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp +++ b/Gems/PhysX/Code/Editor/Source/ComponentModes/Joints/JointsComponentMode.cpp @@ -307,7 +307,16 @@ namespace PhysX AZStd::vector JointsComponentMode::PopulateViewportUiImpl() { - return AZStd::vector(m_modeSelectionClusterIds.begin(), m_modeSelectionClusterIds.end()); + AZStd::vector ids; + ids.reserve(m_modeSelectionClusterIds.size()); + for (auto clusterid : m_modeSelectionClusterIds) + { + if (clusterid != AzToolsFramework::ViewportUi::InvalidClusterId) + { + ids.emplace_back(clusterid); + } + } + return ids; } void JointsComponentMode::SetCurrentMode(JointsComponentModeCommon::SubComponentModes::ModeType newMode, ButtonData& buttonData) @@ -353,31 +362,64 @@ namespace PhysX void JointsComponentMode::SetupSubModes(const AZ::EntityComponentIdPair& entityComponentIdPair) { - //create the 3 cluster groups - for (auto& clusterId : m_modeSelectionClusterIds) - { - AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( - clusterId, AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, - AzToolsFramework::ViewportUi::Alignment::TopLeft); - } - //retrieve the enabled sub components from the entity AZStd::vector subModesState; EditorJointRequestBus::EventResult(subModesState, entityComponentIdPair, &EditorJointRequests::GetSubComponentModesState); + //group 1 is always available so create it + AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( + m_modeSelectionClusterIds[static_cast(ClusterGroups::Group1)], AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, AzToolsFramework::ViewportUi::Alignment::TopLeft); + + //check if groups 2 and/or 3 need to be created + for (auto [modeType, _] : subModesState) + { + const AzToolsFramework::ViewportUi::ClusterId group2Id = GetClusterId(ClusterGroups::Group2); + const AzToolsFramework::ViewportUi::ClusterId group3Id = GetClusterId(ClusterGroups::Group3); + switch (modeType) + { + case JointsComponentModeCommon::SubComponentModes::ModeType::Damping: + case JointsComponentModeCommon::SubComponentModes::ModeType::Stiffness: + case JointsComponentModeCommon::SubComponentModes::ModeType::TwistLimits: + case JointsComponentModeCommon::SubComponentModes::ModeType::SwingLimits: + { + if (group2Id == AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( + m_modeSelectionClusterIds[static_cast(ClusterGroups::Group2)], + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, + AzToolsFramework::ViewportUi::Alignment::TopLeft); + } + } + break; + case JointsComponentModeCommon::SubComponentModes::ModeType::MaxForce: + case JointsComponentModeCommon::SubComponentModes::ModeType::MaxTorque: + { + if (group3Id == AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::EventResult( + m_modeSelectionClusterIds[static_cast(ClusterGroups::Group3)], + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::CreateCluster, + AzToolsFramework::ViewportUi::Alignment::TopLeft); + } + } + break; + default: + AZ_Error("Joints", false, "Joints component mode cluster UI setup found unknown sub mode."); + break; + } + //if both are created - break; + if (group2Id != AzToolsFramework::ViewportUi::InvalidClusterId && group3Id != AzToolsFramework::ViewportUi::InvalidClusterId) + { + break; + } + } + const AzToolsFramework::ViewportUi::ClusterId group1ClusterId = GetClusterId(ClusterGroups::Group1); const AzToolsFramework::ViewportUi::ClusterId group2ClusterId = GetClusterId(ClusterGroups::Group2); - //hide cluster 2, if something is added to it. it will make is visible - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, - group2ClusterId, false); - const AzToolsFramework::ViewportUi::ClusterId group3ClusterId = GetClusterId(ClusterGroups::Group3); - // hide cluster 3, if something is added to it. it will make is visible - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, - group3ClusterId, false); //translation and rotation are enabled for all joints in group 1 m_subModes[JointsComponentModeCommon::SubComponentModes::ModeType::Translation] = @@ -408,10 +450,6 @@ namespace PhysX Internal::RegisterClusterButton(group3ClusterId, "joints/MaxForce", SubModeData::MaxForceToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::MaxForce] = ButtonData{ group3ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group3ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::MaxTorque: @@ -424,10 +462,6 @@ namespace PhysX Internal::RegisterClusterButton(group3ClusterId, "joints/MaxTorque", SubModeData::MaxTorqueToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::MaxTorque] = ButtonData{ group3ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group3ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::Damping: @@ -439,10 +473,6 @@ namespace PhysX const AzToolsFramework::ViewportUi::ButtonId buttonId = Internal::RegisterClusterButton(group2ClusterId, "joints/Damping", SubModeData::DampingToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::Damping] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::Stiffness: @@ -455,10 +485,6 @@ namespace PhysX Internal::RegisterClusterButton(group2ClusterId, "joints/Stiffness", SubModeData::StiffnessToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::Stiffness] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::TwistLimits: @@ -473,10 +499,6 @@ namespace PhysX Internal::RegisterClusterButton(group2ClusterId, "joints/TwistLimits", SubModeData::TwistLimitsToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::TwistLimits] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::SwingLimits: @@ -489,10 +511,6 @@ namespace PhysX Internal::RegisterClusterButton(group2ClusterId, "joints/SwingLimits", SubModeData::SwingLimitsToolTip); m_buttonData[JointsComponentModeCommon::SubComponentModes::ModeType::SwingLimits] = ButtonData{ group2ClusterId, buttonId }; - - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::SetClusterVisible, group2ClusterId, true); } break; case JointsComponentModeCommon::SubComponentModes::ModeType::SnapPosition: @@ -517,6 +535,9 @@ namespace PhysX ButtonData{ group1ClusterId, buttonId }; } break; + default: + AZ_Error("Joints", false, "Joints component mode cluster button setup found unknown sub mode."); + break; } } @@ -560,10 +581,13 @@ namespace PhysX for (int i = 0; i < static_cast(ClusterGroups::GroupCount); i++) { - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, - &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, m_modeSelectionClusterIds[i], - m_modeSelectionHandlers[i]); + if (m_modeSelectionClusterIds[i] != AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RegisterClusterEventHandler, + m_modeSelectionClusterIds[i], m_modeSelectionHandlers[i]); + } } // set the translate as enabled by default. @@ -588,10 +612,14 @@ namespace PhysX { for (auto clusterid : m_modeSelectionClusterIds) { - AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( - AzToolsFramework::ViewportUi::DefaultViewportId, &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, - clusterid); + if (clusterid != AzToolsFramework::ViewportUi::InvalidClusterId) + { + AzToolsFramework::ViewportUi::ViewportUiRequestBus::Event( + AzToolsFramework::ViewportUi::DefaultViewportId, + &AzToolsFramework::ViewportUi::ViewportUiRequestBus::Events::RemoveCluster, clusterid); + } } + m_modeSelectionClusterIds.assign(static_cast(ClusterGroups::GroupCount), AzToolsFramework::ViewportUi::InvalidClusterId); } AzToolsFramework::ViewportUi::ClusterId JointsComponentMode::GetClusterId(ClusterGroups group) diff --git a/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp b/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp index fa71fa0061..d7065a869d 100644 --- a/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorBallJointComponent.cpp @@ -215,7 +215,7 @@ namespace PhysX { EditorJointComponent::DisplayEntityViewport(viewportInfo, debugDisplay); - if (!m_config.m_displayJointSetup && + if (!m_config.ShowSetupDisplay() && !m_config.m_inComponentMode) { return; diff --git a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp index 262e40cb99..7e1d1c341f 100644 --- a/Gems/PhysX/Code/Source/EditorColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorColliderComponent.cpp @@ -760,7 +760,7 @@ namespace PhysX if (asset == m_shapeConfiguration.m_physicsAsset.m_pxAsset) { m_shapeConfiguration.m_physicsAsset.m_pxAsset = asset; - m_shapeConfiguration.m_physicsAsset.m_configuration.m_asset = m_shapeConfiguration.m_physicsAsset.m_pxAsset; + m_shapeConfiguration.m_physicsAsset.m_configuration.m_asset = asset; UpdateMaterialSlotsFromMeshAsset(); CreateStaticEditorCollider(); @@ -785,7 +785,9 @@ namespace PhysX { const PhysX::EditorRigidBodyComponent* entityRigidbody = m_entity->FindComponent(); - if (m_shapeConfiguration.m_physicsAsset.m_pxAsset && (m_shapeConfiguration.m_shapeType == Physics::ShapeType::PhysicsAsset) && entityRigidbody) + if (entityRigidbody && + m_shapeConfiguration.m_shapeType == Physics::ShapeType::PhysicsAsset && + m_shapeConfiguration.m_physicsAsset.m_pxAsset.IsReady()) { AZStd::vector> shapes; Utils::GetShapesFromAsset(m_shapeConfiguration.m_physicsAsset.m_configuration, m_configuration, m_hasNonUniformScale, diff --git a/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp b/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp index 0f09258524..fb0a38fa18 100644 --- a/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorHeightfieldColliderComponent.cpp @@ -34,8 +34,8 @@ namespace PhysX "PhysX Heightfield Collider", "Creates geometry in the PhysX simulation based on an attached heightfield component") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "PhysX") - ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/PhysXCollider.svg") - ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Icons/Components/Viewport/PhysXCollider.svg") + ->Attribute(AZ::Edit::Attributes::Icon, "Editor/Icons/Components/PhysXHeightfieldCollider.svg") + ->Attribute(AZ::Edit::Attributes::ViewportIcon, "Editor/Icons/Components/Viewport/PhysXHeightfieldCollider.svg") ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC_CE("Game")) ->Attribute( AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/physx/heightfield-collider/") diff --git a/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp b/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp index 1b575074e2..f009c990b4 100644 --- a/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp +++ b/Gems/PhysX/Code/Source/EditorHingeJointComponent.cpp @@ -211,7 +211,7 @@ namespace PhysX { EditorJointComponent::DisplayEntityViewport(viewportInfo, debugDisplay); - if (!m_config.m_displayJointSetup && + if (!m_config.ShowSetupDisplay() && !m_config.m_inComponentMode) { return; diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp index 4ed2825cc2..46f4c04880 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.cpp @@ -344,6 +344,55 @@ namespace PhysX bool isAcceleration = true; return physx::PxD6JointDrive(stiffness, damping, forceLimit, isAcceleration); } + + AZStd::vector ComputeHierarchyDepths(const AZStd::vector& parentIndices) + { + const size_t numNodes = parentIndices.size(); + AZStd::vector nodeDepths(numNodes); + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) + { + nodeDepths[nodeIndex] = { -1, nodeIndex }; + } + + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) + { + if (nodeDepths[nodeIndex].m_depth != -1) + { + continue; + } + int depth = -1; // initial depth value for this node + int ancestorDepth = 0; // the depth of the first ancestor we find when iteratively visiting parents + bool ancestorFound = false; // whether we have found either an ancestor which already has a depth value, or the root + size_t currentIndex = nodeIndex; + while (!ancestorFound) + { + depth++; + if (depth > numNodes) + { + AZ_Error("PhysX Ragdoll", false, "Loop detected in hierarchy depth computation."); + return nodeDepths; + } + const size_t parentIndex = parentIndices[currentIndex]; + + if (parentIndex >= numNodes || nodeDepths[currentIndex].m_depth != -1) + { + ancestorFound = true; + ancestorDepth = (nodeDepths[currentIndex].m_depth != -1) ? nodeDepths[currentIndex].m_depth : 0; + } + + currentIndex = parentIndex; + } + + currentIndex = nodeIndex; + for (int i = depth; i >= 0; i--) + { + nodeDepths[currentIndex] = { ancestorDepth + i, currentIndex }; + currentIndex = parentIndices[currentIndex]; + } + } + + return nodeDepths; + } } // namespace Characters } // namespace Utils } // namespace PhysX diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h index 0f51a5d9b9..245dc01abd 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h +++ b/Gems/PhysX/Code/Source/PhysXCharacters/API/CharacterUtils.h @@ -49,6 +49,18 @@ namespace PhysX //! @param forceLimit The upper limit on the force the joint can apply to reach its target. //! @return The created joint drive. physx::PxD6JointDrive CreateD6JointDrive(float strength, float dampingRatio, float forceLimit); + + //! Contains information about a node in a hierarchy and how deep it is in the hierarchy relative to the root. + struct DepthData + { + int m_depth = -1; //!< Depth of the joint in the hierarchy. The root has depth 0, its children depth 1, and so on. + size_t m_index = 0; // ComputeHierarchyDepths(const AZStd::vector& parentIndices); } // namespace Characters } // namespace Utils } // namespace PhysX diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp index 57972fea3e..7615a175d1 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp +++ b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.cpp @@ -7,20 +7,20 @@ */ #include -#include #include -#include #include +#include +#include #include +#include #include #include -#include +#include #include namespace PhysX { - bool RagdollComponent::VersionConverter(AZ::SerializeContext& context, - AZ::SerializeContext::DataElementNode& classElement) + bool RagdollComponent::VersionConverter(AZ::SerializeContext& context, AZ::SerializeContext::DataElementNode& classElement) { // The element "PhysXRagdoll" was changed from a shared pointer to a unique pointer, but a version converter was // not added at the time. This means there may be serialized data with either the shared or unique pointer, but @@ -76,13 +76,13 @@ namespace PhysX ->Field("EnableJointProjection", &RagdollComponent::m_enableJointProjection) ->Field("ProjectionLinearTol", &RagdollComponent::m_jointProjectionLinearTolerance) ->Field("ProjectionAngularTol", &RagdollComponent::m_jointProjectionAngularToleranceDegrees) - ; + ->Field("EnableMassRatioClamping", &RagdollComponent::m_enableMassRatioClamping) + ->Field("MaxMassRatio", &RagdollComponent::m_maxMassRatio); AZ::EditContext* editContext = serializeContext->GetEditContext(); if (editContext) { - editContext->Class( - "PhysX Ragdoll", "Creates a PhysX ragdoll simulation for an animation actor.") + editContext->Class("PhysX Ragdoll", "Creates a PhysX ragdoll simulation for an animation actor.") ->ClassElement(AZ::Edit::ClassElements::EditorData, "") ->Attribute(AZ::Edit::Attributes::Category, "PhysX") ->Attribute(AZ::Edit::Attributes::Icon, "Icons/Components/PhysXRagdoll.svg") @@ -90,34 +90,49 @@ namespace PhysX ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("Game", 0x232b318c)) ->Attribute(AZ::Edit::Attributes::HelpPageURL, "https://o3de.org/docs/user-guide/components/reference/physx/ragdoll/") ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_positionIterations, "Position Iteration Count", + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_positionIterations, "Position Iteration Count", "The frequency at which ragdoll collider positions are resolved. Higher values can increase fidelity but decrease " "performance. Very high values might introduce instability.") ->Attribute(AZ::Edit::Attributes::Min, 1) ->Attribute(AZ::Edit::Attributes::Max, 255) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_velocityIterations, "Velocity Iteration Count", + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_velocityIterations, "Velocity Iteration Count", "The frequency at which ragdoll collider velocities are resolved. Higher values can increase fidelity but decrease " "performance. Very high values might introduce instability.") ->Attribute(AZ::Edit::Attributes::Min, 1) ->Attribute(AZ::Edit::Attributes::Max, 255) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_enableJointProjection, - "Enable Joint Projection", "When active, preserves joint constraints in volatile simulations. " + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_enableJointProjection, "Enable Joint Projection", + "When active, preserves joint constraints in volatile simulations. " "Might not be physically correct in all simulations.") ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionLinearTolerance, + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionLinearTolerance, "Joint Projection Linear Tolerance", "Maximum linear joint error. Projection is applied to linear joint errors above this value.") ->Attribute(AZ::Edit::Attributes::Min, 0.0f) ->Attribute(AZ::Edit::Attributes::Step, 1e-3f) ->Attribute(AZ::Edit::Attributes::Visibility, &RagdollComponent::IsJointProjectionVisible) - ->DataElement(AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionAngularToleranceDegrees, + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_jointProjectionAngularToleranceDegrees, "Joint Projection Angular Tolerance", "Maximum angular joint error. Projection is applied to angular joint errors above this value.") ->Attribute(AZ::Edit::Attributes::Min, 0.0f) ->Attribute(AZ::Edit::Attributes::Step, 0.1f) ->Attribute(AZ::Edit::Attributes::Suffix, " degrees") ->Attribute(AZ::Edit::Attributes::Visibility, &RagdollComponent::IsJointProjectionVisible) - ; + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_enableMassRatioClamping, "Enable Mass Ratio Clamping", + "When active, ragdoll node mass values may be overridden to avoid unstable mass ratios.") + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::EntireTree) + ->DataElement( + AZ::Edit::UIHandlers::Default, &RagdollComponent::m_maxMassRatio, "Maximum Mass Ratio", + "The mass of the child body of a joint may be clamped to avoid its ratio with the parent " + "body mass exceeding this threshold.") + ->Attribute(AZ::Edit::Attributes::Min, 1.0f) + ->Attribute(AZ::Edit::Attributes::Step, 0.1f) + ->Attribute(AZ::Edit::Attributes::Visibility, &RagdollComponent::IsMaxMassRatioVisible); } } @@ -126,11 +141,16 @@ namespace PhysX } } - bool RagdollComponent::IsJointProjectionVisible() + bool RagdollComponent::IsJointProjectionVisible() const { return m_enableJointProjection; } + bool RagdollComponent::IsMaxMassRatioVisible() const + { + return m_enableMassRatioClamping; + } + // AZ::Component void RagdollComponent::Init() { @@ -272,7 +292,6 @@ namespace PhysX return ragdoll->IsSimulated(); } return false; - } AZ::Aabb RagdollComponent::GetAabb() const @@ -318,20 +337,19 @@ namespace PhysX if (numNodes == 0) { - AZ_Error("PhysX Ragdoll Component", false, - "Ragdoll configuration has 0 nodes, ragdoll will not be created for entity \"%s\".", + AZ_Error( + "PhysX Ragdoll Component", false, "Ragdoll configuration has 0 nodes, ragdoll will not be created for entity \"%s\".", GetEntity()->GetName().c_str()); return; } - ragdollConfiguration.m_parentIndices.resize(numNodes); for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) { AZStd::string parentName; AZStd::string nodeName = ragdollConfiguration.m_nodes[nodeIndex].m_debugName; - AzFramework::CharacterPhysicsDataRequestBus::EventResult(parentName, GetEntityId(), - &AzFramework::CharacterPhysicsDataRequests::GetParentNodeName, nodeName); + AzFramework::CharacterPhysicsDataRequestBus::EventResult( + parentName, GetEntityId(), &AzFramework::CharacterPhysicsDataRequests::GetParentNodeName, nodeName); AZ::Outcome parentIndex = Utils::Characters::GetNodeIndex(ragdollConfiguration, parentName); ragdollConfiguration.m_parentIndices[nodeIndex] = parentIndex ? parentIndex.GetValue() : SIZE_MAX; @@ -339,8 +357,8 @@ namespace PhysX } Physics::RagdollState bindPose; - AzFramework::CharacterPhysicsDataRequestBus::EventResult(bindPose, GetEntityId(), - &AzFramework::CharacterPhysicsDataRequests::GetBindPose, ragdollConfiguration); + AzFramework::CharacterPhysicsDataRequestBus::EventResult( + bindPose, GetEntityId(), &AzFramework::CharacterPhysicsDataRequests::GetBindPose, ragdollConfiguration); AZ::Transform entityTransform = AZ::Transform::CreateIdentity(); AZ::TransformBus::EventResult(entityTransform, GetEntityId(), &AZ::TransformBus::Events::GetWorldTM); @@ -354,13 +372,12 @@ namespace PhysX m_ragdollHandle = sceneInterface->AddSimulatedBody(m_attachedSceneHandle, &ragdollConfiguration); } auto* ragdoll = GetPhysXRagdoll(); - if (ragdoll == nullptr || - m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle) + if (ragdoll == nullptr || m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle) { AZ_Error("PhysX Ragdoll Component", false, "Failed to create ragdoll."); return; } - + for (size_t nodeIndex = 0; nodeIndex < numNodes; nodeIndex++) { if (physx::PxRigidDynamic* pxRigidBody = ragdoll->GetPxRigidDynamic(nodeIndex)) @@ -389,17 +406,63 @@ namespace PhysX } } + // If mass ratio clamping is enabled, iterate out from the root and clamp mass values + if (m_enableMassRatioClamping) + { + const float maxMassRatio = AZStd::GetMax(1.0f + AZ::Constants::FloatEpsilon, m_maxMassRatio); + + // figure out the depth of each node in the tree, so that nodes can be visited from the root outwards + AZStd::vector nodeDepths = + Utils::Characters::ComputeHierarchyDepths(ragdollConfiguration.m_parentIndices); + + AZStd::sort( + nodeDepths.begin(), nodeDepths.end(), + [](const Utils::Characters::DepthData& d1, const Utils::Characters::DepthData& d2) + { + return d1.m_depth < d2.m_depth; + }); + + bool massesClamped = false; + for (const auto& nodeDepth : nodeDepths) + { + const size_t nodeIndex = nodeDepth.m_index; + const size_t parentIndex = ragdollConfiguration.m_parentIndices[nodeIndex]; + if (parentIndex < numNodes) + { + AzPhysics::RigidBody& nodeRigidBody = ragdoll->GetNode(nodeIndex)->GetRigidBody(); + const float originalMass = nodeRigidBody.GetMass(); + const float parentMass = ragdoll->GetNode(parentIndex)->GetRigidBody().GetMass(); + const float minMass = parentMass / maxMassRatio; + const float maxMass = parentMass; + if (originalMass < minMass || originalMass > maxMass) + { + const float clampedMass = AZStd::clamp(originalMass, minMass, maxMass); + nodeRigidBody.SetMass(clampedMass); + massesClamped = true; + if (!AZ::IsClose(originalMass, 0.0f)) + { + // scale the inertia proportionally to how the mass was modified + auto pxRigidBody = static_cast(nodeRigidBody.GetNativePointer()); + pxRigidBody->setMassSpaceInertiaTensor(clampedMass / originalMass * pxRigidBody->getMassSpaceInertiaTensor()); + } + } + } + } + + AZ_WarningOnce("PhysX Ragdoll", !massesClamped, + "Mass values for ragdoll on entity \"%s\" were modified based on max mass ratio setting to avoid instability.", + GetEntity()->GetName().c_str()); + } + AzFramework::RagdollPhysicsRequestBus::Handler::BusConnect(GetEntityId()); AzPhysics::SimulatedBodyComponentRequestsBus::Handler::BusConnect(GetEntityId()); - AzFramework::RagdollPhysicsNotificationBus::Event(GetEntityId(), - &AzFramework::RagdollPhysicsNotifications::OnRagdollActivated); + AzFramework::RagdollPhysicsNotificationBus::Event(GetEntityId(), &AzFramework::RagdollPhysicsNotifications::OnRagdollActivated); } void RagdollComponent::DestroyRagdoll() { - if (m_ragdollHandle != AzPhysics::InvalidSimulatedBodyHandle && - m_attachedSceneHandle != AzPhysics::InvalidSceneHandle) + if (m_ragdollHandle != AzPhysics::InvalidSimulatedBodyHandle && m_attachedSceneHandle != AzPhysics::InvalidSceneHandle) { AzFramework::RagdollPhysicsRequestBus::Handler::BusDisconnect(); AzFramework::RagdollPhysicsNotificationBus::Event( @@ -421,8 +484,7 @@ namespace PhysX const Ragdoll* RagdollComponent::GetPhysXRagdollConst() const { - if (m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle || - m_attachedSceneHandle == AzPhysics::InvalidSceneHandle) + if (m_ragdollHandle == AzPhysics::InvalidSimulatedBodyHandle || m_attachedSceneHandle == AzPhysics::InvalidSceneHandle) { return nullptr; } diff --git a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h index 63dd1354dd..3ef59bf623 100644 --- a/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h +++ b/Gems/PhysX/Code/Source/PhysXCharacters/Components/RagdollComponent.h @@ -103,7 +103,8 @@ namespace PhysX Ragdoll* GetPhysXRagdoll(); const Ragdoll* GetPhysXRagdollConst() const; - bool IsJointProjectionVisible(); + bool IsJointProjectionVisible() const; + bool IsMaxMassRatioVisible() const; AzPhysics::SimulatedBodyHandle m_ragdollHandle = AzPhysics::InvalidSimulatedBodyHandle; AzPhysics::SceneHandle m_attachedSceneHandle = AzPhysics::InvalidSceneHandle; @@ -119,5 +120,9 @@ namespace PhysX float m_jointProjectionLinearTolerance = 1e-3f; /// Angular joint error (in degrees) above which projection will be applied. float m_jointProjectionAngularToleranceDegrees = 1.0f; + /// Allows ragdoll node mass values to be overridden to avoid unstable mass ratios. + bool m_enableMassRatioClamping = false; + /// If mass ratio clamping is enabled, masses will be clamped to within this ratio. + float m_maxMassRatio = 2.0f; }; } // namespace PhysX diff --git a/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake b/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake index e6a2b35d36..1d078bb505 100644 --- a/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake +++ b/Gems/PhysX/Code/Source/Platform/Android/PAL_android.cmake @@ -7,5 +7,3 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) - diff --git a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake index 0d9c4f1e3a..43c92ab916 100644 --- a/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/PhysX/Code/Source/Platform/Linux/PAL_linux.cmake @@ -7,7 +7,6 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-linux TARGETS poly2tri PACKAGE_HASH b16eef8f0bc469de0e3056d28d7484cf42659667e39b68b239f0d3a4cbb533d0) diff --git a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake index 141a80ae59..992280bceb 100644 --- a/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake +++ b/Gems/PhysX/Code/Source/Platform/Mac/PAL_mac.cmake @@ -7,7 +7,6 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-mac TARGETS poly2tri PACKAGE_HASH 23e49e6b06d79327985d17b40bff20ab202519c283a842378f5f1791c1bf8dbc) diff --git a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake index 7abd7ab9e9..336bb89c40 100644 --- a/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake +++ b/Gems/PhysX/Code/Source/Platform/Windows/PAL_windows.cmake @@ -7,7 +7,6 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE TRUE) if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_associate_package(PACKAGE_NAME poly2tri-7f0487a-rev1-windows TARGETS poly2tri PACKAGE_HASH 5fea2bf294e5130e0654fbfa39f192e6369f3853901dde90bb9b3f3a11edcb1e) diff --git a/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake b/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake index 6316fa60c6..1d078bb505 100644 --- a/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake +++ b/Gems/PhysX/Code/Source/Platform/iOS/PAL_ios.cmake @@ -7,4 +7,3 @@ # set(PAL_TRAIT_PHYSX_SUPPORTED TRUE) -set(PAL_TRAIT_JOINTS_TYPED_TEST_CASE FALSE) diff --git a/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp b/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp index 1f393386f8..2b5db1be67 100644 --- a/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp +++ b/Gems/PhysX/Code/Tests/PhysXColliderComponentModeTests.cpp @@ -66,7 +66,7 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the mouse wheel is scrolled while holding ctrl AzToolsFramework::ViewportInteraction::MouseInteractionEvent @@ -84,7 +84,7 @@ namespace UnitTest // Then the component mode is cycled. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); EXPECT_EQ(handled, MouseInteractionResult::Viewport); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); } TEST_F(PhysXColliderComponentModeTest, MouseWheelDownShouldSetPreviousMode) @@ -95,7 +95,7 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the mouse wheel is scrolled while holding ctrl AzToolsFramework::ViewportInteraction::MouseInteractionEvent @@ -116,7 +116,7 @@ namespace UnitTest EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Rotation, subMode); } - TEST_F(PhysXColliderComponentModeTest, PressingKey1ShouldSetSizeMode) + TEST_F(PhysXColliderComponentModeTest, PressingKey1ShouldSetOffsetMode) { // Given there is a collider component in component mode. CreateColliderComponent(); @@ -124,17 +124,17 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the '1' key is pressed QTest::keyPress(&m_editorActions.m_componentModeWidget, Qt::Key_1); - // Then the component mode is set to Size. + // Then the component mode is set to Offset. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); } - TEST_F(PhysXColliderComponentModeTest, PressingKey2ShouldSetSizeMode) + TEST_F(PhysXColliderComponentModeTest, PressingKey2ShouldSetRotationMode) { // Given there is a collider component in component mode. auto colliderEntity = CreateColliderComponent(); @@ -143,14 +143,14 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the '2' key is pressed QTest::keyPress(&m_editorActions.m_componentModeWidget, Qt::Key_2); - // Then the component mode is set to Offset. + // Then the component mode is set to Rotation. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Rotation, subMode); } TEST_F(PhysXColliderComponentModeTest, PressingKey3ShouldSetSizeMode) @@ -162,14 +162,14 @@ namespace UnitTest PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // When the '3' key is pressed QTest::keyPress(&m_editorActions.m_componentModeWidget, Qt::Key_3); - // Then the component mode is set to Rotation. + // Then the component mode is set to Size. PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Rotation, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); } TEST_F(PhysXColliderComponentModeTest, PressingKeyRShouldResetSphereRadius) @@ -292,7 +292,7 @@ namespace UnitTest // Check preconditions PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // Get the cluster and button Ids AzToolsFramework::ViewportUi::ClusterId modeSelectionClusterId; @@ -327,7 +327,7 @@ namespace UnitTest // Check preconditions PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // Get the cluster and button Ids AzToolsFramework::ViewportUi::ClusterId modeSelectionClusterId; @@ -362,7 +362,7 @@ namespace UnitTest // Check preconditions PhysX::ColliderComponentModeRequests::SubMode subMode = PhysX::ColliderComponentModeRequests::SubMode::NumModes; PhysX::ColliderComponentModeRequestBus::BroadcastResult(subMode, &PhysX::ColliderComponentModeRequests::GetCurrentMode); - EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Dimensions, subMode); + EXPECT_EQ(PhysX::ColliderComponentModeRequests::SubMode::Offset, subMode); // Get the cluster and button Ids AzToolsFramework::ViewportUi::ClusterId modeSelectionClusterId; diff --git a/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp b/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp index 3a7eac0884..8a624e0223 100644 --- a/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp +++ b/Gems/PhysX/Code/Tests/PhysXJointsTest.cpp @@ -267,8 +267,6 @@ namespace PhysX EXPECT_GT(followerEndPosition.GetZ(), followerPosition.GetZ()); } -// for some reason TYPED_TEST_CASE with the fixture is not working on Android + Linux -#ifdef ENABLE_JOINTS_TYPED_TEST_CASE template class PhysXJointsApiTest : public PhysX::GenericPhysicsInterfaceTest { @@ -347,5 +345,4 @@ namespace PhysX EXPECT_GT(childCurrentPos.GetX(), this->m_childInitialPos.GetX()); } -#endif // ENABLE_JOINTS_TYPED_TEST_CASE } diff --git a/Gems/PhysX/Code/Tests/RagdollTests.cpp b/Gems/PhysX/Code/Tests/RagdollTests.cpp index 30e9400790..ff4637fd6e 100644 --- a/Gems/PhysX/Code/Tests/RagdollTests.cpp +++ b/Gems/PhysX/Code/Tests/RagdollTests.cpp @@ -367,4 +367,19 @@ namespace PhysX float minZ = ragdoll->GetAabb().GetMin().GetZ(); EXPECT_NEAR(minZ, 0.0f, 0.05f); } + + TEST(ComputeHierarchyDepthsTest, DepthValuesCorrect) + { + AZStd::vector parentIndices = + { 3, 5, AZStd::numeric_limits::max(), 1, 2, 9, 7, 4, 0, 6, 11, 12, 5, 14, 15, 16, 5, 18, 19, 4, 21, 22, 4 }; + + const AZStd::vector nodeDepths = Utils::Characters::ComputeHierarchyDepths(parentIndices); + + std::vector expectedDepths = { 8, 6, 0, 7, 1, 5, 3, 2, 9, 4, 8, 7, 6, 9, 8, 7, 6, 4, 3, 2, 4, 3, 2 }; + + for (size_t i = 0; i < parentIndices.size(); i++) + { + EXPECT_EQ(nodeDepths[i].m_depth, expectedDepths[i]); + } + } } // namespace PhysX diff --git a/Gems/QtForPython/Code/CMakeLists.txt b/Gems/QtForPython/Code/CMakeLists.txt index 48ce5c02d3..da763978a6 100644 --- a/Gems/QtForPython/Code/CMakeLists.txt +++ b/Gems/QtForPython/Code/CMakeLists.txt @@ -21,7 +21,8 @@ ly_add_target( NAME QtForPython.Editor.Static STATIC NAMESPACE Gem FILES_CMAKE - qtforpython_editor_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake + qtforpython_editor_files.cmake + ${CMAKE_CURRENT_SOURCE_DIR}/Source/Platform/${PAL_PLATFORM_NAME}/qtforpython_editor_${PAL_PLATFORM_NAME_LOWERCASE}_files.cmake PLATFORM_INCLUDE_FILES ${common_source_dir}/${PAL_TRAIT_COMPILER_ID}/qtforpython_${PAL_TRAIT_COMPILER_ID_LOWERCASE}.cmake INCLUDE_DIRECTORIES @@ -45,6 +46,9 @@ ly_add_target( NAMESPACE Gem FILES_CMAKE qtforpython_shared_files.cmake + INCLUDE_DIRECTORIES + PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/Source/Platform/${PAL_PLATFORM_NAME} BUILD_DEPENDENCIES PRIVATE Gem::QtForPython.Editor.Static diff --git a/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h b/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h new file mode 100644 index 0000000000..094a4f8548 --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Linux/InitializeEmbeddedPyside2.h @@ -0,0 +1,60 @@ +/* + * 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 + +#include +#include + +namespace QtForPython +{ + const char* s_libPythonLibraryFile = "libpython3.7m.so.1.0"; + const char* s_libPyside2LibraryFile = "libpyside2.abi3.so.5.14"; + const char* s_libShibokenLibraryFile = "libshiboken2.abi3.so.5.14"; + + class InitializeEmbeddedPyside2 + { + public: + InitializeEmbeddedPyside2() + { + m_libPythonLibraryFile = InitializeEmbeddedPyside2::LoadModule(s_libPythonLibraryFile); + m_libPyside2LibraryFile = InitializeEmbeddedPyside2::LoadModule(s_libPyside2LibraryFile); + m_libShibokenLibraryFile = InitializeEmbeddedPyside2::LoadModule(s_libShibokenLibraryFile); + } + virtual ~InitializeEmbeddedPyside2() + { + InitializeEmbeddedPyside2::UnloadModule(m_libShibokenLibraryFile); + InitializeEmbeddedPyside2::UnloadModule(m_libPyside2LibraryFile); + InitializeEmbeddedPyside2::UnloadModule(m_libPythonLibraryFile); + } + + private: + static void* LoadModule(const char* moduleToLoad) + { + void* moduleHandle = dlopen(moduleToLoad, RTLD_NOW | RTLD_GLOBAL); + if (!moduleHandle) + { + [[maybe_unused]] const char* loadError = dlerror(); + AZ_Error("QtForPython", false, "Unable to load python library %s for Pyside2: %s", moduleToLoad, + loadError ? loadError : "Unknown Error"); + } + return moduleHandle; + } + + static void UnloadModule(void* moduleHandle) + { + if (moduleHandle) + { + dlclose(moduleHandle); + } + } + + void* m_libPythonLibraryFile; + void* m_libPyside2LibraryFile; + void* m_libShibokenLibraryFile; + }; +} // namespace QtForPython diff --git a/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake b/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake index 236043e893..789d2afae2 100644 --- a/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake +++ b/Gems/QtForPython/Code/Source/Platform/Linux/PAL_linux.cmake @@ -6,4 +6,4 @@ # # -set(PAL_TRAIT_BUILD_QTFORPYTHON_SUPPORTED FALSE) +set(PAL_TRAIT_BUILD_QTFORPYTHON_SUPPORTED TRUE) diff --git a/Gems/QtForPython/Code/Source/Platform/Linux/qtforpython_editor_linux_files.cmake b/Gems/QtForPython/Code/Source/Platform/Linux/qtforpython_editor_linux_files.cmake new file mode 100644 index 0000000000..54c588a247 --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Linux/qtforpython_editor_linux_files.cmake @@ -0,0 +1,11 @@ +# +# 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 +# +# + +set(FILES + InitializeEmbeddedPyside2.h +) diff --git a/Gems/QtForPython/Code/Source/Platform/Mac/InitializeEmbeddedPyside2.h b/Gems/QtForPython/Code/Source/Platform/Mac/InitializeEmbeddedPyside2.h new file mode 100644 index 0000000000..819764620b --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Mac/InitializeEmbeddedPyside2.h @@ -0,0 +1,18 @@ +/* + * 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 + +namespace QtForPython +{ + class InitializeEmbeddedPyside2 + { + public: + InitializeEmbeddedPyside2() = default; + virtual ~InitializeEmbeddedPyside2() = default; + }; +} // namespace QtForPython diff --git a/Gems/QtForPython/Code/Source/Platform/Mac/qtforpython_editor_macos_files.cmake b/Gems/QtForPython/Code/Source/Platform/Mac/qtforpython_editor_macos_files.cmake new file mode 100644 index 0000000000..54c588a247 --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Mac/qtforpython_editor_macos_files.cmake @@ -0,0 +1,11 @@ +# +# 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 +# +# + +set(FILES + InitializeEmbeddedPyside2.h +) diff --git a/Gems/QtForPython/Code/Source/Platform/Windows/InitializeEmbeddedPyside2.h b/Gems/QtForPython/Code/Source/Platform/Windows/InitializeEmbeddedPyside2.h new file mode 100644 index 0000000000..819764620b --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Windows/InitializeEmbeddedPyside2.h @@ -0,0 +1,18 @@ +/* + * 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 + +namespace QtForPython +{ + class InitializeEmbeddedPyside2 + { + public: + InitializeEmbeddedPyside2() = default; + virtual ~InitializeEmbeddedPyside2() = default; + }; +} // namespace QtForPython diff --git a/Gems/QtForPython/Code/Source/Platform/Windows/qtforpython_editor_windows_files.cmake b/Gems/QtForPython/Code/Source/Platform/Windows/qtforpython_editor_windows_files.cmake new file mode 100644 index 0000000000..54c588a247 --- /dev/null +++ b/Gems/QtForPython/Code/Source/Platform/Windows/qtforpython_editor_windows_files.cmake @@ -0,0 +1,11 @@ +# +# 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 +# +# + +set(FILES + InitializeEmbeddedPyside2.h +) diff --git a/Gems/QtForPython/Code/Source/QtForPythonModule.cpp b/Gems/QtForPython/Code/Source/QtForPythonModule.cpp index 1ed79310b4..ad39d0b82c 100644 --- a/Gems/QtForPython/Code/Source/QtForPythonModule.cpp +++ b/Gems/QtForPython/Code/Source/QtForPythonModule.cpp @@ -8,13 +8,17 @@ #include #include +#include #include +#include "InitializeEmbeddedPyside2.h" + namespace QtForPython { class QtForPythonModule : public AZ::Module + , private InitializeEmbeddedPyside2 { public: AZ_RTTI(QtForPythonModule, "{81545CD5-79FA-47CE-96F2-1A9C5D59B4B9}", AZ::Module); @@ -22,11 +26,13 @@ namespace QtForPython QtForPythonModule() : AZ::Module() + , InitializeEmbeddedPyside2() { m_descriptors.insert(m_descriptors.end(), { QtForPythonSystemComponent::CreateDescriptor(), }); } + ~QtForPythonModule() override = default; /** * Add required SystemComponents to the SystemEntity. diff --git a/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp b/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp index 83a158dd18..240beff78e 100644 --- a/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp +++ b/Gems/QtForPython/Code/Source/QtForPythonSystemComponent.cpp @@ -203,10 +203,6 @@ namespace QtForPython { QtBootstrapParameters params; -#if !defined(Q_OS_WIN) -#error Unsupported OS platform for this QtForPython gem -#endif - params.m_mainWindowId = 0; using namespace AzToolsFramework; QWidget* activeWindow = nullptr; diff --git a/Gems/QtForPython/Code/qtforpython_editor_macos_files.cmake b/Gems/QtForPython/Code/Source/qtforpython_editor_files.cmake similarity index 100% rename from Gems/QtForPython/Code/qtforpython_editor_macos_files.cmake rename to Gems/QtForPython/Code/Source/qtforpython_editor_files.cmake diff --git a/Gems/QtForPython/Code/qtforpython_editor_windows_files.cmake b/Gems/QtForPython/Code/qtforpython_editor_files.cmake similarity index 100% rename from Gems/QtForPython/Code/qtforpython_editor_windows_files.cmake rename to Gems/QtForPython/Code/qtforpython_editor_files.cmake diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_AttributesSubmissionList.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_AttributesSubmissionList.names new file mode 100644 index 0000000000..e0c9852e54 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_AttributesSubmissionList.names @@ -0,0 +1,57 @@ +{ + "entries": [ + { + "key": "AWSMetrics_AttributesSubmissionList", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Attributes Submission List", + "category": "AWS Metrics" + }, + "methods": [ + { + "key": "Getattributes", + "details": { + "name": "Get Attributes" + }, + "params": [ + { + "typeid": "{B1106C14-D22B-482F-B33E-B6E154A53798}", + "details": { + "name": "Attribute Submission List" + } + } + ], + "results": [ + { + "typeid": "{1C1ABE6D-94D2-5CFD-A502-8813300FEC8D}", + "details": { + "name": "Metrics Attribute" + } + } + ] + }, + { + "key": "Setattributes", + "details": { + "name": "Set Attributes" + }, + "params": [ + { + "typeid": "{B1106C14-D22B-482F-B33E-B6E154A53798}", + "details": { + "name": "Attribute Submission List" + } + }, + { + "typeid": "{1C1ABE6D-94D2-5CFD-A502-8813300FEC8D}", + "details": { + "name": "Metrics Attribute" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_MetricsAttribute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_MetricsAttribute.names new file mode 100644 index 0000000000..57a94769b0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSMetrics_MetricsAttribute.names @@ -0,0 +1,131 @@ +{ + "entries": [ + { + "key": "AWSMetrics_MetricsAttribute", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Metrics Attribute", + "category": "AWS Metrics" + }, + "methods": [ + { + "key": "SetName", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetName" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetName is invoked" + }, + "details": { + "name": "Set Name" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "key": "SetStrValue", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetStrValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetStrValue is invoked" + }, + "details": { + "name": "Set String Value" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name" + } + } + ] + }, + { + "key": "SetIntValue", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetIntValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetIntValue is invoked" + }, + "details": { + "name": "Set Int Value" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ] + }, + { + "key": "SetDoubleValue", + "context": "AWSMetrics_MetricsAttribute", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SetDoubleValue" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetDoubleValue is invoked" + }, + "details": { + "name": "Set Double Value" + }, + "params": [ + { + "typeid": "{6483F481-0C18-4171-8B59-A44F2F28EAE5}", + "details": { + "name": "Metrics Attribute" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Value" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorDynamoDB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorDynamoDB.names new file mode 100644 index 0000000000..3d9e963484 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorDynamoDB.names @@ -0,0 +1,81 @@ +{ + "entries": [ + { + "key": "AWSScriptBehaviorDynamoDB", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS Dynamo DB", + "category": "AWS Core" + }, + "methods": [ + { + "key": "GetItem", + "context": "AWSScriptBehaviorDynamoDB", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetItem" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetItem is invoked" + }, + "details": { + "name": "Get Item", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Table Resource Key" + } + }, + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Key Map" + } + } + ] + }, + { + "key": "GetItemRaw", + "context": "AWSScriptBehaviorDynamoDB", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetItemRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetItemRaw is invoked" + }, + "details": { + "name": "Get Item Raw", + "category": "Other" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Table" + } + }, + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Key Map" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorLambda.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorLambda.names new file mode 100644 index 0000000000..9ee4a606b9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorLambda.names @@ -0,0 +1,79 @@ +{ + "entries": [ + { + "key": "AWSScriptBehaviorLambda", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS Lambda", + "category": "AWS Core" + }, + "methods": [ + { + "key": "Invoke", + "context": "AWSScriptBehaviorLambda", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Invoke" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Invoke is invoked" + }, + "details": { + "name": "Invoke" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Function Resource Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Payload" + } + } + ] + }, + { + "key": "InvokeRaw", + "context": "AWSScriptBehaviorLambda", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke InvokeRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after InvokeRaw is invoked" + }, + "details": { + "name": "Invoke Raw" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Function Name" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Payload" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorS3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorS3.names new file mode 100644 index 0000000000..7630385d28 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AWSScriptBehaviorS3.names @@ -0,0 +1,155 @@ +{ + "entries": [ + { + "key": "AWSScriptBehaviorS3", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS S3", + "category": "AWS Core" + }, + "methods": [ + { + "key": "GetObject", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetObject" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetObject is invoked" + }, + "details": { + "name": "Get Object" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket Resource Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Object Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "File" + } + } + ] + }, + { + "key": "GetObjectRaw", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetObjectRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetObjectRaw is invoked" + }, + "details": { + "name": "Get Object Raw" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Object Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "File" + } + } + ] + }, + { + "key": "HeadObject", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HeadObject" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HeadObject is invoked" + }, + "details": { + "name": "Head Object" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket Resource Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "OBject Key" + } + } + ] + }, + { + "key": "HeadObjectRaw", + "context": "AWSScriptBehaviorS3", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HeadObjectRaw" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HeadObjectRaw is invoked" + }, + "details": { + "name": "Head Object Raw" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Bucket" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Object Key" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__Containers__SceneGraph.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__Containers__SceneGraph.names new file mode 100644 index 0000000000..887aedbd5e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__Containers__SceneGraph.names @@ -0,0 +1,581 @@ +{ + "entries": [ + { + "key": "AZ::SceneAPI::Containers::SceneGraph", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Scene Graph", + "category": "Scene Graph" + }, + "methods": [ + { + "key": "GetNodeChild", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Child is invoked" + }, + "details": { + "name": "Get Node Child" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "key": "FindWithPath", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find With Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find With Path is invoked" + }, + "details": { + "name": "Find With Path" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Path" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "key": "HasNodeChild", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Child" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Child is invoked" + }, + "details": { + "name": "Has Node Child" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Child" + } + } + ] + }, + { + "key": "HasNodeParent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Parent is invoked" + }, + "details": { + "name": "Has Node Parent" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Parent" + } + } + ] + }, + { + "key": "GetNodeSibling", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Sibling" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Sibling is invoked" + }, + "details": { + "name": "Get Node Sibling" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "key": "HasNodeSibling", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Sibling" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Sibling is invoked" + }, + "details": { + "name": "Has Node Sibling" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Sibling" + } + } + ] + }, + { + "key": "IsNodeEndPoint", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Node End Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Node End Point is invoked" + }, + "details": { + "name": "Is Node End Point" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Node End Point" + } + } + ] + }, + { + "key": "GetNodeCount", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Count" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Count is invoked" + }, + "details": { + "name": "Get Node Count" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + } + ], + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "Node Count" + } + } + ] + }, + { + "key": "HasNodeContent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Has Node Content" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Has Node Content is invoked" + }, + "details": { + "name": "Has Node Content" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Node Content" + } + } + ] + }, + { + "key": "GetNodeContent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Content" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Content is invoked" + }, + "details": { + "name": "Get Node Content" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{3EF0DDEC-C734-4804-BE99-82058FEBDA71}", + "details": { + "name": "Graph Object Proxy" + } + } + ] + }, + { + "key": "GetNodeName", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Name is invoked" + }, + "details": { + "name": "Get Node Name" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", + "details": { + "name": "Node Name" + } + } + ] + }, + { + "key": "GetRoot", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Root" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Root is invoked" + }, + "details": { + "name": "Get Root" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "key": "GetNodeSeperationCharacter", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Separation Character" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Separation Character is invoked" + }, + "details": { + "name": "Get Node Separation Character" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Separation Character" + } + } + ] + }, + { + "key": "GetNodeParent", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Node Parent" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Node Parent is invoked" + }, + "details": { + "name": "Get Node Parent" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "key": "FindWithRootAndPath", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Find With Root And Path" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Find With Root And Path is invoked" + }, + "details": { + "name": "Find With Root And Path" + }, + "params": [ + { + "typeid": "{CAC6556D-D5FE-4D0E-BCCD-8940357C1D35}", + "details": { + "name": "Scene Graph" + } + }, + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Path" + } + } + ], + "results": [ + { + "typeid": "{4AD18037-E629-480D-8165-997A137327FD}", + "details": { + "name": "Node Index" + } + } + ] + }, + { + "key": "IsValidName", + "context": "AZ::SceneAPI::Containers::SceneGraph", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Valid Name" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Valid Name is invoked" + }, + "details": { + "name": "Is Valid Name" + }, + "params": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "Name" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Valid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__DataTypes__IMeshData__Face.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__DataTypes__IMeshData__Face.names new file mode 100644 index 0000000000..d40917fb34 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AZ__SceneAPI__DataTypes__IMeshData__Face.names @@ -0,0 +1,52 @@ +{ + "entries": [ + { + "key": "AZ::SceneAPI::DataTypes::IMeshData::Face", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Mesh Data Face", + "category": "Scene Graph" + }, + "methods": [ + { + "key": "GetVertexIndex", + "context": "AZ::SceneAPI::DataTypes::IMeshData::Face", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Vertex Index" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Vertex Index is invoked" + }, + "details": { + "name": "Get Vertex Index" + }, + "params": [ + { + "typeid": "{F9F49C1A-014F-46F5-A46F-B56D8CB46C2B}", + "details": { + "name": "Mesh Data Face" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Face Index" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Index" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AcesParameterOverrides.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AcesParameterOverrides.names index 50a563d9c4..d3a32c2709 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AcesParameterOverrides.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AcesParameterOverrides.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "AcesParameterOverrides" + "name": "Aces Parameter Overrides", + "category": "Rendering" }, "methods": [ { @@ -13,21 +14,300 @@ "context": "AcesParameterOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke LoadPreset" + "tooltip": "When signaled, this will invoke Load Preset" }, "exit": { "name": "Out", - "tooltip": "Signaled after LoadPreset is invoked" + "tooltip": "Signaled after Load Preset is invoked" }, "details": { - "name": "AcesParameterOverrides::LoadPreset", - "category": "Other" + "name": "Load Preset" }, "params": [ { "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", "details": { - "name": "AcesParameterOverrides*" + "name": "Aces Parameter Overrides" + } + } + ] + }, + { + "key": "GetOutputDeviceTransformType_4000Nits", + "details": { + "name": "Get Output Device Transform Type_ 4000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "key": "GetOutputDeviceTransformType_2000Nits", + "details": { + "name": "Get Output Device Transform Type_ 2000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "key": "GetapplyCATD60toD65", + "details": { + "name": "GetapplyCATD 60toD 65" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "SetapplyCATD60toD65", + "details": { + "name": "SetapplyCATD 60toD 65" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "GetOutputDeviceTransformType_48Nits", + "details": { + "name": "Get Output Device Transform Type_ 48 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "key": "GetOutputDeviceTransformType_NumOutputDeviceTransformTypes", + "details": { + "name": "Get Output Device Transform Type_ Num Output Device Transform Types" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "key": "GetOutputDeviceTransformType_1000Nits", + "details": { + "name": "Get Output Device Transform Type_ 1000 Nits" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + }, + { + "key": "GetapplyDesaturation", + "details": { + "name": "Getapply Desaturation" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "SetapplyDesaturation", + "details": { + "name": "Setapply Desaturation" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Getpreset", + "details": { + "name": "Getpreset" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{B94085B7-C0D4-466A-A791-188A4559EC8D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Setpreset", + "details": { + "name": "Setpreset" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + }, + { + "typeid": "{B94085B7-C0D4-466A-A791-188A4559EC8D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "GetalterSurround", + "details": { + "name": "Getalter Surround" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "SetalterSurround", + "details": { + "name": "Setalter Surround" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "GetoverrideDefaults", + "details": { + "name": "Getoverride Defaults" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "SetoverrideDefaults", + "details": { + "name": "Setoverride Defaults" + }, + "params": [ + { + "typeid": "{3EE8C0D4-3792-46C0-B91C-B89A81C36B91}", + "details": { + "name": "" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AtomToolsDocumentSystemSettings.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AtomToolsDocumentSystemSettings.names index 966764e44a..8cb330e91d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AtomToolsDocumentSystemSettings.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AtomToolsDocumentSystemSettings.names @@ -5,8 +5,53 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "AtomToolsDocumentSystemSettings" - } + "name": "Document System Settings", + "category": "Atom Tools" + }, + "methods": [ + { + "key": "GetshowReloadDocumentPrompt", + "details": { + "name": "Get Show Reload Document Prompt" + }, + "params": [ + { + "typeid": "{9E576D4F-A74A-4326-9135-C07284D0A3B9}", + "details": { + "name": "Document System Settings" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "key": "SetshowReloadDocumentPrompt", + "details": { + "name": "Set Show Reload Document Prompt" + }, + "params": [ + { + "typeid": "{9E576D4F-A74A-4326-9135-C07284D0A3B9}", + "details": { + "name": "Document System Settings" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AuthenticationTokens.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AuthenticationTokens.names new file mode 100644 index 0000000000..fde350b776 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AuthenticationTokens.names @@ -0,0 +1,145 @@ +{ + "entries": [ + { + "key": "AuthenticationTokens", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Authentication Tokens", + "category": "AWS Client Auth" + }, + "methods": [ + { + "key": "GetAccessToken", + "details": { + "name": "Get Access Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Access Token" + } + } + ] + }, + { + "key": "SetAccessToken", + "details": { + "name": "Set Access Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Access Token" + } + } + ] + }, + { + "key": "GetOpenIdToken", + "context": "getter", + "details": { + "name": "Get OpenId Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "OpenId Token" + } + } + ] + }, + { + "key": "SetOpenIdToken", + "context": "setter", + "details": { + "name": "Set OpenId Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "OpenId Token" + } + } + ] + }, + { + "key": "GetRefreshToken", + "context": "getter", + "details": { + "name": "Get Refresh Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Refresh Token" + } + } + ] + }, + { + "key": "SetRefreshToken", + "context": "setter", + "details": { + "name": "Set Refresh Token" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Token" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Refresh Token" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AxisType.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AxisType.names index 005a2d564e..c6e75adc4a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AxisType.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AxisType.names @@ -5,8 +5,95 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "AxisType" - } + "name": "Axis Type", + "category": "Constants" + }, + "methods": [ + { + "key": "GetZNegative", + "details": { + "name": "Get -Z" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "-Z" + } + } + ] + }, + { + "key": "GetZPositive", + "details": { + "name": "Get +Z" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "+Z" + } + } + ] + }, + { + "key": "GetYPositive", + "details": { + "name": "Get +Y" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "+Y" + } + } + ] + }, + { + "key": "GetXNegative", + "details": { + "name": "Get -X" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "-X" + } + } + ] + }, + { + "key": "GetXPositive", + "details": { + "name": "Get +X" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "+X" + } + } + ] + }, + { + "key": "GetYNegative", + "details": { + "name": "Get -Y" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "-Y" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names new file mode 100644 index 0000000000..dfcbac7dad --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/AzFramework__SurfaceData__SurfacePoint.names @@ -0,0 +1,141 @@ +{ + "entries": [ + { + "key": "AzFramework::SurfaceData::SurfacePoint", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Surface Point", + "category": "Surface Data" + }, + "methods": [ + { + "key": "Getposition", + "details": { + "name": "Get Position" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "key": "Setposition", + "details": { + "name": "Set Position" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "key": "Getnormal", + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "key": "Setnormal", + "details": { + "name": "Set Normal" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "key": "GetsurfaceTags", + "details": { + "name": "Get Surface Tags" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + } + ], + "results": [ + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Tags" + } + } + ] + }, + { + "key": "SetsurfaceTags", + "details": { + "name": "Set Surface Tags" + }, + "params": [ + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Tags" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlastActorData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlastActorData.names new file mode 100644 index 0000000000..a63a0541e0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlastActorData.names @@ -0,0 +1,105 @@ +{ + "entries": [ + { + "key": "BlastActorData", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Actor Data", + "category": "Blast" + }, + "methods": [ + { + "key": "GetEntityId", + "details": { + "name": "Get Entity Id" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "key": "SetEntityId", + "details": { + "name": "Set Entity Id" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "key": "GetIsStatic", + "details": { + "name": "Get Is Static" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + }, + { + "key": "SetIsStatic", + "details": { + "name": "Set Is Static" + }, + "params": [ + { + "typeid": "{A23453D5-79A8-49C8-B9F0-9CC35D711DD4}", + "details": { + "name": "Blast Actor Data*", + "tooltip": "Represents Blast Actor in a Script Canvas friendly format." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeData.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeData.names index f450864610..9dd686a898 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeData.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeData.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "BlendShapeData" + "name": "Blend Shape Data" }, "methods": [ { @@ -13,33 +13,32 @@ "context": "BlendShapeData", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetUV" + "tooltip": "When signaled, this will invoke Get UV" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetUV is invoked" + "tooltip": "Signaled after Get UV is invoked" }, "details": { - "name": "BlendShapeData::GetUV", - "category": "Other" + "name": "Get UV" }, "params": [ { "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", "details": { - "name": "BlendShapeData*" + "name": "Blend Shape Data" } }, { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Vertex Index" } }, { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "UV Set Index" } } ], @@ -47,7 +46,7 @@ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "const Vector2&" + "name": "UV" } } ] @@ -57,27 +56,26 @@ "context": "BlendShapeData", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTangent" + "tooltip": "When signaled, this will invoke Get Tangent" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTangent is invoked" + "tooltip": "Signaled after Get Tangent is invoked" }, "details": { - "name": "BlendShapeData::GetTangent", - "category": "Other" + "name": "Get Tangent" }, "params": [ { "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", "details": { - "name": "const BlendShapeData&" + "name": "Blend Shape Data" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Index" } } ], @@ -85,7 +83,7 @@ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Tangents" } } ] @@ -95,27 +93,26 @@ "context": "BlendShapeData", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBitangent" + "tooltip": "When signaled, this will invoke Get Bitangent" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBitangent is invoked" + "tooltip": "Signaled after Get Bitangent is invoked" }, "details": { - "name": "BlendShapeData::GetBitangent", - "category": "Other" + "name": "Get Bi-Tangent" }, "params": [ { "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", "details": { - "name": "const BlendShapeData&" + "name": "Blend Shape Data" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Index" } } ], @@ -123,7 +120,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Bi-Tangent" } } ] @@ -133,33 +130,32 @@ "context": "BlendShapeData", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetColor" + "tooltip": "When signaled, this will invoke Get Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetColor is invoked" + "tooltip": "Signaled after Get Color is invoked" }, "details": { - "name": "BlendShapeData::GetColor", - "category": "Other" + "name": "Get Color" }, "params": [ { "typeid": "{FF875C22-2E4F-4CE3-BA49-09BF78C70A09}", "details": { - "name": "const BlendShapeData&" + "name": "Blend Shape Data" } }, { "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", "details": { - "name": "unsigned char" + "name": "Color Set Index" } }, { "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", "details": { - "name": "unsigned char" + "name": "Color Index" } } ], @@ -167,7 +163,7 @@ { "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", "details": { - "name": "SceneAPI::DataTypes::Color" + "name": "Color" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeDataFace.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeDataFace.names index 2d4d4c2f92..c66094da05 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeDataFace.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BlendShapeDataFace.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "BlendShapeDataFace" + "name": "Blend Shape Data Face" }, "methods": [ { @@ -13,27 +13,26 @@ "context": "BlendShapeDataFace", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetVertexIndex" + "tooltip": "When signaled, this will invoke Get Vertex Index" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetVertexIndex is invoked" + "tooltip": "Signaled after Get Vertex Index is invoked" }, "details": { - "name": "BlendShapeDataFace::GetVertexIndex", - "category": "Other" + "name": "Get Vertex Index" }, "params": [ { "typeid": "{C972EC9A-3A5C-47CD-9A92-ECB4C0C0451C}", "details": { - "name": "const SceneAPI::DataTypes::IBlendShapeData::Face&" + "name": "Blend Shape Data Face" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Face Index" } } ], @@ -41,7 +40,7 @@ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Vertex Index" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BoxShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BoxShapeConfig.names index b5cad7c12d..33fa703a22 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BoxShapeConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/BoxShapeConfig.names @@ -5,8 +5,54 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "BoxShapeConfig" - } + "name": "Box Shape Config" + }, + "methods": [ + { + "key": "GetDimensions", + "details": { + "name": "Get Dimensions" + }, + "params": [ + { + "typeid": "{F034FBA2-AC2F-4E66-8152-14DFB90D6283}", + "details": { + "name": "Box Shape Config", + "tooltip": "Box shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Dimensions" + } + } + ] + }, + { + "key": "SetDimensions", + "details": { + "name": "Set Dimensions" + }, + "params": [ + { + "typeid": "{F034FBA2-AC2F-4E66-8152-14DFB90D6283}", + "details": { + "name": "Box Shape Config", + "tooltip": "Box shape configuration parameters" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Dimensions" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CapsuleShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CapsuleShapeConfig.names index 5172f2b9b9..3720501b2c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CapsuleShapeConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CapsuleShapeConfig.names @@ -5,8 +5,98 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "CapsuleShapeConfig" - } + "name": "Capsule Shape Config" + }, + "methods": [ + { + "key": "GetHeight", + "details": { + "name": "Get Height" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "key": "SetHeight", + "details": { + "name": "Set Height" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "key": "GetRadius", + "details": { + "name": "Get Radius" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "key": "SetRadius", + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{00931AEB-2AD8-42CE-B1DC-FA4332F51501}", + "details": { + "name": "Capsule Shape Config", + "tooltip": "Capsule shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ClientAuthAWSCredentials.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ClientAuthAWSCredentials.names new file mode 100644 index 0000000000..3d1fc2e80e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ClientAuthAWSCredentials.names @@ -0,0 +1,141 @@ +{ + "entries": [ + { + "key": "ClientAuthAWSCredentials", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "AWS Client Auth Credentials", + "category": "AWS Client Auth" + }, + "methods": [ + { + "key": "GetAWSAccessKeyId", + "details": { + "name": "Get AWS Access Key Id" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Access Key Id" + } + } + ] + }, + { + "key": "SetAWSAccessKeyId", + "details": { + "name": "Set AWS Access Key Id" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Access Key Id" + } + } + ] + }, + { + "key": "GetAWSSecretKey", + "details": { + "name": "Get AWS Secret Key" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Secret Key" + } + } + ] + }, + { + "key": "SetAWSSecretKey", + "details": { + "name": "Set AWS Secret Key" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Secret Key" + } + } + ] + }, + { + "key": "GetAWSSessionToken", + "details": { + "name": "Get AWS Session Token" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Session Token" + } + } + ] + }, + { + "key": "SetAWSSessionToken", + "details": { + "name": "Set AWS Session Token" + }, + "params": [ + { + "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", + "details": { + "name": "AWS ClientAuth Credentials" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AWS Session Token" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionEvent.names index 3613a3631f..335200a350 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CollisionEvent.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "CollisionEvent" + "name": "Collision Event" }, "methods": [ { @@ -13,21 +13,20 @@ "context": "CollisionEvent", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBody1EntityId" + "tooltip": "When signaled, this will invoke Get Body 1 Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBody1EntityId is invoked" + "tooltip": "Signaled after Get Body 1 Entity Id is invoked" }, "details": { - "name": "CollisionEvent::Get Body 1 EntityId", - "category": "Other" + "name": "Get Body 1 Entity Id" }, "params": [ { "typeid": "{7602AA36-792C-4BDC-BDF8-AA16792151A3}", "details": { - "name": "CollisionEvent*" + "name": "Collision Event" } } ], @@ -35,7 +34,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -46,21 +45,20 @@ "context": "CollisionEvent", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBody2EntityId" + "tooltip": "When signaled, this will invoke Get Body 2 Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBody2EntityId is invoked" + "tooltip": "Signaled after Get Body 2 Entity Id is invoked" }, "details": { - "name": "CollisionEvent::Get Body 2 EntityId", - "category": "Other" + "name": "Get Body 2 Entity Id" }, "params": [ { "typeid": "{7602AA36-792C-4BDC-BDF8-AA16792151A3}", "details": { - "name": "CollisionEvent*" + "name": "Collision Event" } } ], @@ -68,11 +66,33 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } ] + }, + { + "key": "GetContacts", + "details": { + "name": "Get Contacts" + }, + "params": [ + { + "typeid": "{7602AA36-792C-4BDC-BDF8-AA16792151A3}", + "details": { + "name": "Collision Event" + } + } + ], + "results": [ + { + "typeid": "{009022A1-16A5-50B0-958F-F69C729985A3}", + "details": { + "name": "Contacts" + } + } + ] } ] } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ComponentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ComponentId.names index b9a8574451..edc87d77f7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ComponentId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ComponentId.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "ComponentID", + "name": "Component Id", "category": "Entity" }, "methods": [ @@ -14,21 +14,20 @@ "context": "ComponentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsValid" + "tooltip": "When signaled, this will invoke Is Valid" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsValid is invoked" + "tooltip": "Signaled after Is Valid is invoked" }, "details": { - "name": "ComponentId::IsValid", - "category": "Entity" + "name": "Is Valid" }, "params": [ { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId*" + "name": "Behavior Component Id*" } } ], @@ -36,7 +35,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Valid" } } ] @@ -53,20 +52,19 @@ "tooltip": "Signaled after Equal is invoked" }, "details": { - "name": "ComponentId::Equal", - "category": "Entity" + "name": "Equal" }, "params": [ { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId*" + "name": "Behavior Component Id" } }, { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "const BehaviorComponentId&" + "name": "Behavior Component Id" } } ], @@ -74,7 +72,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Equal" } } ] @@ -84,21 +82,20 @@ "context": "ComponentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "ComponentId::ToString", - "category": "Entity" + "name": "To String" }, "params": [ { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId*" + "name": "Behavior Component Id*" } } ], diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Contact.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Contact.names index 068759089b..0e0e29f073 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Contact.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Contact.names @@ -6,7 +6,177 @@ "variant": "", "details": { "name": "Contact" - } + }, + "methods": [ + { + "key": "GetPosition", + "details": { + "name": "Get Position" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "key": "SetPosition", + "details": { + "name": "Set Position" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + } + ] + }, + { + "key": "GetNormal", + "details": { + "name": "Get Normal" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "key": "SetNormal", + "details": { + "name": "Set Normal" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Normal" + } + } + ] + }, + { + "key": "GetImpulse", + "details": { + "name": "Get Impulse" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Impulse" + } + } + ] + }, + { + "key": "SetImpulse", + "details": { + "name": "Set Impulse" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Impulse" + } + } + ] + }, + { + "key": "GetSeparation", + "details": { + "name": "Get Separation" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Separation" + } + } + ] + }, + { + "key": "SetSeparation", + "details": { + "name": "Set Separation" + }, + "params": [ + { + "typeid": "{D7439508-ED10-4395-9D48-1FC3D7815361}", + "details": { + "name": "Contact" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Separation" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CylinderShapeConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CylinderShapeConfig.names index 633933e188..35503ee625 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CylinderShapeConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/CylinderShapeConfig.names @@ -5,8 +5,98 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "CylinderShapeConfig" - } + "name": "Cylinder Shape Config" + }, + "methods": [ + { + "key": "GetHeight", + "details": { + "name": "Get Height" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "key": "SetHeight", + "details": { + "name": "Set Height" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Height" + } + } + ] + }, + { + "key": "GetRadius", + "details": { + "name": "Get Radius" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + }, + { + "key": "SetRadius", + "details": { + "name": "Set Radius" + }, + "params": [ + { + "typeid": "{53254779-82F1-441E-9116-81E1FACFECF4}", + "details": { + "name": "Cylinder Shape Config", + "tooltip": "Cylinder shape configuration parameters" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity.names index 258e490a4e..a6d6ac1f03 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Entity.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Entity", + "name": "Behavior Entity", "category": "Entity" }, "methods": [ @@ -14,28 +14,28 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetComponentName" + "tooltip": "When signaled, this will invoke Get Component Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetComponentName is invoked" + "tooltip": "Signaled after Get Component Name is invoked" }, "details": { - "name": "Entity::GetComponentName", - "category": "Entity" + "name": "Get Component Name", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId" + "name": "Behavior Component Id" } } ], @@ -43,7 +43,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::vector" + "name": "Component Name" } } ] @@ -53,28 +53,28 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetComponentType" + "tooltip": "When signaled, this will invoke Get Component Type" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetComponentType is invoked" + "tooltip": "Signaled after Get Component Type is invoked" }, "details": { - "name": "Entity::GetComponentType", - "category": "Entity" + "name": "Get Component Type", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId" + "name": "Behavior Component Id" } } ], @@ -82,7 +82,7 @@ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "Uuid" + "name": "Type" } } ] @@ -92,34 +92,34 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateComponent" + "tooltip": "When signaled, this will invoke Create Component" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateComponent is invoked" + "tooltip": "Signaled after Create Component is invoked" }, "details": { - "name": "Entity::CreateComponent", - "category": "Entity" + "name": "Create Component", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "const AZ::Uuid&" + "name": "Component Type" } }, { "typeid": "{0A7929DF-2932-40EA-B2B3-79BC1C3490D0}", "details": { - "name": "const ComponentConfig*" + "name": "Component Config*" } } ], @@ -127,7 +127,7 @@ { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "Number" + "name": "Behavior Component Id" } } ] @@ -137,28 +137,28 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DestroyComponent" + "tooltip": "When signaled, this will invoke Destroy Component" }, "exit": { "name": "Out", - "tooltip": "Signaled after DestroyComponent is invoked" + "tooltip": "Signaled after Destroy Component is invoked" }, "details": { - "name": "Entity::DestroyComponent", - "category": "Entity" + "name": "Destroy Component", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId" + "name": "Behavior Component Id" } } ], @@ -166,7 +166,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Success" } } ] @@ -176,28 +176,28 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke FindComponentOfType" + "tooltip": "When signaled, this will invoke Find Component Of Type" }, "exit": { "name": "Out", - "tooltip": "Signaled after FindComponentOfType is invoked" + "tooltip": "Signaled after Find Component Of Type is invoked" }, "details": { - "name": "Entity::FindComponentOfType", - "category": "Entity" + "name": "Find Component Of Type", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "const AZ::Uuid&" + "name": "Component Type" } } ], @@ -205,7 +205,7 @@ { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "Component ID" + "name": "Behavior Component Id" } } ] @@ -215,34 +215,34 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetComponentConfiguration" + "tooltip": "When signaled, this will invoke Set Component Configuration" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetComponentConfiguration is invoked" + "tooltip": "Signaled after Set Component Configuration is invoked" }, "details": { - "name": "Entity::SetComponentConfiguration", - "category": "Entity" + "name": "Set Component Configuration", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId" + "name": "Behavior Component Id" } }, { "typeid": "{0A7929DF-2932-40EA-B2B3-79BC1C3490D0}", "details": { - "name": "const ComponentConfig&" + "name": "Component Config" } } ], @@ -250,7 +250,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Success" } } ] @@ -260,21 +260,21 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsValid" + "tooltip": "When signaled, this will invoke Is Valid" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsValid is invoked" + "tooltip": "Signaled after Is Valid is invoked" }, "details": { - "name": "Entity::IsValid", - "category": "Entity/Game Entity" + "name": "Is Valid", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "EntityID", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -283,7 +283,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Valid" } } ] @@ -300,14 +300,14 @@ "tooltip": "Signaled after GetId is invoked" }, "details": { - "name": "Entity::GetId", - "category": "Entity" + "name": "Get Id", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -316,7 +316,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityID", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -334,14 +334,13 @@ "tooltip": "Signaled after GetOwningContextId is invoked" }, "details": { - "name": "Entity::GetOwningContextId", - "category": "Entity" + "name": "Get Owning Context Id" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -350,7 +349,7 @@ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "Uuid" + "name": "Context Id" } } ] @@ -360,21 +359,21 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetComponents" + "tooltip": "When signaled, this will invoke Get Components" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetComponents is invoked" + "tooltip": "Signaled after Get Components is invoked" }, "details": { - "name": "Entity::GetComponents", - "category": "Entity" + "name": "Get Components", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -393,28 +392,28 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke FindAllComponentsOfType" + "tooltip": "When signaled, this will invoke Find All Components Of Type" }, "exit": { "name": "Out", - "tooltip": "Signaled after FindAllComponentsOfType is invoked" + "tooltip": "Signaled after Find All Components Of Type is invoked" }, "details": { - "name": "Entity::FindAllComponentsOfType", - "category": "Entity" + "name": "Find All Components Of Type", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "const AZ::Uuid&" + "name": "Component Type" } } ], @@ -422,7 +421,7 @@ { "typeid": "{8293031B-ABC3-5CD2-A1CB-1DB6792ADD5C}", "details": { - "name": "AZStd::vector" + "name": "Components" } } ] @@ -432,34 +431,34 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetComponentConfiguration" + "tooltip": "When signaled, this will invoke Get Component Configuration" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetComponentConfiguration is invoked" + "tooltip": "Signaled after Get Component Configuration is invoked" }, "details": { - "name": "Entity::GetComponentConfiguration", - "category": "Entity" + "name": "Get Component Configuration", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{60A9A069-9C3D-465A-B7AD-0D6CC803990A}", "details": { - "name": "BehaviorComponentId" + "name": "Behavior Component Id" } }, { "typeid": "{0A7929DF-2932-40EA-B2B3-79BC1C3490D0}", "details": { - "name": "ComponentConfig&" + "name": "Component Config" } } ], @@ -467,7 +466,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Success" } } ] @@ -477,28 +476,28 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetName" + "tooltip": "When signaled, this will invoke Set Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetName is invoked" + "tooltip": "Signaled after Set Name is invoked" }, "details": { - "name": "Entity::SetName", - "category": "Entity" + "name": "Set Name", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "const char*" + "name": "Name" } } ] @@ -508,21 +507,21 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsActivated" + "tooltip": "When signaled, this will invoke Is Activated" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsActivated is invoked" + "tooltip": "Signaled after Is Activated is invoked" }, "details": { - "name": "Entity::IsActivated", - "category": "Entity" + "name": "Is Activated", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -531,7 +530,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Activated" } } ] @@ -548,14 +547,14 @@ "tooltip": "Signaled after Activate is invoked" }, "details": { - "name": "Entity::Activate", - "category": "Entity" + "name": "Activate", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -573,14 +572,14 @@ "tooltip": "Signaled after Deactivate is invoked" }, "details": { - "name": "Entity::Deactivate", - "category": "Entity" + "name": "Deactivate", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -591,21 +590,21 @@ "context": "Entity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetName" + "tooltip": "When signaled, this will invoke Get Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetName is invoked" + "tooltip": "Signaled after Get Name is invoked" }, "details": { - "name": "Entity::GetName", - "category": "Entity" + "name": "GetName", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -614,7 +613,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "String" + "name": "Name" } } ] @@ -631,14 +630,14 @@ "tooltip": "Signaled after Exists is invoked" }, "details": { - "name": "Entity::Exists", - "category": "Entity" + "name": "Exists", + "category": "Other" }, "params": [ { "typeid": "{41CC88A4-FE07-48E6-943D-998DE68AFF5C}", "details": { - "name": "BehaviorEntity*", + "name": "Behavior Entity", "tooltip": "Entity" } } @@ -647,7 +646,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Exists" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExposureControlConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExposureControlConfig.names index ef15a10176..b58c7ff990 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExposureControlConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ExposureControlConfig.names @@ -5,8 +5,262 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "ExposureControlConfig" - } + "name": "Exposure Control Config" + }, + "methods": [ + { + "key": "GetautoExposureSpeedUp", + "details": { + "name": "Get Auto Exposure Speed Up" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Speed Up" + } + } + ] + }, + { + "key": "SetautoExposureSpeedUp", + "details": { + "name": "Set Auto Exposure Speed Up" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Speed Up" + } + } + ] + }, + { + "key": "GetautoExposureSpeedDown", + "details": { + "name": "Get Auto Exposure Speed Down" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Speed Down" + } + } + ] + }, + { + "key": "SetautoExposureSpeedDown", + "details": { + "name": "Setauto Exposure Speed Down" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Exposure Speed Down" + } + } + ] + }, + { + "key": "GetautoExposureMax", + "details": { + "name": "Get Auto Exposure Max" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Max" + } + } + ] + }, + { + "key": "SetautoExposureMax", + "details": { + "name": "Set Auto Exposure Max" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Max" + } + } + ] + }, + { + "key": "GetautoExposureMin", + "details": { + "name": "Get Auto Exposure Min" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Min" + } + } + ] + }, + { + "key": "SetautoExposureMin", + "details": { + "name": "Set Auto Exposure Min" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Auto Exposure Min" + } + } + ] + }, + { + "key": "GetexposureControlType", + "details": { + "name": "Get Exposure Control Type" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Exposure Control Type" + } + } + ] + }, + { + "key": "SetexposureControlType", + "details": { + "name": "Set Exposure Control Type" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Exposure Control Type" + } + } + ] + }, + { + "key": "GetcompensateValue", + "details": { + "name": "Get Compensate Value" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Compensate Value" + } + } + ] + }, + { + "key": "SetcompensateValue", + "details": { + "name": "Set Compensate Value" + }, + "params": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Compensate Value" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputEventNotificationId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputEventNotificationId.names index e964bd2518..7ba42921f1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputEventNotificationId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/InputEventNotificationId.names @@ -5,8 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Input Event Notification ID", - "category": "Gameplay/Input" + "name": "Input", + "category": "Gameplay" }, "methods": [ { @@ -14,21 +14,20 @@ "context": "InputEventNotificationId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "InputEventNotificationId::ToString", - "category": "Gameplay/Input" + "name": "To String" }, "params": [ { "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", "details": { - "name": "InputEventNotificationId*" + "name": "Input Event Notification Id" } } ], @@ -53,20 +52,19 @@ "tooltip": "Signaled after Equal is invoked" }, "details": { - "name": "InputEventNotificationId::Equal", - "category": "Gameplay/Input" + "name": "Equal" }, "params": [ { "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", "details": { - "name": "InputEventNotificationId*" + "name": "Input Event Notification Id" } }, { "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", "details": { - "name": "const InputEventNotificationId&" + "name": "Input Event Notification Id" } } ], @@ -74,7 +72,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Equal" } } ] @@ -91,14 +89,13 @@ "tooltip": "Signaled after Clone is invoked" }, "details": { - "name": "InputEventNotificationId::Clone", - "category": "Gameplay/Input" + "name": "Clone" }, "params": [ { "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", "details": { - "name": "InputEventNotificationId*" + "name": "Input Event Notification Id" } } ], @@ -106,7 +103,7 @@ { "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", "details": { - "name": "InputEventNotificationID" + "name": "Input Event Notification Id" } } ] @@ -116,29 +113,26 @@ "context": "InputEventNotificationId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateInputEventNotificationId" + "tooltip": "When signaled, this will invoke Create Input Event Notification Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateInputEventNotificationId is invoked" + "tooltip": "Signaled after Create Input Event Notification Id is invoked" }, "details": { - "name": "InputEventNotificationId::CreateInputEventNotificationId", - "category": "Gameplay/Input" + "name": "Create Input Event Notification Id" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "localUserId", - "tooltip": "Local user ID (0-3, or -1 for all users)" + "name": "Local User Id" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "actionName", - "tooltip": "The name of the Input event action" + "name": "Value" } } ], @@ -146,7 +140,111 @@ { "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", "details": { - "name": "InputEventNotificationID" + "name": "Input Event Notification Id" + } + } + ] + }, + { + "key": "GetactionNameCrc", + "details": { + "name": "Get Action Name Tag" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "key": "SetactionNameCrc", + "details": { + "name": "Set Action Name Tag" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "key": "GetlocalUserId", + "details": { + "name": "Get Local User Id" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Local User Id" + } + } + ] + }, + { + "key": "SetlocalUserId", + "details": { + "name": "Set Local User Id" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "Local User Id" + } + } + ] + }, + { + "key": "SetactionName", + "details": { + "name": "Set Action Name" + }, + "params": [ + { + "typeid": "{9E0F0801-348B-4FF9-AF9B-858D59404968}", + "details": { + "name": "Input Event Notification Id" + } + }, + { + "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", + "details": { + "name": "Action Name" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightConfig.names index 2ff191ad6c..a0e6ba654c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightConfig.names @@ -5,8 +5,346 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "LightConfig" - } + "name": "Light Config" + }, + "methods": [ + { + "key": "GetshadowmapSize", + "details": { + "name": "Get Shadowmap Size" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{3EC1CE83-483D-41FD-9909-D22B03E56F4E}", + "details": { + "name": "Shadowmap Size" + } + } + ] + }, + { + "key": "SetshadowmapSize", + "details": { + "name": "Set Shadowmap Size" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{3EC1CE83-483D-41FD-9909-D22B03E56F4E}", + "details": { + "name": "Shadowmap Size" + } + } + ] + }, + { + "key": "GetshadowCascadeCount", + "details": { + "name": "Get Shadow Cascade Count" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{ECA0B403-C4F8-4B86-95FC-81688D046E40}", + "details": { + "name": "Shadow Cascade Count" + } + } + ] + }, + { + "key": "SetshadowCascadeCount", + "details": { + "name": "Set Shadow Cascade Count" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{ECA0B403-C4F8-4B86-95FC-81688D046E40}", + "details": { + "name": "Shadow Cascade Count" + } + } + ] + }, + { + "key": "GetenableShadowDebugColoring", + "details": { + "name": "Get Enable Shadow Debug Coloring" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "key": "SetenableShadowDebugColoring", + "details": { + "name": "Set Enable Shadow Debug Coloring" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enable" + } + } + ] + }, + { + "key": "Getintensity", + "details": { + "name": "Get Intensity" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + }, + { + "key": "Setintensity", + "details": { + "name": "Set Intensity" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Intensity" + } + } + ] + }, + { + "key": "GetshadowRatioLogarithmUniform", + "details": { + "name": "Get Shadow Ratio Logarithm Uniform" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Ratio Logarithm Uniform" + } + } + ] + }, + { + "key": "SetshadowRatioLogarithmUniform", + "details": { + "name": "Set Shadow Ratio Logarithm Uniform" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Ratio Logarithm Uniform" + } + } + ] + }, + { + "key": "Getcolor", + "details": { + "name": "Get Color" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "key": "Setcolor", + "details": { + "name": "Set Color" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + } + ] + }, + { + "key": "Getdirection", + "details": { + "name": "Get Direction" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "key": "Setdirection", + "details": { + "name": "Set Direction" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "key": "GetshadowFarClipDistance", + "details": { + "name": "Get Shadow Far Clip Distance" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Far Clip Distance" + } + } + ] + }, + { + "key": "SetshadowFarClipDistance", + "details": { + "name": "Set Shadow Far Clip Distance" + }, + "params": [ + { + "typeid": "{02644F52-9483-47A8-9028-37671695C34E}", + "details": { + "name": "Light Config" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Far Clip Distance" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightingPreset.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightingPreset.names index 3bad4ebca7..880ca19784 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightingPreset.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/LightingPreset.names @@ -5,8 +5,430 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "LightingPreset" - } + "name": "Lighting Preset" + }, + "methods": [ + { + "key": "GetshadowCatcherOpacity", + "details": { + "name": "Get Shadow Catcher Opacity" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Catcher Opacity" + } + } + ] + }, + { + "key": "SetshadowCatcherOpacity", + "details": { + "name": "Set Shadow Catcher Opacity" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Shadow Catcher Opacity" + } + } + ] + }, + { + "key": "GetskyboxExposure", + "details": { + "name": "Get Skybox Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Skybox Exposure" + } + } + ] + }, + { + "key": "SetskyboxExposure", + "details": { + "name": "Set Skybox Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Skybox Exposure" + } + } + ] + }, + { + "key": "Getlights", + "details": { + "name": "Get Lights" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "Light Configs" + } + } + ] + }, + { + "key": "Setlights", + "details": { + "name": "Set Lights" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{33492660-D9A8-5E84-9CFB-03CBCD87919F}", + "details": { + "name": "Light Configs" + } + } + ] + }, + { + "key": "GetiblExposure", + "details": { + "name": "Get IBL Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "IBL Exposure" + } + } + ] + }, + { + "key": "SetiblExposure", + "details": { + "name": "Set IBL Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "IBL Exposure" + } + } + ] + }, + { + "key": "GetskyboxImageAsset", + "details": { + "name": "Get Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Skybox Image Asset" + } + } + ] + }, + { + "key": "SetskyboxImageAsset", + "details": { + "name": "Set Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Skybox Image Asset" + } + } + ] + }, + { + "key": "GetiblSpecularImageAsset", + "details": { + "name": "Get IBL Specular Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Specular Image Asset" + } + } + ] + }, + { + "key": "SetiblSpecularImageAsset", + "details": { + "name": "Set IBL Specular Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Specular Image Asset" + } + } + ] + }, + { + "key": "GetdisplayName", + "details": { + "name": "Get Display Name" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "key": "SetdisplayName", + "details": { + "name": "Set Display Name" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "key": "GetalternateSkyboxImageAsset", + "details": { + "name": "Get Alternate Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Alternate Skybox Image Asset" + } + } + ] + }, + { + "key": "SetalternateSkyboxImageAsset", + "details": { + "name": "Set Alternate Skybox Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Alternate Skybox Image Asset" + } + } + ] + }, + { + "key": "GetiblDiffuseImageAsset", + "details": { + "name": "Get IBL Diffuse Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Diffuse Image Asset" + } + } + ] + }, + { + "key": "SetiblDiffuseImageAsset", + "details": { + "name": "Set IBL Diffuse Image Asset" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "IBL Diffuse Image Asset" + } + } + ] + }, + { + "key": "Getexposure", + "details": { + "name": "Get Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + } + ], + "results": [ + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ] + }, + { + "key": "Setexposure", + "details": { + "name": "Set Exposure" + }, + "params": [ + { + "typeid": "{6EEACBC0-2D97-414C-8E87-088E7BA231A9}", + "details": { + "name": "Lighting Preset" + } + }, + { + "typeid": "{C6FD75F7-58BA-46CE-8FBA-2D64CB4ECFF9}", + "details": { + "name": "Exposure Control Config" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignment.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignment.names index a77e2615b8..529159f6e5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignment.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignment.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "MaterialAssignment" + "name": "Material Assignment", + "category": "Rendering" }, "methods": [ { @@ -13,29 +14,104 @@ "context": "MaterialAssignment", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "MaterialAssignment::ToString", - "category": "Other" + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + }, + { + "key": "GetmaterialAsset", + "details": { + "name": "Getmaterial Asset" }, "params": [ { "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", "details": { - "name": "AZ::Render::MaterialAssignment*" + "name": "" } } ], "results": [ { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "SetmaterialAsset", + "details": { + "name": "Setmaterial Asset" + }, + "params": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "" + } + }, + { + "typeid": "{834DC049-5EC3-5C29-B621-5F0046864DC4}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "GetpropertyOverrides", + "details": { + "name": "Getproperty Overrides" + }, + "params": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "SetpropertyOverrides", + "details": { + "name": "Setproperty Overrides" + }, + "params": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "" + } + }, + { + "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", "details": { - "name": "AZStd::basic_string, allocator>" + "name": "" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignmentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignmentId.names index 6a5c0d5b60..cf708d0d9b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignmentId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialAssignmentId.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "MaterialAssignmentId" + "name": "Material Assignment Id", + "category": "Rendering" }, "methods": [ { @@ -13,29 +14,20 @@ "context": "MaterialAssignmentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "MaterialAssignmentId::ToString", - "category": "Other" + "name": "To String" }, - "params": [ - { - "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", - "details": { - "name": "AZ::Render::MaterialAssignmentId*" - } - } - ], "results": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::basic_string, allocator>" + "name": "AZ Std::basic_string, allocator>" } } ] @@ -45,24 +37,15 @@ "context": "MaterialAssignmentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsAssetOnly" + "tooltip": "When signaled, this will invoke Is Asset Only" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsAssetOnly is invoked" + "tooltip": "Signaled after Is Asset Only is invoked" }, "details": { - "name": "MaterialAssignmentId::IsAssetOnly", - "category": "Other" + "name": "Is Asset Only" }, - "params": [ - { - "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", - "details": { - "name": "AZ::Render::MaterialAssignmentId*" - } - } - ], "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", @@ -77,24 +60,15 @@ "context": "MaterialAssignmentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsSlotIdOnly" + "tooltip": "When signaled, this will invoke Is Slot Id Only" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsSlotIdOnly is invoked" + "tooltip": "Signaled after Is Slot Id Only is invoked" }, "details": { - "name": "MaterialAssignmentId::IsSlotIdOnly", - "category": "Other" + "name": "Is Slot Id Only" }, - "params": [ - { - "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", - "details": { - "name": "AZ::Render::MaterialAssignmentId*" - } - } - ], "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", @@ -109,24 +83,38 @@ "context": "MaterialAssignmentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsLodAndSlotId" + "tooltip": "When signaled, this will invoke Is Lod And Slot Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsLodAndSlotId is invoked" + "tooltip": "Signaled after Is Lod And Slot Id is invoked" }, "details": { - "name": "MaterialAssignmentId::IsLodAndSlotId", - "category": "Other" + "name": "Is Lod And Slot Id" }, - "params": [ + "results": [ { - "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "AZ::Render::MaterialAssignmentId*" + "name": "bool" } } - ], + ] + }, + { + "key": "IsDefault", + "context": "MaterialAssignmentId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Default" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Default is invoked" + }, + "details": { + "name": "Is Default" + }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", @@ -137,65 +125,108 @@ ] }, { - "key": "IsDefault", + "key": "IsLodAndAsset", "context": "MaterialAssignmentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsDefault" + "tooltip": "When signaled, this will invoke Is Lod And Asset" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsDefault is invoked" + "tooltip": "Signaled after Is Lod And Asset is invoked" + }, + "details": { + "name": "Is Lod And Asset" }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "bool" + } + } + ] + }, + { + "key": "GetlodIndex", "details": { - "name": "MaterialAssignmentId::IsDefault", - "category": "Other" + "name": "Getlod Index" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId*" + "name": "" } } ], "results": [ { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "bool" + "name": "" } } ] }, { - "key": "IsLodAndAsset", - "context": "MaterialAssignmentId", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke IsLodAndAsset" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after IsLodAndAsset is invoked" + "key": "SetlodIndex", + "details": { + "name": "Setlod Index" }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "" + } + }, + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "GetmaterialSlotStableId", "details": { - "name": "MaterialAssignmentId::IsLodAndAsset", - "category": "Other" + "name": "Getmaterial Slot Stable Id" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId*" + "name": "" } } ], "results": [ { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "bool" + "name": "" + } + } + ] + }, + { + "key": "SetmaterialSlotStableId", + "details": { + "name": "Setmaterial Slot Stable Id" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialComponentConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialComponentConfig.names index 66798ef901..27edc76275 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialComponentConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MaterialComponentConfig.names @@ -5,8 +5,55 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "MaterialComponentConfig" - } + "name": "Material Component Config", + "category": "Rendering" + }, + "methods": [ + { + "key": "Getmaterials", + "details": { + "name": "Get Materials" + }, + "params": [ + { + "typeid": "{3366C279-32AE-48F6-839B-7700AE117A54}", + "details": { + "name": "", + "tooltip": "Material Component Config" + } + } + ], + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "Material Assignment Map" + } + } + ] + }, + { + "key": "Setmaterials", + "details": { + "name": "Set Materials" + }, + "params": [ + { + "typeid": "{3366C279-32AE-48F6-839B-7700AE117A54}", + "details": { + "name": "", + "tooltip": "Material Component Config" + } + }, + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "Material Assignment Map" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math.names index 4ff9bc2ffa..546608f0b0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Math.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Trigonometry", + "name": "Functions", "category": "Math" }, "methods": [ @@ -21,20 +21,20 @@ "tooltip": "Signaled after DivideByNumber is invoked" }, "details": { - "name": "Math::Divide By Number", - "category": "Math" + "name": "Divide By Number", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "X" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Y" } } ], @@ -42,7 +42,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Result" } } ] @@ -59,15 +59,14 @@ "tooltip": "Signaled after Round is invoked" }, "details": { - "name": "Math::Round", - "category": "Math/Number" + "name": "Round", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "Number to round" + "name": "Value" } } ], @@ -75,8 +74,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "Rounded number" + "name": "Result" } } ] @@ -93,15 +91,14 @@ "tooltip": "Signaled after Sqrt is invoked" }, "details": { - "name": "Math::Sqrt", - "category": "Math/Number" + "name": "Sqrt", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "Number to get the square root of" + "name": "Value" } } ], @@ -109,8 +106,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "Square root of the number" + "name": "Result" } } ] @@ -127,22 +123,20 @@ "tooltip": "Signaled after Mod is invoked" }, "details": { - "name": "Math::Mod", - "category": "Math/Number" + "name": "Mod", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Dividend", - "tooltip": "The number to be divided" + "name": "A" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Divisor", - "tooltip": "The number to be divided by" + "name": "B" } } ], @@ -150,8 +144,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Remainder", - "tooltip": "The remainder of the division between the two inputs" + "name": "Value" } } ] @@ -168,15 +161,14 @@ "tooltip": "Signaled after Ceil is invoked" }, "details": { - "name": "Math::Ceil", - "category": "Math/Number" + "name": "Ceil", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "The number to be rounded up" + "name": "Value" } } ], @@ -184,8 +176,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Ceiling", - "tooltip": "The value rounded up" + "name": "Result" } } ] @@ -202,15 +193,14 @@ "tooltip": "Signaled after IsEven is invoked" }, "details": { - "name": "Math::IsEven", - "category": "Math/Number" + "name": "Is Even", + "category": "Other" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Number", - "tooltip": "Number to be checked" + "name": "Value" } } ], @@ -218,8 +208,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean", - "tooltip": "Returns true if the number is even; false if not" + "name": "Is Event" } } ] @@ -236,29 +225,26 @@ "tooltip": "Signaled after IsClose is invoked" }, "details": { - "name": "Math::IsClose", - "category": "Math/Number" + "name": "Is Close", + "category": "Other" }, "params": [ { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "Number A", - "tooltip": "Number to compare" + "name": "A" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "Number B", - "tooltip": "Number to compare" + "name": "B" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "Tolerance", - "tooltip": "The value range to check the numbers against" + "name": "Tolerance" } } ], @@ -266,7 +252,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Close" } } ] @@ -283,15 +269,14 @@ "tooltip": "Signaled after ArcSin is invoked" }, "details": { - "name": "Math::ArcSin", - "category": "Math" + "name": "Arc Sin", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Value" } } ], @@ -299,8 +284,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Result" } } ] @@ -317,15 +301,14 @@ "tooltip": "Signaled after ArcTan is invoked" }, "details": { - "name": "Math::ArcTan", - "category": "Math" + "name": "Arc Tan", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Value" } } ], @@ -333,8 +316,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Result" } } ] @@ -351,22 +333,20 @@ "tooltip": "Signaled after Max is invoked" }, "details": { - "name": "Math::Max", - "category": "Math/Number" + "name": "Max", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number A", - "tooltip": "Number to be compared" + "name": "A" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number B", - "tooltip": "Number to be compared" + "name": "B" } } ], @@ -374,8 +354,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Max", - "tooltip": "The largest between two numbers" + "name": "Result" } } ] @@ -392,15 +371,14 @@ "tooltip": "Signaled after Tan is invoked" }, "details": { - "name": "Math::Tan", - "category": "Math" + "name": "Tan", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Value" } } ], @@ -408,8 +386,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Result" } } ] @@ -426,22 +403,20 @@ "tooltip": "Signaled after ArcTan2 is invoked" }, "details": { - "name": "Math::ArcTan2", - "category": "Math" + "name": "Arc Tan 2", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle A", - "tooltip": "Angle as radians" + "name": "A" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle B", - "tooltip": "Angle as radians" + "name": "B" } } ], @@ -449,8 +424,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Result" } } ] @@ -467,15 +441,14 @@ "tooltip": "Signaled after Floor is invoked" }, "details": { - "name": "Math::Floor", - "category": "Math/Number" + "name": "Floor", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "The number to be rounded down" + "name": "Value" } } ], @@ -483,8 +456,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Floor", - "tooltip": "The value rounded down" + "name": "Result" } } ] @@ -501,22 +473,20 @@ "tooltip": "Signaled after Min is invoked" }, "details": { - "name": "Math::Min", - "category": "Math/Number" + "name": "Min", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number A", - "tooltip": "Number to be compared" + "name": "A" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number B", - "tooltip": "Number to be compared" + "name": "B" } } ], @@ -524,8 +494,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Min", - "tooltip": "The smallest between two numbers" + "name": "Result" } } ] @@ -542,26 +511,26 @@ "tooltip": "Signaled after Lerp is invoked" }, "details": { - "name": "Math::Lerp", - "category": "Math/Number" + "name": "Lerp", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "a" + "name": "A" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "b" + "name": "B" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "t" + "name": "Time" } } ], @@ -569,7 +538,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number" + "name": "Result" } } ] @@ -586,26 +555,26 @@ "tooltip": "Signaled after LerpInverse is invoked" }, "details": { - "name": "Math::LerpInverse", - "category": "Math/Number" + "name": "LerpInverse", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "a" + "name": "A" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "b" + "name": "B" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "value" + "name": "Time" } } ], @@ -613,7 +582,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number" + "name": "Result" } } ] @@ -630,15 +599,14 @@ "tooltip": "Signaled after IsOdd is invoked" }, "details": { - "name": "Math::IsOdd", - "category": "Math/Number" + "name": "Is Odd", + "category": "Other" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Number", - "tooltip": "Number to be checked" + "name": "Value" } } ], @@ -646,8 +614,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean", - "tooltip": "Returns true if the number is not even; false if it is" + "name": "Is Odd" } } ] @@ -664,14 +631,13 @@ "tooltip": "Signaled after Abs is invoked" }, "details": { - "name": "Math::Abs", - "category": "Math" + "name": "Abs" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ], @@ -679,7 +645,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Result" } } ] @@ -696,15 +662,14 @@ "tooltip": "Signaled after RadToDeg is invoked" }, "details": { - "name": "Math::RadToDeg", - "category": "Math" + "name": "Radians To Degrees", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Radians", - "tooltip": "Radians to be converted" + "name": "Radians" } } ], @@ -712,8 +677,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Degrees", - "tooltip": "Degrees from radians" + "name": "Degrees" } } ] @@ -730,15 +694,14 @@ "tooltip": "Signaled after Sin is invoked" }, "details": { - "name": "Math::Sin", - "category": "Math" + "name": "Sin", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Number as radians" + "name": "Value" } } ], @@ -746,8 +709,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Number as radians" + "name": "Result" } } ] @@ -764,15 +726,14 @@ "tooltip": "Signaled after Cos is invoked" }, "details": { - "name": "Math::Cos", - "category": "Math" + "name": "Cos", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Value" } } ], @@ -780,8 +741,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Result" } } ] @@ -798,15 +758,14 @@ "tooltip": "Signaled after ArcCos is invoked" }, "details": { - "name": "Math::ArcCos", - "category": "Math" + "name": "Arc Cos", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Value" } } ], @@ -814,8 +773,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Angle", - "tooltip": "Angle as radians" + "name": "Result" } } ] @@ -832,15 +790,14 @@ "tooltip": "Signaled after Sign is invoked" }, "details": { - "name": "Math::Sign", - "category": "Math/Number" + "name": "Sign", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "Number to check" + "name": "Value" } } ], @@ -848,8 +805,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Sign", - "tooltip": "Returns 1 if the number is positive and -1 if the number is negative" + "name": "Result" } } ] @@ -866,29 +822,26 @@ "tooltip": "Signaled after Clamp is invoked" }, "details": { - "name": "Math::Clamp", - "category": "Math/Number" + "name": "Clamp", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "Value to be clamped" + "name": "Value" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Min", - "tooltip": "The minimum value to clamp to" + "name": "Minimum" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Max", - "tooltip": "The maximum value to clamp to" + "name": "Maximum" } } ], @@ -896,8 +849,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "The result of the clamp" + "name": "Result" } } ] @@ -914,26 +866,26 @@ "tooltip": "Signaled after GetSinCos is invoked" }, "details": { - "name": "Math::GetSinCos", - "category": "Math" + "name": "Get Sin Cos", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float&" + "name": "Sin" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float&" + "name": "Cos" } } ] @@ -950,15 +902,14 @@ "tooltip": "Signaled after DegToRad is invoked" }, "details": { - "name": "Math::DegToRad", - "category": "Math" + "name": "Degrees To Radians", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Degrees", - "tooltip": "Degrees to be converted" + "name": "Degrees" } } ], @@ -966,8 +917,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Radians", - "tooltip": "Radians from degrees" + "name": "Radians" } } ] @@ -984,22 +934,20 @@ "tooltip": "Signaled after Pow is invoked" }, "details": { - "name": "Math::Pow", - "category": "Math/Number" + "name": "Pow", + "category": "Other" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "The value to be raised" + "name": "Value" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Exponent", - "tooltip": "The power exponent" + "name": "Exponent" } } ], @@ -1007,8 +955,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Number", - "tooltip": "The result of the number raised to the power exponent" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathUtils.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathUtils.names index 58fcdad8e0..20232e4b0a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathUtils.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MathUtils.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Math", + "name": "Utilities", "category": "Math" }, "methods": [ @@ -14,22 +14,20 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertEulerDegreesToQuaternion" + "tooltip": "When signaled, this will invoke Convert Euler Angles To Quaternion" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertEulerDegreesToQuaternion is invoked" + "tooltip": "Signaled after Convert Euler Angles To Quaternion is invoked" }, "details": { - "name": "MathUtils::ConvertEulerDegreesToQuaternion", - "category": "Math/Quaternion" + "name": "Convert Euler Angles To Quaternion" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in degrees" + "name": "Angles (Degrees)" } } ], @@ -37,8 +35,7 @@ { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "Quaternion", - "tooltip": "Angle as a quaternion" + "name": "Quaternion" } } ] @@ -48,22 +45,21 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertEulerDegreesToTransformPrecise" + "tooltip": "When signaled, this will invoke Convert Euler Angles To Transform (Precise)" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertEulerDegreesToTransformPrecise is invoked" + "tooltip": "Signaled after Convert Euler Angles To Transform (Precise) is invoked" }, "details": { - "name": "MathUtils::ConvertEulerDegreesToTransformPrecise", - "category": "Math/Transform" + "name": "Convert Euler Angles To Transform (Precise)", + "category": "Other" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in degrees" + "name": "Angles (Degrees)" } } ], @@ -71,8 +67,7 @@ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Transform", - "tooltip": "Transform from a Euler angle" + "name": "Transform" } } ] @@ -82,22 +77,20 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertEulerDegreesToTransform" + "tooltip": "When signaled, this will invoke Convert Euler Angles To Transform" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertEulerDegreesToTransform is invoked" + "tooltip": "Signaled after Convert Euler Angles To Transform is invoked" }, "details": { - "name": "MathUtils::ConvertEulerDegreesToTransform", - "category": "Math/Transform" + "name": "Convert Euler Angles To Transform" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in degrees" + "name": "Angles (Degrees)" } } ], @@ -105,8 +98,7 @@ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Transform", - "tooltip": "Transform from a Euler angle" + "name": "Transform" } } ] @@ -116,22 +108,20 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertQuaternionToEulerRadians" + "tooltip": "When signaled, this will invoke Convert Quaternion To Euler Angles (Radians)" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertQuaternionToEulerRadians is invoked" + "tooltip": "Signaled after Convert Quaternion To Euler Angles (Radians) is invoked" }, "details": { - "name": "MathUtils::ConvertQuaternionToEulerRadians", - "category": "Math/Quaternion" + "name": "Convert Quaternion To Euler Angles (Radians)" }, "params": [ { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "Quaternion", - "tooltip": "Quaternion angle" + "name": "Quaternion" } } ], @@ -139,8 +129,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in radians" + "name": "Angles (Radians)" } } ] @@ -150,36 +139,33 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateLookAt" + "tooltip": "When signaled, this will invoke Create Look At" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateLookAt is invoked" + "tooltip": "Signaled after Create Look At is invoked" }, "details": { - "name": "MathUtils::CreateLookAt", - "category": "Math/Transform" + "name": "Create Look At" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "From Position", - "tooltip": "The position looking from" + "name": "From" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Target Position", - "tooltip": "The position looking at" + "name": "To" } }, { "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", "details": { - "name": "Forward Axis", - "tooltip": "1 == X, 2 == -X, 3 == Y, 4 == -Y, 5 == Z, 6 == -Z" + "name": "Axis", + "tooltip": "0: X+, 1: X-, 2: Y+, 3: Y-, 4: Z+, 5: Z-" } } ], @@ -187,8 +173,7 @@ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Transform", - "tooltip": "The look at rotation expressed as a transform" + "name": "Transform" } } ] @@ -198,22 +183,20 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertTransformToEulerRadians" + "tooltip": "When signaled, this will invoke Convert Transform To Euler Angles (Radians)" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertTransformToEulerRadians is invoked" + "tooltip": "Signaled after Convert Transform To Euler Angles (Radians) is invoked" }, "details": { - "name": "MathUtils::ConvertTransformToEulerRadians", - "category": "Math/Transform" + "name": "Convert Transform To Euler Angles (Radians)" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Transform", - "tooltip": "The rotation from the transform is used for the conversion" + "name": "Transform" } } ], @@ -221,8 +204,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in radians" + "name": "Angles (Radians)" } } ] @@ -232,22 +214,20 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertQuaternionToEulerDegrees" + "tooltip": "When signaled, this will invoke Convert Quaternion To Euler Angles (Degrees)" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertQuaternionToEulerDegrees is invoked" + "tooltip": "Signaled after Convert Quaternion To Euler Angles (Degrees) is invoked" }, "details": { - "name": "MathUtils::ConvertQuaternionToEulerDegrees", - "category": "Math/Quaternion" + "name": "Convert Quaternion To Euler Angles (Degrees)" }, "params": [ { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "Quaternion", - "tooltip": "Quaternion angle" + "name": "Quaternion" } } ], @@ -255,8 +235,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in degrees" + "name": "Angles (Degrees)" } } ] @@ -266,22 +245,20 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertTransformToEulerDegrees" + "tooltip": "When signaled, this will invoke Convert Transform To Euler Angles (Degrees)" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertTransformToEulerDegrees is invoked" + "tooltip": "Signaled after Convert Transform To Euler Angles (Degrees) is invoked" }, "details": { - "name": "MathUtils::ConvertTransformToEulerDegrees", - "category": "Math/Transform" + "name": "Convert Transform To Euler Angles (Degrees)" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Transform", - "tooltip": "The rotation from the transform is used for the conversion" + "name": "Transform" } } ], @@ -289,8 +266,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in degrees" + "name": "Angles (Degrees)" } } ] @@ -300,22 +276,20 @@ "context": "MathUtils", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertEulerRadiansToQuaternion" + "tooltip": "When signaled, this will invoke Convert Euler Angles (Radians) To Quaternion" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertEulerRadiansToQuaternion is invoked" + "tooltip": "Signaled after Convert Euler Angles (Radians) To Quaternion is invoked" }, "details": { - "name": "MathUtils::ConvertEulerRadiansToQuaternion", - "category": "Math/Quaternion" + "name": "Convert Euler Angles (Radians) To Quaternion" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Euler Angle", - "tooltip": "Euler angle in radians" + "name": "Angles (Radians)" } } ], @@ -323,8 +297,7 @@ { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "Quaternion", - "tooltip": "Angle as a quaternion" + "name": "Quaternion" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names index 7aea9d3918..a2f2bed3f9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Matrix3x4.names @@ -20,14 +20,14 @@ "tooltip": "Signaled after CreateZero is invoked" }, "details": { - "name": "Matrix3x4::CreateZero", - "category": "Other" + "name": "Create Zero", + "tooltip": "Creates a Matrix3x4 with all values zero" }, "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -37,27 +37,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetRotationPartFromQuaternion" + "tooltip": "When signaled, this will invoke Set Rotation Part From Quaternion" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetRotationPartFromQuaternion is invoked" + "tooltip": "Signaled after Set Rotation Part From Quaternion is invoked" }, "details": { - "name": "Matrix3x4::SetRotationPartFromQuaternion", - "category": "Other" + "name": "Set Rotation Part From Quaternion", + "tooltip": "Sets the 3x3 part of the matrix from a quaternion" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "const Quaternion&" + "name": "Quaternion" } } ] @@ -67,39 +67,39 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateFromColumns" + "tooltip": "When signaled, this will invoke Create From Columns" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateFromColumns is invoked" + "tooltip": "Signaled after Create From Columns is invoked" }, "details": { - "name": "Matrix3x4::CreateFromColumns", - "category": "Other" + "name": "Create From Columns", + "tooltip": "Constructs from individual columns" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 1" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 2" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 4" } } ], @@ -107,7 +107,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -117,33 +117,33 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsClose" + "tooltip": "When signaled, this will invoke Is Close" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsClose is invoked" + "tooltip": "Signaled after Is Close is invoked" }, "details": { - "name": "Matrix3x4::IsClose", - "category": "Other" + "name": "Is Close", + "tooltip": "Tests element-wise whether this matrix is close to another matrix, within the specified tolerance" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "A" } }, { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "B" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Tolerance" } } ], @@ -151,7 +151,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Close" } } ] @@ -161,27 +161,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsOrthogonal" + "tooltip": "When signaled, this will invoke Is Orthogonal" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsOrthogonal is invoked" + "tooltip": "Signaled after Is Orthogonal is invoked" }, "details": { - "name": "Matrix3x4::IsOrthogonal", - "category": "Other" + "name": "Is Orthogonal", + "tooltip": "Tests if the 3x3 part of the matrix is orthogonal" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Tolerance" } } ], @@ -189,7 +189,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Orthogonal" } } ] @@ -206,14 +206,14 @@ "tooltip": "Signaled after Orthogonalize is invoked" }, "details": { - "name": "Matrix3x4::Orthogonalize", - "category": "Other" + "name": "Orthogonalize", + "tooltip": "Modifies the basis vectors of the matrix to be orthogonal and unit length" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ] @@ -223,21 +223,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateFromMatrix3x3" + "tooltip": "When signaled, this will invoke Create From Matrix3x3" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateFromMatrix3x3 is invoked" + "tooltip": "Signaled after Create From Matrix3x3 is invoked" }, "details": { - "name": "Matrix3x4::CreateFromMatrix3x3", - "category": "Other" + "name": "Create From Matrix3x3", + "tooltip": "Constructs from a Matrix3x3, with translation set to zero" }, "params": [ { "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", "details": { - "name": "const Matrix3x3&" + "name": "Matrix3x3" } } ], @@ -245,7 +245,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -255,21 +255,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke RetrieveScale" + "tooltip": "When signaled, this will invoke Retrieve Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after RetrieveScale is invoked" + "tooltip": "Signaled after Retrieve Scale is invoked" }, "details": { - "name": "Matrix3x4::RetrieveScale", - "category": "Other" + "name": "Retrieve Scale", + "tooltip": "Gets the scale part of the transformation (the length of the basis vectors)" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -277,7 +277,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Scale" } } ] @@ -287,21 +287,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateRotationX" + "tooltip": "When signaled, this will invoke Create Rotation X" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateRotationX is invoked" + "tooltip": "Signaled after Create Rotation X is invoked" }, "details": { - "name": "Matrix3x4::CreateRotationX", - "category": "Other" + "name": "Create Rotation X", + "tooltip": "Sets the matrix to be a rotation around the X-axis, specified in radians" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angle (Radians)" } } ], @@ -309,7 +309,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -319,27 +319,26 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateFromMatrix3x3AndTranslation" + "tooltip": "When signaled, this will invoke Create From Matrix3x3 And Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateFromMatrix3x3AndTranslation is invoked" + "tooltip": "Signaled after Create From Matrix3x3 And Translation is invoked" }, "details": { - "name": "Matrix3x4::CreateFromMatrix3x3AndTranslation", - "category": "Other" + "name": "Create From Matrix3x3 And Translation" }, "params": [ { "typeid": "{15A4332F-7C3F-4A58-AC35-50E1CE53FB9C}", "details": { - "name": "const Matrix3x3&" + "name": "Matrix3x3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Translation" } } ], @@ -347,7 +346,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -364,14 +363,13 @@ "tooltip": "Signaled after ToString is invoked" }, "details": { - "name": "Matrix3x4::ToString", - "category": "Other" + "name": "To String" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "Source" } } ], @@ -379,7 +377,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::basic_string, allocator>" + "name": "String" } } ] @@ -389,21 +387,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ExtractScale" + "tooltip": "When signaled, this will invoke Extract Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after ExtractScale is invoked" + "tooltip": "Signaled after Extract Scale is invoked" }, "details": { - "name": "Matrix3x4::ExtractScale", - "category": "Other" + "name": "Extract Scale", + "tooltip": "Gets the scale part of the transformation as in RetrieveScale, and also removes this scaling from the matrix" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -411,7 +409,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Scale" } } ] @@ -421,21 +419,20 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTranspose" + "tooltip": "When signaled, this will invoke Get Transpose" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTranspose is invoked" + "tooltip": "Signaled after Get Transpose is invoked" }, "details": { - "name": "Matrix3x4::GetTranspose", - "category": "Other" + "name": "Get Transpose" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -443,7 +440,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Transpose" } } ] @@ -453,21 +450,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke InvertFast" + "tooltip": "When signaled, this will invoke Invert Fast" }, "exit": { "name": "Out", - "tooltip": "Signaled after InvertFast is invoked" + "tooltip": "Signaled after Invert Fast is invoked" }, "details": { - "name": "Matrix3x4::InvertFast", - "category": "Other" + "name": "Invert Fast", + "tooltip": "Inverts the transformation represented by the matrix, assuming the 3x3 part is orthogonal" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Inverted" } } ] @@ -477,33 +474,33 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateFromRows" + "tooltip": "When signaled, this will invoke Create From Rows" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateFromRows is invoked" + "tooltip": "Signaled after Create From Rows is invoked" }, "details": { - "name": "Matrix3x4::CreateFromRows", - "category": "Other" + "name": "Create From Rows", + "tooltip": "Constructs from individual rows" }, "params": [ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Row 1" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Row 2" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Row 3" } } ], @@ -511,7 +508,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -521,21 +518,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateTranslation" + "tooltip": "When signaled, this will invoke Create Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateTranslation is invoked" + "tooltip": "Signaled after Create Translation is invoked" }, "details": { - "name": "Matrix3x4::CreateTranslation", - "category": "Other" + "name": "Create Translation", + "tooltip": "Sets the matrix to be a translation matrix, with 3x3 part set to the identity" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Translation" } } ], @@ -543,7 +540,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -560,14 +557,14 @@ "tooltip": "Signaled after GetTranspose3x3 is invoked" }, "details": { - "name": "Matrix3x4::GetTranspose3x3", - "category": "Other" + "name": "Get Transpose 3x3", + "tooltip": "Gets the matrix obtained by transposing the 3x3 part of the matrix, leaving the translation untouched" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -575,7 +572,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Transpose" } } ] @@ -585,33 +582,33 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetColumn" + "tooltip": "When signaled, this will invoke Set Column" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetColumn is invoked" + "tooltip": "Signaled after Set Column is invoked" }, "details": { - "name": "Matrix3x4::SetColumn", - "category": "Other" + "name": "Set Column", + "tooltip": "Sets the specified column" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Column Index" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Vector3" } } ] @@ -621,27 +618,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetRow" + "tooltip": "When signaled, this will invoke Get Row" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetRow is invoked" + "tooltip": "Signaled after Get Row is invoked" }, "details": { - "name": "Matrix3x4::GetRow", - "category": "Other" + "name": "Get Row", + "tooltip": "Gets the specified row" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "Source" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Row Index" } } ], @@ -666,14 +663,14 @@ "tooltip": "Signaled after GetInverseFast is invoked" }, "details": { - "name": "Matrix3x4::GetInverseFast", - "category": "Other" + "name": "GetInverseFast", + "tooltip": "Gets the inverse of the transformation represented by the matrix.\nThis function works for any matrix, even if they have scaling or skew.\nIf the 3x3 part of the matrix is orthogonal then \ref GetInverseFast is much faster" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -681,7 +678,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Inverse" } } ] @@ -691,21 +688,22 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOrthogonalized" + "tooltip": "When signaled, this will invoke Get Orthogonalized" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOrthogonalized is invoked" + "tooltip": "Signaled after Get Orthogonalized is invoked" }, "details": { - "name": "Matrix3x4::GetOrthogonalized", - "category": "Other" + "name": "Get Orthogonalized", + "tooltip": "Returns an orthogonal matrix based on this matrix" + }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -713,7 +711,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Orthogonalized" } } ] @@ -730,20 +728,20 @@ "tooltip": "Signaled after Multiply3x3 is invoked" }, "details": { - "name": "Matrix3x4::Multiply3x3", - "category": "Other" + "name": "Multiply 3x3", + "tooltip": "Post-multiplies the matrix by a vector, using only the 3x3 part of the matrix" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Vector3" } } ], @@ -751,7 +749,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Result" } } ] @@ -761,21 +759,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsFinite" + "tooltip": "When signaled, this will invoke Is Finite" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsFinite is invoked" + "tooltip": "Signaled after Is Finite is invoked" }, "details": { - "name": "Matrix3x4::IsFinite", - "category": "Other" + "name": "Is Finite", + "tooltip": "Checks whether the elements of the matrix are all finite" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -783,7 +781,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Finite" } } ] @@ -793,21 +791,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateFromQuaternion" + "tooltip": "When signaled, this will invoke Create From Quaternion" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateFromQuaternion is invoked" + "tooltip": "Signaled after Create From Quaternion is invoked" }, "details": { - "name": "Matrix3x4::CreateFromQuaternion", - "category": "Other" + "name": "Create From Quaternion", + "tooltip": "Sets the matrix from a quaternion, with translation set to zero" }, "params": [ { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "const Quaternion&" + "name": "Quaternion" } } ], @@ -815,7 +813,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -825,45 +823,45 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBasisAndTranslation" + "tooltip": "When signaled, this will invoke Set Basis And Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBasisAndTranslation is invoked" + "tooltip": "Signaled after Set Basis And Translation is invoked" }, "details": { - "name": "Matrix3x4::SetBasisAndTranslation", - "category": "Other" + "name": "Set Basis And Translation", + "tooltip": "Sets the three basis vectors and the translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Basis X" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Basis Y" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Basis Z" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Translation" } } ] @@ -873,27 +871,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke MultiplyVector4" + "tooltip": "When signaled, this will invoke Multiply Vector4" }, "exit": { "name": "Out", - "tooltip": "Signaled after MultiplyVector4 is invoked" + "tooltip": "Signaled after Multiply Vector4 is invoked" }, "details": { - "name": "Matrix3x4::MultiplyVector4", - "category": "Other" + "name": "Multiply Vector4", + "tooltip": "Operator for transforming a Vector4" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Vector4" } } ], @@ -901,7 +899,7 @@ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Result" } } ] @@ -911,21 +909,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateScale" + "tooltip": "When signaled, this will invoke Create Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateScale is invoked" + "tooltip": "Signaled after Create Scale is invoked" }, "details": { - "name": "Matrix3x4::CreateScale", - "category": "Other" + "name": "Create Scale", + "tooltip": "Sets the matrix to be a scale matrix, with translation set to zero" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Scale" } } ], @@ -933,7 +931,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -943,21 +941,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateDiagonal" + "tooltip": "When signaled, this will invoke Create Diagonal" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateDiagonal is invoked" + "tooltip": "Signaled after Create Diagonal is invoked" }, "details": { - "name": "Matrix3x4::CreateDiagonal", - "category": "Other" + "name": "Create Diagonal", + "tooltip": "Sets the matrix to be a diagonal matrix, with translation set to zero" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Diagonal" } } ], @@ -965,7 +963,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -975,21 +973,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTranslation" + "tooltip": "When signaled, this will invoke Get Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTranslation is invoked" + "tooltip": "Signaled after Get Translation is invoked" }, "details": { - "name": "Matrix3x4::GetTranslation", - "category": "Other" + "name": "Get Translation", + "tooltip": "Gets the translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -997,7 +995,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Translation" } } ] @@ -1007,21 +1005,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke InvertFull" + "tooltip": "When signaled, this will invoke Invert Full" }, "exit": { "name": "Out", - "tooltip": "Signaled after InvertFull is invoked" + "tooltip": "Signaled after Invert Full is invoked" }, "details": { - "name": "Matrix3x4::InvertFull", - "category": "Other" + "name": "Invert Full", + "tooltip": "Inverts the transformation represented by the matrix\nThis function works for any matrix, even if they have scaling or skew\nIf the 3x3 part of the matrix is orthogonal then \ref InvertFast is much faster" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Inverted" } } ] @@ -1031,45 +1029,45 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetColumns" + "tooltip": "When signaled, this will invoke Set Columns" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetColumns is invoked" + "tooltip": "Signaled after Set Columns is invoked" }, "details": { - "name": "Matrix3x4::SetColumns", - "category": "Other" + "name": "Set Columns", + "tooltip": "Sets all the columns of the matrix" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 1" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 2" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Column 4" } } ] @@ -1079,39 +1077,39 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetElement" + "tooltip": "When signaled, this will invoke Set Element" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetElement is invoked" + "tooltip": "Signaled after Set Element is invoked" }, "details": { - "name": "Matrix3x4::SetElement", - "category": "Other" + "name": "Set Element", + "tooltip": "Sets the element in the specified row and column\nAccessing individual elements can be slower than working with entire rows" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Row" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Column" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1128,20 +1126,20 @@ "tooltip": "Signaled after Equal is invoked" }, "details": { - "name": "Matrix3x4::Equal", - "category": "Other" + "name": "Equal", + "tooltip": "Compares if two Matrix3x4 are equal" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "A" } }, { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "B" } } ], @@ -1149,7 +1147,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Equal" } } ] @@ -1159,21 +1157,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetDeterminant3x3" + "tooltip": "When signaled, this will invoke Get Determinant 3x3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetDeterminant3x3 is invoked" + "tooltip": "Signaled after Get Determinant 3x3 is invoked" }, "details": { - "name": "Matrix3x4::GetDeterminant3x3", - "category": "Other" + "name": "Get Determinant 3x3", + "tooltip": "Calculates the determinant of the 3x3 part of the matrix" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -1181,7 +1179,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Determinant" } } ] @@ -1191,45 +1189,45 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetColumns" + "tooltip": "When signaled, this will invoke Get Columns" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetColumns is invoked" + "tooltip": "Signaled after Get Columns is invoked" }, "details": { - "name": "Matrix3x4::GetColumns", - "category": "Other" + "name": "Get Columns", + "tooltip": "Gets all the columns of the matrix" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Column 1" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Column 2" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Column 3" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Column 4" } } ] @@ -1246,32 +1244,32 @@ "tooltip": "Signaled after SetRows is invoked" }, "details": { - "name": "Matrix3x4::SetRows", - "category": "Other" + "name": "SetRows", + "tooltip": "Sets all rows of the matrix" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Row 1" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Row 2" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Row 3" } } ] @@ -1281,27 +1279,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetMultipliedByScale" + "tooltip": "When signaled, this will invoke Get Multiplied By Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetMultipliedByScale is invoked" + "tooltip": "Signaled after Get Multiplied By Scale is invoked" }, "details": { - "name": "Matrix3x4::GetMultipliedByScale", - "category": "Other" + "name": "Get Multiplied By Scale", + "tooltip": "Gets a copy of the Matrix3x4 and multiplies it by the specified scale" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Scale" } } ], @@ -1309,7 +1307,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1319,21 +1317,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateRotationZ" + "tooltip": "When signaled, this will invoke Create Rotation Z" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateRotationZ is invoked" + "tooltip": "Signaled after Create Rotation Z is invoked" }, "details": { - "name": "Matrix3x4::CreateRotationZ", - "category": "Other" + "name": "CreateRotationZ", + "tooltip": "Sets the matrix to be a rotation around the Z-axis, specified in radians" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angle (Radians)" } } ], @@ -1341,7 +1339,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1351,27 +1349,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateFromQuaternionAndTranslation" + "tooltip": "When signaled, this will invoke Create From Quaternion And Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateFromQuaternionAndTranslation is invoked" + "tooltip": "Signaled after Create From Quaternion And Translation is invoked" }, "details": { - "name": "Matrix3x4::CreateFromQuaternionAndTranslation", - "category": "Other" + "name": "Create From Quaternion And Translation", + "tooltip": "Sets the matrix from a quaternion and a translation" }, "params": [ { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "const Quaternion&" + "name": "Quaternion" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Translation" } } ], @@ -1379,7 +1377,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1389,27 +1387,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetRowAsVector3" + "tooltip": "When signaled, this will invoke Get Row As Vector3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetRowAsVector3 is invoked" + "tooltip": "Signaled after Get Row As Vector3 is invoked" }, "details": { - "name": "Matrix3x4::GetRowAsVector3", - "category": "Other" + "name": "Get Row As Vector3", + "tooltip": "Gets the specified row as a Vector3" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "Source" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Row" } } ], @@ -1417,7 +1415,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Result" } } ] @@ -1427,27 +1425,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke MultiplyMatrix3x4" + "tooltip": "When signaled, this will invoke Multiply Matrix3x4" }, "exit": { "name": "Out", - "tooltip": "Signaled after MultiplyMatrix3x4 is invoked" + "tooltip": "Signaled after Multiply Matrix3x4 is invoked" }, "details": { - "name": "Matrix3x4::MultiplyMatrix3x4", - "category": "Other" + "name": "Multiply Matrix3x4", + "tooltip": "Operator for matrix-matrix multiplication" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "Multiplicand" } } ], @@ -1455,7 +1453,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1465,39 +1463,39 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetRows" + "tooltip": "When signaled, this will invoke Get Rows" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetRows is invoked" + "tooltip": "Signaled after Get Rows is invoked" }, "details": { - "name": "Matrix3x4::GetRows", - "category": "Other" + "name": "GetRows", + "tooltip": "Gets all rows of the matrix" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4*" + "name": "Row 1" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4*" + "name": "Row 2" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4*" + "name": "Row 3" } } ] @@ -1514,14 +1512,14 @@ "tooltip": "Signaled after Clone is invoked" }, "details": { - "name": "Matrix3x4::Clone", - "category": "Other" + "name": "Clone", + "tooltip": "Returns a deep copy of the provided Matrix3x4" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "Source" } } ], @@ -1529,7 +1527,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Clone" } } ] @@ -1539,27 +1537,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke MultiplyVector3" + "tooltip": "When signaled, this will invoke Multiply Vector3" }, "exit": { "name": "Out", - "tooltip": "Signaled after MultiplyVector3 is invoked" + "tooltip": "Signaled after Multiply Vector3 is invoked" }, "details": { - "name": "Matrix3x4::MultiplyVector3", - "category": "Other" + "name": "Multiply Vector3", + "tooltip": "perator for transforming a Vector3" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Vector3" } } ], @@ -1567,7 +1565,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Result" } } ] @@ -1577,21 +1575,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateIdentity" + "tooltip": "When signaled, this will invoke Create Identity" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateIdentity is invoked" + "tooltip": "Signaled after Create Identity is invoked" }, "details": { - "name": "Matrix3x4::CreateIdentity", - "category": "Other" + "name": "Create Identity", + "tooltip": "Creates an identity Matrix3x4" }, "results": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1608,38 +1606,38 @@ "tooltip": "Signaled after GetBasisAndTranslation is invoked" }, "details": { - "name": "Matrix3x4::GetBasisAndTranslation", - "category": "Other" + "name": "GetBasisAndTranslation", + "tooltip": "Gets the three basis vectors and the translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Basis X" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Basis Y" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Basis Z" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3*" + "name": "Translation" } } ] @@ -1649,21 +1647,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateFromValue" + "tooltip": "When signaled, this will invoke Create From Value" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateFromValue is invoked" + "tooltip": "Signaled after Create From Value is invoked" }, "details": { - "name": "Matrix3x4::CreateFromValue", - "category": "Other" + "name": "Create From Value", + "tooltip": "Constructs a matrix with all components set to the specified value" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ], @@ -1671,7 +1669,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1681,33 +1679,33 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetElement" + "tooltip": "When signaled, this will invoke Get Element" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetElement is invoked" + "tooltip": "Signaled after Get Element is invoked" }, "details": { - "name": "Matrix3x4::GetElement", - "category": "Other" + "name": "Get Element", + "tooltip": "Gets the element in the specified row and column\nAccessing individual elements can be slower than working with entire rows" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Row" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Column" } } ], @@ -1715,7 +1713,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1725,21 +1723,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Transpose3x3" + "tooltip": "When signaled, this will invoke Transpose 3x3" }, "exit": { "name": "Out", - "tooltip": "Signaled after Transpose3x3 is invoked" + "tooltip": "Signaled after Transpose 3x3 is invoked" }, "details": { - "name": "Matrix3x4::Transpose3x3", - "category": "Other" + "name": "Transpose 3x3", + "tooltip": "Gets the matrix obtained by transposing the 3x3 part of the matrix, leaving the translation untouched" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ] @@ -1756,14 +1754,14 @@ "tooltip": "Signaled after Transpose is invoked" }, "details": { - "name": "Matrix3x4::Transpose", - "category": "Other" + "name": "Transpose", + "tooltip": "Transposes the 3x3 part of the matrix, and sets the translation part to zero" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ] @@ -1773,21 +1771,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateRotationY" + "tooltip": "When signaled, this will invoke Create Rotation Y" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateRotationY is invoked" + "tooltip": "Signaled after Create Rotation Y is invoked" }, "details": { - "name": "Matrix3x4::CreateRotationY", - "category": "Other" + "name": "Create Rotation Y", + "tooltip": "Sets the matrix to be a rotation around the Y-axis, specified in radians" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angle (Radians)" } } ], @@ -1795,7 +1793,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1812,26 +1810,26 @@ "tooltip": "Signaled after SetRow is invoked" }, "details": { - "name": "Matrix3x4::SetRow", - "category": "Other" + "name": "Set Row", + "tooltip": "Sets the specified row" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Row Index" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "const Vector4&" + "name": "Vector4" } } ] @@ -1841,21 +1839,21 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetInverseFull" + "tooltip": "When signaled, this will invoke Get Inverse Full" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetInverseFull is invoked" + "tooltip": "Signaled after Get Inverse Full is invoked" }, "details": { - "name": "Matrix3x4::GetInverseFull", - "category": "Other" + "name": "Get Inverse Full", + "tooltip": "Gets the inverse of the transformation represented by the matrix\nThis function works for any matrix, even if they have scaling or skew\nIf the 3x3 part of the matrix is orthogonal then \ref GetInverseFast is much faster" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } } ], @@ -1863,7 +1861,7 @@ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4" + "name": "Result" } } ] @@ -1873,27 +1871,27 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetColumn" + "tooltip": "When signaled, this will invoke Get Column" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetColumn is invoked" + "tooltip": "Signaled after Get Column is invoked" }, "details": { - "name": "Matrix3x4::GetColumn", - "category": "Other" + "name": "Get Column", + "tooltip": "Gets the specified column" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "const Matrix3x4&" + "name": "Source" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Column Index" } } ], @@ -1901,7 +1899,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Column" } } ] @@ -1911,27 +1909,203 @@ "context": "Matrix3x4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTranslation" + "tooltip": "When signaled, this will invoke Set Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTranslation is invoked" + "tooltip": "Signaled after Set Translation is invoked" + }, + "details": { + "name": "Set Translation", + "tooltip": "Sets the translation" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Translation" + } + } + ] + }, + { + "key": "basisX", + "context": "Getter", + "details": { + "name": "Get Basis X" }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Basis X" + } + } + ] + }, + { + "key": "basisX", + "context": "Setter", + "details": { + "name": "Set Basis X" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Basis X" + } + } + ] + }, + { + "key": "basisY", + "context": "Getter", + "details": { + "name": "Get Basis Y" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Basis Y" + } + } + ] + }, + { + "key": "basisY", + "context": "Setter", + "details": { + "name": "Set Basis Y" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Basis Y" + } + } + ] + }, + { + "key": "basisZ", + "context": "Getter", + "details": { + "name": "Get Basis Z" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Basis Z" + } + } + ] + }, + { + "key": "basisZ", + "context": "Setter", + "details": { + "name": "Set Basis Z" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Basis Z" + } + } + ] + }, + { + "key": "translation", + "context": "Getter", + "details": { + "name": "Get Translation" + }, + "params": [ + { + "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", + "details": { + "name": "Source" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Translation" + } + } + ] + }, + { + "key": "translation", + "context": "Setter", "details": { - "name": "Matrix3x4::SetTranslation", - "category": "Other" + "name": "Set Translation" }, "params": [ { "typeid": "{1906D8A5-7DEC-4DE3-A606-9E53BB3459E7}", "details": { - "name": "Matrix3x4*" + "name": "Source" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "const Vector3&" + "name": "Translation" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ModelPreset.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ModelPreset.names index be96ebd842..ca6c97b051 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ModelPreset.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ModelPreset.names @@ -5,8 +5,136 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "ModelPreset" - } + "name": "Model Preset" + }, + "methods": [ + { + "key": "GetdisplayName", + "details": { + "name": "Get Display Name" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "key": "SetdisplayName", + "details": { + "name": "Set Display Name" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Display Name" + } + } + ] + }, + { + "key": "GetmodelAsset", + "details": { + "name": "Get Model Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + } + ], + "results": [ + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Model Asset" + } + } + ] + }, + { + "key": "SetmodelAsset", + "details": { + "name": "Set Model Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + }, + { + "typeid": "{A1F6761B-B5CA-59E6-89FF-EB0ABDF6BD68}", + "details": { + "name": "Model Asset" + } + } + ] + }, + { + "key": "GetpreviewImageAsset", + "details": { + "name": "Get Preview Image Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + } + ], + "results": [ + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Preview Image Asset" + } + } + ] + }, + { + "key": "SetpreviewImageAsset", + "details": { + "name": "Set Preview Image Asset" + }, + "params": [ + { + "typeid": "{A7304AE2-EC26-44A4-8C00-89D9731CCB13}", + "details": { + "name": "Model Preset" + } + }, + { + "typeid": "{403A7CFE-B218-5D57-8540-BD58E734BCFE}", + "details": { + "name": "Preview Image Asset" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MultiplayerSystemComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MultiplayerSystemComponent.names new file mode 100644 index 0000000000..cfa35a377f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/MultiplayerSystemComponent.names @@ -0,0 +1,47 @@ +{ + "entries": [ + { + "key": "MultiplayerSystemComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Multiplayer" + }, + "methods": [ + { + "key": "GetOnClientDisconnectedEvent", + "context": "MultiplayerSystemComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get On Client Disconnected Event" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get On Client Disconnected Event is invoked" + }, + "details": { + "name": "Get On Client Disconnected Event", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{F429F985-AF00-529B-8449-16E56694E5F9}", + "details": { + "name": "Event" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetBindComponent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetBindComponent.names new file mode 100644 index 0000000000..5fe51e3a68 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/NetBindComponent.names @@ -0,0 +1,147 @@ +{ + "entries": [ + { + "key": "NetBindComponent", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Net Entity", + "category": "Multiplayer" + }, + "methods": [ + { + "key": "IsNetEntityRoleAuthority", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Net Entity Role Authority" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Net Entity Role Authority is invoked" + }, + "details": { + "name": "Is Role Authority", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Authority" + } + } + ] + }, + { + "key": "IsNetEntityRoleAutonomous", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke IsNetEntityRoleAutonomous" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Net Entity Role Autonomous is invoked" + }, + "details": { + "name": "Is Role Autonomous", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Autonomous" + } + } + ] + }, + { + "key": "IsNetEntityRoleClient", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Role Client" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Role Client is invoked" + }, + "details": { + "name": "Is Role Client", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Client" + } + } + ] + }, + { + "key": "IsNetEntityRoleServer", + "context": "NetBindComponent", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Role Server" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Role Server is invoked" + }, + "details": { + "name": "Is Role Server", + "category": "Other" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Role Server" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsScene.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsScene.names index 19894bcc21..3c1ef2eaaa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsScene.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsScene.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "PhysicsScene" + "name": "Physics Scene" }, "methods": [ { @@ -13,21 +13,20 @@ "context": "PhysicsScene", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnGravityChangeEvent" + "tooltip": "When signaled, this will invoke Get On Gravity Change Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnGravityChangeEvent is invoked" + "tooltip": "Signaled after Get On Gravity Change Event is invoked" }, "details": { - "name": "PhysicsScene::GetOnGravityChangeEvent", - "category": "Other" + "name": "Get On Gravity Change Event" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Scene Name" } } ], @@ -35,7 +34,7 @@ { "typeid": "{4985DFB0-7CD9-5B28-980B-BA2C701BE3D6}", "details": { - "name": "Event const Vector3& >*" + "name": "Gravity Change Event" } } ] @@ -45,21 +44,20 @@ "context": "PhysicsScene", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke QueryScene" + "tooltip": "When signaled, this will invoke Query Scene" }, "exit": { "name": "Out", - "tooltip": "Signaled after QueryScene is invoked" + "tooltip": "Signaled after Query Scene is invoked" }, "details": { - "name": "PhysicsScene::QueryScene", - "category": "Other" + "name": "Query Scene" }, "params": [ { "typeid": "{52BD8163-BDC4-4B09-ABB2-11DD1F601FFD}", "details": { - "name": "Scene*" + "name": "Scene" } }, { @@ -74,7 +72,7 @@ { "typeid": "{BAFCC4E7-A06B-4909-B2AE-C89D9E84FE4E}", "details": { - "name": "SceneQueryHits" + "name": "Scene Query Hits" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsSystemInterface.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsSystemInterface.names index bd2751ecca..feaa908787 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsSystemInterface.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/PhysicsSystemInterface.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "PhysicsSystemInterface" + "name": "Physics System", + "category": "PhysX" }, "methods": [ { @@ -13,21 +14,20 @@ "context": "PhysicsSystemInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnPresimulateEvent" + "tooltip": "When signaled, this will invoke Get On Pre Simulate Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnPresimulateEvent is invoked" + "tooltip": "Signaled after Get On Pre Simulate Event is invoked" }, "details": { - "name": "PhysicsSystemInterface::GetOnPresimulateEvent", - "category": "Other" + "name": "Get On Pre Simulate Event" }, "results": [ { "typeid": "{F0A3166F-115C-5C3E-8D65-28FBA4420028}", "details": { - "name": "Event*" + "name": "Event" } } ] @@ -37,21 +37,20 @@ "context": "PhysicsSystemInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnPostsimulateEvent" + "tooltip": "When signaled, this will invoke Get On Post Simulate Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnPostsimulateEvent is invoked" + "tooltip": "Signaled after Get On Post Simulate Event is invoked" }, "details": { - "name": "PhysicsSystemInterface::GetOnPostsimulateEvent", - "category": "Other" + "name": "Get On Post Simulate Event" }, "results": [ { "typeid": "{F0A3166F-115C-5C3E-8D65-28FBA4420028}", "details": { - "name": "Event*" + "name": "Event" } } ] @@ -61,27 +60,26 @@ "context": "PhysicsSystemInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSceneHandle" + "tooltip": "When signaled, this will invoke Get Scene Handle" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSceneHandle is invoked" + "tooltip": "Signaled after Get Scene Handle is invoked" }, "details": { - "name": "PhysicsSystemInterface::GetSceneHandle", - "category": "Other" + "name": "Get Scene Handle" }, "params": [ { "typeid": "{B6F4D92A-061B-4CB3-AAB5-984B599A53AE}", "details": { - "name": "SystemInterface*" + "name": "System Interface" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Scene Name" } } ], @@ -89,7 +87,7 @@ { "typeid": "{36669095-4036-5479-B116-41A32E4E16EA}", "details": { - "name": "tuple" + "name": "Scene Handle" } } ] @@ -99,27 +97,26 @@ "context": "PhysicsSystemInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetScene" + "tooltip": "When signaled, this will invoke Get Scene" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetScene is invoked" + "tooltip": "Signaled after Get Scene is invoked" }, "details": { - "name": "PhysicsSystemInterface::GetScene", - "category": "Other" + "name": "Get Scene" }, "params": [ { "typeid": "{B6F4D92A-061B-4CB3-AAB5-984B599A53AE}", "details": { - "name": "SystemInterface*" + "name": "System Interface" } }, { "typeid": "{36669095-4036-5479-B116-41A32E4E16EA}", "details": { - "name": "tuple" + "name": "Scene Handle" } } ], @@ -127,7 +124,7 @@ { "typeid": "{52BD8163-BDC4-4B09-ABB2-11DD1F601FFD}", "details": { - "name": "Scene*" + "name": "Scene" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Platform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Platform.names index b7a5be6da9..cc41ff44a3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Platform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Platform.names @@ -14,21 +14,20 @@ "context": "Platform", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetName" + "tooltip": "When signaled, this will invoke Get Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetName is invoked" + "tooltip": "Signaled after Get Name is invoked" }, "details": { - "name": "Platform::GetName", - "category": "Utilities" + "name": "Get Name" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Id" } } ], @@ -36,7 +35,91 @@ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "Number" + "name": "Name" + } + } + ] + }, + { + "key": "GetMac", + "details": { + "name": "Get Mac" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "key": "GetLinux", + "details": { + "name": "Get Linux" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "key": "GetiOS", + "details": { + "name": "Get iOS" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "key": "GetWindows64", + "details": { + "name": "Get Windows64" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "key": "GetAndroid64", + "details": { + "name": "Get Android64" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" + } + } + ] + }, + { + "key": "GetCurrent", + "details": { + "name": "Get Current" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Id" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneGraphName.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneGraphName.names index f3bb103ae3..114882360c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneGraphName.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SceneGraphName.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "SceneGraphName" + "name": "Scene Graph Name", + "category": "Scene Graph" }, "methods": [ { @@ -13,21 +14,20 @@ "context": "SceneGraphName", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPath" + "tooltip": "When signaled, this will invoke Get Path" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPath is invoked" + "tooltip": "Signaled after Get Path is invoked" }, "details": { - "name": "SceneGraphName::GetPath", - "category": "Other" + "name": "Get Path" }, "params": [ { "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", "details": { - "name": "AZ::SceneAPI::Containers::SceneGraph::Name*" + "name": "Scene Graph Name" } } ], @@ -35,7 +35,7 @@ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "const char*" + "name": "Path" } } ] @@ -45,21 +45,20 @@ "context": "SceneGraphName", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetName" + "tooltip": "When signaled, this will invoke Get Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetName is invoked" + "tooltip": "Signaled after Get Name is invoked" }, "details": { - "name": "SceneGraphName::GetName", - "category": "Other" + "name": "Get Name" }, "params": [ { "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", "details": { - "name": "AZ::SceneAPI::Containers::SceneGraph::Name*" + "name": "Scene Graph Name" } } ], @@ -67,7 +66,7 @@ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "const char*" + "name": "Name" } } ] @@ -77,21 +76,20 @@ "context": "SceneGraphName", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "SceneGraphName::ToString", - "category": "Other" + "name": "To String" }, "params": [ { "typeid": "{4077AC3C-B301-4F5A-BEA7-54D6511AEC2E}", "details": { - "name": "const AZ::SceneAPI::Containers::SceneGraph::Name&" + "name": "Scene Graph Name" } } ], @@ -99,7 +97,7 @@ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "const char*" + "name": "String" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ScriptTimePoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ScriptTimePoint.names index 8cad1c3269..b43f891c4c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ScriptTimePoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ScriptTimePoint.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Script Time Point", - "category": "Timing" + "name": "Script Time Point" }, "methods": [ { @@ -14,21 +13,20 @@ "context": "ScriptTimePoint", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "ScriptTimePoint::ToString", - "category": "Timing" + "name": "To String" }, "params": [ { "typeid": "{4C0F6AD4-0D4F-4354-AD4A-0C01E948245C}", "details": { - "name": "ScriptTimePoint*" + "name": "Script Time Point" } } ], @@ -46,21 +44,20 @@ "context": "ScriptTimePoint", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSeconds" + "tooltip": "When signaled, this will invoke Get Seconds" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSeconds is invoked" + "tooltip": "Signaled after Get Seconds is invoked" }, "details": { - "name": "ScriptTimePoint::GetSeconds", - "category": "Timing" + "name": "Get Seconds" }, "params": [ { "typeid": "{4C0F6AD4-0D4F-4354-AD4A-0C01E948245C}", "details": { - "name": "ScriptTimePoint*" + "name": "Script Time Point" } } ], @@ -68,7 +65,7 @@ { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "Number" + "name": "Seconds" } } ] @@ -78,21 +75,20 @@ "context": "ScriptTimePoint", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetMilliseconds" + "tooltip": "When signaled, this will invoke Get Milliseconds" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetMilliseconds is invoked" + "tooltip": "Signaled after Get Milliseconds is invoked" }, "details": { - "name": "ScriptTimePoint::GetMilliseconds", - "category": "Timing" + "name": "Get Milliseconds" }, "params": [ { "typeid": "{4C0F6AD4-0D4F-4354-AD4A-0C01E948245C}", "details": { - "name": "ScriptTimePoint*" + "name": "Script Time Point" } } ], @@ -100,7 +96,7 @@ { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "Number" + "name": "Milliseconds" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SettingsRegistryInterface.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SettingsRegistryInterface.names index 31cfa551b4..8500946948 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SettingsRegistryInterface.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SettingsRegistryInterface.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "SettingsRegistryInterface" + "name": "Settings Registry", + "category": "Registry" }, "methods": [ { @@ -13,27 +14,26 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFloat" + "tooltip": "When signaled, this will invoke Get Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFloat is invoked" + "tooltip": "Signaled after Get Float is invoked" }, "details": { - "name": "SettingsRegistryInterface::GetFloat", - "category": "Other" + "name": "Get Float" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -41,7 +41,7 @@ { "typeid": "{8FE8A00F-5FE8-54A1-A314-346843AD21B6}", "details": { - "name": "AZStd::optional" + "name": "Value" } } ] @@ -51,33 +51,32 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFloat" + "tooltip": "When signaled, this will invoke Set Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFloat is invoked" + "tooltip": "Signaled after Set Float is invoked" }, "details": { - "name": "SettingsRegistryInterface::SetFloat", - "category": "Other" + "name": "Set Float" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "double" + "name": "Value" } } ], @@ -85,7 +84,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -95,27 +94,26 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke RemoveKey" + "tooltip": "When signaled, this will invoke Remove Key" }, "exit": { "name": "Out", - "tooltip": "Signaled after RemoveKey is invoked" + "tooltip": "Signaled after Remove Key is invoked" }, "details": { - "name": "SettingsRegistryInterface::RemoveKey", - "category": "Other" + "name": "Remove Key" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -123,7 +121,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -133,33 +131,32 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetInt" + "tooltip": "When signaled, this will invoke Set Int" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetInt is invoked" + "tooltip": "Signaled after Set Int is invoked" }, "details": { - "name": "SettingsRegistryInterface::SetInt", - "category": "Other" + "name": "Set Int" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{70D8A282-A1EA-462D-9D04-51EDE81FAC2F}", "details": { - "name": "AZ::s64" + "name": "Value" } } ], @@ -167,7 +164,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -177,33 +174,32 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetUInt" + "tooltip": "When signaled, this will invoke Set UInt" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetUInt is invoked" + "tooltip": "Signaled after Set UInt is invoked" }, "details": { - "name": "SettingsRegistryInterface::SetUInt", - "category": "Other" + "name": "Set UInt" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Value" } } ], @@ -211,7 +207,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -221,27 +217,26 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBool" + "tooltip": "When signaled, this will invoke Get Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBool is invoked" + "tooltip": "Signaled after Get Bool is invoked" }, "details": { - "name": "SettingsRegistryInterface::GetBool", - "category": "Other" + "name": "Get Bool" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -249,7 +244,7 @@ { "typeid": "{0170062C-2E7E-5CEB-BAB8-F7663BEF7B3E}", "details": { - "name": "AZStd::optional" + "name": "Value" } } ] @@ -259,27 +254,26 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetInt" + "tooltip": "When signaled, this will invoke Get Int" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetInt is invoked" + "tooltip": "Signaled after Get Int is invoked" }, "details": { - "name": "SettingsRegistryInterface::GetInt", - "category": "Other" + "name": "Get Int" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -287,7 +281,7 @@ { "typeid": "{8E0A7AC1-C649-56B4-99CF-8BE08EEFC47B}", "details": { - "name": "AZStd::optional" + "name": "Value" } } ] @@ -297,27 +291,26 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetUInt" + "tooltip": "When signaled, this will invoke Get UInt" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetUInt is invoked" + "tooltip": "Signaled after Get UInt is invoked" }, "details": { - "name": "SettingsRegistryInterface::GetUInt", - "category": "Other" + "name": "Get UInt" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -325,7 +318,7 @@ { "typeid": "{858A22B8-1B5E-5016-BF33-B2469DD9CAD3}", "details": { - "name": "AZStd::optional" + "name": "Value" } } ] @@ -335,15 +328,14 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNotifyEvent" + "tooltip": "When signaled, this will invoke Get Notify Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNotifyEvent is invoked" + "tooltip": "Signaled after Get Notify Event is invoked" }, "details": { - "name": "Get Notify Event", - "subtitle": "Settings Registry" + "name": "Get Notify Event" }, "params": [ { @@ -357,7 +349,7 @@ { "typeid": "{84290CFC-1335-5341-AD8B-0A3FE9FE46D0}", "details": { - "name": "Event" + "name": "Script Notify Event" } } ] @@ -367,33 +359,33 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke MergeSettings" + "tooltip": "When signaled, this will invoke Merge Settings" }, "exit": { "name": "Out", - "tooltip": "Signaled after MergeSettings is invoked" + "tooltip": "Signaled after Merge Settings is invoked" }, "details": { - "name": "SettingsRegistryInterface::MergeSettings", - "category": "Other" + "name": "Merge Settings" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Format", + "tooltip": "0: Json Path, 1: Json Merge Patch" } } ], @@ -401,7 +393,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -411,39 +403,39 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke MergeSettingsFile" + "tooltip": "When signaled, this will invoke Merge Settings File" }, "exit": { "name": "Out", - "tooltip": "Signaled after MergeSettingsFile is invoked" + "tooltip": "Signaled after Merge Settings File is invoked" }, "details": { - "name": "SettingsRegistryInterface::MergeSettingsFile", - "category": "Other" + "name": "Merge Settings File" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "Root Key" } }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Format", + "tooltip": "0: Json Path, 1: Json Merge Patch" } } ], @@ -451,7 +443,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -461,27 +453,26 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetString" + "tooltip": "When signaled, this will invoke Get String" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetString is invoked" + "tooltip": "Signaled after Get String is invoked" }, "details": { - "name": "SettingsRegistryInterface::GetString", - "category": "Other" + "name": "Get String" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -489,7 +480,7 @@ { "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", "details": { - "name": "AZStd::optional, allocator>>" + "name": "Output" } } ] @@ -499,21 +490,20 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsValid" + "tooltip": "When signaled, this will invoke Is Valid" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsValid is invoked" + "tooltip": "Signaled after Is Valid is invoked" }, "details": { - "name": "SettingsRegistryInterface::IsValid", - "category": "Other" + "name": "Is Valid" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } } ], @@ -521,7 +511,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -531,39 +521,38 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke MergeSettingsFolder" + "tooltip": "When signaled, this will invoke Merge Settings Folder" }, "exit": { "name": "Out", - "tooltip": "Signaled after MergeSettingsFolder is invoked" + "tooltip": "Signaled after Merge Settings Folder is invoked" }, "details": { - "name": "SettingsRegistryInterface::MergeSettingsFolder", - "category": "Other" + "name": "Merge Settings Folder" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", "details": { - "name": "const SpecializationsProxy&" + "name": "Specializations Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -571,7 +560,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -581,33 +570,32 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBool" + "tooltip": "When signaled, this will invoke Set Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBool is invoked" + "tooltip": "Signaled after Set Bool is invoked" }, "details": { - "name": "SettingsRegistryInterface::SetBool", - "category": "Other" + "name": "Set Bool" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ], @@ -615,7 +603,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -625,33 +613,32 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetString" + "tooltip": "When signaled, this will invoke Set String" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetString is invoked" + "tooltip": "Signaled after Set String is invoked" }, "details": { - "name": "SettingsRegistryInterface::SetString", - "category": "Other" + "name": "Set String" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -659,7 +646,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -669,27 +656,26 @@ "context": "SettingsRegistryInterface", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DumpSettings" + "tooltip": "When signaled, this will invoke Dump Settings" }, "exit": { "name": "Out", - "tooltip": "Signaled after DumpSettings is invoked" + "tooltip": "Signaled after Dump Settings is invoked" }, "details": { - "name": "SettingsRegistryInterface::DumpSettings", - "category": "Other" + "name": "Dump Settings" }, "params": [ { "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", "details": { - "name": "SettingsRegistryScriptProxy*" + "name": "Settings Registry Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "JSON Path" } } ], @@ -697,7 +683,7 @@ { "typeid": "{B0D91084-263A-54B9-A4F3-7C5F4240E248}", "details": { - "name": "AZStd::optional, allocator>>" + "name": "Output" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderSemantic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderSemantic.names index 011619c1e3..f6f6d153c4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderSemantic.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/ShaderSemantic.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "ShaderSemantic" + "name": "Shader Semantic", + "category": "Rendering" }, "methods": [ { @@ -13,29 +14,104 @@ "context": "ShaderSemantic", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "ShaderSemantic::ToString", - "category": "Other" + "name": "To String" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::basic_string, allocator>" + } + } + ] + }, + { + "key": "Getname", + "details": { + "name": "Getname" }, "params": [ { "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", "details": { - "name": "ShaderSemantic*" + "name": "" } } ], "results": [ { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Setname", + "details": { + "name": "Setname" + }, + "params": [ + { + "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "details": { + "name": "" + } + }, + { + "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Getindex", + "details": { + "name": "Getindex" + }, + "params": [ + { + "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Setindex", + "details": { + "name": "Setindex" + }, + "params": [ + { + "typeid": "{C6FFF25F-FE52-4D08-8D96-D04C14048816}", + "details": { + "name": "" + } + }, + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "AZStd::basic_string, allocator>" + "name": "" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimulatedBody.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimulatedBody.names index e950654cad..ec697bbb71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimulatedBody.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SimulatedBody.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "SimulatedBody" + "name": "Simulated Body" }, "methods": [ { @@ -13,21 +13,20 @@ "context": "SimulatedBody", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnCollisionEndEvent" + "tooltip": "When signaled, this will invoke Get On Collision End Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnCollisionEndEvent is invoked" + "tooltip": "Signaled after Get On Collision End Event is invoked" }, "details": { - "name": "SimulatedBody::GetOnCollisionEndEvent", - "category": "Other" + "name": "Get On Collision End Event" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -36,7 +35,7 @@ { "typeid": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", "details": { - "name": "Event const CollisionEvent& >*" + "name": "Collision Event" } } ] @@ -46,21 +45,20 @@ "context": "SimulatedBody", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnCollisionPersistEvent" + "tooltip": "When signaled, this will invoke Get On Collision Persist Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnCollisionPersistEvent is invoked" + "tooltip": "Signaled after Get On Collision Persist Event is invoked" }, "details": { - "name": "SimulatedBody::GetOnCollisionPersistEvent", - "category": "Other" + "name": "Get On Collision Persist Event" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -69,7 +67,7 @@ { "typeid": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", "details": { - "name": "Event const CollisionEvent& >*" + "name": "Collision Event" } } ] @@ -79,21 +77,20 @@ "context": "SimulatedBody", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnTriggerEnterEvent" + "tooltip": "When signaled, this will invoke Get On Trigger Enter Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnTriggerEnterEvent is invoked" + "tooltip": "Signaled after Get On Trigger Enter Event is invoked" }, "details": { - "name": "SimulatedBody::GetOnTriggerEnterEvent", - "category": "Other" + "name": "Get On Trigger Enter Event" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -102,7 +99,7 @@ { "typeid": "{C00D2478-E0F3-57A3-AB60-A04DFC515016}", "details": { - "name": "Event const TriggerEvent& >*" + "name": "Trigger Event" } } ] @@ -112,21 +109,20 @@ "context": "SimulatedBody", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnCollisionBeginEvent" + "tooltip": "When signaled, this will invoke Get On Collision Begin Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnCollisionBeginEvent is invoked" + "tooltip": "Signaled after Get On Collision Begin Event is invoked" }, "details": { - "name": "SimulatedBody::GetOnCollisionBeginEvent", - "category": "Other" + "name": "Get On Collision Begin Event" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -135,7 +131,7 @@ { "typeid": "{4C19E257-F929-524E-80E3-C910C5F3E2D9}", "details": { - "name": "Event const CollisionEvent& >*" + "name": "Collision Event" } } ] @@ -145,21 +141,21 @@ "context": "SimulatedBody", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOnTriggerExitEvent" + "tooltip": "When signaled, this will invoke Get On Trigger Exit Event" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOnTriggerExitEvent is invoked" + "tooltip": "Signaled after Get On Trigger Exit Event is invoked" }, "details": { - "name": "SimulatedBody::GetOnTriggerExitEvent", + "name": "Get On Trigger Exit Event", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -168,7 +164,7 @@ { "typeid": "{C00D2478-E0F3-57A3-AB60-A04DFC515016}", "details": { - "name": "Event const TriggerEvent& >*" + "name": "Trigger Event" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstantiationTicket.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstantiationTicket.names index b9edb1cfa1..ba49c58119 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstantiationTicket.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SliceInstantiationTicket.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Slice Instantiation Ticket", - "category": "Gameplay" + "name": "Slice Instantiation Ticket" }, "methods": [ { @@ -21,20 +20,19 @@ "tooltip": "Signaled after Equal is invoked" }, "details": { - "name": "SliceInstantiationTicket::Equal", - "category": "Gameplay" + "name": "Equal" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket*" + "name": "Slice Instantiation Ticket*" } }, { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "const SliceInstantiationTicket&" + "name": "const Slice Instantiation Ticket&" } } ], @@ -42,7 +40,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Equal" } } ] @@ -52,21 +50,20 @@ "context": "SliceInstantiationTicket", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "SliceInstantiationTicket::ToString", - "category": "Gameplay" + "name": "To String" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket*" + "name": "Slice Instantiation Ticket*" } } ], @@ -74,7 +71,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::basic_string, allocator>" + "name": "String" } } ] @@ -84,21 +81,20 @@ "context": "SliceInstantiationTicket", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsValid" + "tooltip": "When signaled, this will invoke Is Valid" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsValid is invoked" + "tooltip": "Signaled after Is Valid is invoked" }, "details": { - "name": "SliceInstantiationTicket::IsValid", - "category": "Gameplay" + "name": "Is Valid" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket*" + "name": "Slice Instantiation Ticket*" } } ], @@ -106,7 +102,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Valid" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Specializations.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Specializations.names index db5ae9fccf..a9f36b42d3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Specializations.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Specializations.names @@ -5,7 +5,8 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Specializations" + "name": "Specializations", + "category": "Registry" }, "methods": [ { @@ -13,27 +14,27 @@ "context": "Specializations", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPriority" + "tooltip": "When signaled, this will invoke Get Priority" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPriority is invoked" + "tooltip": "Signaled after Get Priority is invoked" }, "details": { - "name": "Specializations::GetPriority", + "name": "Get Priority", "category": "Other" }, "params": [ { "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", "details": { - "name": "SpecializationsProxy*" + "name": "Specializations Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "Specialization" } } ], @@ -41,7 +42,7 @@ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Priority" } } ] @@ -51,21 +52,20 @@ "context": "Specializations", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCount" + "tooltip": "When signaled, this will invoke Get Count" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCount is invoked" + "tooltip": "Signaled after Get Count is invoked" }, "details": { - "name": "Specializations::GetCount", - "category": "Other" + "name": "Get Count" }, "params": [ { "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", "details": { - "name": "SpecializationsProxy*" + "name": "Specializations Proxy" } } ], @@ -73,7 +73,7 @@ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Count" } } ] @@ -90,20 +90,19 @@ "tooltip": "Signaled after Contains is invoked" }, "details": { - "name": "Specializations::Contains", - "category": "Other" + "name": "Contains" }, "params": [ { "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", "details": { - "name": "SpecializationsProxy*" + "name": "Specializations Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "Specialization" } } ], @@ -111,7 +110,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Contains" } } ] @@ -128,20 +127,19 @@ "tooltip": "Signaled after Append is invoked" }, "details": { - "name": "Specializations::Append", - "category": "Other" + "name": "Append" }, "params": [ { "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", "details": { - "name": "SpecializationsProxy*" + "name": "Specializations Proxy" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "Specialization" } } ], @@ -149,7 +147,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -159,27 +157,26 @@ "context": "Specializations", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSpecialization" + "tooltip": "When signaled, this will invoke Get Specialization" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSpecialization is invoked" + "tooltip": "Signaled after Get Specialization is invoked" }, "details": { - "name": "Specializations::GetSpecialization", - "category": "Other" + "name": "Get Specialization" }, "params": [ { "typeid": "{EB6B8ADF-ABAA-4D22-B596-127F9C611740}", "details": { - "name": "SpecializationsProxy*" + "name": "Specializations Proxy" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Index" } } ], @@ -187,7 +184,7 @@ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "AZStd::basic_string_view>" + "name": "Specialization" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names index 0e950bcdbd..0c1b3b7e1d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/SurfaceTagWeight.names @@ -5,8 +5,95 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "SurfaceTagWeight" - } + "name": "Surface Tag Weight", + "category": "Surface Data" + }, + "methods": [ + { + "key": "GetsurfaceType", + "details": { + "name": "Get Surface Type" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + } + ], + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "key": "SetsurfaceType", + "details": { + "name": "Set Surface Type" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + }, + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Tag" + } + } + ] + }, + { + "key": "Getweight", + "details": { + "name": "Get Weight" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Weight" + } + } + ] + }, + { + "key": "Setweight", + "details": { + "name": "Set Weight" + }, + "params": [ + { + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "details": { + "name": "Surface Tag Weight" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Weight" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformConfig.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformConfig.names index f13c9a8f80..d9acd8a6cc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformConfig.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TransformConfig.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "Transform", + "name": "Transform Config", "category": "Entity" }, "methods": [ @@ -14,27 +14,26 @@ "context": "TransformConfig", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTransform" + "tooltip": "When signaled, this will invoke Set Transform" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTransform is invoked" + "tooltip": "Signaled after Set Transform is invoked" }, "details": { - "name": "TransformConfig::SetTransform", - "category": "Entity" + "name": "Set Transform" }, "params": [ { "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", "details": { - "name": "TransformConfig*" + "name": "Transform Config" } }, { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "const Transform&" + "name": "Transform" } } ] @@ -44,33 +43,274 @@ "context": "TransformConfig", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetLocalAndWorldTransform" + "tooltip": "When signaled, this will invoke Set Local And World Transform" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetLocalAndWorldTransform is invoked" + "tooltip": "Signaled after Set Local And World Transform is invoked" }, "details": { - "name": "TransformConfig::SetLocalAndWorldTransform", - "category": "Entity" + "name": "Set Local And World Transform" }, "params": [ { "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", "details": { - "name": "TransformConfig*" + "name": "Transform Config" } }, { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "const Transform&" + "name": "Local" } }, { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "const Transform&" + "name": "World" + } + } + ] + }, + { + "key": "GetparentActivationTransformMode", + "details": { + "name": "Get Parent Activation Transform Mode" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Mode", + "tooltip": "0: Maintain Original Relative Transform\n1: Maintain Current World Transform" + } + } + ] + }, + { + "key": "SetparentActivationTransformMode", + "details": { + "name": "Set Parent Activation Transform Mode" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Mode", + "tooltip": "0: Maintain Original Relative Transform\n1: Maintain Current World Transform" + } + } + ] + }, + { + "key": "GetparentId", + "details": { + "name": "Get Parent Id" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "key": "SetparentId", + "details": { + "name": "Set Parent Id" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Parent Id", + "tooltip": "Entity Unique Id" + } + } + ] + }, + { + "key": "GetworldTransform", + "details": { + "name": "Get World Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "World" + } + } + ] + }, + { + "key": "SetworldTransform", + "details": { + "name": "Set World Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "World" + } + } + ] + }, + { + "key": "GetMaintainCurrentWorldTransform", + "details": { + "name": "Get Maintain Current World Transform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ] + }, + { + "key": "GetisStatic", + "details": { + "name": "Get Is Static" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + }, + { + "key": "SetisStatic", + "details": { + "name": "Set Is Static" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Static" + } + } + ] + }, + { + "key": "GetMaintainOriginalRelativeTransform", + "details": { + "name": "Get Maintain Original Relative Transform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Value" + } + } + ] + }, + { + "key": "GetlocalTransform", + "details": { + "name": "Get Local Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + } + ], + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Local" + } + } + ] + }, + { + "key": "SetlocalTransform", + "details": { + "name": "Set Local Transform" + }, + "params": [ + { + "typeid": "{B3AAB26D-D075-4E2B-9653-9527EE363DF8}", + "details": { + "name": "Transform Config" + } + }, + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Local" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TriggerEvent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TriggerEvent.names index ecac2ac2d5..a0da73d31c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TriggerEvent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/TriggerEvent.names @@ -5,7 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "TriggerEvent" + "name": "Trigger Event" }, "methods": [ { @@ -13,21 +13,21 @@ "context": "TriggerEvent", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTriggerEntityId" + "tooltip": "When signaled, this will invoke Get Trigger Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTriggerEntityId is invoked" + "tooltip": "Signaled after Get Trigger Entity Id is invoked" }, "details": { - "name": "TriggerEvent::Get Trigger EntityId", + "name": "Get Trigger Entity Id", "category": "Other" }, "params": [ { "typeid": "{7A0851A3-2CBD-4A03-85D5-1C40221E7F61}", "details": { - "name": "TriggerEvent*" + "name": "Trigger Event" } } ], @@ -35,7 +35,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -46,21 +46,21 @@ "context": "TriggerEvent", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOtherEntityId" + "tooltip": "When signaled, this will invoke Get Other Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOtherEntityId is invoked" + "tooltip": "Signaled after Get Other Entity Id is invoked" }, "details": { - "name": "TriggerEvent::Get Other EntityId", + "name": "Get Other Entity Id", "category": "Other" }, "params": [ { "typeid": "{7A0851A3-2CBD-4A03-85D5-1C40221E7F61}", "details": { - "name": "TriggerEvent*" + "name": "Trigger Event" } } ], @@ -68,7 +68,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UVCoords.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UVCoords.names index 57abfbff4b..9872b76aa1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UVCoords.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UVCoords.names @@ -6,7 +6,7 @@ "variant": "", "details": { "name": "UV Coords", - "category": "UI/LyShine Examples" + "category": "UI/UI Examples" }, "methods": [ { @@ -14,50 +14,44 @@ "context": "UVCoords", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetUVCoords" + "tooltip": "When signaled, this will invoke SetUV Coords" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetUVCoords is invoked" + "tooltip": "Signaled after SetUV Coords is invoked" }, "details": { - "name": "UVCoords::SetUVCoords", - "category": "UI/LyShine Examples" + "name": "Set UV Coords" }, "params": [ { "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", "details": { - "name": "UV Coords", - "tooltip": "The UV coordinates to set" + "name": "UV Rect" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Left", - "tooltip": "The lower X UV coordinate [0-1]" + "name": "Left" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Top", - "tooltip": "The higher Y UV coordinate [0-1]" + "name": "Top" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Right", - "tooltip": "The higher X UV coordinate [0-1]" + "name": "Right" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Bottom", - "tooltip": "The lower Y UV coordinate [0-1]" + "name": "Bottom" } } ] @@ -67,29 +61,26 @@ "context": "UVCoords", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBottom" + "tooltip": "When signaled, this will invoke Set Bottom" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBottom is invoked" + "tooltip": "Signaled after Set Bottom is invoked" }, "details": { - "name": "UVCoords::SetBottom", - "category": "UI/LyShine Examples" + "name": "Set Bottom" }, "params": [ { "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", "details": { - "name": "UV Coords", - "tooltip": "The UV coordinates to set" + "name": "UV Rect" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Bottom", - "tooltip": "The lower Y UV coordinate [0-1]" + "name": "Bottom" } } ] @@ -99,29 +90,26 @@ "context": "UVCoords", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetRight" + "tooltip": "When signaled, this will invoke Set Right" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetRight is invoked" + "tooltip": "Signaled after Set Right is invoked" }, "details": { - "name": "UVCoords::SetRight", - "category": "UI/LyShine Examples" + "name": "Set Right" }, "params": [ { "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", "details": { - "name": "UV Coords", - "tooltip": "The UV coordinates to set" + "name": "UV Rect" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Right", - "tooltip": "The higher X UV coordinate [0-1]" + "name": "Right" } } ] @@ -131,29 +119,26 @@ "context": "UVCoords", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTop" + "tooltip": "When signaled, this will invoke Set Top" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTop is invoked" + "tooltip": "Signaled after Set Top is invoked" }, "details": { - "name": "UVCoords::SetTop", - "category": "UI/LyShine Examples" + "name": "Set Top" }, "params": [ { "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", "details": { - "name": "UV Coords", - "tooltip": "The UV coordinates to set" + "name": "UV Rect" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Top", - "tooltip": "The higher Y UV coordinate [0-1]" + "name": "Top" } } ] @@ -163,29 +148,194 @@ "context": "UVCoords", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetLeft" + "tooltip": "When signaled, this will invoke Set Left" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetLeft is invoked" + "tooltip": "Signaled after Set Left is invoked" }, "details": { - "name": "UVCoords::SetLeft", - "category": "UI/LyShine Examples" + "name": "Set Left" }, "params": [ { "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", "details": { - "name": "UV Coords", - "tooltip": "The UV coordinates to set" + "name": "UV Rect" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Left", - "tooltip": "Sets the lower X UV coordinate [0-1]" + "name": "Left" + } + } + ] + }, + { + "key": "Getleft", + "details": { + "name": "Left" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left" + } + } + ] + }, + { + "key": "Setleft", + "details": { + "name": "Set Left" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Left" + } + } + ] + }, + { + "key": "Gettop", + "details": { + "name": "Top" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Top" + } + } + ] + }, + { + "key": "Settop", + "details": { + "name": "Set Top" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Top" + } + } + ] + }, + { + "key": "Getright", + "details": { + "name": "Get Right" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Right" + } + } + ] + }, + { + "key": "Setright", + "details": { + "name": "Set Right" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Right" + } + } + ] + }, + { + "key": "Getbottom", + "details": { + "name": "Get Bottom" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bottom" + } + } + ] + }, + { + "key": "Setbottom", + "details": { + "name": "Bottom" + }, + "params": [ + { + "typeid": "{E134EAE8-52A1-4E43-847B-09E546CC5B95}", + "details": { + "name": "UV Rect" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Bottom" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiAnchors.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiAnchors.names index fce8a21930..ce779a7f83 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiAnchors.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UiAnchors.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "UI Anchors", - "category": "UI" + "name": "Ui Anchors" }, "methods": [ { @@ -14,29 +13,26 @@ "context": "UiAnchors", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBottom" + "tooltip": "When signaled, this will invoke Set Bottom" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBottom is invoked" + "tooltip": "Signaled after Set Bottom is invoked" }, "details": { - "name": "UiAnchors::SetBottom", - "category": "UI" + "name": "Set Bottom" }, "params": [ { "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", "details": { - "name": "Anchors", - "tooltip": "The anchors for which to set the bottom anchor" + "name": "Anchors" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Bottom", - "tooltip": "The bottom anchor [0-1]" + "name": "float" } } ] @@ -46,29 +42,26 @@ "context": "UiAnchors", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetRight" + "tooltip": "When signaled, this will invoke Set Right" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetRight is invoked" + "tooltip": "Signaled after Set Right is invoked" }, "details": { - "name": "UiAnchors::SetRight", - "category": "UI" + "name": "Set Right" }, "params": [ { "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", "details": { - "name": "Anchors", - "tooltip": "The anchors for which to set the right anchor" + "name": "Anchors" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Right", - "tooltip": "The right anchor [0-1]" + "name": "float" } } ] @@ -78,29 +71,26 @@ "context": "UiAnchors", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTop" + "tooltip": "When signaled, this will invoke Set Top" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTop is invoked" + "tooltip": "Signaled after Set Top is invoked" }, "details": { - "name": "UiAnchors::SetTop", - "category": "UI" + "name": "Set Top" }, "params": [ { "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", "details": { - "name": "Anchors", - "tooltip": "The anchors for which to set the top anchor" + "name": "Anchors" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Top", - "tooltip": "The top anchor [0-1]" + "name": "float" } } ] @@ -110,29 +100,26 @@ "context": "UiAnchors", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetLeft" + "tooltip": "When signaled, this will invoke Set Left" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetLeft is invoked" + "tooltip": "Signaled after Set Left is invoked" }, "details": { - "name": "UiAnchors::SetLeft", - "category": "UI" + "name": "Set Left" }, "params": [ { "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", "details": { - "name": "Anchors", - "tooltip": "The anchors for which to set the left anchor" + "name": "Anchors" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Left", - "tooltip": "The left anchor [0-1]" + "name": "float" } } ] @@ -142,50 +129,212 @@ "context": "UiAnchors", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAnchors" + "tooltip": "When signaled, this will invoke Set Anchors" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAnchors is invoked" + "tooltip": "Signaled after Set Anchors is invoked" }, "details": { - "name": "UiAnchors::SetAnchors", - "category": "UI" + "name": "Set Anchors" }, "params": [ { "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", "details": { - "name": "Anchors", - "tooltip": "The anchors to set" + "name": "Anchors" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Left", - "tooltip": "The left anchor [0-1]" + "name": "float" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Top", - "tooltip": "The top anchor [0-1]" + "name": "float" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Right", - "tooltip": "The right anchor [0-1]" + "name": "float" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Bottom", - "tooltip": "The bottom anchor [0-1]" + "name": "float" + } + } + ] + }, + { + "key": "Getleft", + "details": { + "name": "Getleft" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Setleft", + "details": { + "name": "Setleft" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Gettop", + "details": { + "name": "Gettop" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Settop", + "details": { + "name": "Settop" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Getright", + "details": { + "name": "Getright" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Setright", + "details": { + "name": "Setright" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Getbottom", + "details": { + "name": "Getbottom" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" + } + } + ] + }, + { + "key": "Setbottom", + "details": { + "name": "Setbottom" + }, + "params": [ + { + "typeid": "{65D4346C-FB16-4CB0-9BDC-1185B122C4A9}", + "details": { + "name": "" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names index c5eefda46c..fde1730637 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Unit Testing.names @@ -20,33 +20,33 @@ "tooltip": "Signaled after ExpectLessThanEqual is invoked" }, "details": { - "name": "Unit Testing::Expect Less Than Equal", + "name": "Expect Less Than Equal", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "double" + "name": "Candidate" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "double" + "name": "Reference" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -70,26 +70,26 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "double" + "name": "Candidate" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "double" + "name": "Reference" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -106,21 +106,21 @@ "tooltip": "Signaled after MarkComplete is invoked" }, "details": { - "name": "Unit Testing::Mark Complete", + "name": "Mark Complete", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -137,27 +137,27 @@ "tooltip": "Signaled after ExpectTrue is invoked" }, "details": { - "name": "Unit Testing::Expect True", + "name": "Expect True", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Candidate" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -174,21 +174,21 @@ "tooltip": "Signaled after Checkpoint is invoked" }, "details": { - "name": "Unit Testing::Checkpoint", + "name": "Checkpoint", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -205,27 +205,27 @@ "tooltip": "Signaled after ExpectFalse is invoked" }, "details": { - "name": "Unit Testing::Expect False", + "name": "Expect False", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Candidate" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -242,33 +242,33 @@ "tooltip": "Signaled after ExpectEqual is invoked" }, "details": { - "name": "Unit Testing::Expect Equal", + "name": "Expect Equal", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", "details": { - "name": "Aabb" + "name": "Candidate" } }, { "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", "details": { - "name": "Aabb" + "name": "Reference" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -285,33 +285,33 @@ "tooltip": "Signaled after ExpectLessThan is invoked" }, "details": { - "name": "Unit Testing::Expect Less Than", + "name": "Expect Less Than", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "double" + "name": "Candidate" } }, { "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", "details": { - "name": "double" + "name": "Reference" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -321,28 +321,28 @@ "context": "Unit Testing", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke AddSuccess" + "tooltip": "When signaled, this will invoke Add Success" }, "exit": { "name": "Out", - "tooltip": "Signaled after AddSuccess is invoked" + "tooltip": "Signaled after Add Success is invoked" }, "details": { - "name": "Unit Testing::Add Success", + "name": "Add Success", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -359,14 +359,14 @@ "tooltip": "Signaled after ExpectNotEqual is invoked" }, "details": { - "name": "Unit Testing::Expect Not Equal", + "name": "Expect Not Equal", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, @@ -385,7 +385,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -402,14 +402,14 @@ "tooltip": "Signaled after ExpectGreaterThan is invoked" }, "details": { - "name": "Unit Testing::Expect Greater Than", + "name": "Expect Greater Than", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, @@ -428,7 +428,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] @@ -445,21 +445,21 @@ "tooltip": "Signaled after AddFailure is invoked" }, "details": { - "name": "Unit Testing::Add Failure", + "name": "Add Failure", "category": "Other" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "const EntityId&", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "const AZStd::basic_string, alloc" + "name": "Report" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UnitTesting.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UnitTesting.names new file mode 100644 index 0000000000..9e5a209d69 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/UnitTesting.names @@ -0,0 +1,484 @@ +{ + "entries": [ + { + "key": "Unit Testing", + "context": "BehaviorClass", + "variant": "", + "details": { + "name": "Unit Testing" + }, + "methods": [ + { + "key": "ExpectLessThanEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Less Than Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Less Than Equal is invoked" + }, + "details": { + "name": "Expect Less Than Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of <=" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of <=" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "ExpectGreaterThanEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Greater Than Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Greater Than Equal is invoked" + }, + "details": { + "name": "Expect Greater Than Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of >=" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of >=" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "MarkComplete", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Mark Complete" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Mark Complete is invoked" + }, + "details": { + "name": "Mark Complete" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "ExpectTrue", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect True" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect True is invoked" + }, + "details": { + "name": "Expect True" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Candidate", + "tooltip": "a value that must be true" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "Checkpoint", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Checkpoint" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Checkpoint is invoked" + }, + "details": { + "name": "Checkpoint" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "ExpectFalse", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect False" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect False is invoked" + }, + "details": { + "name": "Expect False" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Candidate", + "tooltip": "a value that must be false" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "ExpectEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Equal is invoked" + }, + "details": { + "name": "Expect Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Candidate", + "tooltip": "left of ==" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Reference", + "tooltip": "right of ==" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "ExpectLessThan", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Less Than" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Less Than is invoked" + }, + "details": { + "name": "Expect Less Than" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of <" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of <" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "AddSuccess", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Success" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Success is invoked" + }, + "details": { + "name": "Add Success" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "ExpectNotEqual", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Not Equal" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Not Equal is invoked" + }, + "details": { + "name": "Expect Not Equal" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Candidate", + "tooltip": "left of !=" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "Reference", + "tooltip": "right of !=" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "ExpectGreaterThan", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Expect Greater Than" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Expect Greater Than is invoked" + }, + "details": { + "name": "Expect Greater Than" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Candidate", + "tooltip": "left of >" + } + }, + { + "typeid": "{110C4B14-11A8-4E9D-8638-5051013A56AC}", + "details": { + "name": "Reference", + "tooltip": "right of >" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + }, + { + "key": "AddFailure", + "context": "Unit Testing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Add Failure" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Add Failure is invoked" + }, + "details": { + "name": "Add Failure" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Report", + "tooltip": "additional notes for the test report" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Uuid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Uuid.names index dbed05c272..78f3425305 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Uuid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/Uuid.names @@ -5,8 +5,7 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "UUID", - "category": "Utilities" + "name": "Uuid" }, "methods": [ { @@ -14,22 +13,20 @@ "context": "Uuid", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateRandom" + "tooltip": "When signaled, this will invoke Create Random" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateRandom is invoked" + "tooltip": "Signaled after Create Random is invoked" }, "details": { - "name": "Uuid::CreateRandom", - "category": "Utilities" + "name": "Create Random" }, "results": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "UUID", - "tooltip": "Universally Unique Identifier" + "name": "Uuid" } } ] @@ -39,22 +36,20 @@ "context": "Uuid", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateNull" + "tooltip": "When signaled, this will invoke Create Null" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateNull is invoked" + "tooltip": "Signaled after Create Null is invoked" }, "details": { - "name": "Uuid::CreateNull", - "category": "Utilities" + "name": "Create Null" }, "results": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "Null UUID", - "tooltip": "Null Universally Unique Identifier" + "name": "Uuid" } } ] @@ -71,8 +66,7 @@ "tooltip": "Signaled after Create is invoked" }, "details": { - "name": "Uuid::Create", - "category": "Utilities" + "name": "Create" }, "results": [ { @@ -88,21 +82,20 @@ "context": "Uuid", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateName" + "tooltip": "When signaled, this will invoke Create Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateName is invoked" + "tooltip": "Signaled after Create Name is invoked" }, "details": { - "name": "Uuid::CreateName", - "category": "Utilities" + "name": "Create Name" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "const char*" + "name": "Name" } } ], @@ -127,14 +120,13 @@ "tooltip": "Signaled after Clone is invoked" }, "details": { - "name": "Uuid::Clone", - "category": "Utilities" + "name": "Clone" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "const AZ::Uuid&" + "name": "Uuid" } } ], @@ -152,27 +144,26 @@ "context": "Uuid", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke LessThan" + "tooltip": "When signaled, this will invoke Less Than" }, "exit": { "name": "Out", - "tooltip": "Signaled after LessThan is invoked" + "tooltip": "Signaled after Less Than is invoked" }, "details": { - "name": "Uuid::LessThan", - "category": "Utilities" + "name": "Less Than" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid*" + "name": "Uuid" } }, { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "const AZ::Uuid&" + "name": "Uuid" } } ], @@ -180,7 +171,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Less Than" } } ] @@ -190,22 +181,20 @@ "context": "Uuid", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsNull" + "tooltip": "When signaled, this will invoke Is Null" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsNull is invoked" + "tooltip": "Signaled after Is Null is invoked" }, "details": { - "name": "Uuid::IsNull", - "category": "Utilities" + "name": "Is Null" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "UUID", - "tooltip": "Universally Unique Identifier" + "name": "Uuid" } } ], @@ -213,7 +202,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Null" } } ] @@ -223,27 +212,26 @@ "context": "Uuid", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateString" + "tooltip": "When signaled, this will invoke Create String" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateString is invoked" + "tooltip": "Signaled after Create String is invoked" }, "details": { - "name": "Uuid::CreateString", - "category": "Utilities" + "name": "Create String" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "const char*" + "name": "String" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Size" } } ], @@ -261,22 +249,20 @@ "context": "Uuid", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ToString" + "tooltip": "When signaled, this will invoke To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after ToString is invoked" + "tooltip": "Signaled after To String is invoked" }, "details": { - "name": "Uuid::ToString", - "category": "Utilities" + "name": "To String" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "UUID", - "tooltip": "Universally Unique Identifier" + "name": "Uuid" } } ], @@ -301,22 +287,19 @@ "tooltip": "Signaled after Equal is invoked" }, "details": { - "name": "Uuid::Equal", - "category": "Utilities" + "name": "Equal" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "UUID A", - "tooltip": "Universally Unique Identifier A" + "name": "Uuid" } }, { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "UUID B", - "tooltip": "Universally Unique Identifier B" + "name": "Uuid" } } ], @@ -324,7 +307,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Boolean" + "name": "Is Equal" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/VertexColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/VertexColor.names index e7636f6353..af9efaf5a8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/VertexColor.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Classes/VertexColor.names @@ -5,8 +5,98 @@ "context": "BehaviorClass", "variant": "", "details": { - "name": "VertexColor" - } + "name": "Vertex Color" + }, + "methods": [ + { + "key": "Getred", + "details": { + "name": "Get Red" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Red" + } + } + ] + }, + { + "key": "Getgreen", + "details": { + "name": "Get Green" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Green" + } + } + ] + }, + { + "key": "Getblue", + "details": { + "name": "Get Blue" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Blue" + } + } + ] + }, + { + "key": "Getalpha", + "details": { + "name": "Get Alpha" + }, + "params": [ + { + "typeid": "{937E3BF8-5204-4D40-A8DA-C8F083C89F9F}", + "details": { + "name": "Color" + } + } + ], + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Alpha" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoAuthorizationNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoAuthorizationNotificationBus.names index dd039b28e9..b96ab2fb37 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoAuthorizationNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoAuthorizationNotificationBus.names @@ -5,20 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "AWSCognitoAuthorizationNotificationBus", - "category": "EBus Handlers" + "name": "AWS Cognito Authorization", + "category": "AWS Core" }, "methods": [ { "key": "OnRequestAWSCredentialsSuccess", "details": { - "name": "OnRequestAWSCredentialsSuccess" + "name": "On Request AWS Credentials Success" }, "params": [ { "typeid": "{02FB32C4-B94E-4084-9049-3DF32F87BD76}", "details": { - "name": "ClientAuthAWSCredentials" + "name": "AWS Client Auth Credentials" } } ] @@ -26,13 +26,13 @@ { "key": "OnRequestAWSCredentialsFail", "details": { - "name": "OnRequestAWSCredentialsFail" + "name": "On Request AWS Credentials Fail" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Error" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoUserManagementNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoUserManagementNotificationBus.names new file mode 100644 index 0000000000..a796ec0f48 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSCognitoUserManagementNotificationBus.names @@ -0,0 +1,151 @@ +{ + "entries": [ + { + "key": "AWSCognitoUserManagementNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Cognito User Management", + "category": "AWS Client Auth" + }, + "methods": [ + { + "key": "OnEmailSignUpSuccess", + "details": { + "name": "On Email Sign Up Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Unique Id" + } + } + ] + }, + { + "key": "OnEmailSignUpFail", + "details": { + "name": "On Email Sign Up Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnPhoneSignUpSuccess", + "details": { + "name": "On Phone Sign Up Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Unique Id" + } + } + ] + }, + { + "key": "OnPhoneSignUpFail", + "details": { + "name": "On Phone Sign Up Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnConfirmSignUpSuccess", + "details": { + "name": "On Confirm Sign Up Success" + } + }, + { + "key": "OnConfirmSignUpFail", + "details": { + "name": "On Confirm Sign Up Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnForgotPasswordSuccess", + "details": { + "name": "On Forgot Password Success" + } + }, + { + "key": "OnForgotPasswordFail", + "details": { + "name": "On Forgot Password Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnConfirmForgotPasswordSuccess", + "details": { + "name": "On Confirm Forgot Password Success" + } + }, + { + "key": "OnConfirmForgotPasswordFail", + "details": { + "name": "On Confirm Forgot Password Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnEnableMFASuccess", + "details": { + "name": "On Enable MFA Success" + } + }, + { + "key": "OnEnableMFAFail", + "details": { + "name": "On Enable MFA Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSDynamoDBBehaviorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSDynamoDBBehaviorNotificationBus.names new file mode 100644 index 0000000000..c5840d7bdb --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSDynamoDBBehaviorNotificationBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "key": "AWSDynamoDBBehaviorNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Dynamo DB", + "category": "AWS Core" + }, + "methods": [ + { + "key": "OnGetItemSuccess", + "details": { + "name": "On Get Item Success" + }, + "params": [ + { + "typeid": "{F8A7460C-2CC2-5755-AFDA-49B1109A751E}", + "details": { + "name": "Result" + } + } + ] + }, + { + "key": "OnGetItemError", + "details": { + "name": "On Get Item Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSLambdaBehaviorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSLambdaBehaviorNotificationBus.names new file mode 100644 index 0000000000..713ece5219 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSLambdaBehaviorNotificationBus.names @@ -0,0 +1,43 @@ +{ + "entries": [ + { + "key": "AWSLambdaBehaviorNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Lambda", + "category": "AWS Core" + }, + "methods": [ + { + "key": "OnInvokeSuccess", + "details": { + "name": "On Invoke Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Result" + } + } + ] + }, + { + "key": "OnInvokeError", + "details": { + "name": "On Invoke Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSMetricsNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSMetricsNotificationBus.names index 1aa4c85f74..64920f9444 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSMetricsNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSMetricsNotificationBus.names @@ -5,20 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "AWSMetricsNotificationBus", - "category": "EBus Handlers" + "name": "AWS Metrics", + "category": "AWS Core" }, "methods": [ { "key": "OnSendMetricsSuccess", "details": { - "name": "OnSendMetricsSuccess" + "name": "On Send Metrics Success" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Request Id" } } ] @@ -26,19 +26,19 @@ { "key": "OnSendMetricsFailure", "details": { - "name": "OnSendMetricsFailure" + "name": "On Send Metrics Failure" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Request Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Error" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSS3BehaviorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSS3BehaviorNotificationBus.names new file mode 100644 index 0000000000..55b093d348 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AWSS3BehaviorNotificationBus.names @@ -0,0 +1,71 @@ +{ + "entries": [ + { + "key": "AWSS3BehaviorNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS S3", + "category": "AWS Core" + }, + "methods": [ + { + "key": "OnHeadObjectSuccess", + "details": { + "name": "On Head Object Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Result" + } + } + ] + }, + { + "key": "OnHeadObjectError", + "details": { + "name": "On Head Object Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnGetObjectSuccess", + "details": { + "name": "On Get Object Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Result" + } + } + ] + }, + { + "key": "OnGetObjectError", + "details": { + "name": "On Get Object Error" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorComponentNotificationBus.names index c4f08cd6f8..5b61508119 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorComponentNotificationBus.names @@ -5,19 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "ActorComponentNotificationBus" + "name": "Actor", + "category": "Animation" }, "methods": [ { "key": "OnActorInstanceCreated", "details": { - "name": "OnActorInstanceCreated" + "name": "On Actor Instance Created" }, "params": [ { "typeid": "{280A0170-EB6A-4E90-B2F1-E18D8EAEFB36}", "details": { - "name": "" + "name": "Actor Instance" } } ] @@ -25,13 +26,13 @@ { "key": "OnActorInstanceDestroyed", "details": { - "name": "OnActorInstanceDestroyed" + "name": "On Actor Instance Destroyed" }, "params": [ { "typeid": "{280A0170-EB6A-4E90-B2F1-E18D8EAEFB36}", "details": { - "name": "" + "name": "Actor Instance" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorNotificationBus.names index a43f1d827c..82e8a54750 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ActorNotificationBus.names @@ -18,7 +18,7 @@ { "typeid": "{0C899DAC-6B19-4BDD-AD8C-8A11EF2A6729}", "details": { - "name": "MotionEvent" + "name": "Motion Event" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AnimGraphComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AnimGraphComponentNotificationBus.names index 4b0b1a6399..ec8d9fa193 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AnimGraphComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AnimGraphComponentNotificationBus.names @@ -5,19 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "AnimGraphComponentNotificationBus" + "name": "Anim Graph", + "category": "Animation" }, "methods": [ { "key": "OnAnimGraphInstanceCreated", "details": { - "name": "OnAnimGraphInstanceCreated" + "name": "On Anim Graph Instance Created" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } } ] @@ -25,13 +26,13 @@ { "key": "OnAnimGraphInstanceDestroyed", "details": { - "name": "OnAnimGraphInstanceDestroyed" + "name": "On Anim Graph Instance Destroyed" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } } ] @@ -39,31 +40,31 @@ { "key": "OnAnimGraphFloatParameterChanged", "details": { - "name": "OnAnimGraphFloatParameterChanged" + "name": "On Anim Graph Float Parameter Changed" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Previous Value" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Current Value" } } ] @@ -71,31 +72,31 @@ { "key": "OnAnimGraphBoolParameterChanged", "details": { - "name": "OnAnimGraphBoolParameterChanged" + "name": "On Anim Graph Bool Parameter Changed" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Previous Value" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Current Value" } } ] @@ -103,31 +104,31 @@ { "key": "OnAnimGraphStringParameterChanged", "details": { - "name": "OnAnimGraphStringParameterChanged" + "name": "On Anim Graph String Parameter Changed" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Previous Value" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Current Value" } } ] @@ -135,31 +136,31 @@ { "key": "OnAnimGraphVector2ParameterChanged", "details": { - "name": "OnAnimGraphVector2ParameterChanged" + "name": "On Anim Graph Vector2 Parameter Changed" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Previous Value" } }, { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Current Value" } } ] @@ -167,31 +168,31 @@ { "key": "OnAnimGraphVector3ParameterChanged", "details": { - "name": "OnAnimGraphVector3ParameterChanged" + "name": "On Anim Graph Vector3 Parameter Changed" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Previous Value" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Current Value" } } ] @@ -199,31 +200,31 @@ { "key": "OnAnimGraphRotationParameterChanged", "details": { - "name": "OnAnimGraphRotationParameterChanged" + "name": "On Anim Graph Rotation Parameter Changed" }, "params": [ { "typeid": "{2CC86AA2-AFC0-434B-A317-B102FD02E76D}", "details": { - "name": "" + "name": "Anim Graph Instance" } }, { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "Quaternion" + "name": "Previous Value" } }, { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "Quaternion" + "name": "Current Value" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AttachmentComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AttachmentComponentNotificationBus.names index 4ce39f83cb..64f2f4c204 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AttachmentComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AttachmentComponentNotificationBus.names @@ -12,15 +12,14 @@ { "key": "OnAttached", "details": { - "name": "On Attached", - "tooltip": "Notifies when the entity is attached" + "name": "On Attached" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "Target", - "tooltip": "ID of the target being attached to" + "name": "Entity Id", + "tooltip": "Entity Unique Id" } } ] @@ -28,15 +27,14 @@ { "key": "OnDetached", "details": { - "name": "On Detached", - "tooltip": "Notifies when the entity is detached" + "name": "On Detached" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "Target", - "tooltip": "ID of the target being detached from" + "name": "Entity Id", + "tooltip": "Entity Unique Id" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/Audio System Component Notifications.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/Audio System Component Notifications.names index adf505b728..7803611d90 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/Audio System Component Notifications.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/Audio System Component Notifications.names @@ -5,19 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "Audio System Component Notifications" + "name": "Audio System", + "category": "Audio" }, "methods": [ { "key": "OnGamePaused", "details": { - "name": "OnGamePaused" + "name": "On Game Paused" } }, { "key": "OnGameUnpaused", "details": { - "name": "OnGameUnpaused" + "name": "On Game Unpaused" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AuthenticationProviderNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AuthenticationProviderNotificationBus.names new file mode 100644 index 0000000000..f90336780e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/AuthenticationProviderNotificationBus.names @@ -0,0 +1,187 @@ +{ + "entries": [ + { + "key": "AuthenticationProviderNotificationBus", + "context": "EBusHandler", + "variant": "", + "details": { + "name": "AWS Authentication Provider", + "category": "AWS Client Auth" + }, + "methods": [ + { + "key": "OnPasswordGrantSingleFactorSignInSuccess", + "details": { + "name": "On Password Grant Single Factor Sign In Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ] + }, + { + "key": "OnPasswordGrantSingleFactorSignInFail", + "details": { + "name": "On Password Grant Single Factor Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnPasswordGrantMultiFactorSignInSuccess", + "details": { + "name": "On Password Grant Multi Factor Sign In Success" + } + }, + { + "key": "OnPasswordGrantMultiFactorSignInFail", + "details": { + "name": "On Password Grant Multi Factor Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnPasswordGrantMultiFactorConfirmSignInSuccess", + "details": { + "name": "On Password Grant Multi Factor Confirm Sign In Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "AuthenticationTokens" + } + } + ] + }, + { + "key": "OnPasswordGrantMultiFactorConfirmSignInFail", + "details": { + "name": "On Password Grant Multi Factor Confirm Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnDeviceCodeGrantSignInSuccess", + "details": { + "name": "On Device Code Grant Sign In Success" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "User Code" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Verification URL" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Code Expiration (Seconds)" + } + } + ] + }, + { + "key": "OnDeviceCodeGrantSignInFail", + "details": { + "name": "On Device Code Grant Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnDeviceCodeGrantConfirmSignInSuccess", + "details": { + "name": "On Device Code Grant Confirm Sign In Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ] + }, + { + "key": "OnDeviceCodeGrantConfirmSignInFail", + "details": { + "name": "On Device Code Grant Confirm Sign In Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + }, + { + "key": "OnRefreshTokensSuccess", + "details": { + "name": "On Refresh Tokens Success" + }, + "params": [ + { + "typeid": "{F965D1B2-9DE3-4900-B44B-E58D9F083ACB}", + "details": { + "name": "Authentication Tokens" + } + } + ] + }, + { + "key": "OnRefreshTokensFail", + "details": { + "name": "On Refresh Tokens Fail" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Error" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/BlastFamilyComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/BlastFamilyComponentNotificationBus.names index b73860d14c..c8722bf36f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/BlastFamilyComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/BlastFamilyComponentNotificationBus.names @@ -5,8 +5,8 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "BlastFamilyComponentNotificationBus", - "category": "EBus Handlers" + "name": "Blast Family", + "category": "Blast" }, "methods": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CameraNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CameraNotificationBus.names index aeecd598c3..3c12c9643e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CameraNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/CameraNotificationBus.names @@ -18,7 +18,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -33,7 +33,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -48,7 +48,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ConsoleNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ConsoleNotificationBus.names index e96eef8e46..9bd1bfbbb1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ConsoleNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/ConsoleNotificationBus.names @@ -5,19 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "ConsoleNotificationBus" + "name": "Console", + "category": "Utilities" }, "methods": [ { "key": "OnConsoleCommandExecuted", "details": { - "name": "OnConsoleCommandExecuted" + "name": "On Console Command Executed" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Command" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/InputSystemNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/InputSystemNotificationBus.names index 5aea1ad6b7..d77cbe0f32 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/InputSystemNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/InputSystemNotificationBus.names @@ -5,19 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "InputSystemNotificationBus" + "name": "Input System", + "category": "Input" }, "methods": [ { "key": "OnPreInputUpdate", "details": { - "name": "OnPreInputUpdate" + "name": "On Pre Input Update" } }, { "key": "OnPostInputUpdate", "details": { - "name": "OnPostInputUpdate" + "name": "On Post Input Update" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LookAtNotification.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LookAtNotification.names index 6d1ff93ed4..21994e982c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LookAtNotification.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/LookAtNotification.names @@ -5,20 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "LookAtNotification", - "tooltip": "Notifications for the Look At Component" + "name": "Look At", + "category": "Gameplay" }, "methods": [ { "key": "OnTargetChanged", "details": { - "name": "OnTargetChanged" + "name": "On Target Changed" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/MeshComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/MeshComponentNotificationBus.names index a62652ba47..66175bd1bf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/MeshComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/MeshComponentNotificationBus.names @@ -5,13 +5,14 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "MeshComponentNotificationBus" + "name": "Mesh", + "category": "Rendering" }, "methods": [ { "key": "OnModelReady", "details": { - "name": "OnModelReady" + "name": "On Model Ready" }, "params": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NavigationComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NavigationComponentNotificationBus.names index 7a939652fb..b7549119c5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NavigationComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/NavigationComponentNotificationBus.names @@ -5,20 +5,20 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "NavigationComponentNotificationBus", - "category": "EBus Handlers" + "name": "Movement", + "category": "Navigation" }, "methods": [ { "key": "OnSearchingForPath", "details": { - "name": "OnSearchingForPath" + "name": "On Searching For Path" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "RequestId", + "name": "Request Id", "tooltip": "Navigation request Id" } } @@ -27,13 +27,13 @@ { "key": "OnTraversalStarted", "details": { - "name": "OnTraversalStarted" + "name": "On Traversal Started" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "RequestId", + "name": "Request Id", "tooltip": "Navigation request Id" } } @@ -42,27 +42,27 @@ { "key": "OnTraversalPathUpdate", "details": { - "name": "OnTraversalPathUpdate" + "name": "On Traversal Path Update" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "RequestId", + "name": "Request Id", "tooltip": "Navigation request Id" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "NextPathPosition", + "name": "Next Path Position", "tooltip": "Next path position" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "InflectionPosition", + "name": "Inflection Position", "tooltip": "Next inflection position" } } @@ -71,13 +71,13 @@ { "key": "OnTraversalInProgress", "details": { - "name": "OnTraversalInProgress" + "name": "On Traversal In Progress" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "RequestId", + "name": "Request Id", "tooltip": "Navigation request Id" } }, @@ -93,13 +93,13 @@ { "key": "OnTraversalComplete", "details": { - "name": "OnTraversalComplete" + "name": "On Traversal Complete" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "RequestId", + "name": "Request Id", "tooltip": "Navigation request Id" } } @@ -108,13 +108,13 @@ { "key": "OnTraversalCancelled", "details": { - "name": "OnTraversalCancelled" + "name": "On Traversal Cancelled" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "RequestId", + "name": "Request Id", "tooltip": "Navigation request Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SequenceComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SequenceComponentNotificationBus.names index 2de5b0e2f1..cadb4ef7f1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SequenceComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SequenceComponentNotificationBus.names @@ -12,13 +12,14 @@ { "key": "OnStart", "details": { - "name": "On Start" + "name": "On Start", + "tooltip": "Called when Sequence starts" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Start Time" } } ] @@ -26,13 +27,14 @@ { "key": "OnStop", "details": { - "name": "On Stop" + "name": "On Stop", + "tooltip": "Called when Sequence stops" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Stop Time" } } ] @@ -40,25 +42,28 @@ { "key": "OnPause", "details": { - "name": "On Pause" + "name": "On Pause", + "tooltip": "Called when Sequence pauses" } }, { "key": "OnResume", "details": { - "name": "On Resume" + "name": "On Resume", + "tooltip": "Called when Sequence resumes" } }, { "key": "OnAbort", "details": { - "name": "On Abort" + "name": "On Abort", + "tooltip": "Called when Sequence is aborted" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Abort Time" } } ] @@ -66,13 +71,14 @@ { "key": "OnUpdate", "details": { - "name": "On Update" + "name": "On Update", + "tooltip": "Called when Sequence is updated. That is, when the current play time changes, or the playback speed changes" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Update Time" } } ] @@ -80,19 +86,20 @@ { "key": "OnTrackEventTriggered", "details": { - "name": "On Track Event Triggered" + "name": "On Track Event Triggered", + "tooltip": "Called when Sequence Event is triggered" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Event Name" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Event Value" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SpawnerComponentNotificationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SpawnerComponentNotificationBus.names index 39c8a095af..ce3f913622 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SpawnerComponentNotificationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/SpawnerComponentNotificationBus.names @@ -12,15 +12,13 @@ { "key": "OnSpawnBegin", "details": { - "name": "On Spawn Begin", - "tooltip": "Notifies when the spawn starts" + "name": "On Spawn Begin" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "Slice", - "tooltip": "Slice instance from the spawn event" + "name": "Slice Instantiation Ticket" } } ] @@ -28,15 +26,13 @@ { "key": "OnSpawnEnd", "details": { - "name": "On Spawn End", - "tooltip": "Notifies when the spawn completes" + "name": "On Spawn End" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "Slice", - "tooltip": "Slice instance from the spawn event" + "name": "Slice Instantiation Ticket" } } ] @@ -44,22 +40,20 @@ { "key": "OnEntitySpawned", "details": { - "name": "On Entity Spawned", - "tooltip": "Notify that an entity has spawned, will be called once for each entity spawned in a slice" + "name": "On Entity Spawned" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "Slice", - "tooltip": "Slice instance from the spawn event" + "name": "Slice Instantiation Ticket" } }, { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "Entity", - "tooltip": "EntityID of the spawned entity, for each spawned entity" + "name": "Entity Id", + "tooltip": "Entity Unique Id" } } ] @@ -67,13 +61,13 @@ { "key": "OnSpawnedSliceDestroyed", "details": { - "name": "OnSpawnedSliceDestroyed" + "name": "On Spawned Slice Destroyed" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket" + "name": "Slice Instantiation Ticket" } } ] @@ -81,19 +75,19 @@ { "key": "OnEntitiesSpawned", "details": { - "name": "OnEntitiesSpawned" + "name": "On Entities Spawned" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket" + "name": "Slice Instantiation Ticket" } }, { "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", "details": { - "name": "AZStd::vector" + "name": "Entities" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/VariableNotification.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/VariableNotification.names index c470e02dfb..486694b4bb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/VariableNotification.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Handlers/VariableNotification.names @@ -5,14 +5,15 @@ "context": "EBusHandler", "variant": "", "details": { - "name": "VariableNotification", + "name": "Variable Notification", + "category": "Variables", "tooltip": "Notifications from the Variables in the current Script Canvas graph" }, "methods": [ { "key": "OnVariableValueChanged", "details": { - "name": "OnVariableValueChanged" + "name": "On Variable Value Changed" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoAuthorizationRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoAuthorizationRequestBus.names new file mode 100644 index 0000000000..9ba441a6c8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoAuthorizationRequestBus.names @@ -0,0 +1,109 @@ +{ + "entries": [ + { + "key": "AWSCognitoAuthorizationRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "AWS Cognito Authorization", + "category": "AWS Client Auth" + }, + "methods": [ + { + "key": "Reset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reset is invoked" + }, + "details": { + "name": "Reset" + } + }, + { + "key": "GetIdentityId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke GetIdentityId" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after GetIdentityId is invoked" + }, + "details": { + "name": "Get Identity Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Identity" + } + } + ] + }, + { + "key": "HasPersistedLogins", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke HasPersistedLogins" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after HasPersistedLogins is invoked" + }, + "details": { + "name": "Has Persisted Logins" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Has Persisted Logins" + } + } + ] + }, + { + "key": "Initialize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Initialize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Initialize is invoked" + }, + "details": { + "name": "Initialize" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Initialized" + } + } + ] + }, + { + "key": "RequestAWSCredentialsAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke RequestAWSCredentialsAsync" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after RequestAWSCredentialsAsync is invoked" + }, + "details": { + "name": "Request AWS Credentials Async" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoUserManagementRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoUserManagementRequestBus.names new file mode 100644 index 0000000000..932378a747 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSCognitoUserManagementRequestBus.names @@ -0,0 +1,224 @@ +{ + "entries": [ + { + "key": "AWSCognitoUserManagementRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "AWS Cognito User Management", + "category": "AWS Client Auth" + }, + "methods": [ + { + "key": "EnableMFAAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Enable MFA Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Enable MFA Async is invoked" + }, + "details": { + "name": "Enable MFA Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Access token", + "tooltip": "The MFA access token" + } + } + ] + }, + { + "key": "ConfirmSignUpAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Confirm Sign Up Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Confirm Sign Up Async is invoked" + }, + "details": { + "name": "Confirm Sign Up Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Confirmation code", + "tooltip": "The client's confirmation code" + } + } + ] + }, + { + "key": "PhoneSignUpAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Phone Sign Up Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Phone Sign Up Async is invoked" + }, + "details": { + "name": "Phone Sign Up Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Password", + "tooltip": "The client's password" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Phone number", + "tooltip": "The phone number used to sign up" + } + } + ] + }, + { + "key": "EmailSignUpAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Email Sign Up Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Email Sign Up Async is invoked" + }, + "details": { + "name": "Email Sign Up Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Password", + "tooltip": "The client's password" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Email", + "tooltip": "The email address used to sign up" + } + } + ] + }, + { + "key": "ConfirmForgotPasswordAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Confirm Forgot Password Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Confirm Forgot Password Async is invoked" + }, + "details": { + "name": "Confirm Forgot Password Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Confirmation code", + "tooltip": "The client's confirmation code" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "New password", + "tooltip": "The new password for the client" + } + } + ] + }, + { + "key": "Initialize", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Initialize" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Initialize is invoked" + }, + "details": { + "name": "Initialize" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Initialized" + } + } + ] + }, + { + "key": "ForgotPasswordAsync", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Forgot Password Async" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Forgot Password Async is invoked" + }, + "details": { + "name": "Forgot Password Async" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Username", + "tooltip": "The client's username" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSMetricsRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSMetricsRequestBus.names new file mode 100644 index 0000000000..b725fc3de1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSMetricsRequestBus.names @@ -0,0 +1,81 @@ +{ + "entries": [ + { + "key": "AWSMetricsRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Metrics", + "category": "AWS Metrics" + }, + "methods": [ + { + "key": "SubmitMetrics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke SubmitMetrics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SubmitMetrics is invoked" + }, + "details": { + "name": "Submit Metrics" + }, + "params": [ + { + "typeid": "{1C1ABE6D-94D2-5CFD-A502-8813300FEC8D}", + "details": { + "name": "Metrics Attributes list", + "tooltip": "The list of metrics attributes to submit." + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Event priority", + "tooltip": "Priority of the event. Defaults to 0, which is highest priority." + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Event source override", + "tooltip": "Event source used to override the default, 'AWSMetricGem'." + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Buffer metrics", + "tooltip": "Whether to buffer metrics and send them in a batch." + } + } + ], + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Success" + } + } + ] + }, + { + "key": "FlushMetrics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke FlushMetrics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after FlushMetrics is invoked" + }, + "details": { + "name": "Flush Metrics" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSResourceMappingRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSResourceMappingRequestBus.names new file mode 100644 index 0000000000..f7ed1d7591 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AWSResourceMappingRequestBus.names @@ -0,0 +1,206 @@ +{ + "entries": [ + { + "key": "AWSResourceMappingRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "AWS Resource Mapping", + "category": "AWS Core" + }, + "methods": [ + { + "key": "GetResourceNameId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Name Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Name Id is invoked" + }, + "details": { + "name": "Get Resource Name Id" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Name / Id" + } + } + ] + }, + { + "key": "GetResourceRegion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Region" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Region is invoked" + }, + "details": { + "name": "Get Resource Region" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + }, + { + "key": "GetDefaultRegion", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Default Region" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Default Region is invoked" + }, + "details": { + "name": "Get Default Region" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Region" + } + } + ] + }, + { + "key": "GetDefaultAccountId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Default Account Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Default Account Id is invoked" + }, + "details": { + "name": "Get Default Account Id" + }, + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Default Account Id" + } + } + ] + }, + { + "key": "GetResourceAccountId", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Account Id" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Account Id is invoked" + }, + "details": { + "name": "Get Resource Account Id" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Account Id" + } + } + ] + }, + { + "key": "GetResourceType", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Resource Type" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Resource Type is invoked" + }, + "details": { + "name": "Get Resource Type" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Key Name", + "tooltip": "Resource mapping key name is used to identify individual resource attributes." + } + } + ], + "results": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Resource Type" + } + } + ] + }, + { + "key": "ReloadConfigFile", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Reload Config File" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Reload Config File is invoked" + }, + "details": { + "name": "Reload Config File" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Reloading Config FileName", + "tooltip": "Whether reload resource mapping config file name from AWS core configuration settings registry file." + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentNetworkRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentNetworkRequestBus.names index 59c14412b9..177eded8e5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentNetworkRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentNetworkRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AnimGraphComponentNetworkRequestBus" + "name": "Anim Graph", + "category": "Animation" }, "methods": [ { "key": "GetActiveStates", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetActiveStates" + "tooltip": "When signaled, this will invoke Get Active States" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetActiveStates is invoked" + "tooltip": "Signaled after Get Active States is invoked" }, "details": { - "name": "GetActiveStates" + "name": "Get Active States" }, "results": [ { "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", "details": { - "name": "AZStd::vector" + "name": "Active States" } } ] @@ -34,20 +35,20 @@ "key": "CreateSnapshot", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateSnapshot" + "tooltip": "When signaled, this will invoke Create Snapshot" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateSnapshot is invoked" + "tooltip": "Signaled after Create Snapshot is invoked" }, "details": { - "name": "CreateSnapshot" + "name": "Create Snapshot" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Authoritative" } } ] @@ -63,13 +64,13 @@ "tooltip": "Signaled after SetActiveStates is invoked" }, "details": { - "name": "SetActiveStates" + "name": "Set Active States" }, "params": [ { "typeid": "{3349AACD-BE04-50BC-9478-528BF2ACFD55}", "details": { - "name": "AZStd::vector" + "name": "Active States" } } ] @@ -78,20 +79,20 @@ "key": "IsAssetReady", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsAssetReady" + "tooltip": "When signaled, this will invoke Is Asset Ready" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsAssetReady is invoked" + "tooltip": "Signaled after Is Asset Ready is invoked" }, "details": { - "name": "IsAssetReady" + "name": "Is Asset Ready" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Asset Ready" } } ] @@ -100,20 +101,20 @@ "key": "HasSnapshot", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke HasSnapshot" + "tooltip": "When signaled, this will invoke Has Snapshot" }, "exit": { "name": "Out", - "tooltip": "Signaled after HasSnapshot is invoked" + "tooltip": "Signaled after Has Snapshot is invoked" }, "details": { - "name": "HasSnapshot" + "name": "Has Snapshot" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Has Snapshot" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentRequestBus.names index d6b9adb914..7e0ea4f5fa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AnimGraphComponentRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AnimGraphComponentRequestBus", + "name": "Anim Graph", "category": "Animation" }, "methods": [ @@ -13,20 +13,20 @@ "key": "GetVisualizeEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetVisualizeEnabled" + "tooltip": "When signaled, this will invoke Get Visualize Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetVisualizeEnabled is invoked" + "tooltip": "Signaled after Get Visualize Enabled is invoked" }, "details": { - "name": "GetVisualizeEnabled" + "name": "Get Visualize Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -35,20 +35,20 @@ "key": "SetNamedParameterRotation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNamedParameterRotation" + "tooltip": "When signaled, this will invoke Set Named Parameter Rotation" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNamedParameterRotation is invoked" + "tooltip": "Signaled after Set Named Parameter Rotation is invoked" }, "details": { - "name": "SetNamedParameterRotation" + "name": "Set Named Parameter Rotation" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } }, { @@ -63,26 +63,26 @@ "key": "SetParameterString", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetParameterString" + "tooltip": "When signaled, this will invoke Set Parameter String" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetParameterString is invoked" + "tooltip": "Signaled after Set Parameter String is invoked" }, "details": { - "name": "SetParameterString" + "name": "Set Parameter String" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Index" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Value" } } ] @@ -91,20 +91,20 @@ "key": "GetNamedParameterString", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNamedParameterString" + "tooltip": "When signaled, this will invoke Get Named Parameter String" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNamedParameterString is invoked" + "tooltip": "Signaled after Get Named Parameter String is invoked" }, "details": { - "name": "GetNamedParameterString" + "name": "Get Named Parameter String" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Parameter Name" } } ], @@ -112,7 +112,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Value" } } ] @@ -121,20 +121,20 @@ "key": "GetNamedParameterVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNamedParameterVector2" + "tooltip": "When signaled, this will invoke Get Named Parameter Vector2" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNamedParameterVector2 is invoked" + "tooltip": "Signaled after Get Named Parameter Vector2 is invoked" }, "details": { - "name": "GetNamedParameterVector2" + "name": "Get Named Parameter Vector2" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Parameter Name" } } ], @@ -142,7 +142,7 @@ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Value" } } ] @@ -151,20 +151,20 @@ "key": "GetParameterFloat", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetParameterFloat" + "tooltip": "When signaled, this will invoke Get Parameter Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetParameterFloat is invoked" + "tooltip": "Signaled after Get Parameter Float is invoked" }, "details": { - "name": "GetParameterFloat" + "name": "Get Parameter Float" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ], @@ -172,7 +172,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -181,20 +181,20 @@ "key": "SetParameterRotation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetParameterRotation" + "tooltip": "When signaled, this will invoke Set Parameter Rotation" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetParameterRotation is invoked" + "tooltip": "Signaled after Set Parameter Rotation is invoked" }, "details": { - "name": "SetParameterRotation" + "name": "Set Parameter Rotation" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Parameter Name" } }, { @@ -209,20 +209,20 @@ "key": "GetNamedParameterFloat", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNamedParameterFloat" + "tooltip": "When signaled, this will invoke Get Named Parameter Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNamedParameterFloat is invoked" + "tooltip": "Signaled after Get Named Parameter Float is invoked" }, "details": { - "name": "GetNamedParameterFloat" + "name": "Get Named Parameter Float" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Parameter Name" } } ], @@ -230,7 +230,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -239,26 +239,26 @@ "key": "SetParameterBool", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetParameterBool" + "tooltip": "When signaled, this will invoke Set Parameter Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetParameterBool is invoked" + "tooltip": "Signaled after Set Parameter Bool is invoked" }, "details": { - "name": "SetParameterBool" + "name": "Set Parameter Bool" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Value" } } ] @@ -267,20 +267,20 @@ "key": "FindParameterName", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke FindParameterName" + "tooltip": "When signaled, this will invoke Find Parameter Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after FindParameterName is invoked" + "tooltip": "Signaled after Find Parameter Name is invoked" }, "details": { - "name": "FindParameterName" + "name": "Find Parameter Name" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ], @@ -288,7 +288,7 @@ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } } ] @@ -297,20 +297,20 @@ "key": "GetNamedParameterBool", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNamedParameterBool" + "tooltip": "When signaled, this will invoke Get Named Parameter Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNamedParameterBool is invoked" + "tooltip": "Signaled after Get Named Parameter Bool is invoked" }, "details": { - "name": "GetNamedParameterBool" + "name": "Get Named Parameter Bool" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } } ], @@ -318,7 +318,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Value" } } ] @@ -327,26 +327,26 @@ "key": "SetParameterFloat", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetParameterFloat" + "tooltip": "When signaled, this will invoke Set Parameter Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetParameterFloat is invoked" + "tooltip": "Signaled after Set Parameter Float is invoked" }, "details": { - "name": "SetParameterFloat" + "name": "Set Parameter Float" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -355,20 +355,20 @@ "key": "GetParameterVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetParameterVector2" + "tooltip": "When signaled, this will invoke Get Parameter Vector2" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetParameterVector2 is invoked" + "tooltip": "Signaled after Get Parameter Vector2 is invoked" }, "details": { - "name": "GetParameterVector2" + "name": "Get Parameter Vector2" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ], @@ -376,7 +376,7 @@ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Value" } } ] @@ -385,20 +385,20 @@ "key": "GetParameterBool", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetParameterBool" + "tooltip": "When signaled, this will invoke Get Parameter Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetParameterBool is invoked" + "tooltip": "Signaled after Get Parameter Bool is invoked" }, "details": { - "name": "GetParameterBool" + "name": "Get Parameter Bool" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ], @@ -406,7 +406,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Value" } } ] @@ -415,26 +415,26 @@ "key": "SetNamedParameterVector3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNamedParameterVector3" + "tooltip": "When signaled, this will invoke Set Named Parameter Vector3" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNamedParameterVector3 is invoked" + "tooltip": "Signaled after Set Named Parameter Vector3 is invoked" }, "details": { - "name": "SetNamedParameterVector3" + "name": "Set Named Parameter Vector3" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -443,20 +443,20 @@ "key": "FindParameterIndex", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke FindParameterIndex" + "tooltip": "When signaled, this will invoke Find Parameter Index" }, "exit": { "name": "Out", - "tooltip": "Signaled after FindParameterIndex is invoked" + "tooltip": "Signaled after Find Parameter Index is invoked" }, "details": { - "name": "FindParameterIndex" + "name": "Find Parameter Index" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } } ], @@ -464,7 +464,7 @@ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ] @@ -473,26 +473,26 @@ "key": "SetNamedParameterString", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNamedParameterString" + "tooltip": "When signaled, this will invoke Set Named Parameter String" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNamedParameterString is invoked" + "tooltip": "Signaled after Set Named Parameter String is invoked" }, "details": { - "name": "SetNamedParameterString" + "name": "Set Named Parameter String" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Value" } } ] @@ -501,26 +501,26 @@ "key": "SetParameterVector3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetParameterVector3" + "tooltip": "When signaled, this will invoke Set Parameter Vector3" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetParameterVector3 is invoked" + "tooltip": "Signaled after Set Parameter Vector3 is invoked" }, "details": { - "name": "SetParameterVector3" + "name": "Set Parameter Vector3" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -529,20 +529,20 @@ "key": "GetParameterVector3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetParameterVector3" + "tooltip": "When signaled, this will invoke Get Parameter Vector3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetParameterVector3 is invoked" + "tooltip": "Signaled after Get Parameter Vector3 is invoked" }, "details": { - "name": "GetParameterVector3" + "name": "Get Parameter Vector3" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ], @@ -550,7 +550,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -559,20 +559,20 @@ "key": "SyncAnimGraph", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SyncAnimGraph" + "tooltip": "When signaled, this will invoke Sync Anim Graph" }, "exit": { "name": "Out", - "tooltip": "Signaled after SyncAnimGraph is invoked" + "tooltip": "Signaled after Sync Anim Graph is invoked" }, "details": { - "name": "SyncAnimGraph" + "name": "Sync Anim Graph" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -582,26 +582,26 @@ "key": "SetParameterRotationEuler", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetParameterRotationEuler" + "tooltip": "When signaled, this will invoke Set Parameter Rotation Euler" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetParameterRotationEuler is invoked" + "tooltip": "Signaled after Set Parameter Rotation Euler is invoked" }, "details": { - "name": "SetParameterRotationEuler" + "name": "Set Parameter Rotation Euler" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Angles (Radians)" } } ] @@ -610,20 +610,20 @@ "key": "GetParameterRotationEuler", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetParameterRotationEuler" + "tooltip": "When signaled, this will invoke Get Parameter Rotation Euler" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetParameterRotationEuler is invoked" + "tooltip": "Signaled after Get Parameter Rotation Euler is invoked" }, "details": { - "name": "GetParameterRotationEuler" + "name": "Get Parameter Rotation Euler" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ], @@ -631,7 +631,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Angles (Radians)" } } ] @@ -640,20 +640,20 @@ "key": "GetParameterRotation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetParameterRotation" + "tooltip": "When signaled, this will invoke Get Parameter Rotation" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetParameterRotation is invoked" + "tooltip": "Signaled after Get Parameter Rotation is invoked" }, "details": { - "name": "GetParameterRotation" + "name": "Get Parameter Rotation" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Parameter Name" } } ], @@ -670,20 +670,20 @@ "key": "GetNamedParameterRotationEuler", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNamedParameterRotationEuler" + "tooltip": "When signaled, this will invoke Get Named Parameter Rotation Euler" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNamedParameterRotationEuler is invoked" + "tooltip": "Signaled after Get Named Parameter Rotation Euler is invoked" }, "details": { - "name": "GetNamedParameterRotationEuler" + "name": "Get Named Parameter Rotation Euler" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } } ], @@ -691,7 +691,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Angles (Radians)" } } ] @@ -700,20 +700,20 @@ "key": "DesyncAnimGraph", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DesyncAnimGraph" + "tooltip": "When signaled, this will invoke Desync Anim Graph" }, "exit": { "name": "Out", - "tooltip": "Signaled after DesyncAnimGraph is invoked" + "tooltip": "Signaled after Desync Anim Graph is invoked" }, "details": { - "name": "DesyncAnimGraph" + "name": "Desync Anim Graph" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -723,26 +723,26 @@ "key": "SetNamedParameterRotationEuler", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNamedParameterRotationEuler" + "tooltip": "When signaled, this will invoke Set Named Parameter Rotation Euler" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNamedParameterRotationEuler is invoked" + "tooltip": "Signaled after Set Named Parameter Rotation Euler is invoked" }, "details": { - "name": "SetNamedParameterRotationEuler" + "name": "Set Named Parameter Rotation Euler" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Parameter Name" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Angles (Radians)" } } ] @@ -751,26 +751,26 @@ "key": "SetParameterVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetParameterVector2" + "tooltip": "When signaled, this will invoke Set Parameter Vector2" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetParameterVector2 is invoked" + "tooltip": "Signaled after Set Parameter Vector2 is invoked" }, "details": { - "name": "SetParameterVector2" + "name": "Set Parameter Vector2" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } }, { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Value" } } ] @@ -779,20 +779,20 @@ "key": "GetNamedParameterRotation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNamedParameterRotation" + "tooltip": "When signaled, this will invoke Get Named Parameter Rotation" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNamedParameterRotation is invoked" + "tooltip": "Signaled after Get Named Parameter Rotation is invoked" }, "details": { - "name": "GetNamedParameterRotation" + "name": "Get Named Parameter Rotation" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } } ], @@ -809,26 +809,26 @@ "key": "SetNamedParameterBool", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNamedParameterBool" + "tooltip": "When signaled, this will invoke Set Named Parameter Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNamedParameterBool is invoked" + "tooltip": "Signaled after Set Named Parameter Bool is invoked" }, "details": { - "name": "SetNamedParameterBool" + "name": "Set Named Parameter Bool" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Value" } } ] @@ -837,20 +837,20 @@ "key": "SetVisualizeEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetVisualizeEnabled" + "tooltip": "When signaled, this will invoke Set Visualize Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetVisualizeEnabled is invoked" + "tooltip": "Signaled after Set Visualize Enabled is invoked" }, "details": { - "name": "SetVisualizeEnabled" + "name": "Set Visualize Enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Value" } } ] @@ -859,26 +859,26 @@ "key": "SetNamedParameterFloat", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNamedParameterFloat" + "tooltip": "When signaled, this will invoke Set Named Parameter Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNamedParameterFloat is invoked" + "tooltip": "Signaled after Set Named Parameter Float is invoked" }, "details": { - "name": "SetNamedParameterFloat" + "name": "Set Named Parameter Float" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -887,26 +887,26 @@ "key": "SetNamedParameterVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNamedParameterVector2" + "tooltip": "When signaled, this will invoke Set Named Parameter Vector2" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNamedParameterVector2 is invoked" + "tooltip": "Signaled after Set Named Parameter Vector2 is invoked" }, "details": { - "name": "SetNamedParameterVector2" + "name": "Set Named Parameter Vector2" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } }, { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Value" } } ] @@ -915,20 +915,20 @@ "key": "GetNamedParameterVector3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNamedParameterVector3" + "tooltip": "When signaled, this will invoke Get Named Parameter Vector3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNamedParameterVector3 is invoked" + "tooltip": "Signaled after Get Named Parameter Vector3 is invoked" }, "details": { - "name": "GetNamedParameterVector3" + "name": "Get Named Parameter Vector3" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } } ], @@ -936,7 +936,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -945,20 +945,20 @@ "key": "GetParameterString", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetParameterString" + "tooltip": "When signaled, this will invoke Get Parameter String" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetParameterString is invoked" + "tooltip": "Signaled after Get Parameter String is invoked" }, "details": { - "name": "GetParameterString" + "name": "Get Parameter String" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Parameter Index" } } ], @@ -966,7 +966,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Value" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaLightRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaLightRequestBus.names index fe409184f5..3b75eef182 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaLightRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AreaLightRequestBus.names @@ -5,27 +5,29 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AreaLightRequestBus" + "name": "Area Light", + "category": "Lights" }, "methods": [ { "key": "SetFilteringSampleCount", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFilteringSampleCount" + "tooltip": "When signaled, this will invoke Set Filtering Sample Count" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFilteringSampleCount is invoked" + "tooltip": "Signaled after Set Filtering Sample Count is invoked" }, "details": { - "name": "SetFilteringSampleCount" + "name": "Set Filtering Sample Count", + "tooltip": "Sets the sample count for filtering of the shadow boundary. Maximum 64" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Sample Count" } } ] @@ -34,20 +36,21 @@ "key": "SetIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetIntensity" + "tooltip": "When signaled, this will invoke Set Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetIntensity is invoked" + "tooltip": "Signaled after Set Intensity is invoked" }, "details": { - "name": "SetIntensity" + "name": "Set Intensity", + "tooltip": "Sets an area light's intensity and intensity mode. This value is indepedent from its color" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Intensity" } } ] @@ -56,20 +59,21 @@ "key": "SetEsmExponent", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEsmExponent" + "tooltip": "When signaled, this will invoke Set Esm Exponent" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEsmExponent is invoked" + "tooltip": "Signaled after Set Esm Exponent is invoked" }, "details": { - "name": "SetEsmExponent" + "name": "Set Esm Exponent", + "tooltip": "Sets the Esm exponent. Higher values produce a steeper falloff between light and shadow" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Exponent" } } ] @@ -78,20 +82,21 @@ "key": "GetOuterShutterAngle", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOuterShutterAngle" + "tooltip": "When signaled, this will invoke Get Outer Shutter Angle" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOuterShutterAngle is invoked" + "tooltip": "Signaled after Get Outer Shutter Angle is invoked" }, "details": { - "name": "GetOuterShutterAngle" + "name": "Get Outer Shutter Angle", + "tooltip": "Returns the outer angle of the shutters in degrees" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angle (Degrees)" } } ] @@ -100,20 +105,21 @@ "key": "GetInnerShutterAngle", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetInnerShutterAngle" + "tooltip": "When signaled, this will invoke Get Inner Shutter Angle" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetInnerShutterAngle is invoked" + "tooltip": "Signaled after Get Inner Shutter Angle is invoked" }, "details": { - "name": "GetInnerShutterAngle" + "name": "Get Inner Shutter Angle", + "tooltip": "Returns the outer angle of the shutters in degrees" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angles (Degrees)" } } ] @@ -122,14 +128,15 @@ "key": "SetColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetColor" + "tooltip": "When signaled, this will invoke Set Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetColor is invoked" + "tooltip": "Signaled after Set Color is invoked" }, "details": { - "name": "SetColor" + "name": "Set Color", + "tooltip": "Sets an area light's color. This value is indepedent from its intensity" }, "params": [ { @@ -144,20 +151,20 @@ "key": "SetShadowBias", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowBias" + "tooltip": "When signaled, this will invoke Set Shadow Bias" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowBias is invoked" + "tooltip": "Signaled after Set Shadow Bias is invoked" }, "details": { - "name": "SetShadowBias" + "name": "Set Shadow Bias" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Bias" } } ] @@ -166,20 +173,22 @@ "key": "SetShadowFilterMethod", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowFilterMethod" + "tooltip": "When signaled, this will invoke Set Shadow Filter Method" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowFilterMethod is invoked" + "tooltip": "Signaled after Set Shadow Filter Method is invoked" }, "details": { - "name": "SetShadowFilterMethod" + "name": "Set Shadow Filter Method", + "tooltip": "Sets the filter method of shadows, 0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Shadow Filter Method", + "tooltip": "0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" } } ] @@ -188,20 +197,21 @@ "key": "GetEsmExponent", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEsmExponent" + "tooltip": "When signaled, this will invoke Get Esm Exponent" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEsmExponent is invoked" + "tooltip": "Signaled after Get Esm Exponent is invoked" }, "details": { - "name": "GetEsmExponent" + "name": "Get Esm Exponent", + "tooltip": "Gets the Esm exponent. Higher values produce a steeper falloff between light and shadow" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Exponent" } } ] @@ -210,20 +220,21 @@ "key": "SetInnerShutterAngle", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetInnerShutterAngle" + "tooltip": "When signaled, this will invoke Set Inner Shutter Angle" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetInnerShutterAngle is invoked" + "tooltip": "Signaled after Set Inner Shutter Angle is invoked" }, "details": { - "name": "SetInnerShutterAngle" + "name": "Set Inner Shutter Angle", + "tooltip": "Sets the inner angle of the shutters in degrees" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angle (Degrees)" } } ] @@ -232,20 +243,21 @@ "key": "SetEnableShadow", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnableShadow" + "tooltip": "When signaled, this will invoke Set Enable Shadow" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnableShadow is invoked" + "tooltip": "Signaled after Set Enable Shadow is invoked" }, "details": { - "name": "SetEnableShadow" + "name": "Set Enable Shadow", + "tooltip": "Sets if shadows should be enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -254,20 +266,21 @@ "key": "SetUseFastApproximation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetUseFastApproximation" + "tooltip": "When signaled, this will invoke Set Use Fast Approximation" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetUseFastApproximation is invoked" + "tooltip": "Signaled after Set Use Fast Approximation is invoked" }, "details": { - "name": "SetUseFastApproximation" + "name": "Set Use Fast Approximation", + "tooltip": "Sets whether the light should use the default high quality linearly transformed cosine lights (false) or a faster approximation (true)" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Use Fast Approximation" } } ] @@ -276,20 +289,21 @@ "key": "GetUseFastApproximation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetUseFastApproximation" + "tooltip": "When signaled, this will invoke Get Use Fast Approximation" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetUseFastApproximation is invoked" + "tooltip": "Signaled after Get Use Fast Approximation is invoked" }, "details": { - "name": "GetUseFastApproximation" + "name": "Get Use Fast Approximation", + "tooltip" : "Gets whether the light is using the default high quality linearly transformed cosine lights (false) or a faster approximation (true)" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Uses Fast Approximation" } } ] @@ -298,20 +312,21 @@ "key": "GetFilteringSampleCount", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFilteringSampleCount" + "tooltip": "When signaled, this will invoke Get Filtering Sample Count" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFilteringSampleCount is invoked" + "tooltip": "Signaled after Get Filtering Sample Count is invoked" }, "details": { - "name": "GetFilteringSampleCount" + "name": "Get Filtering Sample Count", + "tooltip": "Gets the sample count for filtering of the shadow boundary" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Sample Count" } } ] @@ -320,20 +335,21 @@ "key": "GetEnableShadow", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnableShadow" + "tooltip": "When signaled, this will invoke Get Enable Shadow" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnableShadow is invoked" + "tooltip": "Signaled after Get Enable Shadow is invoked" }, "details": { - "name": "GetEnableShadow" + "name": "Get Enable Shadow", + "tooltip": "Returns true if shadows are enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -342,20 +358,22 @@ "key": "GetShadowFilterMethod", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowFilterMethod" + "tooltip": "When signaled, this will invoke Get Shadow Filter Method" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowFilterMethod is invoked" + "tooltip": "Signaled after Get Shadow Filter Method is invoked" }, "details": { - "name": "GetShadowFilterMethod" + "name": "Get Shadow Filter Method", + "tooltip": "Gets the filter method of shadows, 0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Filter Method", + "tooltip": "0: None, 1: Percentage Closer Filtering (PCF), 2: Exponential Shadow Maps (ESM), 3: ESM with PCF Fallback" } } ] @@ -364,20 +382,22 @@ "key": "GetIntensityMode", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetIntensityMode" + "tooltip": "When signaled, this will invoke Get Intensity Mode" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetIntensityMode is invoked" + "tooltip": "Signaled after Get Intensity Mode is invoked" }, "details": { - "name": "GetIntensityMode" + "name": "Get Intensity Mode", + "tooltip": "Gets an area light's photometric type\n0: Lumen (Total amount of luminous power emitted. Since a unit sphere is 4 pi steradians, 1 candela emitting uniformly in all directions is 4 pi lumens)\n1: Candela (Base unit of luminous intensity; luminous power per unit solid angle)\n2: Lux (One lux is one lumen per square meter. The same lux emitting from larger areas emits more lumens than smaller areas)\n3: Nit (Nits are candela per square meter. It can be calculated as Lux / Pi)\n4: Ev100Luminance (Exposure value for luminance - Similar to nits, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)\n5: Ev100Illuminance (Exposure value for illuminance - Similar to lux, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)" }, "results": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Intensity Mode", + "tooltip": "0: Lumen (Total amount of luminous power emitted. Since a unit sphere is 4 pi steradians, 1 candela emitting uniformly in all directions is 4 pi lumens)\n1: Candela (Base unit of luminous intensity; luminous power per unit solid angle)\n2: Lux (One lux is one lumen per square meter. The same lux emitting from larger areas emits more lumens than smaller areas)\n3: Nit (Nits are candela per square meter. It can be calculated as Lux / Pi)\n4: Ev100Luminance (Exposure value for luminance - Similar to nits, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)\n5: Ev100Illuminance (Exposure value for illuminance - Similar to lux, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)" } } ] @@ -386,20 +406,21 @@ "key": "GetShadowBias", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowBias" + "tooltip": "When signaled, this will invoke Get Shadow Bias" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowBias is invoked" + "tooltip": "Signaled after Get Shadow Bias is invoked" }, "details": { - "name": "GetShadowBias" + "name": "Get Shadow Bias", + "tooltip": "Returns the shadow bias" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Bias" } } ] @@ -408,20 +429,23 @@ "key": "SetAttenuationRadiusMode", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAttenuationRadiusMode" + "tooltip": "When signaled, this will invoke Set Attenuation Radius Mode" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAttenuationRadiusMode is invoked" + "tooltip": "Signaled after Set Attenuation Radius Mode is invoked" }, "details": { - "name": "SetAttenuationRadiusMode" + "name": "Set Attenuation Radius Mode", + "tooltip": "0: Automatic, the radius will immediately be recalculated based on the intensity\n1: Explicit, the radius value will be unchanged from its previous value" + }, "params": [ { "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", "details": { - "name": "unsigned char" + "name": "Mode", + "tooltip": "0: Automatic, the radius will immediately be recalculated based on the intensity\n1: Explicit, the radius value will be unchanged from its previous value" } } ] @@ -430,20 +454,20 @@ "key": "SetEmitsLightBothDirections", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEmitsLightBothDirections" + "tooltip": "When signaled, this will invoke Set Emits Light Both Directions" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEmitsLightBothDirections is invoked" + "tooltip": "Signaled after Set Emits Light Both Directions is invoked" }, "details": { - "name": "SetEmitsLightBothDirections" + "name": "Set Emits Light Both Directions" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -452,20 +476,20 @@ "key": "SetEnableShutters", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnableShutters" + "tooltip": "When signaled, this will invoke Set Enable Shutters" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnableShutters is invoked" + "tooltip": "Signaled after Set Enable Shutters is invoked" }, "details": { - "name": "SetEnableShutters" + "name": "Set Enable Shutters" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -474,20 +498,21 @@ "key": "GetShadowmapMaxSize", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowmapMaxSize" + "tooltip": "When signaled, this will invoke Get Shadowmap Max Size" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowmapMaxSize is invoked" + "tooltip": "Signaled after Get Shadowmap Max Size is invoked" }, "details": { - "name": "GetShadowmapMaxSize" + "name": "Get Shadowmap Max Size", + "tooltip": "Returns the maximum width and height of shadowmap" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Max Size" } } ] @@ -496,20 +521,20 @@ "key": "GetEmitsLightBothDirections", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEmitsLightBothDirections" + "tooltip": "When signaled, this will invoke Get Emits Light Both Directions" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEmitsLightBothDirections is invoked" + "tooltip": "Signaled after Get Emits Light Both Directions is invoked" }, "details": { - "name": "GetEmitsLightBothDirections" + "name": "Get Emits Light Both Directions" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -518,20 +543,21 @@ "key": "SetOuterShutterAngle", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetOuterShutterAngle" + "tooltip": "When signaled, this will invoke Set Outer Shutter Angle" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetOuterShutterAngle is invoked" + "tooltip": "Signaled after Set Outer Shutter Angle is invoked" }, "details": { - "name": "SetOuterShutterAngle" + "name": "Set Outer Shutter Angle", + "tooltip": "Sets the outer angle of the shutters in degrees" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angle (Degrees)" } } ] @@ -540,20 +566,21 @@ "key": "SetAttenuationRadius", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAttenuationRadius" + "tooltip": "When signaled, this will invoke Set Attenuation Radius" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAttenuationRadius is invoked" + "tooltip": "Signaled after Set Attenuation Radius is invoked" }, "details": { - "name": "SetAttenuationRadius" + "name": "Set Attenuation Radius", + "tooltip": "Set the distance and which an area light will no longer affect lighting. Setting this forces the Radius Calculation to Explicit mode" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Radius" } } ] @@ -562,20 +589,21 @@ "key": "GetAttenuationRadius", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAttenuationRadius" + "tooltip": "When signaled, this will invoke Get Attenuation Radius" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAttenuationRadius is invoked" + "tooltip": "Signaled after Get Attenuation Radius is invoked" }, "details": { - "name": "GetAttenuationRadius" + "name": "Get Attenuation Radius", + "tooltip" : "Gets the distance at which the area light will no longer affect lighting" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Radius" } } ] @@ -584,20 +612,21 @@ "key": "GetEnableShutters", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnableShutters" + "tooltip": "When signaled, this will invoke Get Enable Shutters" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnableShutters is invoked" + "tooltip": "Signaled after Get Enable Shutters is invoked" }, "details": { - "name": "GetEnableShutters" + "name": "Get Enable Shutters", + "tooltip": "Returns true if shutters are enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -606,14 +635,14 @@ "key": "GetColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetColor" + "tooltip": "When signaled, this will invoke Get Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetColor is invoked" + "tooltip": "Signaled after Get Color is invoked" }, "details": { - "name": "GetColor" + "name": "Get Color" }, "results": [ { @@ -628,20 +657,22 @@ "key": "ConvertToIntensityMode", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ConvertToIntensityMode" + "tooltip": "When signaled, this will invoke Convert To Intensity Mode" }, "exit": { "name": "Out", - "tooltip": "Signaled after ConvertToIntensityMode is invoked" + "tooltip": "Signaled after Convert To Intensity Mode is invoked" }, "details": { - "name": "ConvertToIntensityMode" + "name": "Convert To Intensity Mode", + "tooltip": "Sets the photometric unit to the one provided and converts the intensity to the photometric unit so actual light intensity remains constant" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Mode", + "tooltip": "0: Lumen (Total amount of luminous power emitted. Since a unit sphere is 4 pi steradians, 1 candela emitting uniformly in all directions is 4 pi lumens)\n1: Candela (Base unit of luminous intensity; luminous power per unit solid angle)\n2: Lux (One lux is one lumen per square meter. The same lux emitting from larger areas emits more lumens than smaller areas)\n3: Nit (Nits are candela per square meter. It can be calculated as Lux / Pi)\n4: Ev100Luminance (Exposure value for luminance - Similar to nits, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)\n5: Ev100Illuminance (Exposure value for illuminance - Similar to lux, A measurement of illuminance that grows exponentially. See https://en.wikipedia.org/wiki/Exposure_value)" } } ] @@ -650,20 +681,20 @@ "key": "SetShadowmapMaxSize", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowmapMaxSize" + "tooltip": "When signaled, this will invoke Set Shadowmap Max Size" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowmapMaxSize is invoked" + "tooltip": "Signaled after Set Shadowmap Max Size is invoked" }, "details": { - "name": "SetShadowmapMaxSize" + "name": "Set Shadowmap Max Size" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Max Size" } } ] @@ -672,20 +703,21 @@ "key": "GetIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetIntensity" + "tooltip": "When signaled, this will invoke Get Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetIntensity is invoked" + "tooltip": "Signaled after Get Intensity is invoked" }, "details": { - "name": "GetIntensity" + "name": "Get Intensity", + "tooltip": "Gets an area light's intensity. This value is indepedent from its color" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Intensity" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentRequestBus.names index d3439b0a67..40ecc8261c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AtomToolsDocumentRequestBus" + "name": "Document", + "category": "Atom Tools" }, "methods": [ { "key": "CanRedo", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CanRedo" + "tooltip": "When signaled, this will invoke Can Redo" }, "exit": { "name": "Out", - "tooltip": "Signaled after CanRedo is invoked" + "tooltip": "Signaled after Can Redo is invoked" }, "details": { - "name": "CanRedo" + "name": "Can Redo" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Can Redo" } } ] @@ -34,20 +35,20 @@ "key": "SaveAsChild", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SaveAsChild" + "tooltip": "When signaled, this will invoke Save As Child" }, "exit": { "name": "Out", - "tooltip": "Signaled after SaveAsChild is invoked" + "tooltip": "Signaled after Save As Child is invoked" }, "details": { - "name": "SaveAsChild" + "name": "Save As Child" }, "params": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Save Path" } } ], @@ -55,7 +56,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -77,7 +78,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -99,7 +100,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -108,20 +109,20 @@ "key": "IsOpen", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsOpen" + "tooltip": "When signaled, this will invoke Is Open" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsOpen is invoked" + "tooltip": "Signaled after Is Open is invoked" }, "details": { - "name": "IsOpen" + "name": "Is Open" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Open" } } ] @@ -143,7 +144,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -165,7 +166,7 @@ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Load Path" } } ], @@ -173,7 +174,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -182,20 +183,20 @@ "key": "CanUndo", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CanUndo" + "tooltip": "When signaled, this will invoke Can Undo" }, "exit": { "name": "Out", - "tooltip": "Signaled after CanUndo is invoked" + "tooltip": "Signaled after Can Undo is invoked" }, "details": { - "name": "CanUndo" + "name": "Can Undo" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Can Undo" } } ] @@ -204,26 +205,26 @@ "key": "SetPropertyValue", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyValue" + "tooltip": "When signaled, this will invoke Set Property Value" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyValue is invoked" + "tooltip": "Signaled after Set Property Value is invoked" }, "details": { - "name": "SetPropertyValue" + "name": "Set Property Value" }, "params": [ { "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", "details": { - "name": "Name" + "name": "Property Full Name" } }, { "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", "details": { - "name": "any" + "name": "Value" } } ] @@ -232,20 +233,20 @@ "key": "SaveAsCopy", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SaveAsCopy" + "tooltip": "When signaled, this will invoke Save As Copy" }, "exit": { "name": "Out", - "tooltip": "Signaled after SaveAsCopy is invoked" + "tooltip": "Signaled after Save As Copy is invoked" }, "details": { - "name": "SaveAsCopy" + "name": "Save As Copy" }, "params": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Save Path" } } ], @@ -253,7 +254,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -262,20 +263,20 @@ "key": "BeginEdit", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke BeginEdit" + "tooltip": "When signaled, this will invoke Begin Edit" }, "exit": { "name": "Out", - "tooltip": "Signaled after BeginEdit is invoked" + "tooltip": "Signaled after Begin Edit is invoked" }, "details": { - "name": "BeginEdit" + "name": "Begin Edit" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Begin" } } ] @@ -284,20 +285,20 @@ "key": "GetPropertyValue", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyValue" + "tooltip": "When signaled, this will invoke Get Property Value" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyValue is invoked" + "tooltip": "Signaled after Get Property Value is invoked" }, "details": { - "name": "GetPropertyValue" + "name": "Get Property Value" }, "params": [ { "typeid": "{3D2B920C-9EFD-40D5-AAE0-DF131C3D4931}", "details": { - "name": "Name" + "name": "Property Full Name" } } ], @@ -305,7 +306,7 @@ { "typeid": "{03924488-C7F4-4D6D-948B-ABC2D1AE2FD3}", "details": { - "name": "any" + "name": "Value" } } ] @@ -327,7 +328,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -343,13 +344,13 @@ "tooltip": "Signaled after IsModified is invoked" }, "details": { - "name": "IsModified" + "name": "Is Modified" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Modified" } } ] @@ -358,20 +359,20 @@ "key": "EndEdit", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke EndEdit" + "tooltip": "When signaled, this will invoke End Edit" }, "exit": { "name": "Out", - "tooltip": "Signaled after EndEdit is invoked" + "tooltip": "Signaled after End Edit is invoked" }, "details": { - "name": "EndEdit" + "name": "End Edit" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "End Edit" } } ] @@ -380,20 +381,20 @@ "key": "GetAbsolutePath", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAbsolutePath" + "tooltip": "When signaled, this will invoke Get Absolute Path" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAbsolutePath is invoked" + "tooltip": "Signaled after Get Absolute Path is invoked" }, "details": { - "name": "GetAbsolutePath" + "name": "Get Absolute Path" }, "results": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Path" } } ] @@ -402,20 +403,20 @@ "key": "GetRelativePath", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetRelativePath" + "tooltip": "When signaled, this will invoke Get Relative Path" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetRelativePath is invoked" + "tooltip": "Signaled after Get Relative Path is invoked" }, "details": { - "name": "GetRelativePath" + "name": "Get Relative Path" }, "results": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Path" } } ] @@ -424,20 +425,20 @@ "key": "IsSavable", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsSavable" + "tooltip": "When signaled, this will invoke Is Savable" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsSavable is invoked" + "tooltip": "Signaled after Is Savable is invoked" }, "details": { - "name": "IsSavable" + "name": "Is Savable" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Savable" } } ] @@ -459,7 +460,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentSystemRequestBus.names index d22bf3bc7c..9b65065453 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentSystemRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsDocumentSystemRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AtomToolsDocumentSystemRequestBus" + "name": "Document", + "category": "Atom Tools" }, "methods": [ { "key": "SaveDocument", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SaveDocument" + "tooltip": "When signaled, this will invoke Save Document" }, "exit": { "name": "Out", - "tooltip": "Signaled after SaveDocument is invoked" + "tooltip": "Signaled after Save Document is invoked" }, "details": { - "name": "SaveDocument" + "name": "Save Document" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } } ], @@ -33,7 +34,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -42,26 +43,26 @@ "key": "SaveDocumentAsChild", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SaveDocumentAsChild" + "tooltip": "When signaled, this will invoke Save Document As Child" }, "exit": { "name": "Out", - "tooltip": "Signaled after SaveDocumentAsChild is invoked" + "tooltip": "Signaled after Save Document As Child is invoked" }, "details": { - "name": "SaveDocumentAsChild" + "name": "Save Document As Child" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Target Path" } } ], @@ -69,7 +70,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -78,20 +79,20 @@ "key": "OpenDocument", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke OpenDocument" + "tooltip": "When signaled, this will invoke Open Document" }, "exit": { "name": "Out", - "tooltip": "Signaled after OpenDocument is invoked" + "tooltip": "Signaled after Open Document is invoked" }, "details": { - "name": "OpenDocument" + "name": "Open Document" }, "params": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Source Path" } } ], @@ -99,7 +100,7 @@ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } } ] @@ -108,26 +109,26 @@ "key": "CreateDocumentFromFile", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateDocumentFromFile" + "tooltip": "When signaled, this will invoke Create Document From File" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateDocumentFromFile is invoked" + "tooltip": "Signaled after Create Document From File is invoked" }, "details": { - "name": "CreateDocumentFromFile" + "name": "Create Document From File" }, "params": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Source Path" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Target Path" } } ], @@ -135,7 +136,7 @@ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } } ] @@ -144,20 +145,20 @@ "key": "CloseDocument", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CloseDocument" + "tooltip": "When signaled, this will invoke Close Document" }, "exit": { "name": "Out", - "tooltip": "Signaled after CloseDocument is invoked" + "tooltip": "Signaled after Close Document is invoked" }, "details": { - "name": "CloseDocument" + "name": "Close Document" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } } ], @@ -165,7 +166,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -174,20 +175,20 @@ "key": "CloseAllDocuments", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CloseAllDocuments" + "tooltip": "When signaled, this will invoke Close All Documents" }, "exit": { "name": "Out", - "tooltip": "Signaled after CloseAllDocuments is invoked" + "tooltip": "Signaled after Close All Documents is invoked" }, "details": { - "name": "CloseAllDocuments" + "name": "Close All Documents" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -196,20 +197,20 @@ "key": "CloseAllDocumentsExcept", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CloseAllDocumentsExcept" + "tooltip": "When signaled, this will invoke Close All Documents Except" }, "exit": { "name": "Out", - "tooltip": "Signaled after CloseAllDocumentsExcept is invoked" + "tooltip": "Signaled after Close All Documents Except is invoked" }, "details": { - "name": "CloseAllDocumentsExcept" + "name": "Close All Documents Except" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } } ], @@ -217,7 +218,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -226,20 +227,20 @@ "key": "CreateDocument", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateDocument" + "tooltip": "When signaled, this will invoke Create Document" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateDocument is invoked" + "tooltip": "Signaled after Create Document is invoked" }, "details": { - "name": "CreateDocument" + "name": "Create Document" }, "results": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } } ] @@ -248,20 +249,20 @@ "key": "DestroyDocument", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DestroyDocument" + "tooltip": "When signaled, this will invoke Destroy Document" }, "exit": { "name": "Out", - "tooltip": "Signaled after DestroyDocument is invoked" + "tooltip": "Signaled after Destroy Document is invoked" }, "details": { - "name": "DestroyDocument" + "name": "Destroy Document" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } } ], @@ -269,7 +270,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -278,26 +279,26 @@ "key": "SaveDocumentAsCopy", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SaveDocumentAsCopy" + "tooltip": "When signaled, this will invoke Save Document As Copy" }, "exit": { "name": "Out", - "tooltip": "Signaled after SaveDocumentAsCopy is invoked" + "tooltip": "Signaled after Save Document As Copy is invoked" }, "details": { - "name": "SaveDocumentAsCopy" + "name": "Save Document As Copy" }, "params": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "Document Id" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Target Path" } } ], @@ -305,7 +306,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] @@ -314,20 +315,20 @@ "key": "SaveAllDocuments", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SaveAllDocuments" + "tooltip": "When signaled, this will invoke Save All Documents" }, "exit": { "name": "Out", - "tooltip": "Signaled after SaveAllDocuments is invoked" + "tooltip": "Signaled after Save All Documents is invoked" }, "details": { - "name": "SaveAllDocuments" + "name": "Save All Documents" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowFactoryRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowFactoryRequestBus.names index 87f3925316..9d074c4224 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowFactoryRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowFactoryRequestBus.names @@ -5,35 +5,36 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AtomToolsMainWindowFactoryRequestBus" + "name": "Main Window Factory", + "category": "Atom Tools" }, "methods": [ { "key": "CreateMainWindow", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateMainWindow" + "tooltip": "When signaled, this will invoke Create Main Window" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateMainWindow is invoked" + "tooltip": "Signaled after Create Main Window is invoked" }, "details": { - "name": "CreateMainWindow" + "name": "Create Main Window" } }, { "key": "DestroyMainWindow", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DestroyMainWindow" + "tooltip": "When signaled, this will invoke Destroy Main Window" }, "exit": { "name": "Out", - "tooltip": "Signaled after DestroyMainWindow is invoked" + "tooltip": "Signaled after Destroy Main Window is invoked" }, "details": { - "name": "DestroyMainWindow" + "name": "Destroy Main Window" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowRequestBus.names index cb21434ad0..cb6fa04754 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AtomToolsMainWindowRequestBus.names @@ -5,41 +5,42 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AtomToolsMainWindowRequestBus" + "name": "Main Window", + "category": "Atom Tools" }, "methods": [ { "key": "UnlockViewportRenderTargetSize", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke UnlockViewportRenderTargetSize" + "tooltip": "When signaled, this will invoke Unlock Viewport Render Target Size" }, "exit": { "name": "Out", - "tooltip": "Signaled after UnlockViewportRenderTargetSize is invoked" + "tooltip": "Signaled after Unlock Viewport Render Target Size is invoked" }, "details": { - "name": "UnlockViewportRenderTargetSize" + "name": "Unlock Viewport Render Target Size" } }, { "key": "GetDockWidgetNames", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetDockWidgetNames" + "tooltip": "When signaled, this will invoke Get Dock Widget Names" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetDockWidgetNames is invoked" + "tooltip": "Signaled after Get Dock Widget Names is invoked" }, "details": { - "name": "GetDockWidgetNames" + "name": "Get Dock Widget Names" }, "results": [ { "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", "details": { - "name": "AZStd::vector" + "name": "Widget Names" } } ] @@ -48,26 +49,26 @@ "key": "ResizeViewportRenderTarget", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ResizeViewportRenderTarget" + "tooltip": "When signaled, this will invoke Resize Viewport Render Target" }, "exit": { "name": "Out", - "tooltip": "Signaled after ResizeViewportRenderTarget is invoked" + "tooltip": "Signaled after Resize Viewport Render Target is invoked" }, "details": { - "name": "ResizeViewportRenderTarget" + "name": "Resize Viewport Render Target" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Width" } }, { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Height" } } ] @@ -76,26 +77,26 @@ "key": "SetDockWidgetVisible", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetDockWidgetVisible" + "tooltip": "When signaled, this will invoke Set Dock Widget Visible" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetDockWidgetVisible is invoked" + "tooltip": "Signaled after Set Dock Widget Visible is invoked" }, "details": { - "name": "SetDockWidgetVisible" + "name": "Set Dock Widget Visible" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Widget Name" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Visible" } } ] @@ -104,20 +105,20 @@ "key": "IsDockWidgetVisible", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsDockWidgetVisible" + "tooltip": "When signaled, this will invoke Is Dock Widget Visible" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsDockWidgetVisible is invoked" + "tooltip": "Signaled after Is Dock Widget Visible is invoked" }, "details": { - "name": "IsDockWidgetVisible" + "name": "Is Dock Widget Visible" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Widget Name" } } ], @@ -125,7 +126,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Visible" } } ] @@ -134,26 +135,26 @@ "key": "LockViewportRenderTargetSize", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke LockViewportRenderTargetSize" + "tooltip": "When signaled, this will invoke Lock Viewport Render Target Size" }, "exit": { "name": "Out", - "tooltip": "Signaled after LockViewportRenderTargetSize is invoked" + "tooltip": "Signaled after Lock Viewport Render Target Size is invoked" }, "details": { - "name": "LockViewportRenderTargetSize" + "name": "Lock Viewport Render Target Size" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Width" } }, { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Height" } } ] @@ -162,14 +163,14 @@ "key": "ActivateWindow", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ActivateWindow" + "tooltip": "When signaled, this will invoke Activate Window" }, "exit": { "name": "Out", - "tooltip": "Signaled after ActivateWindow is invoked" + "tooltip": "Signaled after Activate Window is invoked" }, "details": { - "name": "ActivateWindow" + "name": "Activate Window" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AttachmentComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AttachmentComponentRequestBus.names index a6e09acaa9..416c0dfae3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AttachmentComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AttachmentComponentRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "AttachmentComponentRequestBus", + "name": "Attachment", "category": "Animation" }, "methods": [ @@ -20,29 +20,26 @@ "tooltip": "Signaled after Attach is invoked" }, "details": { - "name": "Attach", - "tooltip": "Attaches the entity" + "name": "Attach" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "Target", - "tooltip": "ID of entity to attach to" + "name": "Target Entity Id", + "tooltip": "The Entity to attach" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "Bone", - "tooltip": "Name of bone on entity to attach to. If bone is not found, then attach to target entity's transform origin" + "name": "Target Bone Name" } }, { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Offset", - "tooltip": "Attachment's offset from target" + "name": "Offset Transform" } } ] @@ -58,30 +55,27 @@ "tooltip": "Signaled after Detach is invoked" }, "details": { - "name": "Detach", - "tooltip": "Detaches the entity" + "name": "Detach" } }, { "key": "SetAttachmentOffset", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Offset" + "tooltip": "When signaled, this will invoke SetAttachmentOffset" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Offset is invoked" + "tooltip": "Signaled after SetAttachmentOffset is invoked" }, "details": { - "name": "Set Offset", - "tooltip": "Sets the offset of the attachment" + "name": "Set Attachment Offset" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Offset", - "tooltip": "Attachment's offset from target" + "name": "Offset Transform" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSystemComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSystemComponentRequestBus.names index f92d691860..3409c106d3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSystemComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AudioSystemComponentRequestBus.names @@ -5,7 +5,8 @@ "context": "EBusSender", "variant": "", "details": { - "name": "Audio System" + "name": "Audio System", + "category": "Audio" }, "methods": [ { @@ -19,7 +20,7 @@ "tooltip": "Signaled after LevelUnloadAudio is invoked" }, "details": { - "name": "LevelUnloadAudio" + "name": "Level Unload Audio" } }, { @@ -33,13 +34,13 @@ "tooltip": "Signaled after LevelLoadAudio is invoked" }, "details": { - "name": "LevelLoadAudio" + "name": "Level Load Audio" }, "params": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Level Name" } } ] @@ -48,26 +49,26 @@ "key": "GlobalKillAudioTrigger", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalKillAudioTrigger" + "tooltip": "When signaled, this will invoke Global Kill Audio Trigger" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalKillAudioTrigger is invoked" + "tooltip": "Signaled after Global Kill Audio Trigger is invoked" }, "details": { - "name": "GlobalKillAudioTrigger" + "name": "Global Kill Audio Trigger" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Trigger Name" } }, { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Callback Owner", "tooltip": "Entity Unique Id" } } @@ -77,26 +78,26 @@ "key": "GlobalSetAudioRtpc", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalSetAudioRtpc" + "tooltip": "When signaled, this will invoke Global Set Audio RTPC" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalSetAudioRtpc is invoked" + "tooltip": "Signaled after Global Set Audio RTPC is invoked" }, "details": { - "name": "GlobalSetAudioRtpc" + "name": "Global Set Audio RTPC" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "RTPC Name" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -105,26 +106,26 @@ "key": "GlobalSetAudioSwitchState", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalSetAudioSwitchState" + "tooltip": "When signaled, this will invoke Global Set Audio Switch State" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalSetAudioSwitchState is invoked" + "tooltip": "Signaled after Global Set Audio Switch State is invoked" }, "details": { - "name": "GlobalSetAudioSwitchState" + "name": "Global Set Audio Switch State" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Switch Name" } }, { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "State Name" } } ] @@ -140,13 +141,13 @@ "tooltip": "Signaled after GlobalRefreshAudio is invoked" }, "details": { - "name": "GlobalRefreshAudio" + "name": "Global Refresh Audio" }, "params": [ { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Level Name" } } ] @@ -155,40 +156,40 @@ "key": "GlobalMuteAudio", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalMuteAudio" + "tooltip": "When signaled, this will invoke Global Mute Audio" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalMuteAudio is invoked" + "tooltip": "Signaled after Global Mute Audio is invoked" }, "details": { - "name": "GlobalMuteAudio" + "name": "Global Mute Audio" } }, { "key": "GlobalExecuteAudioTrigger", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalExecuteAudioTrigger" + "tooltip": "When signaled, this will invoke Global Execute Audio Trigger" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalExecuteAudioTrigger is invoked" + "tooltip": "Signaled after Global Execute Audio Trigger is invoked" }, "details": { - "name": "GlobalExecuteAudioTrigger" + "name": "Global Execute Audio Trigger" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Trigger Name" } }, { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Callback Owner", "tooltip": "Entity Unique Id" } } @@ -198,42 +199,42 @@ "key": "GlobalStopAllSounds", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalStopAllSounds" + "tooltip": "When signaled, this will invoke Global Stop All Sounds" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalStopAllSounds is invoked" + "tooltip": "Signaled after Global Stop All Sounds is invoked" }, "details": { - "name": "GlobalStopAllSounds" + "name": "Global Stop All Sounds" } }, { "key": "GlobalUnmuteAudio", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalUnmuteAudio" + "tooltip": "When signaled, this will invoke Global Unmute Audio" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalUnmuteAudio is invoked" + "tooltip": "Signaled after Global Unmute Audio is invoked" }, "details": { - "name": "GlobalUnmuteAudio" + "name": "Global Unmute Audio" } }, { "key": "GlobalResetAudioRtpcs", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GlobalResetAudioRtpcs" + "tooltip": "When signaled, this will invoke Global Reset Audio RTPCs" }, "exit": { "name": "Out", - "tooltip": "Signaled after GlobalResetAudioRtpcs is invoked" + "tooltip": "Signaled after Global Reset Audio RTPCs is invoked" }, "details": { - "name": "GlobalResetAudioRtpcs" + "name": "Global Reset Audio RTPCs" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AuthenticationProviderRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AuthenticationProviderRequestBus.names index d0b0baf76f..b9b48b88f6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AuthenticationProviderRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/AuthenticationProviderRequestBus.names @@ -1,11 +1,12 @@ { "entries": [ { - "key": "AuthenticationProviderRequestBus", + "base": "AuthenticationProviderRequestBus", "context": "EBusSender", "variant": "", "details": { - "name": "AuthenticationProviderRequestBus" + "name": "AWS Authentication Provider", + "category": "AWS Client Auth" }, "methods": [ { @@ -19,13 +20,14 @@ "tooltip": "Signaled after SignOut is invoked" }, "details": { - "name": "SignOut" + "name": "Sign Out" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } } ], @@ -33,7 +35,8 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Signed Out", + "tooltip": "True: Successfully sign out" } } ] @@ -42,20 +45,21 @@ "key": "DeviceCodeGrantConfirmSignInAsync", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DeviceCodeGrantConfirmSignInAsync" + "tooltip": "When signaled, this will invoke Device Code Grant Confirm Sign In Async" }, "exit": { "name": "Out", - "tooltip": "Signaled after DeviceCodeGrantConfirmSignInAsync is invoked" + "tooltip": "Signaled after Device Code Grant Confirm Sign In Async is invoked" }, "details": { - "name": "DeviceCodeGrantConfirmSignInAsync" + "name": "Device Code Grant Confirm Sign In Async" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } } ] @@ -64,20 +68,21 @@ "key": "DeviceCodeGrantSignInAsync", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DeviceCodeGrantSignInAsync" + "tooltip": "When signaled, this will invoke Device Code Grant Sign In Async" }, "exit": { "name": "Out", - "tooltip": "Signaled after DeviceCodeGrantSignInAsync is invoked" + "tooltip": "Signaled after Device Code Grant Sign In Async is invoked" }, "details": { - "name": "DeviceCodeGrantSignInAsync" + "name": "Device Code Grant Sign In Async" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } } ] @@ -86,32 +91,35 @@ "key": "PasswordGrantMultiFactorSignInAsync", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke PasswordGrantMultiFactorSignInAsync" + "tooltip": "When signaled, this will invoke Password Grant Multi Factor Sign In Async" }, "exit": { "name": "Out", - "tooltip": "Signaled after PasswordGrantMultiFactorSignInAsync is invoked" + "tooltip": "Signaled after Password Grant Multi Factor Sign In Async is invoked" }, "details": { - "name": "PasswordGrantMultiFactorSignInAsync" + "name": "Password Grant Multi Factor Sign In Async" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Username", + "tooltip": "The client's username" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Password", + "tooltip": "The client's password" } } ] @@ -120,20 +128,21 @@ "key": "GetAuthenticationTokens", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAuthenticationTokens" + "tooltip": "When signaled, this will invoke Get Authentication Tokens" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAuthenticationTokens is invoked" + "tooltip": "Signaled after Get Authentication Tokens is invoked" }, "details": { - "name": "GetAuthenticationTokens" + "name": "Get Authentication Tokens" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } } ], @@ -150,20 +159,21 @@ "key": "GetTokensWithRefreshAsync", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTokensWithRefreshAsync" + "tooltip": "When signaled, this will invoke Get Tokens With Refresh Async" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTokensWithRefreshAsync is invoked" + "tooltip": "Signaled after Get Tokens With Refresh Async is invoked" }, "details": { - "name": "GetTokensWithRefreshAsync" + "name": "Get Tokens With Refresh Async" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } } ] @@ -172,20 +182,21 @@ "key": "IsSignedIn", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsSignedIn" + "tooltip": "When signaled, this will invoke Is Signed In" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsSignedIn is invoked" + "tooltip": "Signaled after Is Signed In is invoked" }, "details": { - "name": "IsSignedIn" + "name": "Is Signed In" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } } ], @@ -193,7 +204,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Signed In" } } ] @@ -202,32 +213,35 @@ "key": "PasswordGrantSingleFactorSignInAsync", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke PasswordGrantSingleFactorSignInAsync" + "tooltip": "When signaled, this will invoke Password GrantSingle Factor Sign In Async" }, "exit": { "name": "Out", - "tooltip": "Signaled after PasswordGrantSingleFactorSignInAsync is invoked" + "tooltip": "Signaled after Password GrantSingle Factor Sign In Async is invoked" }, "details": { - "name": "PasswordGrantSingleFactorSignInAsync" + "name": "Password GrantSingle Factor Sign In Async" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Username", + "tooltip": "The client's username" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Password", + "tooltip": "The client's password" } } ] @@ -236,20 +250,21 @@ "key": "RefreshTokensAsync", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke RefreshTokensAsync" + "tooltip": "When signaled, this will invoke Refresh Tokens Async" }, "exit": { "name": "Out", - "tooltip": "Signaled after RefreshTokensAsync is invoked" + "tooltip": "Signaled after Refresh Tokens Async is invoked" }, "details": { - "name": "RefreshTokensAsync" + "name": "Refresh Tokens Async" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } } ] @@ -271,7 +286,7 @@ { "typeid": "{99DAD0BC-740E-5E82-826B-8FC7968CC02C}", "details": { - "name": "AZStd::vector" + "name": "Provider Names" } } ], @@ -279,7 +294,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Initialized" } } ] @@ -288,32 +303,35 @@ "key": "PasswordGrantMultiFactorConfirmSignInAsync", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke PasswordGrantMultiFactorConfirmSignInAsync" + "tooltip": "When signaled, this will invoke Password Grant Multi Factor Confirm Sign In Async" }, "exit": { "name": "Out", - "tooltip": "Signaled after PasswordGrantMultiFactorConfirmSignInAsync is invoked" + "tooltip": "Signaled after Password Grant Multi Factor Confirm Sign In Async is invoked" }, "details": { - "name": "PasswordGrantMultiFactorConfirmSignInAsync" + "name": "Password Grant Multi Factor Confirm Sign In Async" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Provider name", + "tooltip": "The identity provider name" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Username", + "tooltip": "The client's username" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Confirmation code", + "tooltip": "The client's confirmation code" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BloomRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BloomRequestBus.names index 0ae96265bc..13fb16f618 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BloomRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BloomRequestBus.names @@ -5,27 +5,27 @@ "context": "EBusSender", "variant": "", "details": { - "name": "BloomRequestBus" + "name": "Bloom Request Bus" }, "methods": [ { "key": "GetTintStage0Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage0Override" + "tooltip": "When signaled, this will invoke Get Tint Stage 0 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage0Override is invoked" + "tooltip": "Signaled after Get Tint Stage 0 Override is invoked" }, "details": { - "name": "GetTintStage0Override" + "name": "Get Tint Stage 0 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -34,20 +34,20 @@ "key": "SetTintStage0Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage0Override" + "tooltip": "When signaled, this will invoke Set Tint Stage 0 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage0Override is invoked" + "tooltip": "Signaled after Set Tint Stage 0 Override is invoked" }, "details": { - "name": "SetTintStage0Override" + "name": "Set Tint Stage 0 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -56,20 +56,20 @@ "key": "SetTintStage1", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage1" + "tooltip": "When signaled, this will invoke Set Tint Stage 1" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage1 is invoked" + "tooltip": "Signaled after Set Tint Stage 1 is invoked" }, "details": { - "name": "SetTintStage1" + "name": "Set Tint Stage 1" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -78,20 +78,20 @@ "key": "SetTintStage0", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage0" + "tooltip": "When signaled, this will invoke Set Tint Stage 0" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage0 is invoked" + "tooltip": "Signaled after Set Tint Stage 0 is invoked" }, "details": { - "name": "SetTintStage0" + "name": "Set Tint Stage 0" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -100,20 +100,20 @@ "key": "GetKernelSizeStage3Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage3Override" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 3 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage3Override is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 3 Override is invoked" }, "details": { - "name": "GetKernelSizeStage3Override" + "name": "Get Kernel Size Stage 3 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -122,20 +122,20 @@ "key": "GetTintStage3Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage3Override" + "tooltip": "When signaled, this will invoke Get Tint Stage 3 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage3Override is invoked" + "tooltip": "Signaled after Get Tint Stage 3 Override is invoked" }, "details": { - "name": "GetTintStage3Override" + "name": "Get Tint Stage 3 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -144,20 +144,20 @@ "key": "SetKernelSizeScaleOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeScaleOverride" + "tooltip": "When signaled, this will invoke Set Kernel Size Scale Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeScaleOverride is invoked" + "tooltip": "Signaled after Set Kernel Size Scale Override is invoked" }, "details": { - "name": "SetKernelSizeScaleOverride" + "name": "Set Kernel Size Scale Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -166,20 +166,20 @@ "key": "SetKernelSizeStage2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage2" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 2" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage2 is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 2 is invoked" }, "details": { - "name": "SetKernelSizeStage2" + "name": "Set Kernel Size Stage 2" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -188,20 +188,20 @@ "key": "GetKernelSizeStage4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage4" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage4 is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 4 is invoked" }, "details": { - "name": "GetKernelSizeStage4" + "name": "Get Kernel Size Stage 4" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -210,20 +210,20 @@ "key": "GetTintStage0", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage0" + "tooltip": "When signaled, this will invoke Get Tint Stage 0" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage0 is invoked" + "tooltip": "Signaled after Get Tint Stage 0 is invoked" }, "details": { - "name": "GetTintStage0" + "name": "Get Tint Stage 0" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -232,20 +232,20 @@ "key": "SetTintStage4Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage4Override" + "tooltip": "When signaled, this will invoke Set Tint Stage 4 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage4Override is invoked" + "tooltip": "Signaled after Set Tint Stage 4 Override is invoked" }, "details": { - "name": "SetTintStage4Override" + "name": "Set Tint Stage 4 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -254,20 +254,20 @@ "key": "GetKernelSizeScale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeScale" + "tooltip": "When signaled, this will invoke Get Kernel Size Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeScale is invoked" + "tooltip": "Signaled after Get Kernel Size Scale is invoked" }, "details": { - "name": "GetKernelSizeScale" + "name": "Get Kernel Size Scale" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -276,20 +276,20 @@ "key": "GetKernelSizeStage2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage2" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 2" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage2 is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 2 is invoked" }, "details": { - "name": "GetKernelSizeStage2" + "name": "Get Kernel Size Stage 2" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -298,20 +298,20 @@ "key": "SetTintStage1Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage1Override" + "tooltip": "When signaled, this will invoke Set Tint Stage 1 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage1Override is invoked" + "tooltip": "Signaled after Set Tint Stage 1 Override is invoked" }, "details": { - "name": "SetTintStage1Override" + "name": "Set Tint Stage 1 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -320,20 +320,20 @@ "key": "SetTintStage3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage3" + "tooltip": "When signaled, this will invoke Set Tint Stage 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage3 is invoked" + "tooltip": "Signaled after Set Tint Stage 3 is invoked" }, "details": { - "name": "SetTintStage3" + "name": "Set Tint Stage 3" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -342,20 +342,20 @@ "key": "GetEnabledOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnabledOverride" + "tooltip": "When signaled, this will invoke Get Enabled Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnabledOverride is invoked" + "tooltip": "Signaled after Get Enabled Override is invoked" }, "details": { - "name": "GetEnabledOverride" + "name": "Get Enabled Override" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -364,20 +364,20 @@ "key": "SetTintStage3Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage3Override" + "tooltip": "When signaled, this will invoke Set Tint Stage 3 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage3Override is invoked" + "tooltip": "Signaled after Set Tint Stage 3 Override is invoked" }, "details": { - "name": "SetTintStage3Override" + "name": "Set Tint Stage 3 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -386,20 +386,20 @@ "key": "SetEnabledOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnabledOverride" + "tooltip": "When signaled, this will invoke Set Enabled Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnabledOverride is invoked" + "tooltip": "Signaled after Set Enabled Override is invoked" }, "details": { - "name": "SetEnabledOverride" + "name": "Set Enabled Override" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -408,20 +408,20 @@ "key": "SetKernelSizeStage0", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage0" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 0" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage0 is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 0 is invoked" }, "details": { - "name": "SetKernelSizeStage0" + "name": "Set Kernel Size Stage 0" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -430,20 +430,20 @@ "key": "GetKernelSizeStage0Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage0Override" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 0 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage0Override is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 0 Override is invoked" }, "details": { - "name": "GetKernelSizeStage0Override" + "name": "Get Kernel Size Stage 0 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -452,20 +452,20 @@ "key": "SetKernelSizeStage4Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage4Override" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 4 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage4Override is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 4 Override is invoked" }, "details": { - "name": "SetKernelSizeStage4Override" + "name": "Set Kernel Size Stage 4 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -474,20 +474,20 @@ "key": "GetTintStage2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage2" + "tooltip": "When signaled, this will invoke Get Tint Stage 2" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage2 is invoked" + "tooltip": "Signaled after Get Tint Stage 2 is invoked" }, "details": { - "name": "GetTintStage2" + "name": "Get Tint Stage 2" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -496,20 +496,20 @@ "key": "GetTintStage4Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage4Override" + "tooltip": "When signaled, this will invoke Get Tint Stage 4 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage4Override is invoked" + "tooltip": "Signaled after Get Tint Stage 4 Override is invoked" }, "details": { - "name": "GetTintStage4Override" + "name": "Get Tint Stage 4 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -518,20 +518,20 @@ "key": "SetKernelSizeStage0Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage0Override" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 0 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage0Override is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 0 Override is invoked" }, "details": { - "name": "SetKernelSizeStage0Override" + "name": "Set Kernel Size Stage 0 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -540,20 +540,20 @@ "key": "GetKernelSizeStage4Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage4Override" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 4 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage4Override is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 4 Override is invoked" }, "details": { - "name": "GetKernelSizeStage4Override" + "name": "Get Kernel Size Stage 4 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -562,20 +562,20 @@ "key": "GetTintStage2Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage2Override" + "tooltip": "When signaled, this will invoke Get Tint Stage 2 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage2Override is invoked" + "tooltip": "Signaled after Get Tint Stage 2 Override is invoked" }, "details": { - "name": "GetTintStage2Override" + "name": "Get Tint Stage 2 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -584,20 +584,20 @@ "key": "GetTintStage3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage3" + "tooltip": "When signaled, this will invoke Get Tint Stage 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage3 is invoked" + "tooltip": "Signaled after Get Tint Stage 3 is invoked" }, "details": { - "name": "GetTintStage3" + "name": "Get Tint Stage 3" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -606,20 +606,20 @@ "key": "SetKernelSizeScale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeScale" + "tooltip": "When signaled, this will invoke Set Kernel Size Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeScale is invoked" + "tooltip": "Signaled after Set Kernel Size Scale is invoked" }, "details": { - "name": "SetKernelSizeScale" + "name": "Set Kernel Size Scale" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -628,20 +628,20 @@ "key": "GetIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetIntensity" + "tooltip": "When signaled, this will invoke Get Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetIntensity is invoked" + "tooltip": "Signaled after Get Intensity is invoked" }, "details": { - "name": "GetIntensity" + "name": "Get Intensity" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -650,20 +650,20 @@ "key": "GetBicubicEnabledOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBicubicEnabledOverride" + "tooltip": "When signaled, this will invoke Get Bicubic Enabled Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBicubicEnabledOverride is invoked" + "tooltip": "Signaled after Get Bicubic Enabled Override is invoked" }, "details": { - "name": "GetBicubicEnabledOverride" + "name": "Get Bicubic Enabled Override" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -672,20 +672,20 @@ "key": "SetKernelSizeStage4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage4" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage4 is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 4 is invoked" }, "details": { - "name": "SetKernelSizeStage4" + "name": "Set Kernel Size Stage 4" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -694,20 +694,20 @@ "key": "SetBicubicEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBicubicEnabled" + "tooltip": "When signaled, this will invoke Set Bicubic Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBicubicEnabled is invoked" + "tooltip": "Signaled after Set Bicubic Enabled is invoked" }, "details": { - "name": "SetBicubicEnabled" + "name": "Set Bicubic Enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -716,20 +716,20 @@ "key": "GetKernelSizeStage1Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage1Override" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 1 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage1Override is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 1 Override is invoked" }, "details": { - "name": "GetKernelSizeStage1Override" + "name": "Get Kernel Size Stage 1 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -738,20 +738,20 @@ "key": "GetThresholdOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetThresholdOverride" + "tooltip": "When signaled, this will invoke Get Threshold Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetThresholdOverride is invoked" + "tooltip": "Signaled after Get Threshold Override is invoked" }, "details": { - "name": "GetThresholdOverride" + "name": "Get Threshold Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -760,20 +760,20 @@ "key": "SetIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetIntensity" + "tooltip": "When signaled, this will invoke Set Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetIntensity is invoked" + "tooltip": "Signaled after Set Intensity is invoked" }, "details": { - "name": "SetIntensity" + "name": "Set Intensity" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -782,20 +782,20 @@ "key": "SetBicubicEnabledOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBicubicEnabledOverride" + "tooltip": "When signaled, this will invoke Set Bicubic Enabled Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBicubicEnabledOverride is invoked" + "tooltip": "Signaled after Set Bicubic Enabled Override is invoked" }, "details": { - "name": "SetBicubicEnabledOverride" + "name": "Set Bicubic Enabled Override" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -804,20 +804,20 @@ "key": "GetKernelSizeStage1", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage1" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 1" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage1 is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 1 is invoked" }, "details": { - "name": "GetKernelSizeStage1" + "name": "Get Kernel Size Stage 1" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -826,20 +826,20 @@ "key": "GetKernelSizeStage2Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage2Override" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 2 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage2Override is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 2 Override is invoked" }, "details": { - "name": "GetKernelSizeStage2Override" + "name": "Get Kernel Size Stage 2 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -848,20 +848,20 @@ "key": "SetTintStage4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage4" + "tooltip": "When signaled, this will invoke Set Tint Stage 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage4 is invoked" + "tooltip": "Signaled after Set Tint Stage 4 is invoked" }, "details": { - "name": "SetTintStage4" + "name": "Set Tint Stage 4" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -870,20 +870,20 @@ "key": "SetKernelSizeStage1", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage1" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 1" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage1 is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 1 is invoked" }, "details": { - "name": "SetKernelSizeStage1" + "name": "Set Kernel Size Stage 1" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -892,20 +892,20 @@ "key": "SetThresholdOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetThresholdOverride" + "tooltip": "When signaled, this will invoke Set Threshold Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetThresholdOverride is invoked" + "tooltip": "Signaled after Set Threshold Override is invoked" }, "details": { - "name": "SetThresholdOverride" + "name": "Set Threshold Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -914,20 +914,20 @@ "key": "GetTintStage1", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage1" + "tooltip": "When signaled, this will invoke Get Tint Stage 1" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage1 is invoked" + "tooltip": "Signaled after Get Tint Stage 1 is invoked" }, "details": { - "name": "GetTintStage1" + "name": "Get Tint Stage 1" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -936,20 +936,20 @@ "key": "GetKnee", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKnee" + "tooltip": "When signaled, this will invoke Get Knee" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKnee is invoked" + "tooltip": "Signaled after Get Knee is invoked" }, "details": { - "name": "GetKnee" + "name": "Get Knee" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -958,20 +958,20 @@ "key": "SetThreshold", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetThreshold" + "tooltip": "When signaled, this will invoke Set Threshold" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetThreshold is invoked" + "tooltip": "Signaled after Set Threshold is invoked" }, "details": { - "name": "SetThreshold" + "name": "Set Threshold" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -980,20 +980,20 @@ "key": "SetIntensityOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetIntensityOverride" + "tooltip": "When signaled, this will invoke Set Intensity Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetIntensityOverride is invoked" + "tooltip": "Signaled after Set Intensity Override is invoked" }, "details": { - "name": "SetIntensityOverride" + "name": "Set Intensity Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1002,20 +1002,20 @@ "key": "GetEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnabled" + "tooltip": "When signaled, this will invoke Get Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnabled is invoked" + "tooltip": "Signaled after Get Enabled is invoked" }, "details": { - "name": "GetEnabled" + "name": "Get Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -1024,20 +1024,20 @@ "key": "SetKernelSizeStage1Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage1Override" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 1 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage1Override is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 1 Override is invoked" }, "details": { - "name": "SetKernelSizeStage1Override" + "name": "Set Kernel Size Stage 1 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1046,20 +1046,20 @@ "key": "GetKernelSizeStage0", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage0" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 0" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage0 is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 0 is invoked" }, "details": { - "name": "GetKernelSizeStage0" + "name": "Get Kernel Size Stage 0" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1068,20 +1068,20 @@ "key": "SetTintStage2Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage2Override" + "tooltip": "When signaled, this will invoke Set Tint Stage 2 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage2Override is invoked" + "tooltip": "Signaled after Set Tint Stage 2 Override is invoked" }, "details": { - "name": "SetTintStage2Override" + "name": "Set Tint Stage 2 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1090,20 +1090,20 @@ "key": "GetTintStage4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage4" + "tooltip": "When signaled, this will invoke Get Tint Stage 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage4 is invoked" + "tooltip": "Signaled after Get Tint Stage 4 is invoked" }, "details": { - "name": "GetTintStage4" + "name": "Get Tint Stage 4" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -1112,20 +1112,20 @@ "key": "GetKernelSizeScaleOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeScaleOverride" + "tooltip": "When signaled, this will invoke Get Kernel Size Scale Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeScaleOverride is invoked" + "tooltip": "Signaled after Get Kernel Size Scale Override is invoked" }, "details": { - "name": "GetKernelSizeScaleOverride" + "name": "Get Kernel Size Scale Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1134,20 +1134,20 @@ "key": "SetKernelSizeStage2Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage2Override" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 2 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage2Override is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 2 Override is invoked" }, "details": { - "name": "SetKernelSizeStage2Override" + "name": "Set Kernel Size Stage 2 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1156,20 +1156,20 @@ "key": "GetKernelSizeStage3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKernelSizeStage3" + "tooltip": "When signaled, this will invoke Get Kernel Size Stage 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKernelSizeStage3 is invoked" + "tooltip": "Signaled after Get Kernel Size Stage 3 is invoked" }, "details": { - "name": "GetKernelSizeStage3" + "name": "Get Kernel Size Stage 3" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1178,20 +1178,20 @@ "key": "GetTintStage1Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTintStage1Override" + "tooltip": "When signaled, this will invoke Get Tint Stage 1 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTintStage1Override is invoked" + "tooltip": "Signaled after Get Tint Stage 1 Override is invoked" }, "details": { - "name": "GetTintStage1Override" + "name": "Get Tint Stage 1 Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1200,20 +1200,20 @@ "key": "SetTintStage2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTintStage2" + "tooltip": "When signaled, this will invoke Set Tint Stage 2" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTintStage2 is invoked" + "tooltip": "Signaled after Set Tint Stage 2 is invoked" }, "details": { - "name": "SetTintStage2" + "name": "Set Tint Stage 2" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Value" } } ] @@ -1222,20 +1222,20 @@ "key": "GetKneeOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetKneeOverride" + "tooltip": "When signaled, this will invoke Get Knee Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetKneeOverride is invoked" + "tooltip": "Signaled after Get Knee Override is invoked" }, "details": { - "name": "GetKneeOverride" + "name": "Get Knee Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1244,20 +1244,20 @@ "key": "SetKnee", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKnee" + "tooltip": "When signaled, this will invoke Set Knee" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKnee is invoked" + "tooltip": "Signaled after Set Knee is invoked" }, "details": { - "name": "SetKnee" + "name": "Set Knee" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1266,20 +1266,20 @@ "key": "GetIntensityOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetIntensityOverride" + "tooltip": "When signaled, this will invoke Get Intensity Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetIntensityOverride is invoked" + "tooltip": "Signaled after Get Intensity Override is invoked" }, "details": { - "name": "GetIntensityOverride" + "name": "Get Intensity Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1288,20 +1288,20 @@ "key": "SetEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnabled" + "tooltip": "When signaled, this will invoke Set Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnabled is invoked" + "tooltip": "Signaled after Set Enabled is invoked" }, "details": { - "name": "SetEnabled" + "name": "Set Enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -1310,20 +1310,20 @@ "key": "GetThreshold", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetThreshold" + "tooltip": "When signaled, this will invoke Get Threshold" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetThreshold is invoked" + "tooltip": "Signaled after Get Threshold is invoked" }, "details": { - "name": "GetThreshold" + "name": "Get Threshold" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1332,20 +1332,20 @@ "key": "SetKernelSizeStage3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage3" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage3 is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 3 is invoked" }, "details": { - "name": "SetKernelSizeStage3" + "name": "Set Kernel Size Stage 3" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1354,20 +1354,20 @@ "key": "SetKernelSizeStage3Override", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKernelSizeStage3Override" + "tooltip": "When signaled, this will invoke Set Kernel Size Stage 3 Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKernelSizeStage3Override is invoked" + "tooltip": "Signaled after Set Kernel Size Stage 3 Override is invoked" }, "details": { - "name": "SetKernelSizeStage3Override" + "name": "Set Kernel Size Stage 3 Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1376,20 +1376,20 @@ "key": "SetKneeOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetKneeOverride" + "tooltip": "When signaled, this will invoke Set Knee Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetKneeOverride is invoked" + "tooltip": "Signaled after Set Knee Override is invoked" }, "details": { - "name": "SetKneeOverride" + "name": "Set Knee Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Value" } } ] @@ -1398,20 +1398,20 @@ "key": "GetBicubicEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBicubicEnabled" + "tooltip": "When signaled, this will invoke Get Bicubic Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBicubicEnabled is invoked" + "tooltip": "Signaled after Get Bicubic Enabled is invoked" }, "details": { - "name": "GetBicubicEnabled" + "name": "Get Bicubic Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoundsRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoundsRequestBus.names index a778eb6039..d909eb0338 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoundsRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/BoundsRequestBus.names @@ -5,27 +5,27 @@ "context": "EBusSender", "variant": "", "details": { - "name": "BoundsRequestBus" + "name": "Bounds Request Bus" }, "methods": [ { "key": "GetWorldBounds", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetWorldBounds" + "tooltip": "When signaled, this will invoke Get World Bounds" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetWorldBounds is invoked" + "tooltip": "Signaled after Get World Bounds is invoked" }, "details": { - "name": "GetWorldBounds" + "name": "Get World Bounds" }, "results": [ { "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", "details": { - "name": "Aabb" + "name": "AABB" } } ] @@ -34,20 +34,20 @@ "key": "GetLocalBounds", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetLocalBounds" + "tooltip": "When signaled, this will invoke Get Local Bounds" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetLocalBounds is invoked" + "tooltip": "Signaled after Get Local Bounds is invoked" }, "details": { - "name": "GetLocalBounds" + "name": "Get Local Bounds" }, "results": [ { "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", "details": { - "name": "Aabb" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraRequestBus.names index 500ae4d94c..4fbeba0aa7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "CameraRequestBus", + "name": "Camera", "category": "Camera" }, "methods": [ @@ -13,20 +13,20 @@ "key": "GetOrthographicHalfWidth", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOrthographicHalfWidth" + "tooltip": "When signaled, this will invoke Get Orthographic Half Width" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOrthographicHalfWidth is invoked" + "tooltip": "Signaled after Get Orthographic Half Width is invoked" }, "details": { - "name": "GetOrthographicHalfWidth" + "name": "Get Orthographic Half Width" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Half Width" } } ] @@ -35,21 +35,20 @@ "key": "GetFov", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get FOV" + "tooltip": "When signaled, this will invoke Get Field of View" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get FOV is invoked" + "tooltip": "Signaled after Get Field of View is invoked" }, "details": { - "name": "Get FOV", - "tooltip": "Returns the field of view of the camera" + "name": "Get Field of View" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "FOV" } } ] @@ -58,20 +57,20 @@ "key": "SetFovRadians", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFovRadians" + "tooltip": "When signaled, this will invoke Set Field of View (Radians)" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFovRadians is invoked" + "tooltip": "Signaled after Set Field of View (Radians) is invoked" }, "details": { - "name": "SetFovRadians" + "name": "Set Field of View (Radians)" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "FOV (Radians)" } } ] @@ -87,15 +86,13 @@ "tooltip": "Signaled after Set Near Clip Distance is invoked" }, "details": { - "name": "Set Near Clip Distance", - "tooltip": "Sets the near clip distance of the camera" + "name": "Set Near Clip Distance" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Distance", - "tooltip": "Set the near clip distance of the camera" + "name": "Near Clip Distance" } } ] @@ -104,20 +101,20 @@ "key": "IsOrthographic", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsOrthographic" + "tooltip": "When signaled, this will invoke Is Orthographic" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsOrthographic is invoked" + "tooltip": "Signaled after Is Orthographic is invoked" }, "details": { - "name": "IsOrthographic" + "name": "Is Orthographic" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Orthographic" } } ] @@ -126,20 +123,20 @@ "key": "SetFovDegrees", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFovDegrees" + "tooltip": "When signaled, this will invoke Set Field of View (Degrees)" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFovDegrees is invoked" + "tooltip": "Signaled after Set Field of View (Degrees) is invoked" }, "details": { - "name": "SetFovDegrees" + "name": "Set Field of View (Degrees)" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Field of View (Degrees)" } } ] @@ -148,20 +145,20 @@ "key": "GetFovRadians", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFovRadians" + "tooltip": "When signaled, this will invoke Get Field of View (Radians)" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFovRadians is invoked" + "tooltip": "Signaled after Get Field of View (Radians) is invoked" }, "details": { - "name": "GetFovRadians" + "name": "Get Field of View (Radians)" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Field of View (Radians)" } } ] @@ -170,22 +167,20 @@ "key": "SetFov", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set FOV" + "tooltip": "When signaled, this will invoke Set Field of View" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set FOV is invoked" + "tooltip": "Signaled after Set Field of View is invoked" }, "details": { - "name": "Set FOV", - "tooltip": "Set the field of view of the camera" + "name": "Set Field of View" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "FOV", - "tooltip": "The field of view of the camera" + "name": "Field of View" } } ] @@ -201,8 +196,7 @@ "tooltip": "Signaled after Make Active View is invoked" }, "details": { - "name": "Make Active View", - "tooltip": "Sets the camera on the specified entity to the active view" + "name": "Make Active View" } }, { @@ -216,14 +210,13 @@ "tooltip": "Signaled after Get Far Clip Distance is invoked" }, "details": { - "name": "Get Far Clip Distance", - "tooltip": "Returns the far clip distance of the camera" + "name": "Get Far Clip Distance" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Far Clip Distance" } } ] @@ -232,20 +225,20 @@ "key": "GetFovDegrees", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFovDegrees" + "tooltip": "When signaled, this will invoke Get Field of View (Degrees)" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFovDegrees is invoked" + "tooltip": "Signaled after Get Field of View (Degrees) is invoked" }, "details": { - "name": "GetFovDegrees" + "name": "Get Field of View (Degrees)" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Field of View (Degrees)" } } ] @@ -254,20 +247,20 @@ "key": "SetOrthographic", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetOrthographic" + "tooltip": "When signaled, this will invoke Set Orthographic" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetOrthographic is invoked" + "tooltip": "Signaled after Set Orthographic is invoked" }, "details": { - "name": "SetOrthographic" + "name": "Set Orthographic" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Orthographic" } } ] @@ -276,20 +269,20 @@ "key": "SetOrthographicHalfWidth", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetOrthographicHalfWidth" + "tooltip": "When signaled, this will invoke Set Orthographic Half Width" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetOrthographicHalfWidth is invoked" + "tooltip": "Signaled after Set Orthographic Half Width is invoked" }, "details": { - "name": "SetOrthographicHalfWidth" + "name": "Set Orthographic Half Width" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Half Width" } } ] @@ -305,14 +298,13 @@ "tooltip": "Signaled after Get Near Clip Distance is invoked" }, "details": { - "name": "Get Near Clip Distance", - "tooltip": "Returns the near clip distance of the camera" + "name": "Get Near Clip Distance" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Near Clip Distance" } } ] @@ -328,15 +320,13 @@ "tooltip": "Signaled after Set Far Clip Distance is invoked" }, "details": { - "name": "Set Far Clip Distance", - "tooltip": "Sets the far clip distance of the camera" + "name": "Set Far Clip Distance" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Distance", - "tooltip": "The far clip distance of the camera" + "name": "Far Clip Distance" } } ] @@ -345,20 +335,20 @@ "key": "IsActiveView", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsActiveView" + "tooltip": "When signaled, this will invoke Is Active View" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsActiveView is invoked" + "tooltip": "Signaled after Is Active View is invoked" }, "details": { - "name": "IsActiveView" + "name": "Is Active View" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Active View" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraSystemRequestBus.names index 7aa3557801..6ad6354cd4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraSystemRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CameraSystemRequestBus.names @@ -5,27 +5,27 @@ "context": "EBusSender", "variant": "", "details": { - "name": "CameraSystemRequestBus" + "name": "Camera" }, "methods": [ { "key": "GetActiveCamera", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetActiveCamera" + "tooltip": "When signaled, this will invoke Get Active Camera" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetActiveCamera is invoked" + "tooltip": "Signaled after Get Active Camera is invoked" }, "details": { - "name": "GetActiveCamera" + "name": "Get Active Camera" }, "results": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterControllerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterControllerRequestBus.names index b5b4dbfedd..df4a2d29df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterControllerRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterControllerRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "CharacterControllerRequestBus", + "name": "Character", "category": "PhysX" }, "methods": [ @@ -13,22 +13,20 @@ "key": "SetSlopeLimitDegrees", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Slope Limit (degrees)" + "tooltip": "When signaled, this will invoke Set Slope Limit Degrees" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Slope Limit (degrees) is invoked" + "tooltip": "Signaled after Set Slope Limit Degrees is invoked" }, "details": { - "name": "Set Slope Limit (degrees)", - "tooltip": "Sets the maximum slope (in degrees) which the controller can ascend" + "name": "Set Slope Limit Degrees" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Slope Limit (degrees)", - "tooltip": "The new value for the maximum slope (in degrees) which the controller can ascend" + "name": "Slope Limit" } } ] @@ -37,21 +35,20 @@ "key": "GetSlopeLimitDegrees", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Slope Limit (degrees)" + "tooltip": "When signaled, this will invoke Get Slope Limit Degrees" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Slope Limit (degrees) is invoked" + "tooltip": "Signaled after Get Slope Limit Degrees is invoked" }, "details": { - "name": "Get Slope Limit (degrees)", - "tooltip": "Gets the maximum slope (in degrees) which the controller can ascend" + "name": "Get Slope Limit Degrees" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Slope Limit" } } ] @@ -67,15 +64,13 @@ "tooltip": "Signaled after Set Maximum Speed is invoked" }, "details": { - "name": "Set Maximum Speed", - "tooltip": "Sets the maximum speed, above which the accumulated requested velocity will be clamped" + "name": "Set Maximum Speed" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Maximum Speed", - "tooltip": "The new value for the maximum speed, above which the accumulated requested velocity will be clamped" + "name": "Maximum Speed" } } ] @@ -91,14 +86,13 @@ "tooltip": "Signaled after Get Up Direction is invoked" }, "details": { - "name": "Get Up Direction", - "tooltip": "Gets the direction considered to be upwards when simulating the character" + "name": "Get Up Direction" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Up" } } ] @@ -114,15 +108,13 @@ "tooltip": "Signaled after Add Velocity is invoked" }, "details": { - "name": "Add Velocity", - "tooltip": "Requests a velocity for the controller, to be accumulated with other requests this tick and cumulatively applied before the next physics update" + "name": "Add Velocity" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Velocity", - "tooltip": "The desired velocity" + "name": "Velocity" } } ] @@ -138,15 +130,13 @@ "tooltip": "Signaled after Set Base Position is invoked" }, "details": { - "name": "Set Base Position", - "tooltip": "Directly moves (teleports) the controller to a new base position" + "name": "Set Base Position" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Base Position", - "tooltip": "The new value for the controller's base position" + "name": "Position" } } ] @@ -162,14 +152,13 @@ "tooltip": "Signaled after Get Center Position is invoked" }, "details": { - "name": "Get Center Position", - "tooltip": "Gets the position of the controller's center" + "name": "Get Center Position" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Position" } } ] @@ -185,14 +174,13 @@ "tooltip": "Signaled after Get Step Height is invoked" }, "details": { - "name": "Get Step Height", - "tooltip": "Gets the maximum height of steps which the controller can ascend" + "name": "Get Step Height" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Step Height" } } ] @@ -208,14 +196,13 @@ "tooltip": "Signaled after Get Base Position is invoked" }, "details": { - "name": "Get Base Position", - "tooltip": "Gets the position of the controller's base" + "name": "Get Base Position" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Position" } } ] @@ -231,15 +218,13 @@ "tooltip": "Signaled after Set Step Height is invoked" }, "details": { - "name": "Set Step Height", - "tooltip": "Sets the maximum height of steps which the controller can ascend" + "name": "Set Step Height" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Step Height", - "tooltip": "The new value for the maximum height of steps which the controller can ascend" + "name": "Step Height" } } ] @@ -255,14 +240,13 @@ "tooltip": "Signaled after Get Maximum Speed is invoked" }, "details": { - "name": "Get Maximum Speed", - "tooltip": "Gets the maximum speed, above which the accumulated requested velocity will be clamped" + "name": "Get Maximum Speed" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Maximum Speed" } } ] @@ -278,14 +262,13 @@ "tooltip": "Signaled after Get Velocity is invoked" }, "details": { - "name": "Get Velocity", - "tooltip": "Gets the character's observed velocity from the last simulation update" + "name": "Get Velocity" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Velocity" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterGameplayRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterGameplayRequestBus.names new file mode 100644 index 0000000000..6a957de61b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CharacterGameplayRequestBus.names @@ -0,0 +1,124 @@ +{ + "entries": [ + { + "key": "CharacterGameplayRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Character" + }, + "methods": [ + { + "key": "GetFallingVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Falling Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Falling Velocity is invoked" + }, + "details": { + "name": "Get Falling Velocity" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Falling Velocity" + } + } + ] + }, + { + "key": "GetGravityMultiplier", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Gravity Multiplier" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Gravity Multiplier is invoked" + }, + "details": { + "name": "Get Gravity Multiplier" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Gravity Multiplier" + } + } + ] + }, + { + "key": "SetGravityMultiplier", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Gravity Multiplier" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Gravity Multiplier is invoked" + }, + "details": { + "name": "Set Gravity Multiplier" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Gravity Multiplier" + } + } + ] + }, + { + "key": "IsOnGround", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is On Ground" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is On Ground is invoked" + }, + "details": { + "name": "Is On Ground" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is On Ground" + } + } + ] + }, + { + "key": "SetFallingVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Falling Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Falling Velocity is invoked" + }, + "details": { + "name": "Set Falling Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Falling Velocity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CollisionFilteringBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CollisionFilteringBus.names index ea74fb1d02..1c8eba4b1f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CollisionFilteringBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/CollisionFilteringBus.names @@ -5,8 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "CollisionFilteringBus", - "category": "PhysX" + "name": "Collision Filtering" }, "methods": [ { @@ -20,29 +19,25 @@ "tooltip": "Signaled after Toggle Collision Layer is invoked" }, "details": { - "name": "Toggle Collision Layer", - "tooltip": "Toggles a collision layer on or off on a collision group." + "name": "Toggle Collision Layer" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "Layer Name", - "tooltip": "The name of the layer to toggle. The layer name must exist in the PhysX Configuration otherwise this node will have no effect." + "name": "Layer Name" } }, { "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", "details": { - "name": "Collider Tag", - "tooltip": "Use this to target a specific collider on the entity. If left blank, all colliders will be updated." + "name": "Collider Tag" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Enabled", - "tooltip": "Toggles the layer on or off" + "name": "Enabled" } } ] @@ -58,22 +53,19 @@ "tooltip": "Signaled after Set Collision Group is invoked" }, "details": { - "name": "Set Collision Group", - "tooltip": "Sets the collision group on a collider" + "name": "Set Collision Group" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "Group Name", - "tooltip": "The name of the group to set. The group name must exist in the PhysX Configuration otherwise this node will have no effect." + "name": "Group Name" } }, { "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", "details": { - "name": "Collider Tag", - "tooltip": "Use this to target a specific collider on the entity. If left blank, all colliders will be updated." + "name": "Collider Tag" } } ] @@ -89,14 +81,13 @@ "tooltip": "Signaled after Get Collision Group Name is invoked" }, "details": { - "name": "Get Collision Group Name", - "tooltip": "Gets the collision group on an entity. Note: multiple colliders on an entity are not supported." + "name": "Get Collision Group Name" }, "results": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Name" } } ] @@ -112,14 +103,13 @@ "tooltip": "Signaled after Get Collision Layer Name is invoked" }, "details": { - "name": "Get Collision Layer Name", - "tooltip": "Gets the collision layer on an entity. Note: multiple colliders on an entity are not supported." + "name": "Get Collision Layer Name" }, "results": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Name" } } ] @@ -135,22 +125,19 @@ "tooltip": "Signaled after Set Collision Layer is invoked" }, "details": { - "name": "Set Collision Layer", - "tooltip": "Sets the collision layer on a collider" + "name": "Set Collision Layer" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "Layer Name", - "tooltip": "The name of the layer to set. The layer name must exist in the PhysX Configuration otherwise this node will have no effect." + "name": "Layer Name" } }, { "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", "details": { - "name": "Collider Tag", - "tooltip": "Use this to target a specific collider on the entity. If left blank, all colliders will be updated." + "name": "Collider Tag" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentApplicationBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentApplicationBus.names index 5b5b2c9bb1..59eb3e5025 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentApplicationBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ComponentApplicationBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "ComponentApplicationBus" + "name": "Application", + "category": "Components" }, "methods": [ { "key": "GetEntityName", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEntityName" + "tooltip": "When signaled, this will invoke Get Entity Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEntityName is invoked" + "tooltip": "Signaled after Get Entity Name is invoked" }, "details": { - "name": "GetEntityName" + "name": "Get Entity Name" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -43,27 +44,27 @@ "key": "SetEntityName", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEntityName" + "tooltip": "When signaled, this will invoke Set Entity Name" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEntityName is invoked" + "tooltip": "Signaled after Set Entity Name is invoked" }, "details": { - "name": "SetEntityName" + "name": "Set Entity Name" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{7114E998-A8B4-519B-9342-A86D1587B4F7}", "details": { - "name": "" + "name": "Name" } } ], @@ -71,7 +72,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Succesful" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConsoleRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConsoleRequestBus.names index d956496c3e..eb2414b9b4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConsoleRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ConsoleRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "ConsoleRequestBus", + "name": "Console", "category": "Utilities" }, "methods": [ @@ -26,7 +26,7 @@ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Command" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DebugDrawRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DebugDrawRequestBus.names new file mode 100644 index 0000000000..18933932f8 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DebugDrawRequestBus.names @@ -0,0 +1,606 @@ +{ + "entries": [ + { + "key": "DebugDrawRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Debug Draw" + }, + "methods": [ + { + "key": "DrawTextOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Text On Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Text On Entity is invoked" + }, + "details": { + "name": "Draw Text On Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawRayEntityToDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Ray Entity To Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Ray Entity To Direction is invoked" + }, + "details": { + "name": "Draw Ray Entity To Direction" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawObb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Oriented Bounding Box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Oriented Bounding Box is invoked" + }, + "details": { + "name": "Draw Oriented Bounding Box" + }, + "params": [ + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "OBB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawObbOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Oriented Bounding Box on Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Oriented Bounding Box on Entity is invoked" + }, + "details": { + "name": "Draw Oriented Bounding Box on Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{004ABD25-CF14-4EB3-BD41-022C247C07FA}", + "details": { + "name": "OBB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawRayLocationToDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Ray Location To Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Ray Location To Direction is invoked" + }, + "details": { + "name": "Draw Ray Location To Direction" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawSphereOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Sphere On Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Sphere On Entity is invoked" + }, + "details": { + "name": "Draw Sphere On Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawAabbOnEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Axis Aligned Bounding Box On Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Axis Aligned Bounding Box On Entity is invoked" + }, + "details": { + "name": "Draw Axis Aligned Bounding Box On Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawLineEntityToEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Line Entity To Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Line Entity To Entity is invoked" + }, + "details": { + "name": "Draw Line Entity To Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "From Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "To Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawTextAtLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Text At Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Text At Location is invoked" + }, + "details": { + "name": "Draw Text At Location" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawTextOnScreen", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Text On Screen" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Text On Screen is invoked" + }, + "details": { + "name": "Draw Text On Screen" + }, + "params": [ + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "Text" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Axis Aligned Bounding Box" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Axis Aligned Bounding Box is invoked" + }, + "details": { + "name": "Draw Axis Aligned Bounding Box" + }, + "params": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawLineLocationToLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Line Location To Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Line Location To Location is invoked" + }, + "details": { + "name": "Draw Line Location To Location" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawLineEntityToLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Line Entity To Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Line Entity To Location is invoked" + }, + "details": { + "name": "Draw Line Entity To Location" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawRayEntityToEntity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Ray Entity To Entity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Ray Entity To Entity is invoked" + }, + "details": { + "name": "Draw Ray Entity To Entity" + }, + "params": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "From Entity Id", + "tooltip": "Entity to draw the ray from" + } + }, + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "To Entity Id", + "tooltip": "Entity to draw the ray to" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + }, + { + "key": "DrawSphereAtLocation", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Draw Sphere At Location" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Draw Sphere At Location is invoked" + }, + "details": { + "name": "Draw Sphere At Location" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Radius" + } + }, + { + "typeid": "{7894072A-9050-4F0F-901B-34B1A0D29417}", + "details": { + "name": "Color" + } + }, + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Duration" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DecalRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DecalRequestBus.names index 2d69295887..27d0a36cd4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DecalRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DecalRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "DecalRequestBus" + "name": "Decal", + "category": "Rendering" }, "methods": [ { "key": "GetMaterial", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetMaterial" + "tooltip": "When signaled, this will invoke Get Material" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetMaterial is invoked" + "tooltip": "Signaled after Get Material is invoked" }, "details": { - "name": "GetMaterial" + "name": "Get Material" }, "results": [ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -34,20 +35,20 @@ "key": "GetSortKey", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSortKey" + "tooltip": "When signaled, this will invoke Get Sort Key" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSortKey is invoked" + "tooltip": "Signaled after Get Sort Key is invoked" }, "details": { - "name": "GetSortKey" + "name": "Get Sort Key" }, "results": [ { "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", "details": { - "name": "unsigned char" + "name": "Sort Key" } } ] @@ -56,20 +57,20 @@ "key": "SetSortKey", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetSortKey" + "tooltip": "When signaled, this will invoke Set Sort Key" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetSortKey is invoked" + "tooltip": "Signaled after Set Sort Key is invoked" }, "details": { - "name": "SetSortKey" + "name": "Set Sort Key" }, "params": [ { "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", "details": { - "name": "unsigned char" + "name": "Sort Key" } } ] @@ -78,20 +79,20 @@ "key": "SetMaterial", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetMaterial" + "tooltip": "When signaled, this will invoke Set Material" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetMaterial is invoked" + "tooltip": "Signaled after Set Material is invoked" }, "details": { - "name": "SetMaterial" + "name": "Set Material" }, "params": [ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -100,20 +101,20 @@ "key": "SetAttenuationAngle", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAttenuationAngle" + "tooltip": "When signaled, this will invoke Set Attenuation Angle" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAttenuationAngle is invoked" + "tooltip": "Signaled after Set Attenuation Angle is invoked" }, "details": { - "name": "SetAttenuationAngle" + "name": "Set Attenuation Angle" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Attenuation Angle" } } ] @@ -122,20 +123,20 @@ "key": "GetOpacity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOpacity" + "tooltip": "When signaled, this will invoke Get Opacity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOpacity is invoked" + "tooltip": "Signaled after Get Opacity is invoked" }, "details": { - "name": "GetOpacity" + "name": "Get Opacity" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Opacity" } } ] @@ -144,20 +145,20 @@ "key": "SetOpacity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetOpacity" + "tooltip": "When signaled, this will invoke Set Opacity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetOpacity is invoked" + "tooltip": "Signaled after Set Opacity is invoked" }, "details": { - "name": "SetOpacity" + "name": "Set Opacity" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Opacity" } } ] @@ -166,20 +167,20 @@ "key": "GetAttenuationAngle", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAttenuationAngle" + "tooltip": "When signaled, this will invoke Get Attenuation Angle" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAttenuationAngle is invoked" + "tooltip": "Signaled after Get Attenuation Angle is invoked" }, "details": { - "name": "GetAttenuationAngle" + "name": "Get Attenuation Angle" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Attenuation Angle" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DeferredFogRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DeferredFogRequestsBus.names index ff796ed9d8..a7897a582a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DeferredFogRequestsBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DeferredFogRequestsBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "DeferredFogRequestsBus" + "name": "Deferred Fog", + "category": "Rendering" }, "methods": [ { "key": "SetNoiseTexture", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNoiseTexture" + "tooltip": "When signaled, this will invoke Set Noise Texture" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNoiseTexture is invoked" + "tooltip": "Signaled after Set Noise Texture is invoked" }, "details": { - "name": "SetNoiseTexture" + "name": "Set Noise Texture" }, "params": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Path" } } ] @@ -34,20 +35,20 @@ "key": "SetNoiseTexCoordScale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNoiseTexCoordScale" + "tooltip": "When signaled, this will invoke Set Noise Tex Coord Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNoiseTexCoordScale is invoked" + "tooltip": "Signaled after Set Noise Tex Coord Scale is invoked" }, "details": { - "name": "SetNoiseTexCoordScale" + "name": "Set Noise Tex Coord Scale" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord Scale" } } ] @@ -56,20 +57,20 @@ "key": "SetNoiseTexCoord2Scale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNoiseTexCoord2Scale" + "tooltip": "When signaled, this will invoke Set Noise Tex Coord 2 Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNoiseTexCoord2Scale is invoked" + "tooltip": "Signaled after Set Noise Tex Coord 2 Scale is invoked" }, "details": { - "name": "SetNoiseTexCoord2Scale" + "name": "Set Noise Tex Coord 2 Scale" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord 2 Scale" } } ] @@ -78,20 +79,20 @@ "key": "GetFogMaxHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFogMaxHeight" + "tooltip": "When signaled, this will invoke Get Fog Max Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFogMaxHeight is invoked" + "tooltip": "Signaled after Get Fog Max Height is invoked" }, "details": { - "name": "GetFogMaxHeight" + "name": "Get Fog Max Height" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Max Height" } } ] @@ -100,20 +101,20 @@ "key": "GetNoiseTexCoordScale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNoiseTexCoordScale" + "tooltip": "When signaled, this will invoke Get Noise Tex Coord Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNoiseTexCoordScale is invoked" + "tooltip": "Signaled after Get Noise Tex Coord Scale is invoked" }, "details": { - "name": "GetNoiseTexCoordScale" + "name": "Get Noise Tex Coord Scale" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord Scale" } } ] @@ -122,20 +123,20 @@ "key": "GetNoiseTexCoordVelocity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNoiseTexCoordVelocity" + "tooltip": "When signaled, this will invoke Get Noise Tex Coord Velocity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNoiseTexCoordVelocity is invoked" + "tooltip": "Signaled after Get Noise Tex Coord Velocity is invoked" }, "details": { - "name": "GetNoiseTexCoordVelocity" + "name": "Get Noise Tex Coord Velocity" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord Velocity" } } ] @@ -144,20 +145,20 @@ "key": "SetFogEndDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFogEndDistance" + "tooltip": "When signaled, this will invoke Set Fog End Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFogEndDistance is invoked" + "tooltip": "Signaled after Set Fog End Distance is invoked" }, "details": { - "name": "SetFogEndDistance" + "name": "Set Fog End Distance" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Fod End Distance" } } ] @@ -166,20 +167,20 @@ "key": "GetFogEndDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFogEndDistance" + "tooltip": "When signaled, this will invoke Get Fog End Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFogEndDistance is invoked" + "tooltip": "Signaled after Get Fog End Distance is invoked" }, "details": { - "name": "GetFogEndDistance" + "name": "Get Fog End Distance" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Fog End Distance" } } ] @@ -188,20 +189,20 @@ "key": "GetNoiseTexCoord2Scale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNoiseTexCoord2Scale" + "tooltip": "When signaled, this will invoke Get Noise Tex Coord 2 Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNoiseTexCoord2Scale is invoked" + "tooltip": "Signaled after Get Noise Tex Coord 2 Scale is invoked" }, "details": { - "name": "GetNoiseTexCoord2Scale" + "name": "Get Noise Tex Coord 2 Scale" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord 2 Scale" } } ] @@ -210,20 +211,20 @@ "key": "SetNoiseTexCoord2Velocity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNoiseTexCoord2Velocity" + "tooltip": "When signaled, this will invoke Set Noise Tex Coord 2 Velocity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNoiseTexCoord2Velocity is invoked" + "tooltip": "Signaled after Set Noise Tex Coord 2 Velocity is invoked" }, "details": { - "name": "SetNoiseTexCoord2Velocity" + "name": "Set Noise Tex Coord 2 Velocity" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord 2 Velocity" } } ] @@ -232,20 +233,20 @@ "key": "GetFogStartDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFogStartDistance" + "tooltip": "When signaled, this will invoke Get Fog Start Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFogStartDistance is invoked" + "tooltip": "Signaled after Get Fog Start Distance is invoked" }, "details": { - "name": "GetFogStartDistance" + "name": "Get Fog Start Distance" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Fog Start Distance" } } ] @@ -254,20 +255,20 @@ "key": "SetFogMaxHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFogMaxHeight" + "tooltip": "When signaled, this will invoke Set Fog Max Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFogMaxHeight is invoked" + "tooltip": "Signaled after Set Fog Max Height is invoked" }, "details": { - "name": "SetFogMaxHeight" + "name": "Set Fog Max Height" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Fog Max Height" } } ] @@ -276,20 +277,20 @@ "key": "SetNoiseTexCoordVelocity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetNoiseTexCoordVelocity" + "tooltip": "When signaled, this will invoke Set Noise Tex Coord Velocity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetNoiseTexCoordVelocity is invoked" + "tooltip": "Signaled after Set Noise Tex Coord Velocity is invoked" }, "details": { - "name": "SetNoiseTexCoordVelocity" + "name": "Set Noise Tex Coord Velocity" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord Velocity" } } ] @@ -298,20 +299,20 @@ "key": "GetNoiseTexCoord2Velocity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNoiseTexCoord2Velocity" + "tooltip": "When signaled, this will invoke Get Noise Tex Coord 2 Velocity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNoiseTexCoord2Velocity is invoked" + "tooltip": "Signaled after Get Noise Tex Coord 2 Velocity is invoked" }, "details": { - "name": "GetNoiseTexCoord2Velocity" + "name": "Get Noise Tex Coord 2 Velocity" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Tex Coord 2 Velocity" } } ] @@ -320,20 +321,20 @@ "key": "SetFogStartDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFogStartDistance" + "tooltip": "When signaled, this will invoke Set Fog Start Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFogStartDistance is invoked" + "tooltip": "Signaled after Set Fog Start Distance is invoked" }, "details": { - "name": "SetFogStartDistance" + "name": "Set Fog Start Distance" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Fog Start Distance" } } ] @@ -342,20 +343,20 @@ "key": "GetFogMinHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFogMinHeight" + "tooltip": "When signaled, this will invoke Get Fog Min Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFogMinHeight is invoked" + "tooltip": "Signaled after Get Fog Min Height is invoked" }, "details": { - "name": "GetFogMinHeight" + "name": "Get Fog Min Height" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Fog Min Height" } } ] @@ -364,20 +365,20 @@ "key": "GetFogColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFogColor" + "tooltip": "When signaled, this will invoke Get Fog Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFogColor is invoked" + "tooltip": "Signaled after Get Fog Color is invoked" }, "details": { - "name": "GetFogColor" + "name": "Get Fog Color" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Fog Color" } } ] @@ -386,20 +387,20 @@ "key": "SetOctavesBlendFactor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetOctavesBlendFactor" + "tooltip": "When signaled, this will invoke Set Octaves Blend Factor" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetOctavesBlendFactor is invoked" + "tooltip": "Signaled after Set Octaves Blend Factor is invoked" }, "details": { - "name": "SetOctavesBlendFactor" + "name": "Set Octaves Blend Factor" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Octaves Blend Factor" } } ] @@ -408,20 +409,20 @@ "key": "GetOctavesBlendFactor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOctavesBlendFactor" + "tooltip": "When signaled, this will invoke Get Octaves Blend Factor" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOctavesBlendFactor is invoked" + "tooltip": "Signaled after Get Octaves Blend Factor is invoked" }, "details": { - "name": "GetOctavesBlendFactor" + "name": "Get Octaves Blend Factor" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Octaves Blend Factor" } } ] @@ -430,20 +431,20 @@ "key": "SetFogColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFogColor" + "tooltip": "When signaled, this will invoke Set Fog Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFogColor is invoked" + "tooltip": "Signaled after Set Fog Color is invoked" }, "details": { - "name": "SetFogColor" + "name": "Set Fog Color" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Fog Color" } } ] @@ -452,20 +453,20 @@ "key": "SetFogMinHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFogMinHeight" + "tooltip": "When signaled, this will invoke Set Fog Min Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFogMinHeight is invoked" + "tooltip": "Signaled after Set Fog Min Height is invoked" }, "details": { - "name": "SetFogMinHeight" + "name": "Set Fog Min Height" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Fog Min Height" } } ] @@ -474,20 +475,20 @@ "key": "GetNoiseTexture", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetNoiseTexture" + "tooltip": "When signaled, this will invoke Get Noise Texture" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetNoiseTexture is invoked" + "tooltip": "Signaled after Get Noise Texture is invoked" }, "details": { - "name": "GetNoiseTexture" + "name": "Get Noise Texture" }, "results": [ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Path" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DepthOfFieldRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DepthOfFieldRequestBus.names index 1fbc15e794..ef3d070f51 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DepthOfFieldRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DepthOfFieldRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "DepthOfFieldRequestBus" + "name": "Depth Of Field", + "category": "Post Process" }, "methods": [ { "key": "GetEnableDebugColoringOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnableDebugColoringOverride" + "tooltip": "When signaled, this will invoke Get Enable Debug Coloring Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnableDebugColoringOverride is invoked" + "tooltip": "Signaled after Get Enable Debug Coloring Override is invoked" }, "details": { - "name": "GetEnableDebugColoringOverride" + "name": "Get Enable Debug Coloring Override" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -34,20 +35,20 @@ "key": "GetAutoFocusSpeedOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusSpeedOverride" + "tooltip": "When signaled, this will invoke Get Auto Focus Speed Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusSpeedOverride is invoked" + "tooltip": "Signaled after Get Auto Focus Speed Override is invoked" }, "details": { - "name": "GetAutoFocusSpeedOverride" + "name": "Get Auto Focus Speed Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Speed" } } ] @@ -56,20 +57,20 @@ "key": "SetAutoFocusSensitivity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusSensitivity" + "tooltip": "When signaled, this will invoke Set Auto Focus Sensitivity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusSensitivity is invoked" + "tooltip": "Signaled after Set Auto Focus Sensitivity is invoked" }, "details": { - "name": "SetAutoFocusSensitivity" + "name": "Set Auto Focus Sensitivity" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Sensitivity" } } ] @@ -78,20 +79,20 @@ "key": "SetAutoFocusDelayOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusDelayOverride" + "tooltip": "When signaled, this will invoke Set Auto Focus Delay Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusDelayOverride is invoked" + "tooltip": "Signaled after Set Auto Focus Delay Override is invoked" }, "details": { - "name": "SetAutoFocusDelayOverride" + "name": "Set Auto Focus Delay Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Delay" } } ] @@ -100,20 +101,20 @@ "key": "GetAutoFocusScreenPosition", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusScreenPosition" + "tooltip": "When signaled, this will invoke Get Auto Focus Screen Position" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusScreenPosition is invoked" + "tooltip": "Signaled after Get Auto Focus Screen Position is invoked" }, "details": { - "name": "GetAutoFocusScreenPosition" + "name": "Get Auto Focus Screen Position" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Auto Focus Screen" } } ] @@ -122,20 +123,20 @@ "key": "GetEnableDebugColoring", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnableDebugColoring" + "tooltip": "When signaled, this will invoke Get Enable Debug Coloring" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnableDebugColoring is invoked" + "tooltip": "Signaled after Get Enable Debug Coloring is invoked" }, "details": { - "name": "GetEnableDebugColoring" + "name": "Get Enable Debug Coloring" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -144,20 +145,20 @@ "key": "SetFocusDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFocusDistance" + "tooltip": "When signaled, this will invoke Set Focus Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFocusDistance is invoked" + "tooltip": "Signaled after Set Focus Distance is invoked" }, "details": { - "name": "SetFocusDistance" + "name": "Set Focus Distance" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Focus Distance" } } ] @@ -166,20 +167,20 @@ "key": "SetQualityLevel", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetQualityLevel" + "tooltip": "When signaled, this will invoke Set Quality Level" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetQualityLevel is invoked" + "tooltip": "Signaled after Set Quality Level is invoked" }, "details": { - "name": "SetQualityLevel" + "name": "Set Quality Level" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Quality Level" } } ] @@ -188,20 +189,20 @@ "key": "SetCameraEntityId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCameraEntityId" + "tooltip": "When signaled, this will invoke Set Camera Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCameraEntityId is invoked" + "tooltip": "Signaled after Set Camera Entity Id is invoked" }, "details": { - "name": "SetCameraEntityId" + "name": "Set Camera Entity Id" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -211,20 +212,20 @@ "key": "SetAutoFocusDelay", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusDelay" + "tooltip": "When signaled, this will invoke Set Auto Focus Delay" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusDelay is invoked" + "tooltip": "Signaled after Set Auto Focus Delay is invoked" }, "details": { - "name": "SetAutoFocusDelay" + "name": "Set Auto Focus Delay" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Delay" } } ] @@ -233,20 +234,20 @@ "key": "GetAutoFocusDelay", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusDelay" + "tooltip": "When signaled, this will invoke Get Auto Focus Delay" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusDelay is invoked" + "tooltip": "Signaled after Get Auto Focus Delay is invoked" }, "details": { - "name": "GetAutoFocusDelay" + "name": "Get Auto Focus Delay" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Delay" } } ] @@ -255,20 +256,20 @@ "key": "SetAutoFocusScreenPosition", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusScreenPosition" + "tooltip": "When signaled, this will invoke Set Auto Focus Screen Position" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusScreenPosition is invoked" + "tooltip": "Signaled after Set Auto Focus Screen Position is invoked" }, "details": { - "name": "SetAutoFocusScreenPosition" + "name": "Set Auto Focus Screen Position" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Auto Focus Screen Position" } } ] @@ -277,20 +278,20 @@ "key": "GetFNumber", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFNumber" + "tooltip": "When signaled, this will invoke GetF Number" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFNumber is invoked" + "tooltip": "Signaled after GetF Number is invoked" }, "details": { - "name": "GetFNumber" + "name": "Get F Number" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "F Number" } } ] @@ -299,20 +300,20 @@ "key": "SetApertureFOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetApertureFOverride" + "tooltip": "When signaled, this will invoke Set ApertureF Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetApertureFOverride is invoked" + "tooltip": "Signaled after Set ApertureF Override is invoked" }, "details": { - "name": "SetApertureFOverride" + "name": "Set Aperture F Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Aperture F" } } ] @@ -321,20 +322,20 @@ "key": "SetEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnabled" + "tooltip": "When signaled, this will invoke Set Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnabled is invoked" + "tooltip": "Signaled after Set Enabled is invoked" }, "details": { - "name": "SetEnabled" + "name": "Set Enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -343,20 +344,20 @@ "key": "SetAutoFocusScreenPositionOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusScreenPositionOverride" + "tooltip": "When signaled, this will invoke Set Auto Focus Screen Position Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusScreenPositionOverride is invoked" + "tooltip": "Signaled after Set Auto Focus Screen Position Override is invoked" }, "details": { - "name": "SetAutoFocusScreenPositionOverride" + "name": "Set Auto Focus Screen Position Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Screen Position" } } ] @@ -365,20 +366,20 @@ "key": "GetQualityLevelOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetQualityLevelOverride" + "tooltip": "When signaled, this will invoke Get Quality Level Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetQualityLevelOverride is invoked" + "tooltip": "Signaled after Get Quality Level Override is invoked" }, "details": { - "name": "GetQualityLevelOverride" + "name": "Get Quality Level Override" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Quality Level" } } ] @@ -387,20 +388,20 @@ "key": "SetAutoFocusSpeedOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusSpeedOverride" + "tooltip": "When signaled, this will invoke Set Auto Focus Speed Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusSpeedOverride is invoked" + "tooltip": "Signaled after Set Auto Focus Speed Override is invoked" }, "details": { - "name": "SetAutoFocusSpeedOverride" + "name": "Set Auto Focus Speed Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Speed" } } ] @@ -409,20 +410,20 @@ "key": "GetEnableAutoFocusOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnableAutoFocusOverride" + "tooltip": "When signaled, this will invoke Get Enable Auto Focus Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnableAutoFocusOverride is invoked" + "tooltip": "Signaled after Get Enable Auto Focus Override is invoked" }, "details": { - "name": "GetEnableAutoFocusOverride" + "name": "Get Enable Auto Focus Override" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -431,20 +432,20 @@ "key": "SetEnableDebugColoring", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnableDebugColoring" + "tooltip": "When signaled, this will invoke Set Enable Debug Coloring" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnableDebugColoring is invoked" + "tooltip": "Signaled after Set Enable Debug Coloring is invoked" }, "details": { - "name": "SetEnableDebugColoring" + "name": "Set Enable Debug Coloring" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -453,20 +454,20 @@ "key": "SetFocusDistanceOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFocusDistanceOverride" + "tooltip": "When signaled, this will invoke Set Focus Distance Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFocusDistanceOverride is invoked" + "tooltip": "Signaled after Set Focus Distance Override is invoked" }, "details": { - "name": "SetFocusDistanceOverride" + "name": "Set Focus Distance Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Focus Distance" } } ] @@ -475,20 +476,20 @@ "key": "GetEnableAutoFocus", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnableAutoFocus" + "tooltip": "When signaled, this will invoke Get Enable Auto Focus" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnableAutoFocus is invoked" + "tooltip": "Signaled after Get Enable Auto Focus is invoked" }, "details": { - "name": "GetEnableAutoFocus" + "name": "Get Enable Auto Focus" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -497,20 +498,20 @@ "key": "SetApertureF", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetApertureF" + "tooltip": "When signaled, this will invoke Set ApertureF" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetApertureF is invoked" + "tooltip": "Signaled after Set ApertureF is invoked" }, "details": { - "name": "SetApertureF" + "name": "Set Aperture F" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Aperture F" } } ] @@ -519,14 +520,14 @@ "key": "SetCameraEntityIdOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCameraEntityIdOverride" + "tooltip": "When signaled, this will invoke Set Camera Entity Id Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCameraEntityIdOverride is invoked" + "tooltip": "Signaled after Set Camera Entity Id Override is invoked" }, "details": { - "name": "SetCameraEntityIdOverride" + "name": "Set Camera Entity Id Override" }, "params": [ { @@ -541,20 +542,20 @@ "key": "GetEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnabled" + "tooltip": "When signaled, this will invoke Get Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnabled is invoked" + "tooltip": "Signaled after Get Enabled is invoked" }, "details": { - "name": "GetEnabled" + "name": "Get Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -563,20 +564,20 @@ "key": "GetFocusDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFocusDistance" + "tooltip": "When signaled, this will invoke Get Focus Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFocusDistance is invoked" + "tooltip": "Signaled after Get Focus Distance is invoked" }, "details": { - "name": "GetFocusDistance" + "name": "Get Focus Distance" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Focus Distance" } } ] @@ -585,20 +586,20 @@ "key": "GetEnabledOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetEnabledOverride" + "tooltip": "When signaled, this will invoke Get Enabled Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetEnabledOverride is invoked" + "tooltip": "Signaled after Get Enabled Override is invoked" }, "details": { - "name": "GetEnabledOverride" + "name": "Get Enabled Override" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -607,20 +608,20 @@ "key": "GetCameraEntityId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCameraEntityId" + "tooltip": "When signaled, this will invoke Get Camera Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCameraEntityId is invoked" + "tooltip": "Signaled after Get Camera Entity Id is invoked" }, "details": { - "name": "GetCameraEntityId" + "name": "Get Camera Entity Id" }, "results": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -630,20 +631,20 @@ "key": "GetAutoFocusScreenPositionOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusScreenPositionOverride" + "tooltip": "When signaled, this will invoke Get Auto Focus Screen Position Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusScreenPositionOverride is invoked" + "tooltip": "Signaled after Get Auto Focus Screen Position Override is invoked" }, "details": { - "name": "GetAutoFocusScreenPositionOverride" + "name": "Get Auto Focus Screen Position Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Screen Position" } } ] @@ -652,20 +653,20 @@ "key": "GetAutoFocusSpeed", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusSpeed" + "tooltip": "When signaled, this will invoke Get Auto Focus Speed" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusSpeed is invoked" + "tooltip": "Signaled after Get Auto Focus Speed is invoked" }, "details": { - "name": "GetAutoFocusSpeed" + "name": "Get Auto Focus Speed" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Speed" } } ] @@ -674,20 +675,20 @@ "key": "SetEnabledOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnabledOverride" + "tooltip": "When signaled, this will invoke Set Enabled Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnabledOverride is invoked" + "tooltip": "Signaled after Set Enabled Override is invoked" }, "details": { - "name": "SetEnabledOverride" + "name": "Set Enabled Override" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -696,20 +697,20 @@ "key": "GetAutoFocusSensitivity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusSensitivity" + "tooltip": "When signaled, this will invoke Get Auto Focus Sensitivity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusSensitivity is invoked" + "tooltip": "Signaled after Get Auto Focus Sensitivity is invoked" }, "details": { - "name": "GetAutoFocusSensitivity" + "name": "Get Auto Focus Sensitivity" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Sensitivity" } } ] @@ -718,20 +719,20 @@ "key": "GetAutoFocusDelayOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusDelayOverride" + "tooltip": "When signaled, this will invoke Get Auto Focus Delay Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusDelayOverride is invoked" + "tooltip": "Signaled after Get Auto Focus Delay Override is invoked" }, "details": { - "name": "GetAutoFocusDelayOverride" + "name": "Get Auto Focus Delay Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Delay" } } ] @@ -740,20 +741,20 @@ "key": "GetApertureF", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetApertureF" + "tooltip": "When signaled, this will invoke Get ApertureF" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetApertureF is invoked" + "tooltip": "Signaled after Get ApertureF is invoked" }, "details": { - "name": "GetApertureF" + "name": "Get Aperture F" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Aperture F" } } ] @@ -762,20 +763,20 @@ "key": "GetApertureFOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetApertureFOverride" + "tooltip": "When signaled, this will invoke Get ApertureF Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetApertureFOverride is invoked" + "tooltip": "Signaled after Get ApertureF Override is invoked" }, "details": { - "name": "GetApertureFOverride" + "name": "Get Aperture F Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Aperture F" } } ] @@ -784,20 +785,20 @@ "key": "SetAutoFocusSensitivityOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusSensitivityOverride" + "tooltip": "When signaled, this will invoke Set Auto Focus Sensitivity Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusSensitivityOverride is invoked" + "tooltip": "Signaled after Set Auto Focus Sensitivity Override is invoked" }, "details": { - "name": "SetAutoFocusSensitivityOverride" + "name": "Set Auto Focus Sensitivity Override" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Sensitivity" } } ] @@ -806,20 +807,20 @@ "key": "SetQualityLevelOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetQualityLevelOverride" + "tooltip": "When signaled, this will invoke Set Quality Level Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetQualityLevelOverride is invoked" + "tooltip": "Signaled after Set Quality Level Override is invoked" }, "details": { - "name": "SetQualityLevelOverride" + "name": "Set Quality Level Override" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Quality Level" } } ] @@ -828,20 +829,20 @@ "key": "GetFocusDistanceOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFocusDistanceOverride" + "tooltip": "When signaled, this will invoke Get Focus Distance Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFocusDistanceOverride is invoked" + "tooltip": "Signaled after Get Focus Distance Override is invoked" }, "details": { - "name": "GetFocusDistanceOverride" + "name": "Get Focus Distance Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Focus Distance" } } ] @@ -850,20 +851,20 @@ "key": "SetAutoFocusSpeed", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAutoFocusSpeed" + "tooltip": "When signaled, this will invoke Set Auto Focus Speed" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAutoFocusSpeed is invoked" + "tooltip": "Signaled after Set Auto Focus Speed is invoked" }, "details": { - "name": "SetAutoFocusSpeed" + "name": "Set Auto Focus Speed" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Speed" } } ] @@ -872,20 +873,20 @@ "key": "SetEnableAutoFocusOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnableAutoFocusOverride" + "tooltip": "When signaled, this will invoke Set Enable Auto Focus Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnableAutoFocusOverride is invoked" + "tooltip": "Signaled after Set Enable Auto Focus Override is invoked" }, "details": { - "name": "SetEnableAutoFocusOverride" + "name": "Set Enable Auto Focus Override" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -894,20 +895,20 @@ "key": "GetQualityLevel", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetQualityLevel" + "tooltip": "When signaled, this will invoke Get Quality Level" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetQualityLevel is invoked" + "tooltip": "Signaled after Get Quality Level is invoked" }, "details": { - "name": "GetQualityLevel" + "name": "Get Quality Level" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Quality Level" } } ] @@ -916,20 +917,20 @@ "key": "GetAutoFocusSensitivityOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAutoFocusSensitivityOverride" + "tooltip": "When signaled, this will invoke Get Auto Focus Sensitivity Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAutoFocusSensitivityOverride is invoked" + "tooltip": "Signaled after Get Auto Focus Sensitivity Override is invoked" }, "details": { - "name": "GetAutoFocusSensitivityOverride" + "name": "Get Auto Focus Sensitivity Override" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Auto Focus Sensitivity" } } ] @@ -938,20 +939,20 @@ "key": "SetEnableDebugColoringOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnableDebugColoringOverride" + "tooltip": "When signaled, this will invoke Set Enable Debug Coloring Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnableDebugColoringOverride is invoked" + "tooltip": "Signaled after Set Enable Debug Coloring Override is invoked" }, "details": { - "name": "SetEnableDebugColoringOverride" + "name": "Set Enable Debug Coloring Override" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -960,20 +961,20 @@ "key": "SetFNumber", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFNumber" + "tooltip": "When signaled, this will invoke SetF Number" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFNumber is invoked" + "tooltip": "Signaled after SetF Number is invoked" }, "details": { - "name": "SetFNumber" + "name": "Set F Number" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "F Number" } } ] @@ -982,14 +983,14 @@ "key": "GetCameraEntityIdOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCameraEntityIdOverride" + "tooltip": "When signaled, this will invoke Get Camera Entity Id Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCameraEntityIdOverride is invoked" + "tooltip": "Signaled after Get Camera Entity Id Override is invoked" }, "details": { - "name": "GetCameraEntityIdOverride" + "name": "Get Camera Entity Id Override" }, "results": [ { @@ -1004,20 +1005,20 @@ "key": "SetEnableAutoFocus", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnableAutoFocus" + "tooltip": "When signaled, this will invoke Set Enable Auto Focus" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnableAutoFocus is invoked" + "tooltip": "Signaled after Set Enable Auto Focus is invoked" }, "details": { - "name": "SetEnableAutoFocus" + "name": "Set Enable Auto Focus" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DirectionalLightRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DirectionalLightRequestBus.names index 40b3627894..5813d51e40 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DirectionalLightRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/DirectionalLightRequestBus.names @@ -5,27 +5,50 @@ "context": "EBusSender", "variant": "", "details": { - "name": "DirectionalLightRequestBus" + "name": "Directional Light", + "category": "Lights" }, "methods": [ + { + "key": "GetNormalShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Normal Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Normal Shadow Bias is invoked" + }, + "details": { + "name": "Get Normal Shadow Bias" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Normal Shadow Bias" + } + } + ] + }, { "key": "GetShadowBias", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowBias" + "tooltip": "When signaled, this will invoke Get Shadow Bias" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowBias is invoked" + "tooltip": "Signaled after Get Shadow Bias is invoked" }, "details": { - "name": "GetShadowBias" + "name": "Get Shadow Bias" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Shadow Bias" } } ] @@ -34,20 +57,20 @@ "key": "SetAngularDiameter", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAngularDiameter" + "tooltip": "When signaled, this will invoke Set Angular Diameter" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAngularDiameter is invoked" + "tooltip": "Signaled after Set Angular Diameter is invoked" }, "details": { - "name": "SetAngularDiameter" + "name": "Set Angular Diameter" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angular Diameter" } } ] @@ -56,20 +79,20 @@ "key": "GetShadowFarClipDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowFarClipDistance" + "tooltip": "When signaled, this will invoke Get Shadow Far Clip Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowFarClipDistance is invoked" + "tooltip": "Signaled after Get Shadow Far Clip Distance is invoked" }, "details": { - "name": "GetShadowFarClipDistance" + "name": "Get Shadow Far Clip Distance" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Shadow Far Clip Distance" } } ] @@ -78,20 +101,20 @@ "key": "SetShadowBias", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowBias" + "tooltip": "When signaled, this will invoke Set Shadow Bias" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowBias is invoked" + "tooltip": "Signaled after Set Shadow Bias is invoked" }, "details": { - "name": "SetShadowBias" + "name": "Set Shadow Bias" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Shadow Bias" } } ] @@ -100,20 +123,20 @@ "key": "SetIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetIntensity" + "tooltip": "When signaled, this will invoke Set Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetIntensity is invoked" + "tooltip": "Signaled after Set Intensity is invoked" }, "details": { - "name": "SetIntensity" + "name": "Set Intensity" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Intensity" } } ] @@ -122,20 +145,20 @@ "key": "SetSplitRatio", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetSplitRatio" + "tooltip": "When signaled, this will invoke Set Split Ratio" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetSplitRatio is invoked" + "tooltip": "Signaled after Set Split Ratio is invoked" }, "details": { - "name": "SetSplitRatio" + "name": "Set Split Ratio" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Split Ratio" } } ] @@ -144,20 +167,20 @@ "key": "GetFilteringSampleCount", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetFilteringSampleCount" + "tooltip": "When signaled, this will invoke Get Filtering Sample Count" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetFilteringSampleCount is invoked" + "tooltip": "Signaled after Get Filtering Sample Count is invoked" }, "details": { - "name": "GetFilteringSampleCount" + "name": "Get Filtering Sample Count" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Filtering Sample Count" } } ] @@ -166,20 +189,20 @@ "key": "GetShadowFilterMethod", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowFilterMethod" + "tooltip": "When signaled, this will invoke Get Shadow Filter Method" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowFilterMethod is invoked" + "tooltip": "Signaled after Get Shadow Filter Method is invoked" }, "details": { - "name": "GetShadowFilterMethod" + "name": "Get Shadow Filter Method" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Shadow Filter Method" } } ] @@ -188,20 +211,20 @@ "key": "GetCameraEntityId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCameraEntityId" + "tooltip": "When signaled, this will invoke Get Camera Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCameraEntityId is invoked" + "tooltip": "Signaled after Get Camera Entity Id is invoked" }, "details": { - "name": "GetCameraEntityId" + "name": "Get Camera Entity Id" }, "results": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Camera Entity Id", "tooltip": "Entity Unique Id" } } @@ -211,20 +234,20 @@ "key": "SetDebugColoringEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetDebugColoringEnabled" + "tooltip": "When signaled, this will invoke Set Debug Coloring Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetDebugColoringEnabled is invoked" + "tooltip": "Signaled after Set Debug Coloring Enabled is invoked" }, "details": { - "name": "SetDebugColoringEnabled" + "name": "Set Debug Coloring Enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -233,20 +256,20 @@ "key": "GetDebugColoringEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetDebugColoringEnabled" + "tooltip": "When signaled, this will invoke Get Debug Coloring Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetDebugColoringEnabled is invoked" + "tooltip": "Signaled after Get Debug Coloring Enabled is invoked" }, "details": { - "name": "GetDebugColoringEnabled" + "name": "Get Debug Coloring Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -255,20 +278,20 @@ "key": "GetViewFrustumCorrectionEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetViewFrustumCorrectionEnabled" + "tooltip": "When signaled, this will invoke Get View Frustum Correction Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetViewFrustumCorrectionEnabled is invoked" + "tooltip": "Signaled after Get View Frustum Correction Enabled is invoked" }, "details": { - "name": "GetViewFrustumCorrectionEnabled" + "name": "Get View Frustum Correction Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -277,20 +300,20 @@ "key": "SetViewFrustumCorrectionEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetViewFrustumCorrectionEnabled" + "tooltip": "When signaled, this will invoke Set View Frustum Correction Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetViewFrustumCorrectionEnabled is invoked" + "tooltip": "Signaled after Set View Frustum Correction Enabled is invoked" }, "details": { - "name": "SetViewFrustumCorrectionEnabled" + "name": "Set View Frustum Correction Enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -299,20 +322,20 @@ "key": "SetGroundHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetGroundHeight" + "tooltip": "When signaled, this will invoke Set Ground Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetGroundHeight is invoked" + "tooltip": "Signaled after Set Ground Height is invoked" }, "details": { - "name": "SetGroundHeight" + "name": "Set Ground Height" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Ground Height" } } ] @@ -321,20 +344,20 @@ "key": "GetShadowReceiverPlaneBiasEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowReceiverPlaneBiasEnabled" + "tooltip": "When signaled, this will invoke Get Shadow Receiver Plane Bias Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowReceiverPlaneBiasEnabled is invoked" + "tooltip": "Signaled after Get Shadow Receiver Plane Bias Enabled is invoked" }, "details": { - "name": "GetShadowReceiverPlaneBiasEnabled" + "name": "Get Shadow Receiver Plane Bias Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Shadow Receiver Plane Bias" } } ] @@ -343,20 +366,20 @@ "key": "SetShadowmapSize", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowmapSize" + "tooltip": "When signaled, this will invoke Set Shadowmap Size" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowmapSize is invoked" + "tooltip": "Signaled after Set Shadowmap Size is invoked" }, "details": { - "name": "SetShadowmapSize" + "name": "Set Shadowmap Size" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Shadowmap Size" } } ] @@ -365,20 +388,20 @@ "key": "SetShadowFarClipDistance", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowFarClipDistance" + "tooltip": "When signaled, this will invoke Set Shadow Far Clip Distance" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowFarClipDistance is invoked" + "tooltip": "Signaled after Set Shadow Far Clip Distance is invoked" }, "details": { - "name": "SetShadowFarClipDistance" + "name": "Set Shadow Far Clip Distance" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Shadow Far Clip Distance" } } ] @@ -387,20 +410,20 @@ "key": "SetCameraEntityId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCameraEntityId" + "tooltip": "When signaled, this will invoke Set Camera Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCameraEntityId is invoked" + "tooltip": "Signaled after Set Camera Entity Id is invoked" }, "details": { - "name": "SetCameraEntityId" + "name": "Set Camera Entity Id" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Camera Entity Id", "tooltip": "Entity Unique Id" } } @@ -410,14 +433,14 @@ "key": "GetColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetColor" + "tooltip": "When signaled, this will invoke Get Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetColor is invoked" + "tooltip": "Signaled after Get Color is invoked" }, "details": { - "name": "GetColor" + "name": "Get Color" }, "results": [ { @@ -432,20 +455,20 @@ "key": "SetSplitAutomatic", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetSplitAutomatic" + "tooltip": "When signaled, this will invoke Set Split Automatic" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetSplitAutomatic is invoked" + "tooltip": "Signaled after Set Split Automatic is invoked" }, "details": { - "name": "SetSplitAutomatic" + "name": "Set Split Automatic" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Split Automatic" } } ] @@ -454,20 +477,20 @@ "key": "SetCascadeFarDepth", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCascadeFarDepth" + "tooltip": "When signaled, this will invoke Set Cascade Far Depth" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCascadeFarDepth is invoked" + "tooltip": "Signaled after Set Cascade Far Depth is invoked" }, "details": { - "name": "SetCascadeFarDepth" + "name": "Set Cascade Far Depth" }, "params": [ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Cascade Far Depth" } } ] @@ -476,20 +499,20 @@ "key": "GetSplitAutomatic", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSplitAutomatic" + "tooltip": "When signaled, this will invoke Get Split Automatic" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSplitAutomatic is invoked" + "tooltip": "Signaled after Get Split Automatic is invoked" }, "details": { - "name": "GetSplitAutomatic" + "name": "Get Split Automatic" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Split Automatic" } } ] @@ -498,20 +521,20 @@ "key": "GetGroundHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetGroundHeight" + "tooltip": "When signaled, this will invoke Get Ground Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetGroundHeight is invoked" + "tooltip": "Signaled after Get Ground Height is invoked" }, "details": { - "name": "GetGroundHeight" + "name": "Get Ground Height" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Ground Height" } } ] @@ -520,20 +543,20 @@ "key": "SetCascadeCount", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCascadeCount" + "tooltip": "When signaled, this will invoke Set Cascade Count" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCascadeCount is invoked" + "tooltip": "Signaled after Set Cascade Count is invoked" }, "details": { - "name": "SetCascadeCount" + "name": "Set Cascade Count" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Cascade Count" } } ] @@ -542,20 +565,20 @@ "key": "SetFilteringSampleCount", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetFilteringSampleCount" + "tooltip": "When signaled, this will invoke Set Filtering Sample Count" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetFilteringSampleCount is invoked" + "tooltip": "Signaled after Set Filtering Sample Count is invoked" }, "details": { - "name": "SetFilteringSampleCount" + "name": "Set Filtering Sample Count" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Filtering Sample Count" } } ] @@ -564,20 +587,20 @@ "key": "GetCascadeCount", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCascadeCount" + "tooltip": "When signaled, this will invoke Get Cascade Count" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCascadeCount is invoked" + "tooltip": "Signaled after Get Cascade Count is invoked" }, "details": { - "name": "GetCascadeCount" + "name": "Get Cascade Count" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Cascade Count" } } ] @@ -586,20 +609,42 @@ "key": "GetIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetIntensity" + "tooltip": "When signaled, this will invoke Get Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetIntensity is invoked" + "tooltip": "Signaled after Get Intensity is invoked" }, "details": { - "name": "GetIntensity" + "name": "Get Intensity" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Intensity" + } + } + ] + }, + { + "key": "SetNormalShadowBias", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Normal Shadow Bias" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Normal Shadow Bias is invoked" + }, + "details": { + "name": "Set Normal Shadow Bias" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Normal Shadow Bias" } } ] @@ -608,20 +653,20 @@ "key": "GetShadowmapSize", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetShadowmapSize" + "tooltip": "When signaled, this will invoke Get Shadowmap Size" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetShadowmapSize is invoked" + "tooltip": "Signaled after Get Shadowmap Size is invoked" }, "details": { - "name": "GetShadowmapSize" + "name": "Get Shadowmap Size" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Shadowmap Size" } } ] @@ -630,20 +675,20 @@ "key": "GetAngularDiameter", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAngularDiameter" + "tooltip": "When signaled, this will invoke Get Angular Diameter" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAngularDiameter is invoked" + "tooltip": "Signaled after Get Angular Diameter is invoked" }, "details": { - "name": "GetAngularDiameter" + "name": "Get Angular Diameter" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Angular Diameter" } } ] @@ -652,20 +697,20 @@ "key": "SetShadowFilterMethod", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowFilterMethod" + "tooltip": "When signaled, this will invoke Set Shadow Filter Method" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowFilterMethod is invoked" + "tooltip": "Signaled after Set Shadow Filter Method is invoked" }, "details": { - "name": "SetShadowFilterMethod" + "name": "Set Shadow Filter Method" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Shadow Filter Method" } } ] @@ -674,20 +719,20 @@ "key": "SetShadowReceiverPlaneBiasEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetShadowReceiverPlaneBiasEnabled" + "tooltip": "When signaled, this will invoke Set Shadow Receiver Plane Bias Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetShadowReceiverPlaneBiasEnabled is invoked" + "tooltip": "Signaled after Set Shadow Receiver Plane Bias Enabled is invoked" }, "details": { - "name": "SetShadowReceiverPlaneBiasEnabled" + "name": "Set Shadow Receiver Plane Bias Enabled" }, "params": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -696,20 +741,20 @@ "key": "GetSplitRatio", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSplitRatio" + "tooltip": "When signaled, this will invoke Get Split Ratio" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSplitRatio is invoked" + "tooltip": "Signaled after Get Split Ratio is invoked" }, "details": { - "name": "GetSplitRatio" + "name": "Get Split Ratio" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Split Ratio" } } ] @@ -718,20 +763,20 @@ "key": "GetCascadeFarDepth", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCascadeFarDepth" + "tooltip": "When signaled, this will invoke Get Cascade Far Depth" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCascadeFarDepth is invoked" + "tooltip": "Signaled after Get Cascade Far Depth is invoked" }, "details": { - "name": "GetCascadeFarDepth" + "name": "Get Cascade Far Depth" }, "results": [ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Cascade Far Depth" } } ] @@ -740,14 +785,14 @@ "key": "SetColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetColor" + "tooltip": "When signaled, this will invoke Set Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetColor is invoked" + "tooltip": "Signaled after Set Color is invoked" }, "details": { - "name": "SetColor" + "name": "Set Color" }, "params": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraRequestBus.names index b028b96baa..cbc3fcc40e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorCameraRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "EditorCameraRequestBus" + "name": "Editor Camera", + "category": "Editor" }, "methods": [ { "key": "SetViewFromEntityPerspective", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetViewFromEntityPerspective" + "tooltip": "When signaled, this will invoke Set View From Entity Perspective" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetViewFromEntityPerspective is invoked" + "tooltip": "Signaled after Set View From Entity Perspective is invoked" }, "details": { - "name": "SetViewFromEntityPerspective" + "name": "Set View From Entity Perspective" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -35,27 +36,27 @@ "key": "SetViewAndMovementLockFromEntityPerspective", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetViewAndMovementLockFromEntityPerspective" + "tooltip": "When signaled, this will invoke Set View And Movement Lock From Entity Perspective" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetViewAndMovementLockFromEntityPerspective is invoked" + "tooltip": "Signaled after Set View And Movement Lock From Entity Perspective is invoked" }, "details": { - "name": "SetViewAndMovementLockFromEntityPerspective" + "name": "Set View And Movement Lock From Entity Perspective" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } }, { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Lock Camera Movement" } } ] @@ -64,20 +65,20 @@ "key": "GetCurrentViewEntityId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCurrentViewEntityId" + "tooltip": "When signaled, this will invoke Get Current View Entity Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCurrentViewEntityId is invoked" + "tooltip": "Signaled after Get Current View Entity Id is invoked" }, "details": { - "name": "GetCurrentViewEntityId" + "name": "Get Current View Entity Id" }, "results": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -87,20 +88,20 @@ "key": "GetActiveCameraPosition", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetActiveCameraPosition" + "tooltip": "When signaled, this will invoke Get Active Camera Position" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetActiveCameraPosition is invoked" + "tooltip": "Signaled after Get Active Camera Position is invoked" }, "details": { - "name": "GetActiveCameraPosition" + "name": "Get Active Camera Position" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Position" } } ], @@ -108,7 +109,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Success" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorTransformComponentSelectionRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorTransformComponentSelectionRequestBus.names index 178c30bb43..61641cf327 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorTransformComponentSelectionRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/EditorTransformComponentSelectionRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "EditorTransformComponentSelectionRequestBus" + "name": "Editor Transform Component Selection", + "category": "Editor" }, "methods": [ { "key": "CopyTranslationToSelectedEntitiesGroup", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CopyTranslationToSelectedEntitiesGroup" + "tooltip": "When signaled, this will invoke Copy Translation To Selected Entities Group" }, "exit": { "name": "Out", - "tooltip": "Signaled after CopyTranslationToSelectedEntitiesGroup is invoked" + "tooltip": "Signaled after Copy Translation To Selected Entities Group is invoked" }, "details": { - "name": "CopyTranslationToSelectedEntitiesGroup" + "name": "Copy Translation To Selected Entities Group" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Translation" } } ] @@ -34,14 +35,14 @@ "key": "CopyOrientationToSelectedEntitiesIndividual", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CopyOrientationToSelectedEntitiesIndividual" + "tooltip": "When signaled, this will invoke Copy Orientation To Selected Entities Individual" }, "exit": { "name": "Out", - "tooltip": "Signaled after CopyOrientationToSelectedEntitiesIndividual is invoked" + "tooltip": "Signaled after Copy Orientation To Selected Entities Individual is invoked" }, "details": { - "name": "CopyOrientationToSelectedEntitiesIndividual" + "name": "Copy Orientation To Selected Entities Individual" }, "params": [ { @@ -56,14 +57,14 @@ "key": "CopyOrientationToSelectedEntitiesGroup", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CopyOrientationToSelectedEntitiesGroup" + "tooltip": "When signaled, this will invoke Copy Orientation To Selected Entities Group" }, "exit": { "name": "Out", - "tooltip": "Signaled after CopyOrientationToSelectedEntitiesGroup is invoked" + "tooltip": "Signaled after Copy Orientation To Selected Entities Group is invoked" }, "details": { - "name": "CopyOrientationToSelectedEntitiesGroup" + "name": "Copy Orientation To Selected Entities Group" }, "params": [ { @@ -78,20 +79,20 @@ "key": "CopyTranslationToSelectedEntitiesIndividual", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CopyTranslationToSelectedEntitiesIndividual" + "tooltip": "When signaled, this will invoke Copy Translation To Selected Entities Individual" }, "exit": { "name": "Out", - "tooltip": "Signaled after CopyTranslationToSelectedEntitiesIndividual is invoked" + "tooltip": "Signaled after Copy Translation To Selected Entities Individual is invoked" }, "details": { - "name": "CopyTranslationToSelectedEntitiesIndividual" + "name": "Copy Translation To Selected Entities Individual" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Translation" } } ] @@ -100,14 +101,14 @@ "key": "CopyScaleToSelectedEntitiesIndividualLocal", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CopyScaleToSelectedEntitiesIndividualLocal" + "tooltip": "When signaled, this will invoke Copy Scale To Selected Entities Individual Local" }, "exit": { "name": "Out", - "tooltip": "Signaled after CopyScaleToSelectedEntitiesIndividualLocal is invoked" + "tooltip": "Signaled after Copy Scale To Selected Entities Individual Local is invoked" }, "details": { - "name": "CopyScaleToSelectedEntitiesIndividualLocal" + "name": "Copy Scale To Selected Entities Individual Local" }, "params": [ { @@ -122,20 +123,20 @@ "key": "OverrideManipulatorTranslation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke OverrideManipulatorTranslation" + "tooltip": "When signaled, this will invoke Override Manipulator Translation" }, "exit": { "name": "Out", - "tooltip": "Signaled after OverrideManipulatorTranslation is invoked" + "tooltip": "Signaled after Override Manipulator Translation is invoked" }, "details": { - "name": "OverrideManipulatorTranslation" + "name": "Override Manipulator Translation" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ] @@ -144,14 +145,14 @@ "key": "RefreshManipulators", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke RefreshManipulators" + "tooltip": "When signaled, this will invoke Refresh Manipulators" }, "exit": { "name": "Out", - "tooltip": "Signaled after RefreshManipulators is invoked" + "tooltip": "Signaled after Refresh Manipulators is invoked" }, "details": { - "name": "RefreshManipulators" + "name": "Refresh Manipulators" }, "params": [ { @@ -166,14 +167,14 @@ "key": "OverrideManipulatorOrientation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke OverrideManipulatorOrientation" + "tooltip": "When signaled, this will invoke Override Manipulator Orientation" }, "exit": { "name": "Out", - "tooltip": "Signaled after OverrideManipulatorOrientation is invoked" + "tooltip": "Signaled after Override Manipulator Orientation is invoked" }, "details": { - "name": "OverrideManipulatorOrientation" + "name": "Override Manipulator Orientation" }, "params": [ { @@ -188,14 +189,14 @@ "key": "GetTransformMode", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTransformMode" + "tooltip": "When signaled, this will invoke Get Transform Mode" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTransformMode is invoked" + "tooltip": "Signaled after Get Transform Mode is invoked" }, "details": { - "name": "GetTransformMode" + "name": "Get Transform Mode" }, "results": [ { @@ -210,14 +211,14 @@ "key": "CopyScaleToSelectedEntitiesIndividualWorld", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CopyScaleToSelectedEntitiesIndividualWorld" + "tooltip": "When signaled, this will invoke Copy Scale To Selected Entities Individual World" }, "exit": { "name": "Out", - "tooltip": "Signaled after CopyScaleToSelectedEntitiesIndividualWorld is invoked" + "tooltip": "Signaled after Copy Scale To Selected Entities Individual World is invoked" }, "details": { - "name": "CopyScaleToSelectedEntitiesIndividualWorld" + "name": "Copy Scale To Selected Entities Individual World" }, "params": [ { @@ -232,14 +233,14 @@ "key": "SetTransformMode", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTransformMode" + "tooltip": "When signaled, this will invoke Set Transform Mode" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTransformMode is invoked" + "tooltip": "Signaled after Set Transform Mode is invoked" }, "details": { - "name": "SetTransformMode" + "name": "Set Transform Mode" }, "params": [ { @@ -254,28 +255,28 @@ "key": "ResetTranslationForSelectedEntitiesLocal", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ResetTranslationForSelectedEntitiesLocal" + "tooltip": "When signaled, this will invoke Reset Translation For Selected Entities Local" }, "exit": { "name": "Out", - "tooltip": "Signaled after ResetTranslationForSelectedEntitiesLocal is invoked" + "tooltip": "Signaled after Reset Translation For Selected Entities Local is invoked" }, "details": { - "name": "ResetTranslationForSelectedEntitiesLocal" + "name": "Reset Translation For Selected Entities Local" } }, { "key": "ResetOrientationForSelectedEntitiesLocal", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ResetOrientationForSelectedEntitiesLocal" + "tooltip": "When signaled, this will invoke Reset Orientation For Selected Entities Local" }, "exit": { "name": "Out", - "tooltip": "Signaled after ResetOrientationForSelectedEntitiesLocal is invoked" + "tooltip": "Signaled after Reset Orientation For Selected Entities Local is invoked" }, "details": { - "name": "ResetOrientationForSelectedEntitiesLocal" + "name": "Reset Orientation For Selected Entities Local" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FlyCameraInputBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FlyCameraInputBus.names index 4c6b403587..616cabcfb5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FlyCameraInputBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/FlyCameraInputBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "FlyCameraInputBus", + "name": "Fly Camera", "category": "Camera" }, "methods": [ @@ -26,7 +26,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Enabled" } } ] @@ -35,20 +35,20 @@ "key": "GetIsEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Is Enabled" + "tooltip": "When signaled, this will invoke Get Is Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after Is Enabled is invoked" + "tooltip": "Signaled after Get Is Enabled is invoked" }, "details": { - "name": "Is Enabled" + "name": "Get Is Enabled" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Enabled" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLinearDampingRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLinearDampingRequestBus.names new file mode 100644 index 0000000000..46da76a5ca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLinearDampingRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "key": "ForceLinearDampingRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Linear Damping" + }, + "methods": [ + { + "key": "SetDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Damping is invoked" + }, + "details": { + "name": "Set Damping" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping" + } + } + ] + }, + { + "key": "GetDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Damping is invoked" + }, + "details": { + "name": "Get Damping" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLocalSpaceRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLocalSpaceRequestBus.names new file mode 100644 index 0000000000..a3dd070013 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceLocalSpaceRequestBus.names @@ -0,0 +1,102 @@ +{ + "entries": [ + { + "key": "ForceLocalSpaceRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Local Space" + }, + "methods": [ + { + "key": "SetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after SetDirection is invoked" + }, + "details": { + "name": "Set Direction" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "key": "GetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Direction is invoked" + }, + "details": { + "name": "Get Direction" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "key": "SetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Magnitude is invoked" + }, + "details": { + "name": "Set Magnitude" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + }, + { + "key": "GetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Magnitude is invoked" + }, + "details": { + "name": "Get Magnitude" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForcePointRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForcePointRequestBus.names new file mode 100644 index 0000000000..767d9b1d35 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForcePointRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "key": "ForcePointRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Point" + }, + "methods": [ + { + "key": "SetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Magnitude is invoked" + }, + "details": { + "name": "Set Magnitude" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + }, + { + "key": "GetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Magnitude is invoked" + }, + "details": { + "name": "Get Magnitude" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSimpleDragRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSimpleDragRequestBus.names new file mode 100644 index 0000000000..075aa1b6a4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSimpleDragRequestBus.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "key": "ForceSimpleDragRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Simple Drag" + }, + "methods": [ + { + "key": "SetDensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Density" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Density is invoked" + }, + "details": { + "name": "Set Density" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Density" + } + } + ] + }, + { + "key": "GetDensity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Density" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Density is invoked" + }, + "details": { + "name": "Get Density" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Density" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSplineFollowRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSplineFollowRequestBus.names new file mode 100644 index 0000000000..7143fd0b7f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceSplineFollowRequestBus.names @@ -0,0 +1,190 @@ +{ + "entries": [ + { + "key": "ForceSplineFollowRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force Spline Follow" + }, + "methods": [ + { + "key": "GetLookAhead", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Look Ahead" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Look Ahead is invoked" + }, + "details": { + "name": "Get Look Ahead" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Look Ahead" + } + } + ] + }, + { + "key": "SetLookAhead", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Look Ahead" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Look Ahead is invoked" + }, + "details": { + "name": "Set Look Ahead" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Look Ahead" + } + } + ] + }, + { + "key": "SetTargetSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Target Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Target Speed is invoked" + }, + "details": { + "name": "Set Target Speed" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Target Speed" + } + } + ] + }, + { + "key": "GetFrequency", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Frequency" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Frequency is invoked" + }, + "details": { + "name": "Get Frequency" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Frequency" + } + } + ] + }, + { + "key": "GetDampingRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Damping Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Damping Ratio is invoked" + }, + "details": { + "name": "Get Damping Ratio" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping Ratio" + } + } + ] + }, + { + "key": "SetFrequency", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Frequency" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Frequency is invoked" + }, + "details": { + "name": "Set Frequency" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Frequency" + } + } + ] + }, + { + "key": "GetTargetSpeed", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Target Speed" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Target Speed is invoked" + }, + "details": { + "name": "Get Target Speed" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Target Speed" + } + } + ] + }, + { + "key": "SetDampingRatio", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Damping Ratio" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Damping Ratio is invoked" + }, + "details": { + "name": "Set Damping Ratio" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Damping Ratio" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceWorldSpaceRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceWorldSpaceRequestBus.names new file mode 100644 index 0000000000..f9c1b2dcbe --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ForceWorldSpaceRequestBus.names @@ -0,0 +1,102 @@ +{ + "entries": [ + { + "key": "ForceWorldSpaceRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Force World Space" + }, + "methods": [ + { + "key": "SetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Direction is invoked" + }, + "details": { + "name": "Set Direction" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "key": "GetDirection", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Direction" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Direction is invoked" + }, + "details": { + "name": "Get Direction" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Direction" + } + } + ] + }, + { + "key": "SetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Magnitude is invoked" + }, + "details": { + "name": "Set Magnitude" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + }, + { + "key": "GetMagnitude", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Magnitude" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Magnitude is invoked" + }, + "details": { + "name": "Get Magnitude" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Magnitude" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GameEntityContextRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GameEntityContextRequestBus.names index 4a93df4eb1..bb38d2256a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GameEntityContextRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/GameEntityContextRequestBus.names @@ -5,8 +5,8 @@ "context": "EBusSender", "variant": "", "details": { - "name": "GameEntityContextRequestBus", - "category": "Entity" + "name": "Game Entity Context", + "category": "Game Entity" }, "methods": [ { @@ -26,7 +26,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -49,7 +49,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -58,7 +58,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "Name" } } ] @@ -80,7 +80,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -103,7 +103,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -126,7 +126,7 @@ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } @@ -136,20 +136,20 @@ "key": "CreateGameEntity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreateGameEntity" + "tooltip": "When signaled, this will invoke Create Game Entity" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreateGameEntity is invoked" + "tooltip": "Signaled after Create Game Entity is invoked" }, "details": { - "name": "CreateGameEntity" + "name": "Create Game Entity" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "Name" } } ], diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HeightfieldProviderRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HeightfieldProviderRequestsBus.names new file mode 100644 index 0000000000..0524860818 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/HeightfieldProviderRequestsBus.names @@ -0,0 +1,234 @@ +{ + "entries": [ + { + "key": "HeightfieldProviderRequestsBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Heightfield Provider" + }, + "methods": [ + { + "key": "GetHeightfieldMinHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Min Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Min Height is invoked" + }, + "details": { + "name": "Get Heightfield Min Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Heightfield Min Height" + } + } + ] + }, + { + "key": "GetHeights", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heights" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heights is invoked" + }, + "details": { + "name": "Get Heights" + }, + "results": [ + { + "typeid": "{6106BF95-5ACD-5071-8D0E-4F846C2138AD}", + "details": { + "name": "Heights" + } + } + ] + }, + { + "key": "GetHeightfieldMaxHeight", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Max Height" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Max Height is invoked" + }, + "details": { + "name": "Get Heightfield Max Height" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Heightfield Max Height" + } + } + ] + }, + { + "key": "GetHeightfieldGridColumns", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Grid Columns" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Grid Columns is invoked" + }, + "details": { + "name": "Get Heightfield Grid Columns" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Heightfield Grid Columns" + } + } + ] + }, + { + "key": "GetMaterialList", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Material List" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Material List is invoked" + }, + "details": { + "name": "Get Material List" + }, + "results": [ + { + "typeid": "{82111EAD-9C65-57F0-BA72-46D6D931B434}", + "details": { + "name": "Material List" + } + } + ] + }, + { + "key": "GetHeightfieldTransform", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Transform" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Transform is invoked" + }, + "details": { + "name": "Get Heightfield Transform" + }, + "results": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Heightfield Transform" + } + } + ] + }, + { + "key": "GetHeightfieldGridRows", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Grid Rows" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Grid Rows is invoked" + }, + "details": { + "name": "Get Heightfield Grid Rows" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Heightfield Grid Rows" + } + } + ] + }, + { + "key": "GetHeightfieldGridSpacing", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield Grid Spacing" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield Grid Spacing is invoked" + }, + "details": { + "name": "Get Heightfield Grid Spacing" + }, + "results": [ + { + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "details": { + "name": "Heightfield Grid Spacing" + } + } + ] + }, + { + "key": "GetHeightfieldAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heightfield AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heightfield AABB is invoked" + }, + "details": { + "name": "Get Heightfield AABB" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + }, + { + "key": "GetHeightsAndMaterials", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Heights And Materials" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Heights And Materials is invoked" + }, + "details": { + "name": "Get Heights And Materials" + }, + "results": [ + { + "typeid": "{887288A6-8B56-55A7-BD10-3E4B19CBFD6C}", + "details": { + "name": "Heights And Materials" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InputSystemRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InputSystemRequestBus.names index 883bed230d..ca2b65415c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InputSystemRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/InputSystemRequestBus.names @@ -5,21 +5,22 @@ "context": "EBusSender", "variant": "", "details": { - "name": "InputSystemRequestBus" + "name": "Input System", + "category": "Input" }, "methods": [ { "key": "RecreateEnabledInputDevices", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke RecreateEnabledInputDevices" + "tooltip": "When signaled, this will invoke Recreate Enabled Input Devices" }, "exit": { "name": "Out", - "tooltip": "Signaled after RecreateEnabledInputDevices is invoked" + "tooltip": "Signaled after Recreate Enabled Input Devices is invoked" }, "details": { - "name": "RecreateEnabledInputDevices" + "name": "Recreate Enabled Input Devices" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookAt.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookAt.names index f45199ea84..3e77e49839 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookAt.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LookAt.names @@ -5,28 +5,30 @@ "context": "EBusSender", "variant": "", "details": { - "name": "LookAt" + "name": "Look At", + "category": "Gameplay" }, "methods": [ { "key": "SetTarget", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTarget" + "tooltip": "When signaled, this will invoke Set Target" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTarget is invoked" + "tooltip": "Signaled after Set Target is invoked" }, "details": { - "name": "SetTarget" + "name": "Set Target", + "tooltip": "Set the entity to look at" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", - "tooltip": "Entity Unique Id" + "name": "Target", + "tooltip": "The entity to look at" } } ] @@ -35,20 +37,22 @@ "key": "SetTargetPosition", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTargetPosition" + "tooltip": "When signaled, this will invoke Set Target Position" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTargetPosition is invoked" + "tooltip": "Signaled after Set Target Position is invoked" }, "details": { - "name": "SetTargetPosition" + "name": "Set Target Position", + "tooltip": "Sets the target position to look at." }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Position", + "tooltip": "The position to look at" } } ] @@ -57,20 +61,22 @@ "key": "SetAxis", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAxis" + "tooltip": "When signaled, this will invoke Set Axis" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAxis is invoked" + "tooltip": "Signaled after Set Axis is invoked" }, "details": { - "name": "SetAxis" + "name": "Set Axis", + "tooltip": "Specify the forward axis to use as reference for the look at" }, "params": [ { "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", "details": { - "name": "unsigned char" + "name": "Axis", + "tooltip": "The forward axis to use as reference" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LyShineExamplesCppExampleBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LyShineExamplesCppExampleBus.names index 6e8aff1df5..fcfb8f30c2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LyShineExamplesCppExampleBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/LyShineExamplesCppExampleBus.names @@ -5,8 +5,8 @@ "context": "EBusSender", "variant": "", "details": { - "name": "LyShineExamplesCppExampleBus", - "category": "UI/LyShine Examples" + "name": "UI Examples", + "category": "UI" }, "methods": [ { @@ -20,8 +20,7 @@ "tooltip": "Signaled after Create Canvas is invoked" }, "details": { - "name": "Create Canvas", - "tooltip": "Creates a canvas using C++" + "name": "Create Canvas" } }, { @@ -35,8 +34,7 @@ "tooltip": "Signaled after Destroy Canvas is invoked" }, "details": { - "name": "Destroy Canvas", - "tooltip": "Destroys a canvas using C++" + "name": "Destroy Canvas" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MaterialComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MaterialComponentRequestBus.names index d5a66328b5..a7e2f67610 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MaterialComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/MaterialComponentRequestBus.names @@ -5,27 +5,28 @@ "context": "EBusSender", "variant": "", "details": { - "name": "MaterialComponentRequestBus" + "name": "Material", + "category": "Rendering" }, "methods": [ { "key": "GetPropertyOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrides" + "tooltip": "When signaled, this will invoke Get Property Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrides is invoked" + "tooltip": "Signaled after Get Property Overrides is invoked" }, "details": { - "name": "GetPropertyOverrides" + "name": "Get Property Overrides" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } } ], @@ -33,7 +34,7 @@ { "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", "details": { - "name": "AZStd::unordered_map" + "name": "AZ Std::unordered_map" } } ] @@ -42,26 +43,26 @@ "key": "SetPropertyOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrides" + "tooltip": "When signaled, this will invoke Set Property Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrides is invoked" + "tooltip": "Signaled after Set Property Overrides is invoked" }, "details": { - "name": "SetPropertyOverrides" + "name": "Set Property Overrides" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{6E6962E1-04C9-56F9-89C4-361031CC1384}", "details": { - "name": "AZStd::unordered_map" + "name": "AZ Std::unordered_map" } } ] @@ -70,26 +71,26 @@ "key": "ClearPropertyOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearPropertyOverride" + "tooltip": "When signaled, this will invoke Clear Property Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearPropertyOverride is invoked" + "tooltip": "Signaled after Clear Property Override is invoked" }, "details": { - "name": "ClearPropertyOverride" + "name": "Clear Property Override" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ] @@ -98,20 +99,20 @@ "key": "ClearPropertyOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearPropertyOverrides" + "tooltip": "When signaled, this will invoke Clear Property Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearPropertyOverrides is invoked" + "tooltip": "Signaled after Clear Property Overrides is invoked" }, "details": { - "name": "ClearPropertyOverrides" + "name": "Clear Property Overrides" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } } ] @@ -120,26 +121,26 @@ "key": "GetPropertyOverrideVector4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideVector4" + "tooltip": "When signaled, this will invoke Get Property Override Vector 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideVector4 is invoked" + "tooltip": "Signaled after Get Property Override Vector 4 is invoked" }, "details": { - "name": "GetPropertyOverrideVector4" + "name": "Get Property Override Vector 4" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], @@ -147,185 +148,183 @@ { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ] }, { - "key": "GetPropertyOverrideImageInstance", + "key": "GetPropertyOverrideUInt32", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideImageInstance" + "tooltip": "When signaled, this will invoke Get Property OverrideU Int 32" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideImageInstance is invoked" + "tooltip": "Signaled after Get Property OverrideU Int 32 is invoked" }, "details": { - "name": "GetPropertyOverrideImageInstance" + "name": "Get Property OverrideU Int 32" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], "results": [ { - "typeid": "{C0311D23-97F1-556C-B6A4-ECD726543686}", + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "AZStd::intrusive_ptr" + "name": "unsigned int" } } ] }, { - "key": "GetPropertyOverrideUInt32", + "key": "GetPropertyOverrideBool", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideUInt32" + "tooltip": "When signaled, this will invoke Get Property Override Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideUInt32 is invoked" + "tooltip": "Signaled after Get Property Override Bool is invoked" }, "details": { - "name": "GetPropertyOverrideUInt32" + "name": "Get Property Override Bool" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], "results": [ { - "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "unsigned int" + "name": "bool" } } ] }, { - "key": "GetPropertyOverrideBool", + "key": "SetPropertyOverrideEnum", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideBool" + "tooltip": "When signaled, this will invoke Set Property Override Enum" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideBool is invoked" + "tooltip": "Signaled after Set Property Override Enum is invoked" }, "details": { - "name": "GetPropertyOverrideBool" + "name": "Set Property Override Enum" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } - } - ], - "results": [ + }, { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "bool" + "name": "unsigned int" } } ] }, { - "key": "GetPropertyOverrideImageAsset", + "key": "SetPropertyOverrideVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideImageAsset" + "tooltip": "When signaled, this will invoke Set Property Override Vector 2" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideImageAsset is invoked" + "tooltip": "Signaled after Set Property Override Vector 2 is invoked" }, "details": { - "name": "GetPropertyOverrideImageAsset" + "name": "Set Property Override Vector 2" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } - } - ], - "results": [ + }, { - "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Asset" + "name": "Vector 2" } } ] }, { - "key": "SetPropertyOverrideVector2", + "key": "GetPropertyOverrideImage", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideVector2" + "tooltip": "When signaled, this will invoke Get Property Override Image" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideVector2 is invoked" + "tooltip": "Signaled after Get Property Override Image is invoked" }, "details": { - "name": "SetPropertyOverrideVector2" + "name": "Get Property Override Image" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } - }, + } + ], + "results": [ { - "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "Vector2" + "name": "Asset Id" } } ] @@ -334,90 +333,34 @@ "key": "ClearAllPropertyOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearAllPropertyOverrides" + "tooltip": "When signaled, this will invoke Clear All Property Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearAllPropertyOverrides is invoked" + "tooltip": "Signaled after Clear All Property Overrides is invoked" }, "details": { - "name": "ClearAllPropertyOverrides" + "name": "Clear All Property Overrides" } }, - { - "key": "ClearMaterialOverride", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke ClearMaterialOverride" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after ClearMaterialOverride is invoked" - }, - "details": { - "name": "ClearMaterialOverride" - }, - "params": [ - { - "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", - "details": { - "name": "AZ::Render::MaterialAssignmentId" - } - } - ] - }, - { - "key": "SetPropertyOverrideImageInstance", - "entry": { - "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideImageInstance" - }, - "exit": { - "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideImageInstance is invoked" - }, - "details": { - "name": "SetPropertyOverrideImageInstance" - }, - "params": [ - { - "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", - "details": { - "name": "AZ::Render::MaterialAssignmentId" - } - }, - { - "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", - "details": { - "name": "AZStd::string" - } - }, - { - "typeid": "{C0311D23-97F1-556C-B6A4-ECD726543686}", - "details": { - "name": "AZStd::intrusive_ptr" - } - } - ] - }, { "key": "GetMaterialSlotLabel", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetMaterialSlotLabel" + "tooltip": "When signaled, this will invoke Get Material Slot Label" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetMaterialSlotLabel is invoked" + "tooltip": "Signaled after Get Material Slot Label is invoked" }, "details": { - "name": "GetMaterialSlotLabel" + "name": "Get Material Slot Label" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } } ], @@ -425,7 +368,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ] @@ -434,32 +377,32 @@ "key": "SetPropertyOverrideVector3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideVector3" + "tooltip": "When signaled, this will invoke Set Property Override Vector 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideVector3 is invoked" + "tooltip": "Signaled after Set Property Override Vector 3 is invoked" }, "details": { - "name": "SetPropertyOverrideVector3" + "name": "Set Property Override Vector 3" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ] @@ -468,40 +411,40 @@ "key": "ClearInvalidMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearInvalidMaterialOverrides" + "tooltip": "When signaled, this will invoke Clear Invalid Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearInvalidMaterialOverrides is invoked" + "tooltip": "Signaled after Clear Invalid Material Overrides is invoked" }, "details": { - "name": "ClearInvalidMaterialOverrides" + "name": "Clear Invalid Material Overrides" } }, { "key": "SetPropertyOverrideBool", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideBool" + "tooltip": "When signaled, this will invoke Set Property Override Bool" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideBool is invoked" + "tooltip": "Signaled after Set Property Override Bool is invoked" }, "details": { - "name": "SetPropertyOverrideBool" + "name": "Set Property Override Bool" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { @@ -516,46 +459,46 @@ "key": "RepairInvalidMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke RepairInvalidMaterialOverrides" + "tooltip": "When signaled, this will invoke Repair Invalid Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after RepairInvalidMaterialOverrides is invoked" + "tooltip": "Signaled after Repair Invalid Material Overrides is invoked" }, "details": { - "name": "RepairInvalidMaterialOverrides" + "name": "Repair Invalid Material Overrides" } }, { "key": "SetPropertyOverrideString", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideString" + "tooltip": "When signaled, this will invoke Set Property Override String" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideString is invoked" + "tooltip": "Signaled after Set Property Override String is invoked" }, "details": { - "name": "SetPropertyOverrideString" + "name": "Set Property Override String" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ] @@ -564,20 +507,20 @@ "key": "SetDefaultMaterialOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetDefaultMaterialOverride" + "tooltip": "When signaled, this will invoke Set Default Material Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetDefaultMaterialOverride is invoked" + "tooltip": "Signaled after Set Default Material Override is invoked" }, "details": { - "name": "SetDefaultMaterialOverride" + "name": "Set Default Material Override" }, "params": [ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -586,20 +529,20 @@ "key": "GetDefaultMaterialOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetDefaultMaterialOverride" + "tooltip": "When signaled, this will invoke Get Default Material Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetDefaultMaterialOverride is invoked" + "tooltip": "Signaled after Get Default Material Override is invoked" }, "details": { - "name": "GetDefaultMaterialOverride" + "name": "Get Default Material Override" }, "results": [ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -608,20 +551,20 @@ "key": "SetMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetMaterialOverrides" + "tooltip": "When signaled, this will invoke Set Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetMaterialOverrides is invoked" + "tooltip": "Signaled after Set Material Overrides is invoked" }, "details": { - "name": "SetMaterialOverrides" + "name": "Set Material Overrides" }, "params": [ { "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", "details": { - "name": "AZStd::unordered_map" + "name": "AZ Std::unordered_map" } } ] @@ -630,26 +573,26 @@ "key": "GetPropertyOverrideString", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideString" + "tooltip": "When signaled, this will invoke Get Property Override String" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideString is invoked" + "tooltip": "Signaled after Get Property Override String is invoked" }, "details": { - "name": "GetPropertyOverrideString" + "name": "Get Property Override String" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], @@ -657,7 +600,7 @@ { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ] @@ -666,20 +609,20 @@ "key": "GetMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetMaterialOverrides" + "tooltip": "When signaled, this will invoke Get Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetMaterialOverrides is invoked" + "tooltip": "Signaled after Get Material Overrides is invoked" }, "details": { - "name": "GetMaterialOverrides" + "name": "Get Material Overrides" }, "results": [ { "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", "details": { - "name": "AZStd::unordered_map" + "name": "AZ Std::unordered_map" } } ] @@ -688,20 +631,20 @@ "key": "GetMaterialOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetMaterialOverride" + "tooltip": "When signaled, this will invoke Get Material Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetMaterialOverride is invoked" + "tooltip": "Signaled after Get Material Override is invoked" }, "details": { - "name": "GetMaterialOverride" + "name": "Get Material Override" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } } ], @@ -709,7 +652,7 @@ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -718,32 +661,32 @@ "key": "SetPropertyOverrideVector4", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideVector4" + "tooltip": "When signaled, this will invoke Set Property Override Vector 4" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideVector4 is invoked" + "tooltip": "Signaled after Set Property Override Vector 4 is invoked" }, "details": { - "name": "SetPropertyOverrideVector4" + "name": "Set Property Override Vector 4" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { "typeid": "{0CE9FA36-1E3A-4C06-9254-B7C73A732053}", "details": { - "name": "Vector4" + "name": "Vector 4" } } ] @@ -752,26 +695,26 @@ "key": "SetPropertyOverrideUInt32", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideUInt32" + "tooltip": "When signaled, this will invoke Set Property OverrideU Int 32" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideUInt32 is invoked" + "tooltip": "Signaled after Set Property OverrideU Int 32 is invoked" }, "details": { - "name": "SetPropertyOverrideUInt32" + "name": "Set Property OverrideU Int 32" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { @@ -786,26 +729,26 @@ "key": "FindMaterialAssignmentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke FindMaterialAssignmentId" + "tooltip": "When signaled, this will invoke Find Material Assignment Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after FindMaterialAssignmentId is invoked" + "tooltip": "Signaled after Find Material Assignment Id is invoked" }, "details": { - "name": "FindMaterialAssignmentId" + "name": "Find Material Assignment Id" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "AZ::u 64" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], @@ -813,77 +756,79 @@ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } } ] }, { - "key": "SetPropertyOverrideImageAsset", + "key": "GetPropertyOverrideInt32", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideImageAsset" + "tooltip": "When signaled, this will invoke Get Property Override Int 32" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideImageAsset is invoked" + "tooltip": "Signaled after Get Property Override Int 32 is invoked" }, "details": { - "name": "SetPropertyOverrideImageAsset" + "name": "Get Property Override Int 32" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } - }, + } + ], + "results": [ { - "typeid": "{4BA06517-EDEC-59DC-B5FE-2FDE64BBEF6E}", + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Asset" + "name": "int" } } ] }, { - "key": "GetPropertyOverrideInt32", + "key": "GetPropertyOverrideEnum", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideInt32" + "tooltip": "When signaled, this will invoke Get Property Override Enum" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideInt32 is invoked" + "tooltip": "Signaled after Get Property Override Enum is invoked" }, "details": { - "name": "GetPropertyOverrideInt32" + "name": "Get Property Override Enum" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], "results": [ { - "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "int" + "name": "unsigned int" } } ] @@ -892,26 +837,26 @@ "key": "SetPropertyOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverride" + "tooltip": "When signaled, this will invoke Set Property Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverride is invoked" + "tooltip": "Signaled after Set Property Override is invoked" }, "details": { - "name": "SetPropertyOverride" + "name": "Set Property Override" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { @@ -926,20 +871,20 @@ "key": "GetOriginalMaterialAssignments", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetOriginalMaterialAssignments" + "tooltip": "When signaled, this will invoke Get Original Material Assignments" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetOriginalMaterialAssignments is invoked" + "tooltip": "Signaled after Get Original Material Assignments is invoked" }, "details": { - "name": "GetOriginalMaterialAssignments" + "name": "Get Original Material Assignments" }, "results": [ { "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", "details": { - "name": "AZStd::unordered_map" + "name": "AZ Std::unordered_map" } } ] @@ -948,26 +893,26 @@ "key": "GetPropertyOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverride" + "tooltip": "When signaled, this will invoke Get Property Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverride is invoked" + "tooltip": "Signaled after Get Property Override is invoked" }, "details": { - "name": "GetPropertyOverride" + "name": "Get Property Override" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], @@ -984,34 +929,34 @@ "key": "ClearModelMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearModelMaterialOverrides" + "tooltip": "When signaled, this will invoke Clear Model Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearModelMaterialOverrides is invoked" + "tooltip": "Signaled after Clear Model Material Overrides is invoked" }, "details": { - "name": "ClearModelMaterialOverrides" + "name": "Clear Model Material Overrides" } }, { "key": "GetDefaultMaterialAssetId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetDefaultMaterialAssetId" + "tooltip": "When signaled, this will invoke Get Default Material Asset Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetDefaultMaterialAssetId is invoked" + "tooltip": "Signaled after Get Default Material Asset Id is invoked" }, "details": { - "name": "GetDefaultMaterialAssetId" + "name": "Get Default Material Asset Id" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } } ], @@ -1019,7 +964,7 @@ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -1028,26 +973,26 @@ "key": "SetPropertyOverrideInt32", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideInt32" + "tooltip": "When signaled, this will invoke Set Property Override Int 32" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideInt32 is invoked" + "tooltip": "Signaled after Set Property Override Int 32 is invoked" }, "details": { - "name": "SetPropertyOverrideInt32" + "name": "Set Property Override Int 32" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { @@ -1058,30 +1003,64 @@ } ] }, + { + "key": "SetPropertyOverrideImage", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Property Override Image" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Property Override Image is invoked" + }, + "details": { + "name": "Set Property Override Image" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + }, + { + "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", + "details": { + "name": "AZ Std::string" + } + }, + { + "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", + "details": { + "name": "Asset Id" + } + } + ] + }, { "key": "GetPropertyOverrideVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideVector2" + "tooltip": "When signaled, this will invoke Get Property Override Vector 2" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideVector2 is invoked" + "tooltip": "Signaled after Get Property Override Vector 2 is invoked" }, "details": { - "name": "GetPropertyOverrideVector2" + "name": "Get Property Override Vector 2" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], @@ -1089,7 +1068,7 @@ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Vector 2" } } ] @@ -1098,40 +1077,40 @@ "key": "ClearAllMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearAllMaterialOverrides" + "tooltip": "When signaled, this will invoke Clear All Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearAllMaterialOverrides is invoked" + "tooltip": "Signaled after Clear All Material Overrides is invoked" }, "details": { - "name": "ClearAllMaterialOverrides" + "name": "Clear All Material Overrides" } }, { "key": "GetPropertyOverrideColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideColor" + "tooltip": "When signaled, this will invoke Get Property Override Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideColor is invoked" + "tooltip": "Signaled after Get Property Override Color is invoked" }, "details": { - "name": "GetPropertyOverrideColor" + "name": "Get Property Override Color" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], @@ -1148,26 +1127,26 @@ "key": "SetPropertyOverrideFloat", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideFloat" + "tooltip": "When signaled, this will invoke Set Property Override Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideFloat is invoked" + "tooltip": "Signaled after Set Property Override Float is invoked" }, "details": { - "name": "SetPropertyOverrideFloat" + "name": "Set Property Override Float" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { @@ -1178,58 +1157,102 @@ } ] }, + { + "key": "ApplyAutomaticPropertyUpdates", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Automatic Property Updates" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Automatic Property Updates is invoked" + }, + "details": { + "name": "Apply Automatic Property Updates" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + }, + { + "key": "ClearMaterialOverride", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Clear Material Override" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Clear Material Override is invoked" + }, + "details": { + "name": "Clear Material Override" + }, + "params": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ] + }, { "key": "ClearLodMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearLodMaterialOverrides" + "tooltip": "When signaled, this will invoke Clear Lod Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearLodMaterialOverrides is invoked" + "tooltip": "Signaled after Clear Lod Material Overrides is invoked" }, "details": { - "name": "ClearLodMaterialOverrides" + "name": "Clear Lod Material Overrides" } }, { "key": "ClearIncompatibleMaterialOverrides", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearIncompatibleMaterialOverrides" + "tooltip": "When signaled, this will invoke Clear Incompatible Material Overrides" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearIncompatibleMaterialOverrides is invoked" + "tooltip": "Signaled after Clear Incompatible Material Overrides is invoked" }, "details": { - "name": "ClearIncompatibleMaterialOverrides" + "name": "Clear Incompatible Material Overrides" } }, { "key": "GetPropertyOverrideVector3", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideVector3" + "tooltip": "When signaled, this will invoke Get Property Override Vector 3" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideVector3 is invoked" + "tooltip": "Signaled after Get Property Override Vector 3 is invoked" }, "details": { - "name": "GetPropertyOverrideVector3" + "name": "Get Property Override Vector 3" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], @@ -1237,7 +1260,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Vector 3" } } ] @@ -1246,40 +1269,40 @@ "key": "ClearDefaultMaterialOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke ClearDefaultMaterialOverride" + "tooltip": "When signaled, this will invoke Clear Default Material Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after ClearDefaultMaterialOverride is invoked" + "tooltip": "Signaled after Clear Default Material Override is invoked" }, "details": { - "name": "ClearDefaultMaterialOverride" + "name": "Clear Default Material Override" } }, { "key": "SetPropertyOverrideColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetPropertyOverrideColor" + "tooltip": "When signaled, this will invoke Set Property Override Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetPropertyOverrideColor is invoked" + "tooltip": "Signaled after Set Property Override Color is invoked" }, "details": { - "name": "SetPropertyOverrideColor" + "name": "Set Property Override Color" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } }, { @@ -1294,26 +1317,26 @@ "key": "SetMaterialOverride", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetMaterialOverride" + "tooltip": "When signaled, this will invoke Set Material Override" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetMaterialOverride is invoked" + "tooltip": "Signaled after Set Material Override is invoked" }, "details": { - "name": "SetMaterialOverride" + "name": "Set Material Override" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -1322,26 +1345,26 @@ "key": "GetPropertyOverrideFloat", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPropertyOverrideFloat" + "tooltip": "When signaled, this will invoke Get Property Override Float" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPropertyOverrideFloat is invoked" + "tooltip": "Signaled after Get Property Override Float is invoked" }, "details": { - "name": "GetPropertyOverrideFloat" + "name": "Get Property Override Float" }, "params": [ { "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", "details": { - "name": "AZ::Render::MaterialAssignmentId" + "name": "AZ:: Render:: Material Assignment Id" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "AZ Std::string" } } ], diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/Multi-Position Audio Requests.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/Multi-Position Audio Requests.names index 8234e0cc58..7cee9b0a66 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/Multi-Position Audio Requests.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/Multi-Position Audio Requests.names @@ -9,7 +9,7 @@ }, "methods": [ { - "key": "AddEntity", + "key": "Add Entity", "entry": { "name": "In", "tooltip": "When signaled, this will invoke Add Entity" @@ -42,7 +42,7 @@ "tooltip": "Signaled after Remove Entity is invoked" }, "details": { - "name": "RemoveEntity" + "name": "Remove Entity" }, "params": [ { @@ -58,22 +58,21 @@ "key": "SetBehaviorType", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBehaviorType" + "tooltip": "When signaled, this will invoke Set Behavior Type" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBehaviorType is invoked" + "tooltip": "Signaled after Set Behavior Type is invoked" }, "details": { - "name": "Set Behavior Type", - "tooltip": "0: Separate, 1: Blended" + "name": "Set Behavior Type" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Behavior Type", - "tooltip": "0: Separate, 1: Blended" + "name": "Type", + "tooltip": "0: Separate\n1: Blended" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NavigationComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NavigationComponentRequestBus.names index 0d13037335..88b015bda8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NavigationComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NavigationComponentRequestBus.names @@ -5,27 +5,29 @@ "context": "EBusSender", "variant": "", "details": { - "name": "NavigationComponentRequestBus" + "name": "Movement", + "category": "Navigation" }, "methods": [ { "key": "SetAgentSpeed", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAgentSpeed" + "tooltip": "When signaled, this will invoke Set Agent Speed" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAgentSpeed is invoked" + "tooltip": "Signaled after Set Agent Speed is invoked" }, "details": { - "name": "SetAgentSpeed" + "name": "Set Agent Speed" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Speed", + "tooltip": "The agent speed in meters per second" } } ] @@ -34,20 +36,21 @@ "key": "SetAgentMovementMethod", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetAgentMovementMethod" + "tooltip": "When signaled, this will invoke Set Agent Movement Method" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetAgentMovementMethod is invoked" + "tooltip": "Signaled after Set Agent Movement Method is invoked" }, "details": { - "name": "SetAgentMovementMethod" + "name": "Set Agent Movement Method" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Method", + "tooltip": "0: Transform, 1: Physics, 2: Custom" } } ] @@ -63,13 +66,13 @@ "tooltip": "Signaled after GetAgentSpeed is invoked" }, "details": { - "name": "GetAgentSpeed" + "name": "Get Agent Speed" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Speed" } } ] @@ -78,20 +81,21 @@ "key": "FindPathToPosition", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke FindPathToPosition" + "tooltip": "When signaled, this will invoke Find Path To Position" }, "exit": { "name": "Out", - "tooltip": "Signaled after FindPathToPosition is invoked" + "tooltip": "Signaled after Find Path To Position is invoked" }, "details": { - "name": "FindPathToPosition" + "name": "Find Path To Position" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Position", + "tooltip": "The position to navigate to" } } ], @@ -99,7 +103,7 @@ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Request Id" } } ] @@ -121,7 +125,8 @@ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Request Id", + "tooltip": "The request Id of the navigation process to stop" } } ] @@ -130,21 +135,21 @@ "key": "FindPathToEntity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke FindPathToEntity" + "tooltip": "When signaled, this will invoke Find Path To Entity" }, "exit": { "name": "Out", - "tooltip": "Signaled after FindPathToEntity is invoked" + "tooltip": "Signaled after Find Path To Entity is invoked" }, "details": { - "name": "FindPathToEntity" + "name": "Find Path To Entity" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", - "tooltip": "Entity Unique Id" + "name": "Entity Id", + "tooltip": "The entity to follow" } } ], @@ -152,7 +157,7 @@ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "Request Id" } } ] @@ -161,20 +166,21 @@ "key": "GetAgentMovementMethod", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAgentMovementMethod" + "tooltip": "When signaled, this will invoke Get Agent Movement Method" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAgentMovementMethod is invoked" + "tooltip": "Signaled after Get Agent Movement Method is invoked" }, "details": { - "name": "GetAgentMovementMethod" + "name": "Get Agent Movement Method" }, "results": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "int" + "name": "Method", + "tooltip": "0: Transform, 1: Physics, 2: Custom" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NonUniformScaleRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NonUniformScaleRequestBus.names index 7387063040..dee0920cf2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NonUniformScaleRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/NonUniformScaleRequestBus.names @@ -5,8 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "NonUniformScaleRequestBus", - "category": "Entity" + "name": "Non Uniform Scale" }, "methods": [ { @@ -26,7 +25,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Scale" } } ] @@ -48,7 +47,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Non-uniform Scale" + "name": "Scale" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysXCharacterControllerRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysXCharacterControllerRequestBus.names index c0c09a568d..e4b0b6086d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysXCharacterControllerRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysXCharacterControllerRequestBus.names @@ -41,7 +41,7 @@ "tooltip": "Signaled after Get Radius is invoked" }, "details": { - "name": "Get adius" + "name": "Get Radius" }, "results": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysicalSkyRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysicalSkyRequestBus.names index ccd14962a2..a83525bb17 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysicalSkyRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PhysicalSkyRequestBus.names @@ -5,21 +5,22 @@ "context": "EBusSender", "variant": "", "details": { - "name": "PhysicalSkyRequestBus" + "name": "Physical Sky", + "category": "Rendering" }, "methods": [ { "key": "SetSkyIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetSkyIntensity" + "tooltip": "When signaled, this will invoke Set Sky Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetSkyIntensity is invoked" + "tooltip": "Signaled after Set Sky Intensity is invoked" }, "details": { - "name": "SetSkyIntensity" + "name": "Set Sky Intensity" }, "params": [ { @@ -34,14 +35,14 @@ "key": "SetSunIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetSunIntensity" + "tooltip": "When signaled, this will invoke Set Sun Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetSunIntensity is invoked" + "tooltip": "Signaled after Set Sun Intensity is invoked" }, "details": { - "name": "SetSunIntensity" + "name": "Set Sun Intensity" }, "params": [ { @@ -56,14 +57,14 @@ "key": "GetSunIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSunIntensity" + "tooltip": "When signaled, this will invoke Get Sun Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSunIntensity is invoked" + "tooltip": "Signaled after Get Sun Intensity is invoked" }, "details": { - "name": "GetSunIntensity" + "name": "Get Sun Intensity" }, "results": [ { @@ -78,14 +79,14 @@ "key": "GetSunRadiusFactor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSunRadiusFactor" + "tooltip": "When signaled, this will invoke Get Sun Radius Factor" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSunRadiusFactor is invoked" + "tooltip": "Signaled after Get Sun Radius Factor is invoked" }, "details": { - "name": "GetSunRadiusFactor" + "name": "Get Sun Radius Factor" }, "results": [ { @@ -100,14 +101,14 @@ "key": "SetSunRadiusFactor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetSunRadiusFactor" + "tooltip": "When signaled, this will invoke Set Sun Radius Factor" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetSunRadiusFactor is invoked" + "tooltip": "Signaled after Set Sun Radius Factor is invoked" }, "details": { - "name": "SetSunRadiusFactor" + "name": "Set Sun Radius Factor" }, "params": [ { @@ -122,14 +123,14 @@ "key": "GetTurbidity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTurbidity" + "tooltip": "When signaled, this will invoke Get Turbidity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTurbidity is invoked" + "tooltip": "Signaled after Get Turbidity is invoked" }, "details": { - "name": "GetTurbidity" + "name": "Get Turbidity" }, "results": [ { @@ -144,14 +145,14 @@ "key": "GetSkyIntensity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetSkyIntensity" + "tooltip": "When signaled, this will invoke Get Sky Intensity" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetSkyIntensity is invoked" + "tooltip": "Signaled after Get Sky Intensity is invoked" }, "details": { - "name": "GetSkyIntensity" + "name": "Get Sky Intensity" }, "results": [ { @@ -166,14 +167,14 @@ "key": "SetTurbidity", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTurbidity" + "tooltip": "When signaled, this will invoke Set Turbidity" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTurbidity is invoked" + "tooltip": "Signaled after Set Turbidity is invoked" }, "details": { - "name": "SetTurbidity" + "name": "Set Turbidity" }, "params": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabLoaderScriptingBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabLoaderScriptingBus.names index 791394e50a..1c90afdb38 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabLoaderScriptingBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabLoaderScriptingBus.names @@ -5,27 +5,27 @@ "context": "EBusSender", "variant": "", "details": { - "name": "PrefabLoaderScriptingBus" + "name": "Prefab Loader" }, "methods": [ { "key": "SaveTemplateToString", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SaveTemplateToString" + "tooltip": "When signaled, this will invoke Save Template To String" }, "exit": { "name": "Out", - "tooltip": "Signaled after SaveTemplateToString is invoked" + "tooltip": "Signaled after Save Template To String is invoked" }, "details": { - "name": "SaveTemplateToString" + "name": "Save Template To String" }, "params": [ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Template Id" } } ], @@ -33,7 +33,7 @@ { "typeid": "{92FC6941-F5F5-5141-97A4-1965FC8B09CD}", "details": { - "name": "" + "name": "Success" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabSystemScriptingBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabSystemScriptingBus.names index 8c48798a87..5298a19f9e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabSystemScriptingBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/PrefabSystemScriptingBus.names @@ -5,33 +5,33 @@ "context": "EBusSender", "variant": "", "details": { - "name": "PrefabSystemScriptingBus" + "name": "Prefab System" }, "methods": [ { "key": "CreatePrefab", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke CreatePrefab" + "tooltip": "When signaled, this will invoke Create Prefab" }, "exit": { "name": "Out", - "tooltip": "Signaled after CreatePrefab is invoked" + "tooltip": "Signaled after Create Prefab is invoked" }, "details": { - "name": "CreatePrefab" + "name": "Create Prefab" }, "params": [ { "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", "details": { - "name": "AZStd::vector" + "name": "Entity Ids" } }, { "typeid": "{03AAAB3F-5C47-5A66-9EBC-D5FA4DB353C9}", "details": { - "name": "AZStd::string" + "name": "File Path" } } ], @@ -39,7 +39,7 @@ { "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", "details": { - "name": "AZ::u64" + "name": "Template Id" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RigidBodyRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RigidBodyRequestBus.names new file mode 100644 index 0000000000..412136183b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/RigidBodyRequestBus.names @@ -0,0 +1,722 @@ +{ + "entries": [ + { + "key": "RigidBodyRequestBus", + "context": "EBusSender", + "variant": "", + "details": { + "name": "Rigid Body" + }, + "methods": [ + { + "key": "SetLinearVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Linear Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Linear Velocity is invoked" + }, + "details": { + "name": "Set Linear Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Velocity" + } + } + ] + }, + { + "key": "SetKinematic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kinematic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kinematic is invoked" + }, + "details": { + "name": "Set Kinematic" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "key": "SetMass", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Mass" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Mass is invoked" + }, + "details": { + "name": "Set Mass" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Mass" + } + } + ] + }, + { + "key": "SetGravityEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Gravity Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Gravity Enabled is invoked" + }, + "details": { + "name": "Set Gravity Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "key": "GetAabb", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get AABB" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get AABB is invoked" + }, + "details": { + "name": "Get AABB" + }, + "results": [ + { + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "details": { + "name": "AABB" + } + } + ] + }, + { + "key": "ForceAwake", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Force Awake" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Force Awake is invoked" + }, + "details": { + "name": "Force Awake" + } + }, + { + "key": "SetAngularDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Angular Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Angular Damping is invoked" + }, + "details": { + "name": "Set Angular Damping" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angular Damping" + } + } + ] + }, + { + "key": "ApplyAngularImpulse", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Angular Impulse" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Angular Impulse is invoked" + }, + "details": { + "name": "Apply Angular Impulse" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angular Impulse" + } + } + ] + }, + { + "key": "DisablePhysics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Disable Physics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Disable Physics is invoked" + }, + "details": { + "name": "Disable Physics" + } + }, + { + "key": "SetSimulationEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Simulation Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Simulation Enabled is invoked" + }, + "details": { + "name": "Set Simulation Enabled" + }, + "params": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "key": "GetLinearVelocityAtWorldPoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Linear Velocity At World Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Linear Velocity At World Point is invoked" + }, + "details": { + "name": "Get Linear Velocity At World Point" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Velocity" + } + } + ], + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "World Point" + } + } + ] + }, + { + "key": "SetAngularVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Angular Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Angular Velocity is invoked" + }, + "details": { + "name": "Set Angular Velocity" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angular Velocity" + } + } + ] + }, + { + "key": "SetCenterOfMassOffset", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Center Of Mass Offset" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Center Of Mass Offset is invoked" + }, + "details": { + "name": "Set Center Of Mass Offset" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Offset" + } + } + ] + }, + { + "key": "IsPhysicsEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Physics Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Physics Enabled is invoked" + }, + "details": { + "name": "Is Physics Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Enabled" + } + } + ] + }, + { + "key": "GetSleepThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Sleep Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Sleep Threshold is invoked" + }, + "details": { + "name": "Get Sleep Threshold" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sleep Threshold" + } + } + ] + }, + { + "key": "SetKinematicTarget", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Kinematic Target" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Kinematic Target is invoked" + }, + "details": { + "name": "Set Kinematic Target" + }, + "params": [ + { + "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", + "details": { + "name": "Kinematic Target" + } + } + ] + }, + { + "key": "EnablePhysics", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Enable Physics" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Enable Physics is invoked" + }, + "details": { + "name": "Enable Physics" + } + }, + { + "key": "GetLinearDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Linear Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Linear Damping is invoked" + }, + "details": { + "name": "Get Linear Damping" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Linear Damping" + } + } + ] + }, + { + "key": "ApplyLinearImpulseAtWorldPoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Linear Impulse At World Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Linear Impulse At World Point is invoked" + }, + "details": { + "name": "Apply Linear Impulse At World Point" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Impulse" + } + }, + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "World Point" + } + } + ] + }, + { + "key": "GetCenterOfMassWorld", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Center Of Mass World" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Center Of Mass World is invoked" + }, + "details": { + "name": "Get Center Of Mass World" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Center of Mass (World)" + } + } + ] + }, + { + "key": "GetCenterOfMassLocal", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Center Of Mass Local" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Center Of Mass Local is invoked" + }, + "details": { + "name": "Get Center Of Mass Local" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Center Of Mass (Local)" + } + } + ] + }, + { + "key": "SetLinearDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Linear Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Linear Damping is invoked" + }, + "details": { + "name": "Set Linear Damping" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Linear Damping" + } + } + ] + }, + { + "key": "GetAngularDamping", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Angular Damping" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Angular Damping is invoked" + }, + "details": { + "name": "Get Angular Damping" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Angular Damping" + } + } + ] + }, + { + "key": "GetLinearVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Linear Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Linear Velocity is invoked" + }, + "details": { + "name": "Get Linear Velocity" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Velocity" + } + } + ] + }, + { + "key": "IsAwake", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Awake" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Awake is invoked" + }, + "details": { + "name": "Is Awake" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Awake" + } + } + ] + }, + { + "key": "IsGravityEnabled", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Gravity Enabled" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Gravity Enabled is invoked" + }, + "details": { + "name": "Is Gravity Enabled" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Gravity Enabled" + } + } + ] + }, + { + "key": "GetInverseMass", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Inverse Mass" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Inverse Mass is invoked" + }, + "details": { + "name": "Get Inverse Mass" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Inverse Mass" + } + } + ] + }, + { + "key": "SetSleepThreshold", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Set Sleep Threshold" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Set Sleep Threshold is invoked" + }, + "details": { + "name": "Set Sleep Threshold" + }, + "params": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Sleep Threshold" + } + } + ] + }, + { + "key": "ForceAsleep", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Force Asleep" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Force Asleep is invoked" + }, + "details": { + "name": "Force Asleep" + } + }, + { + "key": "GetMass", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Mass" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Mass is invoked" + }, + "details": { + "name": "Get Mass" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "Mass" + } + } + ] + }, + { + "key": "IsKinematic", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Is Kinematic" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Is Kinematic is invoked" + }, + "details": { + "name": "Is Kinematic" + }, + "results": [ + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Is Kinematic" + } + } + ] + }, + { + "key": "ApplyLinearImpulse", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Apply Linear Impulse" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Apply Linear Impulse is invoked" + }, + "details": { + "name": "Apply Linear Impulse" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Linear Impulse" + } + } + ] + }, + { + "key": "GetAngularVelocity", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Angular Velocity" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Angular Velocity is invoked" + }, + "details": { + "name": "Get Angular Velocity" + }, + "results": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Angular Velocity" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SequenceComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SequenceComponentRequestBus.names index 975a3e146b..f51021f9b4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SequenceComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SequenceComponentRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "SequenceComponentRequestBus", + "name": "Sequence", "category": "Animation" }, "methods": [ @@ -13,20 +13,21 @@ "key": "GetPlaySpeed", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Play Speed" + "tooltip": "When signaled, this will invoke GetPlaySpeed" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Play Speed is invoked" + "tooltip": "Signaled after GetPlaySpeed is invoked" }, "details": { - "name": "Get Play Speed" + "name": "Get Play Speed", + "tooltip": "Returns the current play back speed as a multiplier (1.0 is normal speed, less is slower, more is faster)" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Play Speed" } } ] @@ -42,13 +43,14 @@ "tooltip": "Signaled after Jump To Time is invoked" }, "details": { - "name": "Jump To Time" + "name": "Jump To Time", + "tooltip": "Move the Playhead to the given time" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Time" } } ] @@ -64,7 +66,8 @@ "tooltip": "Signaled after Resume is invoked" }, "details": { - "name": "Resume" + "name": "Resume", + "tooltip": "Resume the sequence. Resume essentially 'unpauses' a sequence. It must have been playing before the pause for playback to start again" } }, { @@ -78,7 +81,8 @@ "tooltip": "Signaled after Jump To End is invoked" }, "details": { - "name": "Jump To End" + "name": "Jump To End", + "tooltip": "Move the Playhead to the end of the sequence" } }, { @@ -92,13 +96,14 @@ "tooltip": "Signaled after Get Current Play Time is invoked" }, "details": { - "name": "Get Current Play Time" + "name": "Get Current Play Time", + "tooltip": " Returns the current play time in seconds" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Play Time" } } ] @@ -114,33 +119,35 @@ "tooltip": "Signaled after Pause is invoked" }, "details": { - "name": "Pause" + "name": "Pause", + "tooltip": "Pause the sequence. Sequence must be playing for pause to have an effect. Pausing leaves the play time at its current position" } }, { "key": "PlayBetweenTimes", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Play Between Times" + "tooltip": "When signaled, this will invoke PlayBetweenTimes" }, "exit": { "name": "Out", - "tooltip": "Signaled after Play Between Times is invoked" + "tooltip": "Signaled after PlayBetweenTimes is invoked" }, "details": { - "name": "Play Between Times" + "name": "PlayBetweenTimes", + "tooltip": "Play sequence between the start to end times, outside of which the sequence behaves according to its 'Out of Range' time setting" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Start Time" } }, { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "End Time" } } ] @@ -156,7 +163,8 @@ "tooltip": "Signaled after Stop is invoked" }, "details": { - "name": "Stop" + "name": "Stop", + "tooltip": "Pause the sequence. Sequence must be playing for pause to have an effect. Pausing leaves the play time at its current position" } }, { @@ -170,7 +178,8 @@ "tooltip": "Signaled after Jump To Beginning is invoked" }, "details": { - "name": "Jump To Beginning" + "name": "Jump To Beginning", + "tooltip": "Move the Playhead to the beginning of the sequence" } }, { @@ -184,27 +193,29 @@ "tooltip": "Signaled after Play is invoked" }, "details": { - "name": "Play" + "name": "Play", + "tooltip": "Play sequence from the start to end times set the sequence" } }, { "key": "SetPlaySpeed", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Play Speed" + "tooltip": "When signaled, this will invoke SetPlaySpeed" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Play Speed is invoked" + "tooltip": "Signaled after SetPlaySpeed is invoked" }, "details": { - "name": "Set Play Speed" + "name": "SetPlaySpeed", + "tooltip": "Set the play speed" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Play Speed" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleMotionComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleMotionComponentRequestBus.names index a92d790054..182ded9e83 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleMotionComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleMotionComponentRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "SimpleMotionComponentRequestBus", + "name": "Simple Motion", "category": "Animation" }, "methods": [ @@ -13,20 +13,20 @@ "key": "BlendOutTime", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke BlendOutTime" + "tooltip": "When signaled, this will invoke Blend Out Time" }, "exit": { "name": "Out", - "tooltip": "Signaled after BlendOutTime is invoked" + "tooltip": "Signaled after Blend Out Time is invoked" }, "details": { - "name": "BlendOutTime" + "name": "Blend Out Time" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Time" } } ] @@ -35,20 +35,20 @@ "key": "GetBlendInTime", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBlendInTime" + "tooltip": "When signaled, this will invoke Get Blend In Time" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBlendInTime is invoked" + "tooltip": "Signaled after Get Blend In Time is invoked" }, "details": { - "name": "GetBlendInTime" + "name": "Get Blend In Time" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Time" } } ] @@ -64,7 +64,7 @@ "tooltip": "Signaled after PlayMotion is invoked" }, "details": { - "name": "PlayMotion" + "name": "Play Motion" } }, { @@ -78,13 +78,13 @@ "tooltip": "Signaled after GetMotion is invoked" }, "details": { - "name": "GetMotion" + "name": "Get Motion" }, "results": [ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -93,20 +93,20 @@ "key": "GetBlendOutTime", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBlendOutTime" + "tooltip": "When signaled, this will invoke Get Blend Out Time" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBlendOutTime is invoked" + "tooltip": "Signaled after Get Blend Out Time is invoked" }, "details": { - "name": "GetBlendOutTime" + "name": "Get Blend Out Time" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Time" } } ] @@ -128,7 +128,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -137,20 +137,20 @@ "key": "GetPlaySpeed", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPlaySpeed" + "tooltip": "When signaled, this will invoke Get Play Speed" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPlaySpeed is invoked" + "tooltip": "Signaled after Get Play Speed is invoked" }, "details": { - "name": "GetPlaySpeed" + "name": "Get Play Speed" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Speed" } } ] @@ -159,20 +159,20 @@ "key": "GetPlayTime", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetPlayTime" + "tooltip": "When signaled, this will invoke Get Play Time" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetPlayTime is invoked" + "tooltip": "Signaled after Get Play Time is invoked" }, "details": { - "name": "GetPlayTime" + "name": "Get Play Time" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Time" } } ] @@ -194,7 +194,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -216,7 +216,7 @@ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Speed" } } ] @@ -238,7 +238,7 @@ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -247,20 +247,20 @@ "key": "BlendInTime", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke BlendInTime" + "tooltip": "When signaled, this will invoke Blend In Time" }, "exit": { "name": "Out", - "tooltip": "Signaled after BlendInTime is invoked" + "tooltip": "Signaled after Blend In Time is invoked" }, "details": { - "name": "BlendInTime" + "name": "Blend In Time" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Time" } } ] @@ -269,20 +269,20 @@ "key": "GetLoopMotion", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetLoopMotion" + "tooltip": "When signaled, this will invoke Get Loop Motion" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetLoopMotion is invoked" + "tooltip": "Signaled after Get Loop Motion is invoked" }, "details": { - "name": "GetLoopMotion" + "name": "Get Loop Motion" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Loop Motion" } } ] @@ -291,20 +291,20 @@ "key": "PlayTime", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke PlayTime" + "tooltip": "When signaled, this will invoke Play Time" }, "exit": { "name": "Out", - "tooltip": "Signaled after PlayTime is invoked" + "tooltip": "Signaled after Play Time is invoked" }, "details": { - "name": "PlayTime" + "name": "Play Time" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Time" } } ] @@ -326,7 +326,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] @@ -348,7 +348,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enable" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleStateComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleStateComponentRequestBus.names index c234b3503c..bd619cbd4d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleStateComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimpleStateComponentRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "SimpleStateComponentRequestBus", + "name": "Simple State", "category": "Gameplay" }, "methods": [ @@ -13,21 +13,20 @@ "key": "GetNumStates", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get State Count" + "tooltip": "When signaled, this will invoke Get Num States" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get State Count is invoked" + "tooltip": "Signaled after Get Num States is invoked" }, "details": { - "name": "Get State Count", - "tooltip": "Returns the number of states" + "name": "Get Num States" }, "results": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "unsigned int" + "name": "State Count" } } ] @@ -36,82 +35,76 @@ "key": "SetToLastState", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set To Last" + "tooltip": "When signaled, this will invoke Set To Last State" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set To Last is invoked" + "tooltip": "Signaled after Set To Last State is invoked" }, "details": { - "name": "Set To Last", - "tooltip": "Sets to the last state in the state list" + "name": "Set To Last State" } }, { "key": "SetToPreviousState", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set To Previous" + "tooltip": "When signaled, this will invoke Set To Previous State" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set To Previous is invoked" + "tooltip": "Signaled after Set To Previous State is invoked" }, "details": { - "name": "Set To Previous", - "tooltip": "Sets to the previous state in the state list from the current state" + "name": "Set To Previous State" } }, { "key": "SetToFirstState", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set To First" + "tooltip": "When signaled, this will invoke Set To First State" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set To First is invoked" + "tooltip": "Signaled after Set To First State is invoked" }, "details": { - "name": "Set To First", - "tooltip": "Sets to the first state in the state list" + "name": "Set To First State" } }, { "key": "SetToNextState", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set To Next" + "tooltip": "When signaled, this will invoke Set To Next State" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set To Next is invoked" + "tooltip": "Signaled after Set To Next State is invoked" }, "details": { - "name": "Set To Next", - "tooltip": "Sets to the next state in the state list from the current state" + "name": "Set To Next State" } }, { "key": "SetStateByIndex", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set State by Index" + "tooltip": "When signaled, this will invoke Set State By Index" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set State by Index is invoked" + "tooltip": "Signaled after Set State By Index is invoked" }, "details": { - "name": "Set State by Index", - "tooltip": "Sets the state by index" + "name": "Set State By Index" }, "params": [ { "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", "details": { - "name": "Index", - "tooltip": "State index" + "name": "Index" } } ] @@ -127,15 +120,13 @@ "tooltip": "Signaled after Set State is invoked" }, "details": { - "name": "Set State", - "tooltip": "Sets the state by name" + "name": "Set State" }, "params": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "Name", - "tooltip": "State name" + "name": "State Name" } } ] @@ -151,14 +142,13 @@ "tooltip": "Signaled after Get Current State is invoked" }, "details": { - "name": "Get Current State", - "tooltip": "Gets the current state name" + "name": "Get Current State" }, "results": [ { "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", "details": { - "name": "char" + "name": "State Name" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimulatedBodyComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimulatedBodyComponentRequestBus.names index 6b4bb30b91..fc0cf7e60d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimulatedBodyComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SimulatedBodyComponentRequestBus.names @@ -5,8 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "SimulatedBodyComponentRequestBus", - "category": "PhysX" + "name": "Simulated Body" }, "methods": [ { @@ -26,7 +25,7 @@ { "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", "details": { - "name": "Aabb" + "name": "AABB" } } ] @@ -35,11 +34,11 @@ "key": "IsPhysicsEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Is Physics Enabled" + "tooltip": "When signaled, this will invoke IsPhysicsEnabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after Is Physics Enabled is invoked" + "tooltip": "Signaled after IsPhysicsEnabled is invoked" }, "details": { "name": "Is Physics Enabled" @@ -48,7 +47,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Enabled" } } ] @@ -57,21 +56,20 @@ "key": "RayCast", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Raycast (Single Body)" + "tooltip": "When signaled, this will invoke RayCast" }, "exit": { "name": "Out", - "tooltip": "Signaled after Raycast (Single Body) is invoked" + "tooltip": "Signaled after RayCast is invoked" }, "details": { - "name": "Raycast (Single Body)", - "tooltip": "Perform a raycast against a single simulated body (not the whole scene)" + "name": "Ray Cast" }, "params": [ { "typeid": "{53EAD088-A391-48F1-8370-2A1DBA31512F}", "details": { - "name": "Raycast Request", + "name": "RayCast Request", "tooltip": "Parameters for raycast" } } @@ -80,7 +78,7 @@ { "typeid": "{7A7201B9-67B5-438B-B4EB-F3EEBB78C617}", "details": { - "name": "SceneQueryHit" + "name": "Scene Query Hit" } } ] @@ -103,11 +101,11 @@ "key": "EnablePhysics", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Enable Physics" + "tooltip": "When signaled, this will invoke EnablePhysics" }, "exit": { "name": "Out", - "tooltip": "Signaled after Enable Physics is invoked" + "tooltip": "Signaled after EnablePhysics is invoked" }, "details": { "name": "Enable Physics" diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SkyBoxFogRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SkyBoxFogRequestBus.names index 477f4fc85c..b0921723a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SkyBoxFogRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SkyBoxFogRequestBus.names @@ -5,21 +5,22 @@ "context": "EBusSender", "variant": "", "details": { - "name": "SkyBoxFogRequestBus" + "name": "Sky Box Fog", + "category": "Rendering" }, "methods": [ { "key": "GetBottomHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetBottomHeight" + "tooltip": "When signaled, this will invoke Get Bottom Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetBottomHeight is invoked" + "tooltip": "Signaled after Get Bottom Height is invoked" }, "details": { - "name": "GetBottomHeight" + "name": "Get Bottom Height" }, "results": [ { @@ -34,14 +35,14 @@ "key": "GetColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetColor" + "tooltip": "When signaled, this will invoke Get Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetColor is invoked" + "tooltip": "Signaled after Get Color is invoked" }, "details": { - "name": "GetColor" + "name": "Get Color" }, "results": [ { @@ -56,14 +57,14 @@ "key": "SetBottomHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetBottomHeight" + "tooltip": "When signaled, this will invoke Set Bottom Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetBottomHeight is invoked" + "tooltip": "Signaled after Set Bottom Height is invoked" }, "details": { - "name": "SetBottomHeight" + "name": "Set Bottom Height" }, "params": [ { @@ -78,14 +79,14 @@ "key": "SetColor", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetColor" + "tooltip": "When signaled, this will invoke Set Color" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetColor is invoked" + "tooltip": "Signaled after Set Color is invoked" }, "details": { - "name": "SetColor" + "name": "Set Color" }, "params": [ { @@ -100,14 +101,14 @@ "key": "GetTopHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetTopHeight" + "tooltip": "When signaled, this will invoke Get Top Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetTopHeight is invoked" + "tooltip": "Signaled after Get Top Height is invoked" }, "details": { - "name": "GetTopHeight" + "name": "Get Top Height" }, "results": [ { @@ -122,14 +123,14 @@ "key": "IsEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsEnabled" + "tooltip": "When signaled, this will invoke Is Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsEnabled is invoked" + "tooltip": "Signaled after Is Enabled is invoked" }, "details": { - "name": "IsEnabled" + "name": "Is Enabled" }, "results": [ { @@ -144,14 +145,14 @@ "key": "SetTopHeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetTopHeight" + "tooltip": "When signaled, this will invoke Set Top Height" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetTopHeight is invoked" + "tooltip": "Signaled after Set Top Height is invoked" }, "details": { - "name": "SetTopHeight" + "name": "Set Top Height" }, "params": [ { @@ -166,14 +167,14 @@ "key": "SetEnabled", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetEnabled" + "tooltip": "When signaled, this will invoke Set Enabled" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetEnabled is invoked" + "tooltip": "Signaled after Set Enabled is invoked" }, "details": { - "name": "SetEnabled" + "name": "Set Enabled" }, "params": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SpawnerComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SpawnerComponentRequestBus.names index aa1b298bde..bd8d62d99a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SpawnerComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/SpawnerComponentRequestBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "SpawnerComponentRequestBus", + "name": "Spawner", "category": "Gameplay" }, "methods": [ @@ -13,20 +13,20 @@ "key": "SetDynamicSlice", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetDynamicSlice" + "tooltip": "When signaled, this will invoke Set Dynamic Slice" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetDynamicSlice is invoked" + "tooltip": "Signaled after Set Dynamic Slice is invoked" }, "details": { - "name": "SetDynamicSlice" + "name": "Set Dynamic Slice" }, "params": [ { "typeid": "{652ED536-3402-439B-AEBE-4A5DBC554085}", "details": { - "name": "AssetId" + "name": "Asset Id" } } ] @@ -35,20 +35,20 @@ "key": "GetCurrentlySpawnedSlices", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCurrentlySpawnedSlices" + "tooltip": "When signaled, this will invoke Get Currently Spawned Slices" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCurrentlySpawnedSlices is invoked" + "tooltip": "Signaled after Get Currently Spawned Slices is invoked" }, "details": { - "name": "GetCurrentlySpawnedSlices" + "name": "Get Currently Spawned Slices" }, "results": [ { "typeid": "{DCAD95EA-9447-5B13-AACC-6C7223E1C04D}", "details": { - "name": "" + "name": "Spawned Slices" } } ] @@ -57,20 +57,20 @@ "key": "HasAnyCurrentlySpawnedSlices", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke HasAnyCurrentlySpawnedSlices" + "tooltip": "When signaled, this will invoke Has Any Currently Spawned Slices" }, "exit": { "name": "Out", - "tooltip": "Signaled after HasAnyCurrentlySpawnedSlices is invoked" + "tooltip": "Signaled after Has Any Currently Spawned Slices is invoked" }, "details": { - "name": "HasAnyCurrentlySpawnedSlices" + "name": "Has Any Currently Spawned Slices" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Result" } } ] @@ -79,20 +79,20 @@ "key": "GetAllCurrentlySpawnedEntities", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetAllCurrentlySpawnedEntities" + "tooltip": "When signaled, this will invoke Get All Currently Spawned Entities" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetAllCurrentlySpawnedEntities is invoked" + "tooltip": "Signaled after Get All Currently Spawned Entities is invoked" }, "details": { - "name": "GetAllCurrentlySpawnedEntities" + "name": "Get All Currently Spawned Entities" }, "results": [ { "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", "details": { - "name": "AZStd::vector" + "name": "Spawned Entities" } } ] @@ -101,34 +101,34 @@ "key": "DestroyAllSpawnedSlices", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DestroyAllSpawnedSlices" + "tooltip": "When signaled, this will invoke Destroy All Spawned Slices" }, "exit": { "name": "Out", - "tooltip": "Signaled after DestroyAllSpawnedSlices is invoked" + "tooltip": "Signaled after Destroy All Spawned Slices is invoked" }, "details": { - "name": "DestroyAllSpawnedSlices" + "name": "Destroy All Spawned Slices" } }, { "key": "GetCurrentEntitiesFromSpawnedSlice", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCurrentEntitiesFromSpawnedSlice" + "tooltip": "When signaled, this will invoke Get Current Entities From Spawned Slice" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCurrentEntitiesFromSpawnedSlice is invoked" + "tooltip": "Signaled after Get Current Entities From Spawned Slice is invoked" }, "details": { - "name": "GetCurrentEntitiesFromSpawnedSlice" + "name": "Get Current Entities From Spawned Slice" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket" + "name": "Slice Instantiation Ticket" } } ], @@ -136,7 +136,7 @@ { "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", "details": { - "name": "AZStd::vector" + "name": "Entities" } } ] @@ -145,20 +145,20 @@ "key": "DestroySpawnedSlice", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke DestroySpawnedSlice" + "tooltip": "When signaled, this will invoke Destroy Spawned Slice" }, "exit": { "name": "Out", - "tooltip": "Signaled after DestroySpawnedSlice is invoked" + "tooltip": "Signaled after Destroy Spawned Slice is invoked" }, "details": { - "name": "DestroySpawnedSlice" + "name": "Destroy Spawned Slice" }, "params": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket" + "name": "Slice Instantiation Ticket" } } ] @@ -167,20 +167,20 @@ "key": "IsReadyToSpawn", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke IsReadyToSpawn" + "tooltip": "When signaled, this will invoke Is Ready To Spawn" }, "exit": { "name": "Out", - "tooltip": "Signaled after IsReadyToSpawn is invoked" + "tooltip": "Signaled after Is Ready To Spawn is invoked" }, "details": { - "name": "IsReadyToSpawn" + "name": "Is Ready To Spawn" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Ready" } } ] @@ -196,15 +196,13 @@ "tooltip": "Signaled after Spawn Relative is invoked" }, "details": { - "name": "Spawn Relative", - "tooltip": "Spawn the selected slice at the entity's location with the provided relative offset" + "name": "Spawn Relative" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Offset", - "tooltip": "The relative offset from the entity" + "name": "Transform" } } ], @@ -212,8 +210,7 @@ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket", - "tooltip": "The relative offset from the entity" + "name": "Slice Instantiation Ticket" } } ] @@ -229,14 +226,13 @@ "tooltip": "Signaled after Spawn is invoked" }, "details": { - "name": "Spawn", - "tooltip": "Spawns the designated slice at the entity's location" + "name": "Spawn" }, "results": [ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket" + "name": "Slice Instantiation Ticket" } } ] @@ -252,15 +248,13 @@ "tooltip": "Signaled after Spawn Absolute is invoked" }, "details": { - "name": "Spawn Absolute", - "tooltip": "Spawn the selected slice at an absolute position" + "name": "Spawn Absolute" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Position", - "tooltip": "The absolute position where the entity should spawn" + "name": "Transform" } } ], @@ -268,8 +262,7 @@ { "typeid": "{E6E7C0C5-07C9-44BB-A38C-930431948667}", "details": { - "name": "SliceInstantiationTicket", - "tooltip": "The absolute position where the entity should spawn" + "name": "Slice Instantiation Ticket" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagComponentRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagComponentRequestBus.names index b0b63a23ed..da9973205b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagComponentRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagComponentRequestBus.names @@ -5,8 +5,8 @@ "context": "EBusSender", "variant": "", "details": { - "name": "TagComponentRequestBus", - "category": "Gameplay" + "name": "Requests", + "category": "Gameplay/Tag" }, "methods": [ { @@ -20,15 +20,13 @@ "tooltip": "Signaled after Has Tag is invoked" }, "details": { - "name": "Has Tag", - "tooltip": "Returns true if an entity has a specified tag" + "name": "Has Tag" }, "params": [ { "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", "details": { - "name": "Tag", - "tooltip": "The tag to check if the source entity has" + "name": "Tag" } } ], @@ -36,8 +34,7 @@ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool", - "tooltip": "The tag to check if the source entity has" + "name": "Has Tag" } } ] @@ -53,15 +50,13 @@ "tooltip": "Signaled after Add Tag is invoked" }, "details": { - "name": "Add Tag", - "tooltip": "Adds a tag to an entity if it didn't already have it" + "name": "Add Tag" }, "params": [ { "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", "details": { - "name": "Tag", - "tooltip": "The tag to add to the entity" + "name": "Tag" } } ] @@ -77,15 +72,13 @@ "tooltip": "Signaled after Remove Tag is invoked" }, "details": { - "name": "Remove Tag", - "tooltip": "Removes a tag from an entity if it had it" + "name": "Remove Tag" }, "params": [ { "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", "details": { - "name": "Tag", - "tooltip": "The tag to remove from the entity" + "name": "Tag" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagGlobalRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagGlobalRequestBus.names index fa31042580..dca7386616 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagGlobalRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TagGlobalRequestBus.names @@ -5,8 +5,8 @@ "context": "EBusSender", "variant": "", "details": { - "name": "TagGlobalRequestBus", - "category": "Gameplay" + "name": "Requests", + "category": "Gameplay/Tag" }, "methods": [ { @@ -20,14 +20,13 @@ "tooltip": "Signaled after Request Tagged Entities is invoked" }, "details": { - "name": "Request Tagged Entities", - "tooltip": "Returns the first responding entity that has a specified Tag" + "name": "Request Tagged Entities" }, "results": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Entity Id", "tooltip": "Entity Unique Id" } } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TerrainDataRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TerrainDataRequestBus.names index acd8f15026..f7ea7fa19e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TerrainDataRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TerrainDataRequestBus.names @@ -5,21 +5,21 @@ "context": "EBusSender", "variant": "", "details": { - "name": "TerrainDataRequestBus" + "name": "Terrain Data" }, "methods": [ { - "key": "GetNormalFromFloats", + "key": "GetIsHoleFromFloats", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Normal From Floats" + "tooltip": "When signaled, this will invoke Get Is Hole From Floats" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Normal From Floats is invoked" + "tooltip": "Signaled after Get Is Hole From Floats is invoked" }, "details": { - "name": "Get Normal From Floats" + "name": "Get Is Hole From Floats" }, "params": [ { @@ -40,49 +40,48 @@ "name": "Sample Filter", "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" } - }, - { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", - "details": { - "name": "Terrain Exists" - } } ], "results": [ { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Normal" + "name": "Terrain Exists" } } ] }, { - "key": "GetNormal", + "key": "GetSurfaceWeightsFromVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Normal" + "tooltip": "When signaled, this will invoke Get Surface Weights From Vector2" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Normal is invoked" + "tooltip": "Signaled after Get Surface Weights From Vector2 is invoked" }, "details": { - "name": "Get Normal" + "name": "Get Surface Weights From Vector2" }, "params": [ { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { "name": "Position" } }, + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Weights" + } + }, { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { "name": "Sample Filter", "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" - } }, { @@ -91,105 +90,116 @@ "name": "Terrain Exists" } } - ], - "results": [ - { - "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", - "details": { - "name": "Normal" - } - } ] }, { - "key": "GetTerrainAabb", + "key": "GetSurfaceWeights", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Terrain AABB" + "tooltip": "When signaled, this will invoke GetSurfaceWeights" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Terrain AABB is invoked" + "tooltip": "Signaled after GetSurfaceWeights is invoked" }, "details": { - "name": "Get Terrain AABB" + "name": "GetSurfaceWeights" }, - "results": [ + "params": [ { - "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "AABB" + "name": "Position" + } + }, + { + "typeid": "{8F60B4D4-06F0-577C-AFB9-ECBFA7B66D4E}", + "details": { + "name": "Surface Weights" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" } } ] }, { - "key": "GetIsHoleFromFloats", + "key": "GetMaxSurfaceWeight", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Is Hole From Floats" + "tooltip": "When signaled, this will invoke Get Max Surface Weight" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Is Hole From Floats is invoked" + "tooltip": "Signaled after Get Max Surface Weight is invoked" }, "details": { - "name": "Get Is Hole From Floats" + "name": "Get Max Surface Weight" }, "params": [ { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "X" + "name": "Position" } }, { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Y" + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" } }, { - "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "Sample Filter", - "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + "name": "Terrain Exists" } } ], "results": [ { - "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", "details": { - "name": "Is Hole" + "name": "Surface Tag Weight" } } ] }, { - "key": "GetHeightFromFloats", + "key": "GetSurfacePointFromVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Height From Floats" + "tooltip": "When signaled, this will invoke Get Surface Point From Vector2" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Height From Floats is invoked" + "tooltip": "Signaled after Get Surface Point From Vector2 is invoked" }, "details": { - "name": "Get Height From Floats" + "name": "Get Surface Point From Vector2" }, "params": [ { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "X" + "name": "Position" } }, { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", "details": { - "name": "Y" + "name": "Surface Point" } }, { @@ -205,28 +215,42 @@ "name": "Terrain Exists" } } - ], + ] + }, + { + "key": "GetTerrainHeightQueryResolution", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Terrain Height Query Resolution" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Terrain Height Query Resolution is invoked" + }, + "details": { + "name": "Get Terrain Height Query Resolution" + }, "results": [ { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Height" + "name": "Position" } } ] }, { - "key": "GetMaxSurfaceWeight", + "key": "GetNormal", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetMaxSurfaceWeight" + "tooltip": "When signaled, this will invoke Get Normal" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetMaxSurfaceWeight is invoked" + "tooltip": "Signaled after Get Normal is invoked" }, "details": { - "name": "Get Max Surface Weight" + "name": "Get Normal" }, "params": [ { @@ -251,37 +275,31 @@ ], "results": [ { - "typeid": "{EA14018E-E853-4BF5-8E13-D83BB99A54CC}", + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Surface Tag Weight" + "name": "Normal" } } ] }, { - "key": "GetMaxSurfaceWeightFromFloats", + "key": "GetMaxSurfaceWeightFromVector2", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Max Surface Weight From Floats" + "tooltip": "When signaled, this will invoke Get Max Surface Weight From Vector2" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Max Surface Weight From Floats is invoked" + "tooltip": "Signaled after Get Max Surface Weight From Vector2 is invoked" }, "details": { - "name": "Get Max Surface Weight From Floats" + "name": "Get Max Surface Weight From Vector2" }, "params": [ { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", - "details": { - "name": "X" - } - }, - { - "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Y" + "name": "Position" } }, { @@ -308,23 +326,23 @@ ] }, { - "key": "GetTerrainHeightQueryResolution", + "key": "GetTerrainAabb", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Terrain Height Query Resolution" + "tooltip": "When signaled, this will invoke Get Terrain AABB" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Terrain Height Query Resolution is invoked" + "tooltip": "Signaled after Get Terrain AABB is invoked" }, "details": { - "name": "Get Terrain Height Query Resolution" + "name": "Get Terrain AABB" }, "results": [ { - "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", + "typeid": "{A54C2B36-D5B8-46A1-A529-4EBDBD2450E7}", "details": { - "name": "Resolution" + "name": "AABB" } } ] @@ -371,6 +389,47 @@ } } ] + }, + { + "key": "GetSurfacePoint", + "entry": { + "name": "In", + "tooltip": "When signaled, this will invoke Get Surface Point" + }, + "exit": { + "name": "Out", + "tooltip": "Signaled after Get Surface Point is invoked" + }, + "details": { + "name": "Get Surface Point" + }, + "params": [ + { + "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", + "details": { + "name": "Position" + } + }, + { + "typeid": "{331A3D0E-BB1D-47BF-96A2-249FAA0D720D}", + "details": { + "name": "Surface Point" + } + }, + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Sample Filter", + "tooltip": "0: Bilinear, 1: Clamp, 2: Exact" + } + }, + { + "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", + "details": { + "name": "Terrain Exists" + } + } + ] } ] } diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TickRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TickRequestBus.names index 869d2cfcfb..414e66e411 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TickRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TickRequestBus.names @@ -5,8 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "TickRequestBus", - "category": "Timing" + "name": "Tick" }, "methods": [ { @@ -20,14 +19,13 @@ "tooltip": "Signaled after Get Tick Delta Time is invoked" }, "details": { - "name": "Get Tick Delta Time", - "tooltip": "Gets the latest time between ticks" + "name": "Get Tick Delta Time" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Delta Time" } } ] @@ -36,21 +34,20 @@ "key": "GetTimeAtCurrentTick", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Time at Current Tick" + "tooltip": "When signaled, this will invoke Get Time At Current Tick" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Time at Current Tick is invoked" + "tooltip": "Signaled after Get Time At Current Tick is invoked" }, "details": { - "name": "Get Time at Current Tick", - "tooltip": "Gets the time in seconds since the epoch (January 1, 1970)" + "name": "Get Time At Current Tick" }, "results": [ { "typeid": "{4C0F6AD4-0D4F-4354-AD4A-0C01E948245C}", "details": { - "name": "ScriptTimePoint" + "name": "Script Time Point" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TransformBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TransformBus.names index 29c14f4961..9ee4d4d58f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TransformBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/TransformBus.names @@ -5,7 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "TransformBus", + "name": "Transform", "category": "Entity" }, "methods": [ @@ -13,20 +13,20 @@ "key": "SetLocalUniformScale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetLocalUniformScale" + "tooltip": "When signaled, this will invoke Set Local Uniform Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetLocalUniformScale is invoked" + "tooltip": "Signaled after Set Local Uniform Scale is invoked" }, "details": { - "name": "SetLocalUniformScale" + "name": "Set Local Uniform Scale" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Local Uniform Scale" } } ] @@ -42,15 +42,13 @@ "tooltip": "Signaled after Set Local Rotation Quaternion is invoked" }, "details": { - "name": "Set Local Rotation Quaternion", - "tooltip": "Sets the entity's rotation in local space using a quaternion" + "name": "Set Local Rotation Quaternion" }, "params": [ { "typeid": "{73103120-3DD3-4873-BAB3-9713FA2804FB}", "details": { - "name": "Rotation", - "tooltip": "The quaternion to rotate around" + "name": "Quaternion" } } ] @@ -66,14 +64,13 @@ "tooltip": "Signaled after Get Local Rotation is invoked" }, "details": { - "name": "Get Local Rotation", - "tooltip": "Gets the entity's rotation in radians in local space" + "name": "Get Local Rotation" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Angles (Radians)" } } ] @@ -105,21 +102,20 @@ "key": "GetEntityAndAllDescendants", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Entity and Descendants" + "tooltip": "When signaled, this will invoke Get Entity And All Descendants" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Entity and Descendants is invoked" + "tooltip": "Signaled after Get Entity And All Descendants is invoked" }, "details": { - "name": "Get Entity and Descendants", - "tooltip": "Returns the EntityID of the entity, the entity's children, the children's children, and so on" + "name": "Get Entity And All Descendants" }, "results": [ { "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", "details": { - "name": "AZStd::vector" + "name": "Entity and Descendants" } } ] @@ -135,15 +131,13 @@ "tooltip": "Signaled after Set Local Z is invoked" }, "details": { - "name": "Set Local Z", - "tooltip": "Gets the entity's Z coordinate in local space" + "name": "Set Local Z" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Z Translation", - "tooltip": "The entity's Z coordinate in local space" + "name": "Z" } } ] @@ -152,21 +146,20 @@ "key": "GetAllDescendants", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Descendants" + "tooltip": "When signaled, this will invoke Get All Descendants" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Descendants is invoked" + "tooltip": "Signaled after Get All Descendants is invoked" }, "details": { - "name": "Get Descendants", - "tooltip": "Returns the entity's children, the children's children, and so on" + "name": "Get All Descendants" }, "results": [ { "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", "details": { - "name": "AZStd::vector" + "name": "Descendants" } } ] @@ -175,29 +168,26 @@ "key": "GetLocalAndWorld", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Local and World" + "tooltip": "When signaled, this will invoke Get Local And World" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Local and World is invoked" + "tooltip": "Signaled after Get Local And World is invoked" }, "details": { - "name": "Get Local and World", - "tooltip": "Retrieves the entity's local and world transforms" + "name": "Get Local And World Transforms" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Local Transform", - "tooltip": "A reference to a transform that represents the entity's position relative to its parent entity" + "name": "Local" } }, { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Global Transform", - "tooltip": "A reference to a transform that represents the entity's position within the world" + "name": "World" } } ] @@ -213,15 +203,13 @@ "tooltip": "Signaled after Rotate Around Local Z is invoked" }, "details": { - "name": "Rotate Around Local Z", - "tooltip": "Rotates the entity around the Z axis in local space" + "name": "Rotate Around Local Z" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Z Rotation", - "tooltip": "The angle, in radians, to rotate the entity around the Z axis in local space" + "name": "Angle (Radians)" } } ] @@ -237,8 +225,7 @@ "tooltip": "Signaled after Get World Rotation Quaternion is invoked" }, "details": { - "name": "Get World Rotation Quaternion", - "tooltip": "Gets the entity's rotation in quaternion in world space" + "name": "Get World Rotation Quaternion" }, "results": [ { @@ -260,15 +247,13 @@ "tooltip": "Signaled after Rotate Around Local X is invoked" }, "details": { - "name": "Rotate Around Local X", - "tooltip": "Rotates the entity around the X axis in local space" + "name": "Rotate Around Local X" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "X Rotation", - "tooltip": "The angle, in radians, to rotate the entity around the X axis in local space" + "name": "Angle (Radians)" } } ] @@ -284,15 +269,14 @@ "tooltip": "Signaled after Set Parent is invoked" }, "details": { - "name": "Set Parent", - "tooltip": "Sets the entity's parent entity" + "name": "Set Parent" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { "name": "Parent", - "tooltip": "The ID of the entity to set as the parent" + "tooltip": "Entity Unique Id" } } ] @@ -308,14 +292,13 @@ "tooltip": "Signaled after Get Local Z is invoked" }, "details": { - "name": "Get Local Z", - "tooltip": "Gets the entity's Z coordinate in local space" + "name": "Get Local Z" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Z" } } ] @@ -328,18 +311,16 @@ }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Local Rotation is invoked" + "tooltip": "Signaled after SetLocalRotation is invoked" }, "details": { - "name": "Set Local Rotation", - "tooltip": "Sets the entity's rotation in local space using a composition of rotations around the three axes" + "name": "Set Local Rotation" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Rotation", - "tooltip": "A three-dimensional vector, containing Euler angles in radians, that specifies a rotation around each axis" + "name": "Euler Angles (Radians)" } } ] @@ -355,15 +336,13 @@ "tooltip": "Signaled after Set Local X is invoked" }, "details": { - "name": "Set Local X", - "tooltip": "Sets the entity's X coordinate in local space" + "name": "Set Local X" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "X Translation", - "tooltip": "A new value for the entity's X coordinate in local space" + "name": "X" } } ] @@ -379,8 +358,7 @@ "tooltip": "Signaled after Get Local Rotation Quaternion is invoked" }, "details": { - "name": "Get Local Rotation Quaternion", - "tooltip": "Gets the quaternion representing the entity's rotation in local space" + "name": "Get Local Rotation Quaternion" }, "results": [ { @@ -402,14 +380,13 @@ "tooltip": "Signaled after Get World X is invoked" }, "details": { - "name": "Get World X", - "tooltip": "Gets the entity's X coordinate in world space" + "name": "Get World X" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "X" } } ] @@ -425,15 +402,13 @@ "tooltip": "Signaled after Set World Translation is invoked" }, "details": { - "name": "Set World Translation", - "tooltip": "Sets the entity's world space translation, which represents how to move the entity to a new position within the world" + "name": "Set World Translation" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation", - "tooltip": "A three-dimensional translation vector" + "name": "World Translation" } } ] @@ -449,15 +424,13 @@ "tooltip": "Signaled after Move Entity is invoked" }, "details": { - "name": "Move Entity", - "tooltip": "Moves the entity within world space" + "name": "Move Entity" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Direction", - "tooltip": "A three-dimensional vector that contains the offset to apply to the entity" + "name": "Offset" } } ] @@ -473,14 +446,13 @@ "tooltip": "Signaled after Get Children is invoked" }, "details": { - "name": "Get Children", - "tooltip": "Returns the EntityIDs of the entity's immediate children" + "name": "Get Children" }, "results": [ { "typeid": "{4841CFF0-7A5C-519C-BD16-D3625E99605E}", "details": { - "name": "AZStd::vector" + "name": "Children" } } ] @@ -496,15 +468,14 @@ "tooltip": "Signaled after Set Parent Relative is invoked" }, "details": { - "name": "Set Parent Relative", - "tooltip": "Sets the entity's parent entity, moves the transform relative to the parent entity, and notifies all listeners" + "name": "Set Parent Relative" }, "params": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { "name": "Parent", - "tooltip": "The ID of the entity to set as the parent" + "tooltip": "Entity Unique Id" } } ] @@ -520,15 +491,13 @@ "tooltip": "Signaled after Set World Transform is invoked" }, "details": { - "name": "Set World Transform", - "tooltip": "Sets the world transform and notifies all listeners" + "name": "Set World Transform" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Transform", - "tooltip": "A reference to a transform for positioning the entity within the world" + "name": "Transform" } } ] @@ -537,14 +506,14 @@ "key": "SetWorldRotationQuaternion", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetWorldRotationQuaternion" + "tooltip": "When signaled, this will invoke Set World Rotation Quaternion" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetWorldRotationQuaternion is invoked" + "tooltip": "Signaled after Set World Rotation Quaternion is invoked" }, "details": { - "name": "SetWorldRotationQuaternion" + "name": "Set World Rotation Quaternion" }, "params": [ { @@ -566,15 +535,13 @@ "tooltip": "Signaled after Set World X is invoked" }, "details": { - "name": "Set World X", - "tooltip": "Sets the entity's X coordinate in world space" + "name": "Set World X" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "X Translation", - "tooltip": "A new value for the entity's X coordinate in world space" + "name": "X" } } ] @@ -590,14 +557,13 @@ "tooltip": "Signaled after Get World Y is invoked" }, "details": { - "name": "Get World Y", - "tooltip": "Gets the entity's Y coordinate in world space" + "name": "Get World Y" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Y" } } ] @@ -606,20 +572,20 @@ "key": "GetLocalUniformScale", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetLocalUniformScale" + "tooltip": "When signaled, this will invoke Get Local Uniform Scale" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetLocalUniformScale is invoked" + "tooltip": "Signaled after Get Local Uniform Scale is invoked" }, "details": { - "name": "GetLocalUniformScale" + "name": "Get Local Uniform Scale" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Uniform Scale" } } ] @@ -635,15 +601,13 @@ "tooltip": "Signaled after Set World Z is invoked" }, "details": { - "name": "Set World Z", - "tooltip": "Sets the entity's Z coordinate in world space" + "name": "Set World Z" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Z Translation", - "tooltip": "A new value for the entity's Z coordinate in world space" + "name": "Z" } } ] @@ -659,15 +623,13 @@ "tooltip": "Signaled after Set Local Transform is invoked" }, "details": { - "name": "Set Local Transform", - "tooltip": "Sets the entity's local transform and notifies all listeners" + "name": "Set Local Transform" }, "params": [ { "typeid": "{5D9958E9-9F1E-4985-B532-FFFDE75FEDFD}", "details": { - "name": "Transform", - "tooltip": "A reference to a transform for positioning the entity relative to its parent entity" + "name": "Transform" } } ] @@ -683,15 +645,13 @@ "tooltip": "Signaled after Set Local Translation is invoked" }, "details": { - "name": "Set Local Translation", - "tooltip": "Sets the entity's local space translation, which represents how to move the entity to a new position relative to its parent" + "name": "Set Local Translation" }, "params": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Translation", - "tooltip": "A three-dimensional translation vector" + "name": "Translation" } } ] @@ -707,14 +667,13 @@ "tooltip": "Signaled after Get Local Scale is invoked" }, "details": { - "name": "Get Local Scale", - "tooltip": "Gets the scale of the entity along each axis in local space" + "name": "Get Local Scale" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Scale" } } ] @@ -730,15 +689,13 @@ "tooltip": "Signaled after Set World Y is invoked" }, "details": { - "name": "Set World Y", - "tooltip": "Sets the entity's Y coordinate in world space" + "name": "Set World Y" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Y Translation", - "tooltip": "A new value for the entity's Y coordinate in world space" + "name": "Y" } } ] @@ -754,15 +711,13 @@ "tooltip": "Signaled after Rotate Around Local Y is invoked" }, "details": { - "name": "Rotate Around Local Y", - "tooltip": "Rotates the entity around the Y axis in local space" + "name": "Rotate Around Local Y" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Y Rotation", - "tooltip": "The angle, in radians, to rotate the entity around the Y axis in local space" + "name": "Euler Angle (Radians)" } } ] @@ -778,14 +733,13 @@ "tooltip": "Signaled after Get Local Translation is invoked" }, "details": { - "name": "Get Local Translation", - "tooltip": "Gets the entity's local space translation" + "name": "Get Local Translation" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Translation" } } ] @@ -801,14 +755,14 @@ "tooltip": "Signaled after Get World Rotation is invoked" }, "details": { - "name": "Get World Rotation", - "tooltip": "Gets the entity's rotation in radians in world space" + "name": "Get World Rotation" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Euler Angles (Radians)", + "tooltip": "Euler angles (Pitch, Yaw, Roll), in radians" } } ] @@ -824,14 +778,13 @@ "tooltip": "Signaled after Get World Z is invoked" }, "details": { - "name": "Get World Z", - "tooltip": "Gets the entity's Z coordinate in world space" + "name": "Get World Z" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Z" } } ] @@ -847,14 +800,13 @@ "tooltip": "Signaled after Get Local Y is invoked" }, "details": { - "name": "Get Local Y", - "tooltip": "Gets the entity's Y coordinate in local space" + "name": "Get Local Y" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "Y" } } ] @@ -870,14 +822,13 @@ "tooltip": "Signaled after Get World Translation is invoked" }, "details": { - "name": "Get World Translation", - "tooltip": "Gets the entity's world space translation" + "name": "Get World Translation" }, "results": [ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Translation" } } ] @@ -893,15 +844,13 @@ "tooltip": "Signaled after Set Local Y is invoked" }, "details": { - "name": "Set Local Y", - "tooltip": "Sets the entity's Y coordinate in local space" + "name": "Set Local Y" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Y Position", - "tooltip": "A new value for the entity's Y coordinate in local space" + "name": "Y" } } ] @@ -917,14 +866,13 @@ "tooltip": "Signaled after Get Local X is invoked" }, "details": { - "name": "Get Local X", - "tooltip": "Gets the entity's X coordinate in local space" + "name": "Get Local X" }, "results": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "float" + "name": "X" } } ] @@ -940,8 +888,7 @@ "tooltip": "Signaled after Get World Transform is invoked" }, "details": { - "name": "Get World Transform", - "tooltip": "Returns the entity's world transform, including the parent transform" + "name": "Get World Transform" }, "results": [ { @@ -956,21 +903,20 @@ "key": "GetParentId", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Parent ID" + "tooltip": "When signaled, this will invoke Get Parent Id" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Parent ID is invoked" + "tooltip": "Signaled after Get Parent Id is invoked" }, "details": { - "name": "Get Parent ID", - "tooltip": "Returns the EntityID of the entity's parent" + "name": "Get Parent Id" }, "results": [ { "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", "details": { - "name": "EntityId", + "name": "Parent Id", "tooltip": "Entity Unique Id" } } @@ -980,21 +926,20 @@ "key": "IsStaticTransform", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Is Static" + "tooltip": "When signaled, this will invoke Is Static Transform" }, "exit": { "name": "Out", - "tooltip": "Signaled after Is Static is invoked" + "tooltip": "Signaled after Is Static Transform is invoked" }, "details": { - "name": "Is Static", - "tooltip": "Returns whether the transform is static" + "name": "Is Static Transform" }, "results": [ { "typeid": "{A0CA880C-AFE4-43CB-926C-59AC48496112}", "details": { - "name": "bool" + "name": "Is Static Transform" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransformBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransformBus.names index 6628f2c84c..a0df1276cc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransformBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/UiTransformBus.names @@ -5,23 +5,21 @@ "context": "EBusSender", "variant": "", "details": { - "name": "UiTransformBus", - "category": "UI" + "name": "Ui Transform Bus" }, "methods": [ { "key": "GetPivotY", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Pivot Y" + "tooltip": "When signaled, this will invoke Get PivotY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Pivot Y is invoked" + "tooltip": "Signaled after Get PivotY is invoked" }, "details": { - "name": "Get Pivot Y", - "tooltip": "Gets the Y value of the pivot point" + "name": "Get PivotY" }, "results": [ { @@ -36,15 +34,14 @@ "key": "GetScaleX", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Scale X" + "tooltip": "When signaled, this will invoke Get ScaleX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Scale X is invoked" + "tooltip": "Signaled after Get ScaleX is invoked" }, "details": { - "name": "Get Scale X", - "tooltip": "Gets the X value of the scale" + "name": "Get ScaleX" }, "results": [ { @@ -66,14 +63,13 @@ "tooltip": "Signaled after Get Scale is invoked" }, "details": { - "name": "Get Scale", - "tooltip": "Gets the scale" + "name": "Get Scale" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Vector 2" } } ] @@ -82,22 +78,20 @@ "key": "SetLocalPositionX", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Local Position X" + "tooltip": "When signaled, this will invoke Set Local PositionX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Local Position X is invoked" + "tooltip": "Signaled after Set Local PositionX is invoked" }, "details": { - "name": "Set Local Position X", - "tooltip": "Sets the X position of the element relative to the center of the element's anchors" + "name": "Set Local PositionX" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "X Local Position", - "tooltip": "The X position of the element relative to the center of the element's anchors" + "name": "float" } } ] @@ -106,22 +100,20 @@ "key": "SetScaleX", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Scale X" + "tooltip": "When signaled, this will invoke Set ScaleX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Scale X is invoked" + "tooltip": "Signaled after Set ScaleX is invoked" }, "details": { - "name": "Set Scale X", - "tooltip": "Sets the X value of the scale" + "name": "Set ScaleX" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "X Scale", - "tooltip": "The X value of the scale" + "name": "float" } } ] @@ -130,22 +122,20 @@ "key": "SetZRotation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Z Rotation" + "tooltip": "When signaled, this will invoke SetZ Rotation" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Z Rotation is invoked" + "tooltip": "Signaled after SetZ Rotation is invoked" }, "details": { - "name": "Set Z Rotation", - "tooltip": "Sets the rotation about the z-axis" + "name": "SetZ Rotation" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Z Rotation", - "tooltip": "The rotation about the z-axis" + "name": "float" } } ] @@ -161,8 +151,7 @@ "tooltip": "Signaled after Get Scale To Device Mode is invoked" }, "details": { - "name": "Get Scale To Device Mode", - "tooltip": "Returns how the element and all its children are scaled to allow for the difference between the authored canvas size and the actual viewport size" + "name": "Get Scale To Device Mode" }, "results": [ { @@ -184,15 +173,13 @@ "tooltip": "Signaled after Set Pivot is invoked" }, "details": { - "name": "Set Pivot", - "tooltip": "Sets the pivot point" + "name": "Set Pivot" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Pivot", - "tooltip": "The pivot point" + "name": "Vector 2" } } ] @@ -201,15 +188,14 @@ "key": "GetScaleY", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Scale Y" + "tooltip": "When signaled, this will invoke Get ScaleY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Scale Y is invoked" + "tooltip": "Signaled after Get ScaleY is invoked" }, "details": { - "name": "Get Scale Y", - "tooltip": "Gets the Y value of the scale" + "name": "Get ScaleY" }, "results": [ { @@ -231,15 +217,13 @@ "tooltip": "Signaled after Move Local Position By is invoked" }, "details": { - "name": "Move Local Position By", - "tooltip": "Moves the element relative to the center of the element's anchors" + "name": "Move Local Position By" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Offset", - "tooltip": "The amount to move the local position" + "name": "Vector 2" } } ] @@ -248,22 +232,20 @@ "key": "SetLocalPositionY", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Local Position Y" + "tooltip": "When signaled, this will invoke Set Local PositionY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Local Position Y is invoked" + "tooltip": "Signaled after Set Local PositionY is invoked" }, "details": { - "name": "Set Local Position Y", - "tooltip": "Sets the Y position of the element relative to the center of the element's anchors" + "name": "Set Local PositionY" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Y Local Position", - "tooltip": "The Y position of the element relative to the center of the element's anchors" + "name": "float" } } ] @@ -279,15 +261,13 @@ "tooltip": "Signaled after Set Viewport Position is invoked" }, "details": { - "name": "Set Viewport Position", - "tooltip": "Sets the position of the element in viewport space" + "name": "Set Viewport Position" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Position", - "tooltip": "The position of the element in viewport space" + "name": "Vector 2" } } ] @@ -303,15 +283,13 @@ "tooltip": "Signaled after Set Scale To Device Mode is invoked" }, "details": { - "name": "Set Scale To Device Mode", - "tooltip": "Sets how the element and all its children should be scaled to allow for the difference between the authored canvas size and the actual viewport size" + "name": "Set Scale To Device Mode" }, "params": [ { "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", "details": { - "name": "Scale to Device Mode", - "tooltip": "Indicates how the element and all its children are scaled to allow for the difference between the authored canvas size and the actual viewport size (0=None, 1=Scale to fit (uniformly), 2=Scale to fill (uniformly), 3=Scale to fit X (uniformly), 4=Scale to fit Y (uniformly), 5=Stretch to fill (non-uniformly), 6=Stretch to fit X (non-uniformly), 7=Stretch to fit Y (non-uniformly))" + "name": "int" } } ] @@ -320,15 +298,14 @@ "key": "GetLocalPositionX", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Local Position X" + "tooltip": "When signaled, this will invoke Get Local PositionX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Local Position X is invoked" + "tooltip": "Signaled after Get Local PositionX is invoked" }, "details": { - "name": "Get Local Position X", - "tooltip": "Gets the X position of the element relative to the center of the element's anchors" + "name": "Get Local PositionX" }, "results": [ { @@ -350,15 +327,13 @@ "tooltip": "Signaled after Move Canvas Position By is invoked" }, "details": { - "name": "Move Canvas Position By", - "tooltip": "Moves the element in canvas space" + "name": "Move Canvas Position By" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Offset", - "tooltip": "The amount to move the canvas position" + "name": "Vector 2" } } ] @@ -367,22 +342,20 @@ "key": "SetPivotX", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Pivot X" + "tooltip": "When signaled, this will invoke Set PivotX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Pivot X is invoked" + "tooltip": "Signaled after Set PivotX is invoked" }, "details": { - "name": "Set Pivot X", - "tooltip": "Sets the X value of the pivot point" + "name": "Set PivotX" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "X Pivot", - "tooltip": "The X value of the pivot point" + "name": "float" } } ] @@ -398,15 +371,13 @@ "tooltip": "Signaled after Move Viewport Position By is invoked" }, "details": { - "name": "Move Viewport Position By", - "tooltip": "Moves the element in viewport space" + "name": "Move Viewport Position By" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Offset", - "tooltip": "The amount to move the viewport position" + "name": "Vector 2" } } ] @@ -415,22 +386,20 @@ "key": "SetPivotY", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Pivot Y" + "tooltip": "When signaled, this will invoke Set PivotY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Pivot Y is invoked" + "tooltip": "Signaled after Set PivotY is invoked" }, "details": { - "name": "Set Pivot Y", - "tooltip": "Sets the Y value of the pivot point" + "name": "Set PivotY" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Y Pivot", - "tooltip": "The Y value of the pivot point" + "name": "float" } } ] @@ -446,14 +415,13 @@ "tooltip": "Signaled after Get Viewport Position is invoked" }, "details": { - "name": "Get Viewport Position", - "tooltip": "Gets the position of the element in viewport space" + "name": "Get Viewport Position" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Vector 2" } } ] @@ -469,15 +437,13 @@ "tooltip": "Signaled after Set Scale is invoked" }, "details": { - "name": "Set Scale", - "tooltip": "Sets the scale" + "name": "Set Scale" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Scale", - "tooltip": "The scale" + "name": "Vector 2" } } ] @@ -493,15 +459,13 @@ "tooltip": "Signaled after Set Local Position is invoked" }, "details": { - "name": "Set Local Position", - "tooltip": "Sets the position of the element relative to the center of the element's anchors" + "name": "Set Local Position" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Local Position", - "tooltip": "The position of the element relative to the center of the element's anchors" + "name": "Vector 2" } } ] @@ -517,14 +481,13 @@ "tooltip": "Signaled after Get Canvas Position is invoked" }, "details": { - "name": "Get Canvas Position", - "tooltip": "Gets the position of the element in canvas space" + "name": "Get Canvas Position" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Vector 2" } } ] @@ -533,15 +496,14 @@ "key": "GetPivotX", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Pivot X" + "tooltip": "When signaled, this will invoke Get PivotX" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Pivot X is invoked" + "tooltip": "Signaled after Get PivotX is invoked" }, "details": { - "name": "Get Pivot X", - "tooltip": "Gets the X value of the pivot point" + "name": "Get PivotX" }, "results": [ { @@ -556,15 +518,14 @@ "key": "GetZRotation", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Z Rotation" + "tooltip": "When signaled, this will invoke GetZ Rotation" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Z Rotation is invoked" + "tooltip": "Signaled after GetZ Rotation is invoked" }, "details": { - "name": "Get Z Rotation", - "tooltip": "Gets the rotation about the z-axis" + "name": "GetZ Rotation" }, "results": [ { @@ -586,14 +547,13 @@ "tooltip": "Signaled after Get Local Position is invoked" }, "details": { - "name": "Get Local Position", - "tooltip": "Gets the position of the element relative to the center of the element's anchors" + "name": "Get Local Position" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Vector 2" } } ] @@ -602,22 +562,20 @@ "key": "SetScaleY", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Set Scale Y" + "tooltip": "When signaled, this will invoke Set ScaleY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Set Scale Y is invoked" + "tooltip": "Signaled after Set ScaleY is invoked" }, "details": { - "name": "Set Scale Y", - "tooltip": "Sets the Y value of the scale" + "name": "Set ScaleY" }, "params": [ { "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", "details": { - "name": "Y Scale", - "tooltip": "The Y value of the scale" + "name": "float" } } ] @@ -633,14 +591,13 @@ "tooltip": "Signaled after Get Pivot is invoked" }, "details": { - "name": "Get Pivot", - "tooltip": "Gets the pivot point" + "name": "Get Pivot" }, "results": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Vector2" + "name": "Vector 2" } } ] @@ -656,15 +613,13 @@ "tooltip": "Signaled after Set Canvas Position is invoked" }, "details": { - "name": "Set Canvas Position", - "tooltip": "Sets the position of the element in canvas space" + "name": "Set Canvas Position" }, "params": [ { "typeid": "{3D80F623-C85C-4741-90D0-E4E66164E6BF}", "details": { - "name": "Position", - "tooltip": "The position of the element in canvas space" + "name": "Vector 2" } } ] @@ -673,15 +628,14 @@ "key": "GetLocalPositionY", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke Get Local Position Y" + "tooltip": "When signaled, this will invoke Get Local PositionY" }, "exit": { "name": "Out", - "tooltip": "Signaled after Get Local Position Y is invoked" + "tooltip": "Signaled after Get Local PositionY is invoked" }, "details": { - "name": "Get Local Position Y", - "tooltip": "Gets the Y position of the element relative to the center of the element's anchors" + "name": "Get Local PositionY" }, "results": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ViewportRequestBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ViewportRequestBus.names index 56ea2c0882..d555b4def6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ViewportRequestBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/ViewportRequestBus.names @@ -5,21 +5,22 @@ "context": "EBusSender", "variant": "", "details": { - "name": "ViewportRequestBus" + "name": "Viewport", + "category": "Rendering" }, "methods": [ { "key": "SetCameraTransform", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCameraTransform" + "tooltip": "When signaled, this will invoke Set Camera Transform" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCameraTransform is invoked" + "tooltip": "Signaled after Set Camera Transform is invoked" }, "details": { - "name": "SetCameraTransform" + "name": "Set Camera Transform" }, "params": [ { @@ -34,20 +35,20 @@ "key": "GetCameraProjectionMatrix", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCameraProjectionMatrix" + "tooltip": "When signaled, this will invoke Get Camera Projection Matrix" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCameraProjectionMatrix is invoked" + "tooltip": "Signaled after Get Camera Projection Matrix is invoked" }, "details": { - "name": "GetCameraProjectionMatrix" + "name": "Get Camera Projection Matrix" }, "results": [ { "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", "details": { - "name": "Matrix4x4" + "name": "Matrix 4x 4" } } ] @@ -56,20 +57,20 @@ "key": "SetCameraViewMatrix", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCameraViewMatrix" + "tooltip": "When signaled, this will invoke Set Camera View Matrix" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCameraViewMatrix is invoked" + "tooltip": "Signaled after Set Camera View Matrix is invoked" }, "details": { - "name": "SetCameraViewMatrix" + "name": "Set Camera View Matrix" }, "params": [ { "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", "details": { - "name": "Matrix4x4" + "name": "Matrix 4x 4" } } ] @@ -78,20 +79,20 @@ "key": "GetCameraViewMatrix", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCameraViewMatrix" + "tooltip": "When signaled, this will invoke Get Camera View Matrix" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCameraViewMatrix is invoked" + "tooltip": "Signaled after Get Camera View Matrix is invoked" }, "details": { - "name": "GetCameraViewMatrix" + "name": "Get Camera View Matrix" }, "results": [ { "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", "details": { - "name": "Matrix4x4" + "name": "Matrix 4x 4" } } ] @@ -100,20 +101,20 @@ "key": "SetCameraProjectionMatrix", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke SetCameraProjectionMatrix" + "tooltip": "When signaled, this will invoke Set Camera Projection Matrix" }, "exit": { "name": "Out", - "tooltip": "Signaled after SetCameraProjectionMatrix is invoked" + "tooltip": "Signaled after Set Camera Projection Matrix is invoked" }, "details": { - "name": "SetCameraProjectionMatrix" + "name": "Set Camera Projection Matrix" }, "params": [ { "typeid": "{157193C7-B673-4A2B-8B43-5681DCC3DEC3}", "details": { - "name": "Matrix4x4" + "name": "Matrix 4x 4" } } ] @@ -122,14 +123,14 @@ "key": "GetCameraTransform", "entry": { "name": "In", - "tooltip": "When signaled, this will invoke GetCameraTransform" + "tooltip": "When signaled, this will invoke Get Camera Transform" }, "exit": { "name": "Out", - "tooltip": "Signaled after GetCameraTransform is invoked" + "tooltip": "Signaled after Get Camera Transform is invoked" }, "details": { - "name": "GetCameraTransform" + "name": "Get Camera Transform" }, "results": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/WindRequestsBus.names b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/WindRequestsBus.names index ed7d56a8bb..3102c94ffb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/WindRequestsBus.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/EBus/Senders/WindRequestsBus.names @@ -5,8 +5,7 @@ "context": "EBusSender", "variant": "", "details": { - "name": "WindRequestsBus", - "category": "PhysX" + "name": "Wind" }, "methods": [ { @@ -26,7 +25,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Global Wind Direction" } } ] @@ -56,7 +55,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Wind Direction" } } ] @@ -86,7 +85,7 @@ { "typeid": "{8379EB7D-01FA-4538-B64B-A6543B4BE73D}", "details": { - "name": "Vector3" + "name": "Wind Direction" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names index 5890324a1a..a2761b6317 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Containers_ForEach.names @@ -7,8 +7,7 @@ "details": { "name": "For Each", "category": "Containers", - "tooltip": "Node for iterating through a container", - "subtitle": "Containers" + "tooltip": "Node for iterating through a container" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names index 7830b046f7..3b3b996f45 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityForward.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetEntityForward", + "name": "Get Entity Forward", "category": "Entity/Entity", - "tooltip": "returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)", - "subtitle": "Entity" + "tooltip": "Returns the forward direction vector from the specified entity' world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_EntityID: EntityId", + "key": "DataInput_EntityId", "details": { - "name": "EntityID: EntityId" + "name": "EntityId" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names index 9e990f6214..f2888839db 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityRight.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetEntityRight", + "name": "Get Entity Right", "category": "Entity/Entity", - "tooltip": "returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)", - "subtitle": "Entity" + "tooltip": "Returns the right direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_EntityID: EntityId", + "key": "DataInput_EntityId", "details": { - "name": "EntityID: EntityId" + "name": "EntityId" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names index b9e6261532..d42ab7e908 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_GetEntityUp.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetEntityUp", + "name": "Get Entity Up", "category": "Entity/Entity", - "tooltip": "returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)", - "subtitle": "Entity" + "tooltip": "Returns the up direction vector from the specified entity's world transform, scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_EntityID: EntityId", + "key": "DataInput_EntityId", "details": { - "name": "EntityID: EntityId" + "name": "EntityId" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names index 4ae41d7b6d..f43c9385e7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsActive.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsActive", + "name": "Is Active", "category": "Entity/Entity", - "tooltip": "returns true if entity with the provided Id is valid and active.", - "subtitle": "Entity" + "tooltip": "Returns true if entity with the provided Id is valid and active." }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_EntityID: Entity Id", + "key": "DataInput_Entity Id", "details": { - "name": "EntityID: Entity Id" + "name": "Entity Id" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names index 67ca271f59..19d8fab52e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_IsValid.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsValid", + "name": "Is Valid", "category": "Entity/Entity", - "tooltip": "returns true if Source is valid, else false", - "subtitle": "Entity" + "tooltip": "Returns true if Source is valid, else false" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_EntityID: Source", + "key": "DataInput_Source", "details": { - "name": "EntityID: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names index f8048d0839..2d9f1e3c77 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/EntityEntity_ToString.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToString", + "name": "To String", "category": "Entity/Entity", - "tooltip": "returns a string representation of Source", - "subtitle": "Entity" + "tooltip": "Returns a string representation of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_EntityID: Source", + "key": "DataInput_Source", "details": { - "name": "EntityID: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: String", + "key": "DataOutput_Result", "details": { - "name": "Result: String" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names index 3d8d866497..3c875880c4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Input_InputHandler.names @@ -5,8 +5,8 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "InputHandler", - "category": "Input", + "name": "Input Handler", + "category": "Input/Input System", "tooltip": "Handle processed input events found in input binding assets" }, "slots": [ diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names index f6ef7768dd..0b5c5f26ea 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddAABB.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "AddAABB", - "category": "Math/AABB", + "name": "Add Axis Aligned Bounding Boxes", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB that is the (min(min(A), min(B)), max(max(A), max(B)))", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: A", "details": { - "name": "AABB: A" + "name": "First" } }, { "key": "DataInput_AABB: B", "details": { - "name": "AABB: B" + "name": "Second" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names index 3745892662..e22bafcc60 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_AddPoint.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "AddPoint", - "category": "Math/AABB", + "name": "Add Point", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB that is the (min(min(Source), Point), max(max(Source), Point))", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataInput_Vector3: Point", "details": { - "name": "Vector3: Point" + "name": "Point" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names index b7ced59374..ad01a37239 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ApplyTransform.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ApplyTransform", - "category": "Math/AABB", + "name": "Apply Transform", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB translated and possibly scaled by the Transform", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataInput_Transform: Transform", "details": { - "name": "Transform: Transform" + "name": "Transform" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names index bc2c86049e..5f3fe027f2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Center.names @@ -6,9 +6,9 @@ "variant": "", "details": { "name": "Center", - "category": "Math/AABB", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the center of Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,13 +26,13 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataOutput_Result: Vector3", "details": { - "name": "Result: Vector3" + "name": "Center" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names index 3d0c00daf6..0e7ee2c5bf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Clamp.names @@ -6,9 +6,9 @@ "variant": "", "details": { "name": "Clamp", - "category": "Math/AABB", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the largest version of Source that can fit entirely within Clamp", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataInput_AABB: Clamp", "details": { - "name": "AABB: Clamp" + "name": "Clamp" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names index 31ea6b1a2e..aad3bbf1c1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsAABB.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ContainsAABB", - "category": "Math/AABB", + "name": "Contains Axis Aligned Bounding Box", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns true if Source contains all of the bounds of Candidate, else false", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataInput_AABB: Candidate", "details": { - "name": "AABB: Candidate" + "name": "Candidate" } }, { "key": "DataOutput_Result: Boolean", "details": { - "name": "Result: Boolean" + "name": "Contains" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names index ba30ab2874..9fc7673965 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ContainsVector3.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ContainsVector3", - "category": "Math/AABB", + "name": "Contains Vector3", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns true if Source contains the Candidate, else false", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataInput_Vector3: Candidate", "details": { - "name": "Vector3: Candidate" + "name": "Candidate" } }, { "key": "DataOutput_Result: Boolean", "details": { - "name": "Result: Boolean" + "name": "Contains" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names index 0f4e2878f8..579771fef0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Distance.names @@ -6,9 +6,9 @@ "variant": "", "details": { "name": "Distance", - "category": "Math/AABB", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the shortest distance from Point to Source, or zero of Point is contained in Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataInput_Vector3: Point", "details": { - "name": "Vector3: Point" + "name": "Point" } }, { "key": "DataOutput_Result: Number", "details": { - "name": "Result: Number" + "name": "Distance" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names index 8b8a82259d..08a7f8ee38 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Expand.names @@ -6,9 +6,9 @@ "variant": "", "details": { "name": "Expand", - "category": "Math/AABB", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the Source expanded in each axis by the absolute value of each axis in Delta", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataInput_Vector3: Delta", "details": { - "name": "Vector3: Delta" + "name": "Delta" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names index f00209439c..2cbc987e31 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Extents.names @@ -6,9 +6,9 @@ "variant": "", "details": { "name": "Extents", - "category": "Math/AABB", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the Vector3(Source.Width, Source.Height, Source.Depth)", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -24,15 +24,15 @@ } }, { - "key": "DataInput_AABB: Source", + "key": "Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataOutput_Result: Vector3", "details": { - "name": "Result: Vector3" + "name": "Extents" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names index f5b5e7b633..3261d0c3d2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterHalfExtents.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromCenterHalfExtents", - "category": "Math/AABB", + "name": "From Center Half Extents", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB with Min = Center - HalfExtents, Max = Center + HalfExtents", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_Vector3: Center", "details": { - "name": "Vector3: Center" + "name": "Center" } }, { "key": "DataInput_Vector3: HalfExtents", "details": { - "name": "Vector3: HalfExtents" + "name": "Half Extents" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names index 8915366da3..204047ee15 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromCenterRadius.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromCenterRadius", - "category": "Math/AABB", + "name": "From Center Radius", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB with Min = Center - Vector3(radius, radius, radius), Max = Center + Vector3(radius, radius, radius)", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_Vector3: Center", "details": { - "name": "Vector3: Center" + "name": "Center" } }, { "key": "DataInput_Number: Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names index 9ebcdc66d4..2b6030e8fb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromMinMax.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromMinMax", - "category": "Math/AABB", + "name": "From Min Max", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB from Min and Max if Min <= Max, else returns FromPoint(max)", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,19 +26,19 @@ { "key": "DataInput_Vector3: Min", "details": { - "name": "Vector3: Min" + "name": "Min" } }, { "key": "DataInput_Vector3: Max", "details": { - "name": "Vector3: Max" + "name": "Max" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names index d339e65542..189aa8d744 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromOBB.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromOBB", - "category": "Math/AABB", + "name": "From Oriented Bounding Box", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB which contains Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,13 +26,13 @@ { "key": "DataInput_OBB: Source", "details": { - "name": "OBB: Source" + "name": "Source" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names index 842e5261bc..433a318baf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_FromPoint.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromPoint", - "category": "Math/AABB", + "name": "From Point", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the AABB with min and max set to Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,13 +26,13 @@ { "key": "DataInput_Vector3: Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names index 5470d43f1b..3ef427e774 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMax.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetMax", - "category": "Math/AABB", + "name": "Get Max", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the Vector3 that is the max value on each axis of Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,13 +26,13 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataOutput_Result: Vector3", "details": { - "name": "Result: Vector3" + "name": "Max" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names index 2f76b75b7e..d8acde7296 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_GetMin.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetMin", - "category": "Math/AABB", + "name": "Get Min", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the Vector3 that is the min value on each axis of Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,13 +26,13 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataOutput_Result: Vector3", "details": { - "name": "Result: Vector3" + "name": "Min" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names index e68a06a2a8..004ecd1e0e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsFinite.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", - "category": "Math/AABB", + "name": "Is Finite", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns true if Source is finite, else false", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,13 +26,13 @@ { "key": "DataInput_AABB: Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { "key": "DataOutput_Result: Boolean", "details": { - "name": "Result: Boolean" + "name": "Is Finite" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names index e39a66c148..7f7f08e3cf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_IsValid.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsValid", - "category": "Math/AABB", + "name": "Is Valid", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns ture if Source is valid, that is if Source.min <= Source.max, else false", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -32,7 +32,7 @@ { "key": "DataOutput_Result: Boolean", "details": { - "name": "Result: Boolean" + "name": "Is Valid" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names index 690c973919..62c7cb2b17 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Null.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Null", - "category": "Math/AABB", + "name": "Invalid Axis Aligned Bounding Box", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns an invalid AABB (min > max), adding any point to it will make it valid", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { @@ -26,7 +26,7 @@ { "key": "DataOutput_Result: AABB", "details": { - "name": "Result: AABB" + "name": "Invalid AABB" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names index 8deb30747c..4474f1220b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Overlaps.names @@ -6,9 +6,9 @@ "variant": "", "details": { "name": "Overlaps", - "category": "Math/AABB", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns true if A overlaps B, else false", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names index d4359828a1..2b206cfcfc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_SurfaceArea.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SurfaceArea", - "category": "Math/AABB", + "name": "Surface Area", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the sum of the surface area of all six faces of Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names index 1d9aaf3302..9a07c147c6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ToSphere.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToSphere", - "category": "Math/AABB", + "name": "To Sphere", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the center and radius of smallest sphere that contains Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names index cc46679f58..01037b2bff 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_Translate.names @@ -6,9 +6,9 @@ "variant": "", "details": { "name": "Translate", - "category": "Math/AABB", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the Source with each point added with Translation", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names index 43862b9608..23e8921ab8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_XExtent.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "XExtent", - "category": "Math/AABB", + "name": "X Extent", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the X extent (max X - min X) of Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names index c43dfbd23e..3e28799512 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_YExtent.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "YExtent", - "category": "Math/AABB", + "name": "Y Extent", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the Y extent (max Y - min Y) of Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names index 87a7fce696..c470eafa0c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathAABB_ZExtent.names @@ -5,10 +5,10 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ZExtent", - "category": "Math/AABB", + "name": "Z Extent", + "category": "Math/Axis Aligned Bounding Box", "tooltip": "returns the Z extent (max Z - min Z) of Source", - "subtitle": "AABB" + "subtitle": "Axis Aligned Bounding Box" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names index 8dd4a92831..16d5b36eb0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_Dot3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "Dot3", + "name": "Dot (RGB)", "category": "Math/Color", - "tooltip": "returns the 3-element dot product of A and B, using only the R, G, B elements", - "subtitle": "Color" + "tooltip": "returns the 3-element dot product of A and B, using only the R, G, B elements" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Color: A", + "key": "DataInput_A", "details": { - "name": "Color: A" + "name": "A" } }, { - "key": "DataInput_Color: B", + "key": "DataInput_B", "details": { - "name": "Color: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names index 7d9506b4bf..01b5ac9cb9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromValues.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromValues", + "name": "From Values", "category": "Math/Color", - "tooltip": "returns a Color from the R, G, B, A inputs", - "subtitle": "Color" + "tooltip": "Returns a Color from the R, G, B, A inputs" }, "slots": [ { @@ -24,33 +23,33 @@ } }, { - "key": "DataInput_Number: R", + "key": "DataInput_R", "details": { - "name": "Number: R" + "name": "R" } }, { - "key": "DataInput_Number: G", + "key": "DataInput_G", "details": { - "name": "Number: G" + "name": "G" } }, { - "key": "DataInput_Number: B", + "key": "DataInput_B", "details": { - "name": "Number: B" + "name": "B" } }, { - "key": "DataInput_Number: A", + "key": "DataInput_A", "details": { - "name": "Number: A" + "name": "A" } }, { - "key": "DataOutput_Result: Color", + "key": "DataOutput_Result", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names index 598c2e52e0..e87ad523b0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromVector3", + "name": "From Vector3", "category": "Math/Color", - "tooltip": "returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to 1.0", - "subtitle": "Color" + "tooltip": "Returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to 1.0" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: RGB", + "key": "DataInput_RGB", "details": { - "name": "Vector3: RGB" + "name": "RGB" } }, { - "key": "DataOutput_Result: Color", + "key": "DataOutput_Result", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names index 3cca83c246..3d657ed1a0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_FromVector3AndNumber.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromVector3AndNumber", + "name": "From Vector3 And Number", "category": "Math/Color", "tooltip": "returns a Color with R, G, B set to X, Y, Z values of RGB, respectively. A is set to A", "subtitle": "Color" @@ -26,19 +26,19 @@ { "key": "DataInput_Vector3: RGB", "details": { - "name": "Vector3: RGB" + "name": "Red, Green, Blue" } }, { "key": "DataInput_Number: A", "details": { - "name": "Number: A" + "name": "Alpha" } }, { "key": "DataOutput_Result: Color", "details": { - "name": "Result: Color" + "name": "Color" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names index 3ae97ec819..f9ed687835 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_GammaToLinear.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GammaToLinear", + "name": "Gamma To Linear", "category": "Math/Color", "tooltip": "returns Source converted from gamma corrected to linear space", "subtitle": "Color" @@ -26,13 +26,13 @@ { "key": "DataInput_Color: Source", "details": { - "name": "Color: Source" + "name": "Source" } }, { "key": "DataOutput_Result: Color", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names index ac5da11652..430cf90d8b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsClose.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Color", - "tooltip": "returns true if A is within Tolerance of B, else false", + "tooltip": "Returns true if A is within Tolerance of B, else false", "subtitle": "Color" }, "slots": [ @@ -26,25 +26,25 @@ { "key": "DataInput_Color: A", "details": { - "name": "Color: A" + "name": "First" } }, { "key": "DataInput_Color: B", "details": { - "name": "Color: B" + "name": "Second" } }, { "key": "DataInput_Number: Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { "key": "DataOutput_Result: Boolean", "details": { - "name": "Result: Boolean" + "name": "Is Close" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names index c865d2d71a..f22b3e3773 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_IsZero.names @@ -5,7 +5,7 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsZero", + "name": "Is Zero", "category": "Math/Color", "tooltip": "returns true if Source is within Tolerance of zero", "subtitle": "Color" @@ -26,19 +26,19 @@ { "key": "DataInput_Color: Source", "details": { - "name": "Color: Source" + "name": "Source" } }, { "key": "DataInput_Number: Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { "key": "DataOutput_Result: Boolean", "details": { - "name": "Result: Boolean" + "name": "Is Zero" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names index 3db2e744cb..fa1d06b510 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_LinearToGamma.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LinearToGamma", + "name": "Linear To Gamma", "category": "Math/Color", - "tooltip": "returns Source converted from linear to gamma corrected space", - "subtitle": "Color" + "tooltip": "Returns Source converted from linear to gamma corrected space" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Color: Source", + "key": "DataInput_Source", "details": { - "name": "Color: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Color", + "key": "DataOutput_Result", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names index 52e8116ee7..4bf7062cb7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathColor_MultiplyByNumber.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByNumber", + "name": "Multiply By Number", "category": "Math/Color", - "tooltip": "returns Source with every elemented multiplied by Multiplier", + "tooltip": "Returns Source with every elemented multiplied by Multiplier", "subtitle": "Color" }, "slots": [ diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names index 86db4d7212..56b63ed01f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathCrc32_FromString.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromString", + "name": "From String", "category": "Math/Crc32", - "tooltip": "returns a Crc32 from the string", - "subtitle": "Crc32" + "tooltip": "Returns a Crc32 from the string" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_String: Value", + "key": "DataInput_Value", "details": { - "name": "String: Value" + "name": "Text" } }, { - "key": "DataOutput_Result: CRC", + "key": "DataOutput_Result", "details": { - "name": "Result: CRC" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names index 9ee3134454..e9c3ac7672 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromColumns.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromColumns", + "name": "From Columns", "category": "Math/Matrix3x3", - "tooltip": "returns a rotation matrix based on angle around Z axis", - "subtitle": "Matrix3x3" + "tooltip": "Returns a rotation matrix based on angle around Z axis" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: Column1", + "key": "DataInput_Column1", "details": { - "name": "Vector3: Column1" + "name": "Column 1" } }, { - "key": "DataInput_Vector3: Column2", + "key": "DataInput_Column2", "details": { - "name": "Vector3: Column2" + "name": "Column 2" } }, { - "key": "DataInput_Vector3: Column3", + "key": "DataInput_Column3", "details": { - "name": "Vector3: Column3" + "name": "Column 3" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names index f1e2ea43e4..f823176f14 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromCrossProduct.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromCrossProduct", + "name": "From Cross Product", "category": "Math/Matrix3x3", - "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector", - "subtitle": "Matrix3x3" + "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names index a519d2254c..9f9c083534 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromDiagonal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromDiagonal", + "name": "From Diagonal", "category": "Math/Matrix3x3", - "tooltip": "returns a diagonal matrix using the supplied vector", - "subtitle": "Matrix3x3" + "tooltip": "Returns a diagonal matrix using the supplied vector" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names index f29968d3b8..f88782a2ee 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromMatrix4x4.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromMatrix4x4", + "name": "From Matrix4x4", "category": "Math/Matrix3x3", - "tooltip": "returns a matrix from the first 3 rows of a Matrix3x3", - "subtitle": "Matrix3x3" + "tooltip": "Returns a matrix from the first 3 rows of a Matrix3x3" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names index 267865c111..1ddbce8343 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromQuaternion.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromQuaternion", + "name": "From Quaternion", "category": "Math/Matrix3x3", - "tooltip": "returns a rotation matrix using the supplied quaternion", - "subtitle": "Matrix3x3" + "tooltip": "Returns a rotation matrix using the supplied quaternion" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names index 987d4360e1..20c7570899 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationXDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotationXDegrees", + "name": "From Rotation X Degrees", "category": "Math/Matrix3x3", - "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis", - "subtitle": "Matrix3x3" + "tooltip": "Returns a rotation matrix representing a rotation in degrees around X-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names index b1568b597b..c5558e192a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationYDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotationYDegrees", + "name": "From Rotation Y Degrees", "category": "Math/Matrix3x3", - "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis", - "subtitle": "Matrix3x3" + "tooltip": "Returns a rotation matrix representing a rotation in degrees around Y-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names index a2afec9066..3c31f1c3ab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRotationZDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotationZDegrees", + "name": "From Rotation Z Degrees", "category": "Math/Matrix3x3", - "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis", - "subtitle": "Matrix3x3" + "tooltip": "Returns a rotation matrix representing a rotation in degrees around Z-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names index e082301192..7bcda04e10 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromRows.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRows", + "name": "From Rows", "category": "Math/Matrix3x3", - "tooltip": "returns a matrix from three row", - "subtitle": "Matrix3x3" + "tooltip": "Returns a matrix from three row" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: Row1", + "key": "DataInput_Row1", "details": { - "name": "Vector3: Row1" + "name": "Row 1" } }, { - "key": "DataInput_Vector3: Row2", + "key": "DataInput_Row2", "details": { - "name": "Vector3: Row2" + "name": "Row 2" } }, { - "key": "DataInput_Vector3: Row3", + "key": "DataInput_Row3", "details": { - "name": "Vector3: Row3" + "name": "Row 3" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names index c6f3431b3b..1caf6865ca 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromScale.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromScale", + "name": "From Scale", "category": "Math/Matrix3x3", - "tooltip": "returns a scale matrix using the supplied vector", - "subtitle": "Matrix3x3" + "tooltip": "Returns a scale matrix using the supplied vector" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Scale", + "key": "DataInput_Scale", "details": { - "name": "Vector3: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names index b4884f75f7..509fda12d3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_FromTransform.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromTransform", + "name": "From Transform", "category": "Math/Matrix3x3", - "tooltip": "returns a matrix using the supplied transform", - "subtitle": "Matrix3x3" + "tooltip": "Returns a matrix using the supplied transform" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Transform: Transform", + "key": "DataInput_Transform", "details": { - "name": "Transform: Transform" + "name": "Transform" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names index 46ec31ebb9..a34e468150 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumn.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetColumn", + "name": "Get Column", "category": "Math/Matrix3x3", - "tooltip": "returns vector from matrix corresponding to the Column index", - "subtitle": "Matrix3x3" + "tooltip": "Returns vector from matrix corresponding to the Column index" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Column", + "key": "DataInput_Column", "details": { - "name": "Number: Column" + "name": "Column" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names index 04c7ffa599..104ca88d50 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetColumns.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetColumns", + "name": "Get Columns", "category": "Math/Matrix3x3", - "tooltip": "returns all columns from matrix", - "subtitle": "Matrix3x3" + "tooltip": "Returns all columns from matrix" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Column1: Vector3", + "key": "DataOutput_Column1", "details": { - "name": "Column1: Vector3" + "name": "Column 1" } }, { - "key": "DataOutput_Column2: Vector3", + "key": "DataOutput_Column2", "details": { - "name": "Column2: Vector3" + "name": "Column 2" } }, { - "key": "DataOutput_Column3: Vector3", + "key": "DataOutput_Column3", "details": { - "name": "Column3: Vector3" + "name": "Column 3" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names index 674cf87642..1c64bf8f40 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetDiagonal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetDiagonal", + "name": "Get Diagonal", "category": "Math/Matrix3x3", - "tooltip": "returns vector of matrix diagonal values", - "subtitle": "Matrix3x3" + "tooltip": "Returns vector of matrix diagonal values" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names index c6c09ba2c4..0cf502fad0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetElement.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetElement", + "name": "Get Element", "category": "Math/Matrix3x3", - "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair", - "subtitle": "Matrix3x3" + "tooltip": "Returns scalar from matrix corresponding to the (Row,Column) pair" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Row", + "key": "DataInput_Row", "details": { - "name": "Number: Row" + "name": "Row" } }, { - "key": "DataInput_Number: Column", + "key": "DataInput_Column", "details": { - "name": "Number: Column" + "name": "Column" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names index 96e705bd14..f886bcbd50 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRow.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetRow", + "name": "Get Row", "category": "Math/Matrix3x3", - "tooltip": "returns vector from matrix corresponding to the Row index", - "subtitle": "Matrix3x3" + "tooltip": "Returns vector from matrix corresponding to the Row index" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Row", + "key": "DataInput_Row", "details": { - "name": "Number: Row" + "name": "Row" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names index 5f23c4b660..fc06f37dfb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_GetRows.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetRows", + "name": "Get Rows", "category": "Math/Matrix3x3", - "tooltip": "returns all rows from matrix", - "subtitle": "Matrix3x3" + "tooltip": "Returns all rows from matrix" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Row1: Vector3", + "key": "DataOutput_Row1", "details": { - "name": "Row1: Vector3" + "name": "Row 1" } }, { - "key": "DataOutput_Row2: Vector3", + "key": "DataOutput_Row2", "details": { - "name": "Row2: Vector3" + "name": "Row 2" } }, { - "key": "DataOutput_Row3: Vector3", + "key": "DataOutput_Row3", "details": { - "name": "Row3: Vector3" + "name": "Row 3" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names index 4899a05c24..24131fb847 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Invert.names @@ -7,8 +7,7 @@ "details": { "name": "Invert", "category": "Math/Matrix3x3", - "tooltip": "returns inverse of Matrix", - "subtitle": "Matrix3x3" + "tooltip": "Returns inverse of Matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names index ae0450c30e..403df39120 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsClose.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Matrix3x3", - "tooltip": "returns true if each element of both Matrix are equal within some tolerance", - "subtitle": "Matrix3x3" + "tooltip": "Returns true if each element of both Matrix are equal within some tolerance" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Matrix3x3: A", + "key": "DataInput_A", "details": { - "name": "Matrix3x3: A" + "name": "A" } }, { - "key": "DataInput_Matrix3x3: B", + "key": "DataInput_B", "details": { - "name": "Matrix3x3: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names index 4f37da4d8b..be00053f63 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Matrix3x3", - "tooltip": "returns true if all numbers in matrix is finite", - "subtitle": "Matrix3x3" + "tooltip": "Returns true if all numbers in matrix is finite" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names index a49ae462cc..68dbdac032 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_IsOrthogonal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsOrthogonal", + "name": "Is Orthogonal", "category": "Math/Matrix3x3", - "tooltip": "returns true if the matrix is orthogonal", - "subtitle": "Matrix3x3" + "tooltip": "Returns true if the matrix is orthogonal" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names index 4e96ab3cc1..174394484a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByNumber.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByNumber", + "name": "Multiply By Number", "category": "Math/Matrix3x3", - "tooltip": "returns matrix created from multiply the source matrix by Multiplier", - "subtitle": "Matrix3x3" + "tooltip": "Returns matrix created from multiply the source matrix by Multiplier" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names index 3da3867769..bc6f6fa58e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_MultiplyByVector.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByVector", + "name": "Multiply By Vector", "category": "Math/Matrix3x3", - "tooltip": "returns vector created by right left multiplying matrix by supplied vector", - "subtitle": "Matrix3x3" + "tooltip": "Returns vector created by right left multiplying matrix by supplied vector" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataInput_Vector3: Vector", + "key": "DataInput_Vector", "details": { - "name": "Vector3: Vector" + "name": "Vector" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names index eeb65268d5..626c0007f0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Orthogonalize.names @@ -7,8 +7,7 @@ "details": { "name": "Orthogonalize", "category": "Math/Matrix3x3", - "tooltip": "returns an orthogonal matrix from the Source matrix", - "subtitle": "Matrix3x3" + "tooltip": "Returns an orthogonal matrix from the Source matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names index ab49d83fa3..ee10f47d79 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToAdjugate.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToAdjugate", + "name": "To Adjugate", "category": "Math/Matrix3x3", - "tooltip": "returns the transpose of Matrix of cofactors", - "subtitle": "Matrix3x3" + "tooltip": "Returns the transpose of Matrix of cofactors" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names index 3f8cff3116..c1f45fec65 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToDeterminant.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToDeterminant", + "name": "To Determinant", "category": "Math/Matrix3x3", - "tooltip": "returns determinant of Matrix", - "subtitle": "Matrix3x3" + "tooltip": "Returns determinant of Matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Determinant: Number", + "key": "DataOutput_Determinant", "details": { - "name": "Determinant: Number" + "name": "Determinant" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names index 965ab601ae..ded60634b3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_ToScale.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToScale", + "name": "To Scale", "category": "Math/Matrix3x3", - "tooltip": "returns scale part of the transformation matrix", - "subtitle": "Matrix3x3" + "tooltip": "Returns scale part of the transformation matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names index c9af69dff5..c03d1e9be7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Transpose.names @@ -7,8 +7,7 @@ "details": { "name": "Transpose", "category": "Math/Matrix3x3", - "tooltip": "returns transpose of Matrix", - "subtitle": "Matrix3x3" + "tooltip": "returns transpose of Matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names index 8dbd85f33a..c9102e659b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix3x3_Zero.names @@ -7,8 +7,7 @@ "details": { "name": "Zero", "category": "Math/Matrix3x3", - "tooltip": "returns the zero matrix", - "subtitle": "Matrix3x3" + "tooltip": "Returns the zero matrix" }, "slots": [ { @@ -24,9 +23,9 @@ } }, { - "key": "DataOutput_Result: Matrix3x3", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix3x3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names index 941bcf2ddc..9e20e78471 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromDiagonal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromDiagonal", + "name": "From Diagonal", "category": "Math/Matrix4x4", - "tooltip": "returns a diagonal matrix using the supplied vector", - "subtitle": "Matrix4x4" + "tooltip": "Returns a diagonal matrix using the supplied vector" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names index bd98877776..7366425c7f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromMatrix3x3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromMatrix3x3", + "name": "From Matrix3x3", "category": "Math/Matrix4x4", - "tooltip": "returns a matrix from the from the Matrix3x3", - "subtitle": "Matrix4x4" + "tooltip": "Returns a matrix from the from the Matrix3x3" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names index deaa71f7ca..c2720c5eaa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromQuaternionAndTranslation.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromQuaternionAndTranslation", + "name": "From Quaternion And Translation", "category": "Math/Matrix4x4", - "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector", - "subtitle": "Matrix4x4" + "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Quaternion: Rotation", + "key": "DataInput_Rotation", "details": { - "name": "Quaternion: Rotation" + "name": "Rotation" } }, { - "key": "DataInput_Vector3: Translation", + "key": "DataInput_Translation", "details": { - "name": "Vector3: Translation" + "name": "Translation" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names index 713eedda7b..c4d2296372 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationXDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotationXDegrees", + "name": "From Rotation X Degrees", "category": "Math/Matrix4x4", - "tooltip": "returns a rotation matrix representing a rotation in degrees around X-axis", - "subtitle": "Matrix4x4" + "tooltip": "Returns a rotation matrix representing a rotation in degrees around X-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names index c0253b05d3..2d99cd99a0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationYDegrees.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotationYDegrees", + "name": "From Rotation Y Degrees", "category": "Math/Matrix4x4", - "tooltip": "returns a rotation matrix representing a rotation in degrees around Y-axis", + "tooltip": "Returns a rotation matrix representing a rotation in degrees around Y-axis", "subtitle": "Matrix4x4" }, "slots": [ @@ -26,13 +26,13 @@ { "key": "DataInput_Number: Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { "key": "DataOutput_Result: Matrix4x4", "details": { - "name": "Result: Matrix4x4" + "name": "Matrix4x4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names index 92757dc6b5..43287ab848 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRotationZDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotationZDegrees", + "name": "From Rotation Z Degrees", "category": "Math/Matrix4x4", - "tooltip": "returns a rotation matrix representing a rotation in degrees around Z-axis", - "subtitle": "Matrix4x4" + "tooltip": "Returns a rotation matrix representing a rotation in degrees around Z-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names index 96a36cd04f..faefebca77 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromRows.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRows", + "name": "From Rows", "category": "Math/Matrix4x4", - "tooltip": "returns a matrix from three row", - "subtitle": "Matrix4x4" + "tooltip": "Returns a matrix from three row" }, "slots": [ { @@ -24,33 +23,33 @@ } }, { - "key": "DataInput_Vector4: Row1", + "key": "DataInput_Row1", "details": { - "name": "Vector4: Row1" + "name": "Row 1" } }, { - "key": "DataInput_Vector4: Row2", + "key": "DataInput_Row2", "details": { - "name": "Vector4: Row2" + "name": "Row 2" } }, { - "key": "DataInput_Vector4: Row3", + "key": "DataInput_Row3", "details": { - "name": "Vector4: Row3" + "name": "Row 3" } }, { - "key": "DataInput_Vector4: Row4", + "key": "DataInput_Row4", "details": { - "name": "Vector4: Row4" + "name": "Row 4" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names index b99af3c94f..8be2fed246 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromScale.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromScale", + "name": "From Scale", "category": "Math/Matrix4x4", - "tooltip": "returns a scale matrix using the supplied vector", + "tooltip": "Returns a scale matrix using the supplied vector", "subtitle": "Matrix4x4" }, "slots": [ @@ -32,7 +32,7 @@ { "key": "DataOutput_Result: Matrix4x4", "details": { - "name": "Result: Matrix4x4" + "name": "Matrix4x4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names index fe6b1540ed..3966f964ee 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTransform.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromTransform", + "name": "From Transform", "category": "Math/Matrix4x4", - "tooltip": "returns a matrix using the supplied transform", + "tooltip": "Returns a matrix using the supplied transform", "subtitle": "Matrix4x4" }, "slots": [ @@ -26,13 +26,13 @@ { "key": "DataInput_Transform: Transform", "details": { - "name": "Transform: Transform" + "name": "Transform" } }, { "key": "DataOutput_Result: Matrix4x4", "details": { - "name": "Result: Matrix4x4" + "name": "Matrix4x4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names index 57b7965e33..0a6606a9c9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_FromTranslation.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromTranslation", + "name": "From Translation", "category": "Math/Matrix4x4", - "tooltip": "returns a skew-symmetric cross product matrix based on supplied vector", + "tooltip": "Returns a skew-symmetric cross product matrix based on supplied vector", "subtitle": "Matrix4x4" }, "slots": [ @@ -26,13 +26,13 @@ { "key": "DataInput_Vector3: Source", "details": { - "name": "Vector3: Source" + "name": "Translation" } }, { "key": "DataOutput_Result: Matrix4x4", "details": { - "name": "Result: Matrix4x4" + "name": "Matrix4x4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names index 4205030f09..6c970c53e3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumn.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetColumn", + "name": "Get Column", "category": "Math/Matrix4x4", - "tooltip": "returns vector from matrix corresponding to the Column index", + "tooltip": "Returns vector from matrix corresponding to the Column index", "subtitle": "Matrix4x4" }, "slots": [ @@ -26,19 +26,19 @@ { "key": "DataInput_Matrix4x4: Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { "key": "DataInput_Number: Column", "details": { - "name": "Number: Column" + "name": "Column" } }, { "key": "DataOutput_Result: Vector4", "details": { - "name": "Result: Vector4" + "name": "Column" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names index 64e26175dc..8a4e1e477c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetColumns.names @@ -5,9 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetColumns", + "name": "Get Columns", "category": "Math/Matrix4x4", - "tooltip": "returns all columns from matrix", + "tooltip": "Returns all columns from matrix", "subtitle": "Matrix4x4" }, "slots": [ @@ -26,31 +26,31 @@ { "key": "DataInput_Matrix4x4: Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { "key": "DataOutput_Column1: Vector4", "details": { - "name": "Column1: Vector4" + "name": "Column 1" } }, { "key": "DataOutput_Column2: Vector4", "details": { - "name": "Column2: Vector4" + "name": "Column 2" } }, { "key": "DataOutput_Column3: Vector4", "details": { - "name": "Column3: Vector4" + "name": "Column 3" } }, { "key": "DataOutput_Column4: Vector4", "details": { - "name": "Column4: Vector4" + "name": "Column 4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names index d9bc2ad59e..8777669eb2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetDiagonal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetDiagonal", + "name": "Get Diagonal", "category": "Math/Matrix4x4", - "tooltip": "returns vector of matrix diagonal values", - "subtitle": "Matrix4x4" + "tooltip": "Returns vector of matrix diagonal values" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names index 8b7e270cef..fb047a7762 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetElement.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetElement", + "name": "Get Element", "category": "Math/Matrix4x4", - "tooltip": "returns scalar from matrix corresponding to the (Row,Column) pair", - "subtitle": "Matrix4x4" + "tooltip": "Returns scalar from matrix corresponding to the (Row,Column) pair" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Row", + "key": "DataInput_Row", "details": { - "name": "Number: Row" + "name": "Row" } }, { - "key": "DataInput_Number: Column", + "key": "DataInput_Column", "details": { - "name": "Number: Column" + "name": "Column" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names index 06c3338d46..9c2f1bd04c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRow.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetRow", + "name": "Get Row", "category": "Math/Matrix4x4", - "tooltip": "returns vector from matrix corresponding to the Row index", - "subtitle": "Matrix4x4" + "tooltip": "Returns vector from matrix corresponding to the Row index" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Row", + "key": "DataInput_Row", "details": { - "name": "Number: Row" + "name": "Row" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names index 6d8fbf97e7..c0209cfa3c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetRows.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetRows", + "name": "Get Rows", "category": "Math/Matrix4x4", - "tooltip": "returns all rows from matrix", - "subtitle": "Matrix4x4" + "tooltip": "Returns all rows from matrix" }, "slots": [ { @@ -24,33 +23,33 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Row1: Vector4", + "key": "DataOutput_Row1", "details": { - "name": "Row1: Vector4" + "name": "Row1" } }, { - "key": "DataOutput_Row2: Vector4", + "key": "DataOutput_Row2", "details": { - "name": "Row2: Vector4" + "name": "Row2" } }, { - "key": "DataOutput_Row3: Vector4", + "key": "DataOutput_Row3", "details": { - "name": "Row3: Vector4" + "name": "Row3" } }, { - "key": "DataOutput_Row4: Vector4", + "key": "DataOutput_Row4", "details": { - "name": "Row4: Vector4" + "name": "Row4" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names index 762e0a301e..97c74a96fa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_GetTranslation.names @@ -7,8 +7,7 @@ "details": { "name": "GetTranslation", "category": "Math/Matrix4x4", - "tooltip": "returns translation vector from the matrix", - "subtitle": "Matrix4x4" + "tooltip": "returns translation vector from the matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names index 3e701b0d40..3746071075 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Invert.names @@ -7,8 +7,7 @@ "details": { "name": "Invert", "category": "Math/Matrix4x4", - "tooltip": "returns inverse of Matrix", - "subtitle": "Matrix4x4" + "tooltip": "Returns inverse of Matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names index 25d1da45bd..3dea7660d6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsClose.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Matrix4x4", - "tooltip": "returns true if each element of both Matrix are equal within some tolerance", - "subtitle": "Matrix4x4" + "tooltip": "Returns true if each element of both Matrix are equal within some tolerance" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Matrix4x4: A", + "key": "DataInput_A", "details": { - "name": "Matrix4x4: A" + "name": "A" } }, { - "key": "DataInput_Matrix4x4: B", + "key": "DataInput_B", "details": { - "name": "Matrix4x4: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names index 8bd0e0dc37..f589f90a96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Matrix4x4", - "tooltip": "returns true if all numbers in matrix is finite", - "subtitle": "Matrix4x4" + "tooltip": "Returns true if all numbers in matrix is finite" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names index 0343347e02..b68524d78b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_MultiplyByVector.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByVector", + "name": "Multiply By Vector", "category": "Math/Matrix4x4", - "tooltip": "returns vector created by right left multiplying matrix by supplied vector", - "subtitle": "Matrix4x4" + "tooltip": "Returns vector created by right left multiplying matrix by supplied vector" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataInput_Vector4: Vector", + "key": "DataInput_Vector", "details": { - "name": "Vector4: Vector" + "name": "Vector" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names index 0d97222f28..1c06bcc228 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_ToScale.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToScale", + "name": "To Scale", "category": "Math/Matrix4x4", - "tooltip": "returns scale part of the transformation matrix", - "subtitle": "Matrix4x4" + "tooltip": "Returns scale part of the transformation matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names index 51a2bf229a..922ac1ee22 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Transpose.names @@ -7,8 +7,7 @@ "details": { "name": "Transpose", "category": "Math/Matrix4x4", - "tooltip": "returns transpose of Matrix", - "subtitle": "Matrix4x4" + "tooltip": "returns transpose of Matrix" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names index a2dc799220..9e2a4628df 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathMatrix4x4_Zero.names @@ -7,8 +7,7 @@ "details": { "name": "Zero", "category": "Math/Matrix4x4", - "tooltip": "returns the zero matrix", - "subtitle": "Matrix4x4" + "tooltip": "returns the zero matrix" }, "slots": [ { @@ -24,9 +23,9 @@ } }, { - "key": "DataOutput_Result: Matrix4x4", + "key": "DataOutput_Result", "details": { - "name": "Result: Matrix4x4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names index 77735b2622..62c13d11c8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromAabb.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromAabb", - "category": "Math/OBB", - "tooltip": "converts the Source to an OBB", - "subtitle": "OBB" + "name": "From Axis Aligned Bounding Box", + "category": "Math/Oriented Bounding Box", + "tooltip": "Converts the Source to an Oriented Bounding Box" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_AABB: Source", + "key": "DataInput_Source", "details": { - "name": "AABB: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: OBB", + "key": "DataOutput_Result", "details": { - "name": "Result: OBB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names index a683c20248..d59a1fdd33 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_FromPositionRotationAndHalfLengths.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromPositionRotationAndHalfLengths", - "category": "Math/OBB", - "tooltip": "returns an OBB from the position, rotation and half lengths", - "subtitle": "OBB" + "name": "From Position Rotation And Half Lengths", + "category": "Math/Oriented Bounding Box", + "tooltip": "returns an Oriented Bounding Box from the position, rotation and half lengths" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: Position", + "key": "DataInput_Position", "details": { - "name": "Vector3: Position" + "name": "Position" } }, { - "key": "DataInput_Quaternion: Rotation", + "key": "DataInput_Rotation", "details": { - "name": "Quaternion: Rotation" + "name": "Rotation" } }, { - "key": "DataInput_Vector3: HalfLengths", + "key": "DataInput_HalfLengths", "details": { - "name": "Vector3: HalfLengths" + "name": "Half Lengths" } }, { - "key": "DataOutput_Result: OBB", + "key": "DataOutput_Result", "details": { - "name": "Result: OBB" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names index 7380a8011a..abfb3f23f5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisX.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetAxisX", - "category": "Math/OBB", - "tooltip": "returns the X-Axis of Source", - "subtitle": "OBB" + "name": "Get Axis X", + "category": "Math/Oriented Bounding Box", + "tooltip": "Returns the X-Axis of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_OBB: Source", + "key": "DataInput_Source", "details": { - "name": "OBB: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names index 174e8abbd8..2bb5294f11 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisY.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetAxisY", - "category": "Math/OBB", - "tooltip": "returns the Y-Axis of Source", - "subtitle": "OBB" + "name": "Get Axis Y", + "category": "Math/Oriented Bounding Box", + "tooltip": "Returns the Y-Axis of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_OBB: Source", + "key": "DataInput_Source", "details": { - "name": "OBB: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names index b46dd378a6..03363e3123 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetAxisZ.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetAxisZ", - "category": "Math/OBB", - "tooltip": "returns the Z-Axis of Source", - "subtitle": "OBB" + "name": "Get Axis Z", + "category": "Math/Oriented Bounding Box", + "tooltip": "Returns the Z-Axis of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_OBB: Source", + "key": "DataInput_Source", "details": { - "name": "OBB: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names index acdc8235da..d69e720586 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_GetPosition.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetPosition", - "category": "Math/OBB", - "tooltip": "returns the position of Source", - "subtitle": "OBB" + "name": "Get Position", + "category": "Math/Oriented Bounding Box", + "tooltip": "Returns the position of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_OBB: Source", + "key": "DataInput_Source", "details": { - "name": "OBB: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names index 4aca32e4e7..73e7d36a6e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathOBB_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", - "category": "Math/OBB", - "tooltip": "returns true if every element in Source is finite, is false", - "subtitle": "OBB" + "name": "Is Finite", + "category": "Math/Oriented Bounding Box", + "tooltip": "Returns true if every element in Source is finite, is false" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_OBB: Source", + "key": "DataInput_Source", "details": { - "name": "OBB: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names index b6bd650223..7d80966095 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_DistanceToPoint.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DistanceToPoint", + "name": "Distance To Point", "category": "Math/Plane", - "tooltip": "returns the closest distance from Source to Point", - "subtitle": "Plane" + "tooltip": "Returns the closest distance from Source to Point" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Plane: Source", + "key": "DataInput_Source", "details": { - "name": "Plane: Source" + "name": "Source" } }, { - "key": "DataInput_Vector3: Point", + "key": "DataInput_Point", "details": { - "name": "Vector3: Point" + "name": "Point" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names index 85df33bab5..808f50a2d1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromCoefficients.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromCoefficients", + "name": "From Coefficients", "category": "Math/Plane", - "tooltip": "returns the plane that satisfies the equation Ax + By + Cz + D = 0", - "subtitle": "Plane" + "tooltip": "Returns the plane that satisfies the equation Ax + By + Cz + D = 0" }, "slots": [ { @@ -24,33 +23,33 @@ } }, { - "key": "DataInput_Number: A", + "key": "DataInput_A", "details": { - "name": "Number: A" + "name": "A" } }, { - "key": "DataInput_Number: B", + "key": "DataInput_B", "details": { - "name": "Number: B" + "name": "B" } }, { - "key": "DataInput_Number: C", + "key": "DataInput_C", "details": { - "name": "Number: C" + "name": "C" } }, { - "key": "DataInput_Number: D", + "key": "DataInput_D", "details": { - "name": "Number: D" + "name": "D" } }, { - "key": "DataOutput_Result: Plane", + "key": "DataOutput_Result", "details": { - "name": "Result: Plane" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names index f4c79b9c93..c4578ba333 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndDistance.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromNormalAndDistance", + "name": "From Normal And Distance", "category": "Math/Plane", - "tooltip": "returns the plane with the specified Normal and Distance from the origin", - "subtitle": "Plane" + "tooltip": "Returns the plane with the specified Normal and Distance from the origin" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Normal", + "key": "DataInput_Normal", "details": { - "name": "Vector3: Normal" + "name": "Normal" } }, { - "key": "DataInput_Number: Distance", + "key": "DataInput_Distance", "details": { - "name": "Number: Distance" + "name": "Distance" } }, { - "key": "DataOutput_Result: Plane", + "key": "DataOutput_Result", "details": { - "name": "Result: Plane" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names index 6656072a9b..e590504d18 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_FromNormalAndPoint.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromNormalAndPoint", + "name": "From Normal And Point", "category": "Math/Plane", - "tooltip": "returns the plane which includes the Point with the specified Normal", - "subtitle": "Plane" + "tooltip": "Returns the plane which includes the Point with the specified Normal" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Normal", + "key": "DataInput_Normal", "details": { - "name": "Vector3: Normal" + "name": "Normal" } }, { - "key": "DataInput_Vector3: Point", + "key": "DataInput_Point", "details": { - "name": "Vector3: Point" + "name": "Point" } }, { - "key": "DataOutput_Result: Plane", + "key": "DataOutput_Result", "details": { - "name": "Result: Plane" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names index 54ce9345b3..d097209d63 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetDistance.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetDistance", + "name": "Get Distance", "category": "Math/Plane", - "tooltip": "returns the Source's distance from the origin", - "subtitle": "Plane" + "tooltip": "Returns the Source's distance from the origin" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Plane: Source", + "key": "DataInput_Source", "details": { - "name": "Plane: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names index 6e043d8c10..b149b8451a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetNormal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetNormal", + "name": "Get Normal", "category": "Math/Plane", - "tooltip": "returns the surface normal of Source", - "subtitle": "Plane" + "tooltip": "Returns the surface normal of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Plane: Source", + "key": "DataInput_Source", "details": { - "name": "Plane: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names index 0379e3c94d..2a904695e9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_GetPlaneEquationCoefficients.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetPlaneEquationCoefficients", + "name": "Get Plane Equation Coefficients", "category": "Math/Plane", - "tooltip": "returns Source's coefficient's (A, B, C, D) in the equation Ax + By + Cz + D = 0", - "subtitle": "Plane" + "tooltip": "Returns Source's coefficient's (A, B, C, D) in the equation Ax + By + Cz + D = 0" }, "slots": [ { @@ -24,33 +23,33 @@ } }, { - "key": "DataInput_Plane: Source", + "key": "DataInput_Source", "details": { - "name": "Plane: Source" + "name": "Source" } }, { - "key": "DataOutput_A: Number", + "key": "DataOutput_A", "details": { - "name": "A: Number" + "name": "A" } }, { - "key": "DataOutput_B: Number", + "key": "DataOutput_B", "details": { - "name": "B: Number" + "name": "B" } }, { - "key": "DataOutput_C: Number", + "key": "DataOutput_C", "details": { - "name": "C: Number" + "name": "C" } }, { - "key": "DataOutput_D: Number", + "key": "DataOutput_D", "details": { - "name": "D: Number" + "name": "D" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names index f704433c45..efdd4a332e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Plane", - "tooltip": "returns true if Source is finite, else false", - "subtitle": "Plane" + "tooltip": "Returns true if Source is finite, else false" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Plane: Source", + "key": "DataInput_Source", "details": { - "name": "Plane: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names index 38bf03f9e3..ec23385c33 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Project.names @@ -7,8 +7,7 @@ "details": { "name": "Project", "category": "Math/Plane", - "tooltip": "returns the projection of Point onto Source", - "subtitle": "Plane" + "tooltip": "Returns the projection of Point onto Source" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Plane: Source", + "key": "DataInput_Source", "details": { - "name": "Plane: Source" + "name": "Source" } }, { - "key": "DataInput_Vector3: Point", + "key": "DataInput_Point", "details": { - "name": "Vector3: Point" + "name": "Point" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names index 113ec5540a..f075b312ad 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathPlane_Transform.names @@ -7,8 +7,7 @@ "details": { "name": "Transform", "category": "Math/Plane", - "tooltip": "returns Source transformed by Transform", - "subtitle": "Plane" + "tooltip": "Returns Source transformed by Transform" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Plane: Source", + "key": "DataInput_Source", "details": { - "name": "Plane: Source" + "name": "Source" } }, { - "key": "DataInput_Transform: Transform", + "key": "DataInput_Transform", "details": { - "name": "Transform: Transform" + "name": "Transform" } }, { - "key": "DataOutput_Result: Plane", + "key": "DataOutput_Result", "details": { - "name": "Result: Plane" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names index 20959c0355..204cd35042 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Conjugate.names @@ -7,8 +7,7 @@ "details": { "name": "Conjugate", "category": "Math/Quaternion", - "tooltip": "returns the conjugate of the source, (-x, -y, -z, w)", - "subtitle": "Quaternion" + "tooltip": "Returns the conjugate of the source, (-x, -y, -z, w)" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names index e61f327c74..3d0d0823b1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ConvertTransformToRotation.names @@ -5,9 +5,8 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ConvertTransformToRotation", - "category": "Math/Quaternion", - "subtitle": "Quaternion" + "name": "Convert Transform To Rotation", + "category": "Math/Quaternion" }, "slots": [ { @@ -23,15 +22,15 @@ } }, { - "key": "DataInput_Transform: Transform", + "key": "DataInput_Transform", "details": { - "name": "Transform: Transform" + "name": "Transform" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names index 47fef5d4e1..69cdb0f4b9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_CreateFromEulerAngles.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "CreateFromEulerAngles", + "name": "Create From Euler Angles", "category": "Math/Quaternion", - "tooltip": "Returns a new Quaternion initialized with the specified Angles", - "subtitle": "Quaternion" + "tooltip": "Returns a new Quaternion initialized with the specified Angles" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Number: Pitch", + "key": "DataInput_Pitch", "details": { - "name": "Number: Pitch" + "name": "Pitch" } }, { - "key": "DataInput_Number: Roll", + "key": "DataInput_Roll", "details": { - "name": "Number: Roll" + "name": "Roll" } }, { - "key": "DataInput_Number: Yaw", + "key": "DataInput_Yaw", "details": { - "name": "Number: Yaw" + "name": "Yaw" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names index edf359e399..26fe0c1b79 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Dot.names @@ -7,8 +7,7 @@ "details": { "name": "Dot", "category": "Math/Quaternion", - "tooltip": "returns the Dot product of A and B", - "subtitle": "Quaternion" + "tooltip": "Returns the Dot product of A and B" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Quaternion: A", + "key": "DataInput_A", "details": { - "name": "Quaternion: A" + "name": "A" } }, { - "key": "DataInput_Quaternion: B", + "key": "DataInput_B", "details": { - "name": "Quaternion: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names index e7d7e7d9ee..9851c3fd8f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromAxisAngleDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromAxisAngleDegrees", + "name": "From Axis Angle (Degrees)", "category": "Math/Quaternion", - "tooltip": "returns the rotation created from Axis the angle Degrees", - "subtitle": "Quaternion" + "tooltip": "Returns the rotation created from Axis the angle Degrees" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Axis", + "key": "DataInput_Axis", "details": { - "name": "Vector3: Axis" + "name": "Axis" } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names index 3047464992..906014820e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix3x3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromMatrix3x3", + "name": "From Matrix3x3", "category": "Math/Quaternion", - "tooltip": "returns a rotation created from the 3x3 matrix source", - "subtitle": "Quaternion" + "tooltip": "Returns a rotation created from the 3x3 matrix source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names index 0584ca0fc6..cbfd1dc1ea 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromMatrix4x4.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromMatrix4x4", + "name": "From Matrix4x4", "category": "Math/Quaternion", - "tooltip": "returns a rotation created from the 4x4 matrix source", - "subtitle": "Quaternion" + "tooltip": "Returns a rotation created from the 4x4 matrix source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix4x4: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix4x4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names index 29caf9ef30..3a708bac08 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_FromTransform.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromTransform", + "name": "From Transform", "category": "Math/Quaternion", - "tooltip": "returns a rotation created from the rotation part of the transform source", - "subtitle": "Quaternion" + "tooltip": "Returns a rotation created from the rotation part of the transform source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names index 4c5c4bc914..fc4ab2f1c7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_InvertFull.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "InvertFull", + "name": "Invert Full", "category": "Math/Quaternion", - "tooltip": "returns the inverse for any rotation, not just unit rotations", - "subtitle": "Quaternion" + "tooltip": "Returns the inverse for any rotation, not just unit rotations" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names index 664d1d5902..4af70867e8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsClose.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Quaternion", - "tooltip": "returns true if A and B are within Tolerance of each other", - "subtitle": "Quaternion" + "tooltip": "Returns true if A and B are within Tolerance of each other" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Quaternion: A", + "key": "DataInput_A", "details": { - "name": "Quaternion: A" + "name": "A" } }, { - "key": "DataInput_Quaternion: B", + "key": "DataInput_B", "details": { - "name": "Quaternion: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names index 3c6ed7b793..0ccd7a1ce7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Quaternion", - "tooltip": "returns true if every element in Source is finite", - "subtitle": "Quaternion" + "tooltip": "Returns true if every element in Source is finite" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names index d4fd132017..62655f407c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsIdentity.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsIdentity", + "name": "Is Identity", "category": "Math/Quaternion", - "tooltip": "returns true if Source is within Tolerance of the Identity rotation", - "subtitle": "Quaternion" + "tooltip": "Returns true if Source is within Tolerance of the Identity rotation" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names index 6fd28166a3..9ab1882a09 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_IsZero.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsZero", + "name": "Is Zero", "category": "Math/Quaternion", - "tooltip": "returns true if Source is within Tolerance of the Zero rotation", - "subtitle": "Quaternion" + "tooltip": "Returns true if Source is within Tolerance of the Zero rotation" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names index 536c549af9..772ab4f4d6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthReciprocal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LengthReciprocal", + "name": "Length Reciprocal", "category": "Math/Quaternion", - "tooltip": "returns the reciprocal length of Source", - "subtitle": "Quaternion" + "tooltip": "Returns the reciprocal length of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names index 5279f1839e..8890491e60 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_LengthSquared.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LengthSquared", + "name": "Length Squared", "category": "Math/Quaternion", - "tooltip": "returns the square of the length of Source", - "subtitle": "Quaternion" + "tooltip": "Returns the square of the length of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names index ca24736058..16925c829a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Lerp.names @@ -7,8 +7,7 @@ "details": { "name": "Lerp", "category": "Math/Quaternion", - "tooltip": "returns a the linear interpolation between From and To by the amount T", - "subtitle": "Quaternion" + "tooltip": "Returns a the linear interpolation between From and To by the amount T" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Quaternion: From", + "key": "DataInput_From", "details": { - "name": "Quaternion: From" + "name": "From" } }, { - "key": "DataInput_Quaternion: To", + "key": "DataInput_To", "details": { - "name": "Quaternion: To" + "name": "To" } }, { - "key": "DataInput_Number: T", + "key": "DataInput_T", "details": { - "name": "Number: T" + "name": "T" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names index 2c62ec63a3..9c8fdd2ada 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_MultiplyByNumber.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByNumber", + "name": "Multiply By Number", "category": "Math/Quaternion", - "tooltip": "returns the Source with each element multiplied by Multiplier", - "subtitle": "Quaternion" + "tooltip": "Returns the Source with each element multiplied by Multiplier" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names index f8749b2bc3..ac5912acc4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Negate.names @@ -7,8 +7,7 @@ "details": { "name": "Negate", "category": "Math/Quaternion", - "tooltip": "returns the Source with each element negated", - "subtitle": "Quaternion" + "tooltip": "Returns the Source with each element negated" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names index 525e1d087f..c5773851d4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Normalize.names @@ -7,8 +7,7 @@ "details": { "name": "Normalize", "category": "Math/Quaternion", - "tooltip": "returns the normalized version of Source", - "subtitle": "Quaternion" + "tooltip": "Returns the normalized version of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names index 113408dc70..cbd26e5162 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotateVector3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RotateVector3", + "name": "Rotate Vector3", "category": "Math/Quaternion", - "tooltip": "Returns a new Vector3 that is the source vector3 rotated by the given Quaternion", - "subtitle": "Quaternion" + "tooltip": "Returns a new Vector3 that is the source vector3 rotated by the given Quaternion" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Quaternion: Quaternion", + "key": "DataInput_Quaternion", "details": { - "name": "Quaternion: Quaternion" + "name": "Quaternion" } }, { - "key": "DataInput_Vector3: Vector", + "key": "DataInput_Vector", "details": { - "name": "Vector3: Vector" + "name": "Vector" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names index 4abb365d80..4eb971a203 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationXDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RotationXDegrees", + "name": "Rotation X (Degrees)", "category": "Math/Quaternion", - "tooltip": "creates a rotation of Degrees around the x-axis", - "subtitle": "Quaternion" + "tooltip": "Creates a rotation of Degrees around the x-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names index 6e7ca8c4da..aada946ccc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationYDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RotationYDegrees", + "name": "Rotation Y (Degrees)", "category": "Math/Quaternion", - "tooltip": "creates a rotation of Degrees around the y-axis", - "subtitle": "Quaternion" + "tooltip": "Creates a rotation of Degrees around the y-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names index ec05a8b2fa..7a72aa9330 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_RotationZDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RotationZDegrees", + "name": "Rotation Z (Degrees)", "category": "Math/Quaternion", - "tooltip": "creates a rotation of Degrees around the z-axis", - "subtitle": "Quaternion" + "tooltip": "Creates a rotation of Degrees around the z-axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names index 0e86f79092..deb69f734f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ShortestArc.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ShortestArc", + "name": "Shortest Arc", "category": "Math/Quaternion", - "tooltip": "creates a rotation representing the shortest arc between From and To", - "subtitle": "Quaternion" + "tooltip": "Creates a rotation representing the shortest arc between From and To" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: From", + "key": "DataInput_From", "details": { - "name": "Vector3: From" + "name": "From" } }, { - "key": "DataInput_Vector3: To", + "key": "DataInput_To", "details": { - "name": "Vector3: To" + "name": "To" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names index c027414e99..a1d1dfa30b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Slerp.names @@ -7,8 +7,7 @@ "details": { "name": "Slerp", "category": "Math/Quaternion", - "tooltip": "returns the spherical linear interpolation between From and To by the amount T, the result is NOT normalized", - "subtitle": "Quaternion" + "tooltip": "Returns the spherical linear interpolation between From and To by the amount T, the result is NOT normalized" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Quaternion: From", + "key": "DataInput_From", "details": { - "name": "Quaternion: From" + "name": "From" } }, { - "key": "DataInput_Quaternion: To", + "key": "DataInput_To", "details": { - "name": "Quaternion: To" + "name": "To" } }, { - "key": "DataInput_Number: T", + "key": "DataInput_T", "details": { - "name": "Number: T" + "name": "T" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names index 613ea8326e..c9efc06f69 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_Squad.names @@ -7,8 +7,7 @@ "details": { "name": "Squad", "category": "Math/Quaternion", - "tooltip": "returns the quadratic interpolation, that is: Squad(From, To, In, Out, T) = Slerp(Slerp(From, Out, T), Slerp(To, In, T), 2(1 - T)T)", - "subtitle": "Quaternion" + "tooltip": "Returns the quadratic interpolation, that is: Squad(From, To, In, Out, T) = Slerp(Slerp(From, Out, T), Slerp(To, In, T), 2(1 - T)T)" }, "slots": [ { @@ -24,39 +23,39 @@ } }, { - "key": "DataInput_Quaternion: From", + "key": "DataInput_From", "details": { - "name": "Quaternion: From" + "name": "From" } }, { - "key": "DataInput_Quaternion: To", + "key": "DataInput_To", "details": { - "name": "Quaternion: To" + "name": "To" } }, { - "key": "DataInput_Quaternion: In", + "key": "DataInput_In", "details": { - "name": "Quaternion: In" + "name": "In" } }, { - "key": "DataInput_Quaternion: Out", + "key": "DataInput_Out", "details": { - "name": "Quaternion: Out" + "name": "Out" } }, { - "key": "DataInput_Number: T", + "key": "DataInput_T", "details": { - "name": "Number: T" + "name": "T" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names index cc72bd8aa4..11efc83cb5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathQuaternion_ToAngleDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToAngleDegrees", + "name": "To Angle (Degrees)", "category": "Math/Quaternion", - "tooltip": "returns the angle of angle-axis pair that Source represents in degrees", - "subtitle": "Quaternion" + "tooltip": "Returns the angle of angle-axis pair that Source represents in degrees" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names index e4d315b3d9..2e70823599 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomColor.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomColor", + "name": "Random Color", "category": "Math/Random", - "tooltip": "Returns a random color [Min, Max]", - "subtitle": "Random" + "tooltip": "Returns a random color [Min, Max]" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Color: Min", + "key": "DataInput_Min", "details": { - "name": "Color: Min" + "name": "Min" } }, { - "key": "DataInput_Color: Max", + "key": "DataInput_Max", "details": { - "name": "Color: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Color", + "key": "DataOutput_Result", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names index f8e29b2fc9..15bb0a397c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomGrayscale.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomGrayscale", + "name": "Random Grayscale", "category": "Math/Random", - "tooltip": "Returns a random grayscale color between [Min, Max] intensities", - "subtitle": "Random" + "tooltip": "Returns a random grayscale color between [Min, Max] intensities" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Number: Min", + "key": "DataInput_Min", "details": { - "name": "Number: Min" + "name": "Min" } }, { - "key": "DataInput_Number: Max", + "key": "DataInput_Max", "details": { - "name": "Number: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Color", + "key": "DataOutput_Result", "details": { - "name": "Result: Color" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names index 4f147c7096..4fad43953b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomInteger.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomInteger", + "name": "Random Integer", "category": "Math/Random", - "tooltip": "returns a random integer [Min, Max]", - "subtitle": "Random" + "tooltip": "Returns a random integer [Min, Max]" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Number: Min", + "key": "DataInput_Min", "details": { - "name": "Number: Min" + "name": "Min" } }, { - "key": "DataInput_Number: Max", + "key": "DataInput_Max", "details": { - "name": "Number: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names index 8abeca1d6b..3dfe2b70c6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomNumber.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomNumber", + "name": "Random Number", "category": "Math/Random", - "tooltip": "returns a random real number [Min, Max]", - "subtitle": "Random" + "tooltip": "Returns a random real number [Min, Max]" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Number: Min", + "key": "DataInput_Min", "details": { - "name": "Number: Min" + "name": "Min" } }, { - "key": "DataInput_Number: Max", + "key": "DataInput_Max", "details": { - "name": "Number: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names index c79e012d45..76cc80bb9a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInArc.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInArc", + "name": "Random Point In Arc", "category": "Math/Random", - "tooltip": "returns a random point in the specified arc", - "subtitle": "Random" + "tooltip": "Returns a random point in the specified arc" }, "slots": [ { @@ -24,39 +23,39 @@ } }, { - "key": "DataInput_Vector3: Origin", + "key": "DataInput_Origin", "details": { - "name": "Vector3: Origin" + "name": "Origin" } }, { - "key": "DataInput_Vector3: Direction", + "key": "DataInput_Direction", "details": { - "name": "Vector3: Direction" + "name": "Direction" } }, { - "key": "DataInput_Vector3: Normal", + "key": "DataInput_Normal", "details": { - "name": "Vector3: Normal" + "name": "Normal" } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataInput_Number: Angle", + "key": "DataInput_Angle", "details": { - "name": "Number: Angle" + "name": "Angle" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names index 4be919b924..3e66186f01 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInBox.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInBox", + "name": "Random Point In Box", "category": "Math/Random", - "tooltip": "returns a random point in a box", - "subtitle": "Random" + "tooltip": "Returns a random point in a box" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Dimensions", + "key": "DataInput_Dimensions", "details": { - "name": "Vector3: Dimensions" + "name": "Dimensions" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names index cbdf74516f..fa9aa601c7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCircle.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInCircle", + "name": "Random Point In Circle", "category": "Math/Random", - "tooltip": "returns a random point inside the area of a circle", - "subtitle": "Random" + "tooltip": "Returns a random point inside the area of a circle" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names index fbec23d1e8..7b48818c3a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCone.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInCone", + "name": "Random Point In Cone", "category": "Math/Random", - "tooltip": "returns a random point in a cone", - "subtitle": "Random" + "tooltip": "Returns a random point in a cone" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataInput_Number: Angle", + "key": "DataInput_Angle", "details": { - "name": "Number: Angle" + "name": "Angle" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names index 983c867fbe..4f383fc218 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInCylinder.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInCylinder", + "name": "Random Point In Cylinder", "category": "Math/Random", - "tooltip": "returns a random point in a cylinder", - "subtitle": "Random" + "tooltip": "Returns a random point in a cylinder" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataInput_Number: Height", + "key": "DataInput_Height", "details": { - "name": "Number: Height" + "name": "Height" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names index aa5a4c9bfb..0097ccc4a5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInEllipsoid.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInEllipsoid", + "name": "Random Point In Ellipsoid", "category": "Math/Random", - "tooltip": "returns a random point in an ellipsoid", - "subtitle": "Random" + "tooltip": "Returns a random point in an ellipsoid" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Dimensions", + "key": "DataInput_Dimensions", "details": { - "name": "Vector3: Dimensions" + "name": "Dimensions" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names index fa9d74c28f..ef39e9d0bf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSphere.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInSphere", + "name": "Random Point In Sphere", "category": "Math/Random", - "tooltip": "returns a random point in a sphere", - "subtitle": "Random" + "tooltip": "Returns a random point in a sphere" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names index fc57d51457..9793721ef9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInSquare.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInSquare", + "name": "Random Point In Square", "category": "Math/Random", - "tooltip": "returns a random point in a square", - "subtitle": "Random" + "tooltip": "Returns a random point in a square" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Dimensions", + "key": "DataInput_Dimensions", "details": { - "name": "Vector2: Dimensions" + "name": "Dimensions" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names index 32903d94b3..89f9558c38 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointInWedge.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointInWedge", + "name": "Random Point In Wedge", "category": "Math/Random", - "tooltip": "returns a random point in the specified wedge", - "subtitle": "Random" + "tooltip": "Returns a random point in the specified wedge" }, "slots": [ { @@ -24,45 +23,45 @@ } }, { - "key": "DataInput_Vector3: Origin", + "key": "DataInput_Origin", "details": { - "name": "Vector3: Origin" + "name": "Origin" } }, { - "key": "DataInput_Vector3: Direction", + "key": "DataInput_Direction", "details": { - "name": "Vector3: Direction" + "name": "Direction" } }, { - "key": "DataInput_Vector3: Normal", + "key": "DataInput_Normal", "details": { - "name": "Vector3: Normal" + "name": "Normal" } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataInput_Number: Height", + "key": "DataInput_Height", "details": { - "name": "Number: Height" + "name": "Height" } }, { - "key": "DataInput_Number: Angle", + "key": "DataInput_Angle", "details": { - "name": "Number: Angle" + "name": "Angle" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names index a878a99abd..428cd58136 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnCircle.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointOnCircle", + "name": "Random Point On Circle", "category": "Math/Random", - "tooltip": "returns a random point on the circumference of a circle", - "subtitle": "Random" + "tooltip": "Returns a random point on the circumference of a circle" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names index fc35ee804a..f648814dfc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomPointOnSphere.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomPointOnSphere", + "name": "Random Point On Sphere", "category": "Math/Random", - "tooltip": "returns a random point on the surface of a sphere", - "subtitle": "Random" + "tooltip": "Returns a random point on the surface of a sphere" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Radius", + "key": "DataInput_Radius", "details": { - "name": "Number: Radius" + "name": "Radius" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names index dbfed976d7..161d7552d4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomQuaternion.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomQuaternion", + "name": "Random Quaternion", "category": "Math/Random", - "tooltip": "returns a random quaternion", - "subtitle": "Random" + "tooltip": "Returns a random quaternion" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Number: Min", + "key": "DataInput_Min", "details": { - "name": "Number: Min" + "name": "Min" } }, { - "key": "DataInput_Number: Max", + "key": "DataInput_Max", "details": { - "name": "Number: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Quaternion", + "key": "DataOutput_Result", "details": { - "name": "Result: Quaternion" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names index 20e046cf1a..c27266cdcf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector2.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomUnitVector2", + "name": "Random Unit Vector2", "category": "Math/Random", - "tooltip": "returns a random Vector2 direction", - "subtitle": "Random" + "tooltip": "Returns a random Vector2 direction" }, "slots": [ { @@ -24,9 +23,9 @@ } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names index 71137cce94..2a7ca79279 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomUnitVector3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomUnitVector3", + "name": "Random Unit Vector3", "category": "Math/Random", - "tooltip": "returns a random Vector3 direction", - "subtitle": "Random" + "tooltip": "Returns a random Vector3 direction" }, "slots": [ { @@ -24,9 +23,9 @@ } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names index 5fe7c74d9c..b185b25309 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector2.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomVector2", + "name": "Random Vector2", "category": "Math/Random", - "tooltip": "returns a random Vector2", - "subtitle": "Random" + "tooltip": "Returns a random Vector2" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: Min", + "key": "DataInput_Min", "details": { - "name": "Vector2: Min" + "name": "Min" } }, { - "key": "DataInput_Vector2: Max", + "key": "DataInput_Max", "details": { - "name": "Vector2: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names index 29c2859b23..3be02e9d63 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomVector3", + "name": "Random Vector3", "category": "Math/Random", - "tooltip": "returns a random Vector3", - "subtitle": "Random" + "tooltip": "Returns a random Vector3" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Min", + "key": "DataInput_Min", "details": { - "name": "Vector3: Min" + "name": "Min" } }, { - "key": "DataInput_Vector3: Max", + "key": "DataInput_Max", "details": { - "name": "Vector3: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names index f6ec9b52c9..060a2aa54c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathRandom_RandomVector4.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RandomVector4", + "name": "Random Vector4", "category": "Math/Random", - "tooltip": "returns a random Vector4", - "subtitle": "Random" + "tooltip": "Returns a random Vector4" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Min", + "key": "DataInput_Min", "details": { - "name": "Vector4: Min" + "name": "Min" } }, { - "key": "DataInput_Vector4: Max", + "key": "DataInput_Max", "details": { - "name": "Vector4: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names index db82a0ef2c..6467b86b65 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromMatrix3x3", + "name": "From Matrix3x3", "category": "Math/Transform", - "tooltip": "returns a transform with from 3x3 matrix and with the translation set to zero", - "subtitle": "Transform" + "tooltip": "Returns a transform with from 3x3 matrix and with the translation set to zero" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Matrix3x3: Source", + "key": "DataInput_Source", "details": { - "name": "Matrix3x3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names index a3e3c145bf..a982f27f00 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromMatrix3x3AndTranslation.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromMatrix3x3AndTranslation", + "name": "From Matrix3x3 And Translation", "category": "Math/Transform", - "tooltip": "returns a transform from the 3x3 matrix and the translation", - "subtitle": "Transform" + "tooltip": "Returns a transform from the 3x3 matrix and the translation" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Matrix3x3: Matrix", + "key": "DataInput_Matrix", "details": { - "name": "Matrix3x3: Matrix" + "name": "Matrix" } }, { - "key": "DataInput_Vector3: Translation", + "key": "DataInput_Translation", "details": { - "name": "Vector3: Translation" + "name": "Translation" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names index 3e0d34ddb7..8f9e25ac73 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotation.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotation", + "name": "From Rotation", "category": "Math/Transform", - "tooltip": "returns a transform from the rotation and with the translation set to zero", - "subtitle": "Transform" + "tooltip": "Returns a transform from the rotation and with the translation set to zero" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Quaternion: Source", + "key": "DataInput_Source", "details": { - "name": "Quaternion: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names index 8c2711d55b..86af19524d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromRotationAndTranslation.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromRotationAndTranslation", + "name": "From Rotation And Translation", "category": "Math/Transform", - "tooltip": "returns a transform from the rotation and the translation", - "subtitle": "Transform" + "tooltip": "Returns a transform from the rotation and the translation" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Quaternion: Rotation", + "key": "DataInput_Rotation", "details": { - "name": "Quaternion: Rotation" + "name": "Rotation" } }, { - "key": "DataInput_Vector3: Translation", + "key": "DataInput_Translation", "details": { - "name": "Vector3: Translation" + "name": "Translation" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names index 713dcda37e..c7b3729287 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromScale.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromScale", + "name": "From Scale", "category": "Math/Transform", - "tooltip": "returns a transform which applies the specified uniform Scale, but no rotation or translation", - "subtitle": "Transform" + "tooltip": "Returns a transform which applies the specified uniform Scale, but no rotation or translation" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names index 296c785033..9de04cbca8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_FromTranslation.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromTranslation", + "name": "From Translation", "category": "Math/Transform", - "tooltip": "returns a translation matrix and the rotation set to zero", - "subtitle": "Transform" + "tooltip": "Returns a translation matrix and the rotation set to zero" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Translation", + "key": "DataInput_Translation", "details": { - "name": "Vector3: Translation" + "name": "Translation" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names index 5945a1ae06..60ca484883 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetForward.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetForward", + "name": "Get Forward", "category": "Math/Transform", - "tooltip": "returns the forward direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)", - "subtitle": "Transform" + "tooltip": "Returns the forward direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names index 31b01e4787..9c9105301e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetRight.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetRight", + "name": "Get Right", "category": "Math/Transform", - "tooltip": "returns the right direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)", - "subtitle": "Transform" + "tooltip": "Returns the right direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names index 671a641f6f..657ae89af1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetTranslation.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetTranslation", + "name": "Get Translation", "category": "Math/Transform", - "tooltip": "returns the translation of Source", - "subtitle": "Transform" + "tooltip": "Returns the translation of Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names index 2b6c1e7f5b..9eae139080 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_GetUp.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetUp", + "name": "Get Up", "category": "Math/Transform", - "tooltip": "returns the up direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)", - "subtitle": "Transform" + "tooltip": "Returns the up direction vector from the specified transform scaled by a given value (O3DE uses Z up, right handed)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names index b0a4021edc..47fdde6039 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsClose.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Transform", - "tooltip": "returns true if every row of A is within Tolerance of corresponding row in B, else false", - "subtitle": "Transform" + "tooltip": "Returns true if every row of A is within Tolerance of corresponding row in B, else false" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Transform: A", + "key": "DataInput_A", "details": { - "name": "Transform: A" + "name": "A" } }, { - "key": "DataInput_Transform: B", + "key": "DataInput_B", "details": { - "name": "Transform: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names index d37de79fb8..5a820ec8aa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Transform", - "tooltip": "returns true if every row of source is finite, else false", - "subtitle": "Transform" + "tooltip": "Returns true if every row of source is finite, else false" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names index 0e711ac6fa..77f686a375 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_IsOrthogonal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsOrthogonal", + "name": "Is Orthogonal", "category": "Math/Transform", - "tooltip": "returns true if the upper 3x3 matrix of Source is within Tolerance of orthogonal, else false", - "subtitle": "Transform" + "tooltip": "Returns true if the upper 3x3 matrix of Source is within Tolerance of orthogonal, else false" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names index 691bd412cf..a898617aa1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByUniformScale.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByUniformScale", + "name": "Multiply By Uniform Scale", "category": "Math/Transform", - "tooltip": "returns Source multiplied uniformly by Scale", - "subtitle": "Transform" + "tooltip": "Returns Source multiplied uniformly by Scale" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names index 18fa67ce86..e227c1ef2b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector3.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByVector3", + "name": "Multiply By Vector3", "category": "Math/Transform", - "tooltip": "returns Source post multiplied by Multiplier", - "subtitle": "Transform" + "tooltip": "Returns Source post multiplied by Multiplier" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataInput_Vector3: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Vector3: Multiplier" + "name": "Multiplier" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names index eb22b5daa9..64820d14e1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_MultiplyByVector4.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByVector4", + "name": "Multiply By Vector4", "category": "Math/Transform", - "tooltip": "returns Source post multiplied by Multiplier", - "subtitle": "Transform" + "tooltip": "Returns Source post multiplied by Multiplier" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataInput_Vector4: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Vector4: Multiplier" + "name": "Multiplier" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names index 928a8ed811..4e803bc6b7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_Orthogonalize.names @@ -7,8 +7,7 @@ "details": { "name": "Orthogonalize", "category": "Math/Transform", - "tooltip": "returns an orthogonal matrix if the Source is almost orthogonal", - "subtitle": "Transform" + "tooltip": "Returns an orthogonal matrix if the Source is almost orthogonal" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names index 5db0abd4d8..d50b4f99e4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationXDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RotationXDegrees", + "name": "Rotation X (Degrees)", "category": "Math/Transform", - "tooltip": "returns a transform representing a rotation Degrees around the X-Axis", - "subtitle": "Transform" + "tooltip": "Returns a transform representing a rotation Degrees around the X-Axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names index 4861a3d6b4..2da86bdade 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationYDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RotationYDegrees", + "name": "Rotation Y (Degrees)", "category": "Math/Transform", - "tooltip": "returns a transform representing a rotation Degrees around the Y-Axis", - "subtitle": "Transform" + "tooltip": "Returns a transform representing a rotation Degrees around the Y-Axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names index 78d4211f65..75a0e7d1ec 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_RotationZDegrees.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "RotationZDegrees", + "name": "Rotation Z (Degrees)", "category": "Math/Transform", - "tooltip": "returns a transform representing a rotation Degrees around the Z-Axis", - "subtitle": "Transform" + "tooltip": "Returns a transform representing a rotation Degrees around the Z-Axis" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Degrees", + "key": "DataInput_Degrees", "details": { - "name": "Number: Degrees" + "name": "Degrees" } }, { - "key": "DataOutput_Result: Transform", + "key": "DataOutput_Result", "details": { - "name": "Result: Transform" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names index 47f28fd9af..3e9da773e0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathTransform_ToScale.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToScale", + "name": "To Scale", "category": "Math/Transform", - "tooltip": "returns the uniform scale of the Source", - "subtitle": "Transform" + "tooltip": "Returns the uniform scale of the Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Transform: Source", + "key": "DataInput_Source", "details": { - "name": "Transform: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names index bd5e3a88f6..8eb626b066 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Absolute.names @@ -7,8 +7,7 @@ "details": { "name": "Absolute", "category": "Math/Vector2", - "tooltip": "returns a vector with the absolute values of the elements of the source", - "subtitle": "Vector2" + "tooltip": "Returns a vector with the absolute values of the elements of the source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names index 76f0626c0c..d70cb4b898 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Angle.names @@ -7,8 +7,7 @@ "details": { "name": "Angle", "category": "Math/Vector2", - "tooltip": "returns a unit length vector from an angle in radians", - "subtitle": "Vector2" + "tooltip": "Returns a unit length vector from an angle in radians" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Number: Angle", + "key": "DataInput_Angle", "details": { - "name": "Number: Angle" + "name": "Angle" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names index 718f497f51..970b1647a8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Clamp.names @@ -7,8 +7,7 @@ "details": { "name": "Clamp", "category": "Math/Vector2", - "tooltip": "returns vector clamped to [min, max] and equal to source if possible", - "subtitle": "Vector2" + "tooltip": "Returns vector clamped to [min, max] and equal to source if possible" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataInput_Vector2: Min", + "key": "DataInput_Min", "details": { - "name": "Vector2: Min" + "name": "Min" } }, { - "key": "DataInput_Vector2: Max", + "key": "DataInput_Max", "details": { - "name": "Vector2: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names index f6499bc67c..53b667f5d4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DirectionTo.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DirectionTo", + "name": "Direction To", "category": "Math/Vector2", - "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0", - "subtitle": "Vector2" + "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0" }, "slots": [ { @@ -24,33 +23,27 @@ } }, { - "key": "DataInput_Vector2: From", + "key": "DataInput_From", "details": { - "name": "Vector2: From" + "name": "From" } }, { - "key": "DataInput_Vector2: To", + "key": "DataInput_To", "details": { - "name": "Vector2: To" + "name": "To" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" - } - }, - { - "key": "DataOutput_Result: Number", - "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names index ac09369515..81c7caac36 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Distance.names @@ -7,8 +7,7 @@ "details": { "name": "Distance", "category": "Math/Vector2", - "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)", - "subtitle": "Vector2" + "tooltip": "Returns the distance from B to A, that is the magnitude of the vector (A - B)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: A", + "key": "DataInput_A", "details": { - "name": "Vector2: A" + "name": "A" } }, { - "key": "DataInput_Vector2: B", + "key": "DataInput_B", "details": { - "name": "Vector2: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names index 88616d077a..d8282d40d0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_DistanceSquared.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DistanceSquared", + "name": "Distance Squared", "category": "Math/Vector2", - "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)", - "subtitle": "Vector2" + "tooltip": "Returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: A", + "key": "DataInput_A", "details": { - "name": "Vector2: A" + "name": "A" } }, { - "key": "DataInput_Vector2: B", + "key": "DataInput_B", "details": { - "name": "Vector2: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names index f0490c0224..21a9836da5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Dot.names @@ -7,8 +7,7 @@ "details": { "name": "Dot", "category": "Math/Vector2", - "tooltip": "returns the vector dot product of A dot B", - "subtitle": "Vector2" + "tooltip": "Returns the vector dot product of A dot B" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: A", + "key": "DataInput_A", "details": { - "name": "Vector2: A" + "name": "A" } }, { - "key": "DataInput_Vector2: B", + "key": "DataInput_B", "details": { - "name": "Vector2: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names index 7ada76f810..1825d3b69f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_FromValues.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromValues", + "name": "From Values", "category": "Math/Vector2", - "tooltip": "returns a vector from elements", - "subtitle": "Vector2" + "tooltip": "Returns a vector from elements" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Number: X", + "key": "DataInput_X", "details": { - "name": "Number: X" + "name": "X" } }, { - "key": "DataInput_Number: Y", + "key": "DataInput_Y", "details": { - "name": "Number: Y" + "name": "Y" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names index c85cfe67af..4abdac379a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_GetElement.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetElement", + "name": "Get Element", "category": "Math/Vector2", - "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y)", - "subtitle": "Vector2" + "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Index", + "key": "DataInput_Index", "details": { - "name": "Number: Index" + "name": "Index" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names index 38b1f446c9..30d0f9eab6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsClose.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Vector2", - "tooltip": "returns true if the difference between A and B is less than tolerance, else false", - "subtitle": "Vector2" + "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector2: A", + "key": "DataInput_A", "details": { - "name": "Vector2: A" + "name": "A" } }, { - "key": "DataInput_Vector2: B", + "key": "DataInput_B", "details": { - "name": "Vector2: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names index b56cbc74e1..d170de9066 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Vector2", - "tooltip": "returns true if every element in the source is finite, else false", - "subtitle": "Vector2" + "tooltip": "Returns true if every element in the source is finite, else false" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names index 7a737fa8e1..aecdcde55d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsNormalized.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsNormalized", + "name": "Is Normalized", "category": "Math/Vector2", - "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false", - "subtitle": "Vector2" + "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names index 07fc13fbc6..d0869fffd0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_IsZero.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsZero", + "name": "Is Zero", "category": "Math/Vector2", - "tooltip": "returns true if A is within tolerance of the zero vector, else false", - "subtitle": "Vector2" + "tooltip": "Returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names index c6f78e8083..99e7922e75 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Length.names @@ -7,8 +7,7 @@ "details": { "name": "Length", "category": "Math/Vector2", - "tooltip": "returns the magnitude of source", - "subtitle": "Vector2" + "tooltip": "Returns the magnitude of source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names index 2d70c7e4e4..6ff64af10f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_LengthSquared.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LengthSquared", + "name": "Length Squared", "category": "Math/Vector2", - "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length", - "subtitle": "Vector2" + "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names index 296c05bdf5..78bf3b0d6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Lerp.names @@ -7,8 +7,7 @@ "details": { "name": "Lerp", "category": "Math/Vector2", - "tooltip": "returns the linear interpolation (From + ((To - From) * T)", - "subtitle": "Vector2" + "tooltip": "Returns the linear interpolation (From + ((To - From) * T)" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector2: From", + "key": "DataInput_From", "details": { - "name": "Vector2: From" + "name": "From" } }, { - "key": "DataInput_Vector2: To", + "key": "DataInput_To", "details": { - "name": "Vector2: To" + "name": "To" } }, { - "key": "DataInput_Number: T", + "key": "DataInput_T", "details": { - "name": "Number: T" + "name": "T" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names index 52b3489c28..6b906d80bf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Max.names @@ -7,8 +7,7 @@ "details": { "name": "Max", "category": "Math/Vector2", - "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y))", - "subtitle": "Vector2" + "tooltip": "Returns the vector (max(A.x, B.x), max(A.y, B.y))" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: A", + "key": "DataInput_A", "details": { - "name": "Vector2: A" + "name": "A" } }, { - "key": "DataInput_Vector2: B", + "key": "DataInput_B", "details": { - "name": "Vector2: B" + "name": "B" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names index 33585a0662..bc50faf138 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Min.names @@ -7,8 +7,7 @@ "details": { "name": "Min", "category": "Math/Vector2", - "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y))", - "subtitle": "Vector2" + "tooltip": "Returns the vector (min(A.x, B.x), min(A.y, B.y))" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: A", + "key": "DataInput_A", "details": { - "name": "Vector2: A" + "name": "A" } }, { - "key": "DataInput_Vector2: B", + "key": "DataInput_B", "details": { - "name": "Vector2: B" + "name": "B" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names index 13a43e0593..14e227c51d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_MultiplyByNumber.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByNumber", + "name": "Multiply By Number", "category": "Math/Vector2", - "tooltip": "returns the vector Source with each element multiplied by Multiplier", - "subtitle": "Vector2" + "tooltip": "Returns the vector Source with each element multiplied by Multiplier" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names index 79a5e7c6e2..d0501ee1b3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Negate.names @@ -7,8 +7,7 @@ "details": { "name": "Negate", "category": "Math/Vector2", - "tooltip": "returns the vector Source with each element multiplied by -1", - "subtitle": "Vector2" + "tooltip": "Returns the vector Source with each element multiplied by -1" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names index 9b7ba9a72e..a8c9e0ef3b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Normalize.names @@ -7,8 +7,7 @@ "details": { "name": "Normalize", "category": "Math/Vector2", - "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small", - "subtitle": "Vector2" + "tooltip": "Returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names index fbf04133a8..e6a60b35aa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Project.names @@ -7,8 +7,7 @@ "details": { "name": "Project", "category": "Math/Vector2", - "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B", - "subtitle": "Vector2" + "tooltip": "Returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: A", + "key": "DataInput_A", "details": { - "name": "Vector2: A" + "name": "A" } }, { - "key": "DataInput_Vector2: B", + "key": "DataInput_B", "details": { - "name": "Vector2: B" + "name": "B" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names index 2d055c4d63..001c062eb8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetX.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetX", + "name": "Set X", "category": "Math/Vector2", - "tooltip": "returns a the vector(X, Source.Y)", - "subtitle": "Vector2" + "tooltip": "Returns a the vector(X, Source.Y)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataInput_Number: X", + "key": "DataInput_X", "details": { - "name": "Number: X" + "name": "X" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names index 74e2a7197c..cb0655fafc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_SetY.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetY", + "name": "Set Y", "category": "Math/Vector2", - "tooltip": "returns a the vector(Source.X, Y)", - "subtitle": "Vector2" + "tooltip": "Returns a the vector(Source.X, Y)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Y", + "key": "DataInput_Y", "details": { - "name": "Number: Y" + "name": "Y" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names index 703f0e858b..d6e29b7a5f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_Slerp.names @@ -7,8 +7,7 @@ "details": { "name": "Slerp", "category": "Math/Vector2", - "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To", - "subtitle": "Vector2" + "tooltip": "Returns a vector that is the spherical linear interpolation T, between From and To" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector2: From", + "key": "DataInput_From", "details": { - "name": "Vector2: From" + "name": "From" } }, { - "key": "DataInput_Vector2: To", + "key": "DataInput_To", "details": { - "name": "Vector2: To" + "name": "To" } }, { - "key": "DataInput_Number: T", + "key": "DataInput_T", "details": { - "name": "Number: T" + "name": "T" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names index 2e4ae9369c..5ea65c816c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector2_ToPerpendicular.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToPerpendicular", + "name": "To Perpendicular", "category": "Math/Vector2", - "tooltip": "returns the vector (-Source.y, Source.x), a 90 degree, positive rotation", - "subtitle": "Vector2" + "tooltip": "Returns the vector (-Source.y, Source.x), a 90 degree, positive rotation" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector2: Source", + "key": "DataInput_Source", "details": { - "name": "Vector2: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector2", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector2" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names index 6253641670..dbaeb967a2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Absolute.names @@ -7,8 +7,7 @@ "details": { "name": "Absolute", "category": "Math/Vector3", - "tooltip": "returns a vector with the absolute values of the elements of the source", - "subtitle": "Vector3" + "tooltip": "Returns a vector with the absolute values of the elements of the source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names index 3d8de21436..05aec1da52 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_BuildTangentBasis.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "BuildTangentBasis", + "name": "Build Tangent Basis", "category": "Math/Vector3", - "tooltip": "returns a tangent basis from the normal", - "subtitle": "Vector3" + "tooltip": "Returns a tangent basis from the normal" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Normal", + "key": "DataInput_Normal", "details": { - "name": "Vector3: Normal" + "name": "Normal" } }, { - "key": "DataOutput_Tangent: Vector3", + "key": "DataOutput_Tangent", "details": { - "name": "Tangent: Vector3" + "name": "Tangent" } }, { - "key": "DataOutput_Bitangent: Vector3", + "key": "DataOutput_Bitangent", "details": { - "name": "Bitangent: Vector3" + "name": "Bitangent" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names index 6f1842a151..28e5747493 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Clamp.names @@ -7,8 +7,7 @@ "details": { "name": "Clamp", "category": "Math/Vector3", - "tooltip": "returns vector clamped to [min, max] and equal to source if possible", - "subtitle": "Vector3" + "tooltip": "Returns vector clamped to [min, max] and equal to source if possible" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Vector3: Min", + "key": "DataInput_Min", "details": { - "name": "Vector3: Min" + "name": "Min" } }, { - "key": "DataInput_Vector3: Max", + "key": "DataInput_Max", "details": { - "name": "Vector3: Max" + "name": "Max" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names index ed9184dd39..64f6d9f992 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Cross.names @@ -7,8 +7,7 @@ "details": { "name": "Cross", "category": "Math/Vector3", - "tooltip": "returns the vector cross product of A X B", - "subtitle": "Vector3" + "tooltip": "Returns the vector cross product of A X B" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names index 3e1a50ff1b..b0e542b842 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DirectionTo.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DirectionTo", + "name": "Direction To", "category": "Math/Vector3", - "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0", - "subtitle": "Vector3" + "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0" }, "slots": [ { @@ -24,33 +23,27 @@ } }, { - "key": "DataInput_Vector3: From", + "key": "DataInput_From", "details": { - "name": "Vector3: From" + "name": "From" } }, { - "key": "DataInput_Vector3: To", + "key": "DataInput_To", "details": { - "name": "Vector3: To" + "name": "To" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" - } - }, - { - "key": "DataOutput_Result: Number", - "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names index 255663090c..1c8df2ccc5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Distance.names @@ -7,8 +7,7 @@ "details": { "name": "Distance", "category": "Math/Vector3", - "tooltip": "returns the distance from B to A, that is the magnitude of the vector (A - B)", - "subtitle": "Vector3" + "tooltip": "Returns the distance from B to A, that is the magnitude of the vector (A - B)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names index 12c52b7efe..5e33d91136 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_DistanceSquared.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DistanceSquared", + "name": "Distance Squared", "category": "Math/Vector3", - "tooltip": "returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)", - "subtitle": "Vector3" + "tooltip": "Returns the distance squared from B to A, (generally faster than the actual distance if only needed for comparison)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names index 7e811e9b0e..06a80b4078 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Dot.names @@ -7,8 +7,7 @@ "details": { "name": "Dot", "category": "Math/Vector3", - "tooltip": "returns the vector dot product of A dot B", - "subtitle": "Vector3" + "tooltip": "Returns the vector dot product of A dot B" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names index ed2092f2f6..42a47d5fcf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_FromValues.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromValues", + "name": "From Values", "category": "Math/Vector3", - "tooltip": "returns a vector from elements", - "subtitle": "Vector3" + "tooltip": "Returns a vector from elements" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Number: X", + "key": "DataInput_X", "details": { - "name": "Number: X" + "name": "X" } }, { - "key": "DataInput_Number: Y", + "key": "DataInput_Y", "details": { - "name": "Number: Y" + "name": "Y" } }, { - "key": "DataInput_Number: Z", + "key": "DataInput_Z", "details": { - "name": "Number: Z" + "name": "Z" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names index 6b2375e69c..89d4c218e4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_GetElement.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetElement", + "name": "Get Element", "category": "Math/Vector3", - "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z)", - "subtitle": "Vector3" + "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Index", + "key": "DataInput_Index", "details": { - "name": "Number: Index" + "name": "Index" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names index 728ff6f9f8..2eef451673 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsClose.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Vector3", - "tooltip": "returns true if the difference between A and B is less than tolerance, else false", - "subtitle": "Vector3" + "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names index 2cd0e9b94a..c1e14e8db0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Vector3", - "tooltip": "returns true if every element in the source is finite, else false", - "subtitle": "Vector3" + "tooltip": "Returns true if every element in the source is finite, else false" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names index 4847d3096e..35f2e6421a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsNormalized.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsNormalized", + "name": "Is Normalized", "category": "Math/Vector3", - "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false", - "subtitle": "Vector3" + "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names index 245b7b2e32..82c3388632 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsPerpendicular.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsPerpendicular", + "name": "Is Perpendicular", "category": "Math/Vector3", - "tooltip": "returns true if A is within tolerance of perpendicular with B, that is if Dot(A, B) < tolerance, else false", - "subtitle": "Vector3" + "tooltip": "Returns true if A is within tolerance of perpendicular with B, that is if Dot(A, B) < tolerance, else false" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names index f7adf9fb80..0d80b3395c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_IsZero.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsZero", + "name": "Is Zero", "category": "Math/Vector3", - "tooltip": "returns true if A is within tolerance of the zero vector, else false", - "subtitle": "Vector3" + "tooltip": "Returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names index 2227256047..4c23c9cbbd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Length.names @@ -7,8 +7,7 @@ "details": { "name": "Length", "category": "Math/Vector3", - "tooltip": "returns the magnitude of source", - "subtitle": "Vector3" + "tooltip": "Returns the magnitude of source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names index dfeffe512a..be22489f6d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthReciprocal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LengthReciprocal", + "name": "Length Reciprocal", "category": "Math/Vector3", - "tooltip": "returns the 1 / magnitude of the source", - "subtitle": "Vector3" + "tooltip": "Returns the 1 / magnitude of the source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names index dd6c8162c1..4c6d79d1e5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_LengthSquared.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LengthSquared", + "name": "Length Squared", "category": "Math/Vector3", - "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length", - "subtitle": "Vector3" + "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names index 9e28229b8c..5d0b9792c9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Lerp.names @@ -7,8 +7,7 @@ "details": { "name": "Lerp", "category": "Math/Vector3", - "tooltip": "returns the linear interpolation (From + ((To - From) * T)", - "subtitle": "Vector3" + "tooltip": "Returns the linear interpolation (From + ((To - From) * T)" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: From", + "key": "DataInput_From", "details": { - "name": "Vector3: From" + "name": "From" } }, { - "key": "DataInput_Vector3: To", + "key": "DataInput_To", "details": { - "name": "Vector3: To" + "name": "To" } }, { - "key": "DataInput_Number: T", + "key": "DataInput_T", "details": { - "name": "Number: T" + "name": "T" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names index 00e3e0ff01..38acf91419 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Max.names @@ -7,8 +7,7 @@ "details": { "name": "Max", "category": "Math/Vector3", - "tooltip": "returns the vector (max(A.x, B.x), max(A.y, B.y), max(A.z, B.z))", - "subtitle": "Vector3" + "tooltip": "Returns the vector (max(A.x, B.x), max(A.y, B.y), max(A.z, B.z))" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names index a8fbd3eacf..1a47a31834 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Min.names @@ -7,8 +7,7 @@ "details": { "name": "Min", "category": "Math/Vector3", - "tooltip": "returns the vector (min(A.x, B.x), min(A.y, B.y), min(A.z, B.z))", - "subtitle": "Vector3" + "tooltip": "Returns the vector (min(A.x, B.x), min(A.y, B.y), min(A.z, B.z))" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names index ca55548138..95e2710e33 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_MultiplyByNumber.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByNumber", + "name": "Multiply By Number", "category": "Math/Vector3", - "tooltip": "returns the vector Source with each element multiplied by Multipler", - "subtitle": "Vector3" + "tooltip": "Returns the vector Source with each element multiplied by Multipler" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names index 2924facb4f..e578384975 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Negate.names @@ -7,8 +7,7 @@ "details": { "name": "Negate", "category": "Math/Vector3", - "tooltip": "returns the vector Source with each element multiplied by -1", - "subtitle": "Vector3" + "tooltip": "Returns the vector Source with each element multiplied by -1" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names index 26a7c65467..cf0a181d0b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Normalize.names @@ -7,8 +7,7 @@ "details": { "name": "Normalize", "category": "Math/Vector3", - "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small", - "subtitle": "Vector3" + "tooltip": "Returns a unit length vector in the same direction as the source, or (1,0,0) if the source length is too small" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names index b161686bfb..80df59908d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Project.names @@ -7,8 +7,7 @@ "details": { "name": "Project", "category": "Math/Vector3", - "tooltip": "returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B", - "subtitle": "Vector3" + "tooltip": "Returns the vector of A projected onto B, (Dot(A, B)/(Dot(B, B)) * B" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: A", + "key": "DataInput_A", "details": { - "name": "Vector3: A" + "name": "A" } }, { - "key": "DataInput_Vector3: B", + "key": "DataInput_B", "details": { - "name": "Vector3: B" + "name": "B" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names index 0bafc4373f..dd3de8c146 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Reciprocal.names @@ -7,8 +7,7 @@ "details": { "name": "Reciprocal", "category": "Math/Vector3", - "tooltip": "returns the vector (1/x, 1/y, 1/z) with elements from Source", - "subtitle": "Vector3" + "tooltip": "Returns the vector (1/x, 1/y, 1/z) with elements from Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names index ee8c305f52..47e3273302 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetX.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetX", + "name": "Set X", "category": "Math/Vector3", - "tooltip": "returns a the vector(X, Source.Y, Source.Z)", - "subtitle": "Vector3" + "tooltip": "Returns a the vector(X, Source.Y, Source.Z)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: X", + "key": "DataInput_X", "details": { - "name": "Number: X" + "name": "X" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names index b9c40fc2d0..8456f9de21 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetY.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetY", + "name": "Set Y", "category": "Math/Vector3", - "tooltip": "returns a the vector(Source.X, Y, Source.Z)", - "subtitle": "Vector3" + "tooltip": "Returns a the vector(Source.X, Y, Source.Z)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Y", + "key": "DataInput_Y", "details": { - "name": "Number: Y" + "name": "Y" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names index 87913290bc..a92a4e5a7f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_SetZ.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetZ", + "name": "Set Z", "category": "Math/Vector3", - "tooltip": "returns a the vector(Source.X, Source.Y, Z)", - "subtitle": "Vector3" + "tooltip": "Returns a the vector(Source.X, Source.Y, Z)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector3: Source", + "key": "DataInput_Source", "details": { - "name": "Vector3: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Z", + "key": "DataInput_Z", "details": { - "name": "Number: Z" + "name": "Z" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names index 9c219f2908..09251d7f13 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector3_Slerp.names @@ -7,8 +7,7 @@ "details": { "name": "Slerp", "category": "Math/Vector3", - "tooltip": "returns a vector that is the spherical linear interpolation T, between From and To", - "subtitle": "Vector3" + "tooltip": "Returns a vector that is the spherical linear interpolation T, between From and To" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector3: From", + "key": "DataInput_From", "details": { - "name": "Vector3: From" + "name": "From" } }, { - "key": "DataInput_Vector3: To", + "key": "DataInput_To", "details": { - "name": "Vector3: To" + "name": "To" } }, { - "key": "DataInput_Number: T", + "key": "DataInput_T", "details": { - "name": "Number: T" + "name": "T" } }, { - "key": "DataOutput_Result: Vector3", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector3" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names index 98d0326bda..5ea08e0e68 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Absolute.names @@ -7,8 +7,7 @@ "details": { "name": "Absolute", "category": "Math/Vector4", - "tooltip": "returns a vector with the absolute values of the elements of the source", - "subtitle": "Vector4" + "tooltip": "Returns a vector with the absolute values of the elements of the source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names index 87729c3639..d1fdcbe653 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_DirectionTo.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "DirectionTo", + "name": "Direction To", "category": "Math/Vector4", - "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0", - "subtitle": "Vector4" + "tooltip": "Returns a direction vector between two points and the distance between them, by default the direction will be normalized, but it may be optionally scaled using the Scale parameter if different from 1.0" }, "slots": [ { @@ -24,33 +23,27 @@ } }, { - "key": "DataInput_Vector4: From", + "key": "DataInput_From", "details": { - "name": "Vector4: From" + "name": "From" } }, { - "key": "DataInput_Vector4: To", + "key": "DataInput_To", "details": { - "name": "Vector4: To" + "name": "To" } }, { - "key": "DataInput_Number: Scale", + "key": "DataInput_Scale", "details": { - "name": "Number: Scale" + "name": "Scale" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" - } - }, - { - "key": "DataOutput_Result: Number", - "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names index 077a4327bb..59dfbbc61f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Dot.names @@ -7,8 +7,7 @@ "details": { "name": "Dot", "category": "Math/Vector4", - "tooltip": "returns the vector dot product of A dot B", - "subtitle": "Vector4" + "tooltip": "Returns the vector dot product of A dot B" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: A", + "key": "DataInput_A", "details": { - "name": "Vector4: A" + "name": "A" } }, { - "key": "DataInput_Vector4: B", + "key": "DataInput_B", "details": { - "name": "Vector4: B" + "name": "B" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names index 5afa061714..73f6088330 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_FromValues.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "FromValues", + "name": "From Values", "category": "Math/Vector4", - "tooltip": "returns a vector from elements", - "subtitle": "Vector4" + "tooltip": "Returns a vector from elements" }, "slots": [ { @@ -24,33 +23,33 @@ } }, { - "key": "DataInput_Number: X", + "key": "DataInput_X", "details": { - "name": "Number: X" + "name": "X" } }, { - "key": "DataInput_Number: Y", + "key": "DataInput_Y", "details": { - "name": "Number: Y" + "name": "Y" } }, { - "key": "DataInput_Number: Z", + "key": "DataInput_Z", "details": { - "name": "Number: Z" + "name": "Z" } }, { - "key": "DataInput_Number: W", + "key": "DataInput_W", "details": { - "name": "Number: W" + "name": "W" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names index 34e3294209..7b37a541e7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_GetElement.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "GetElement", + "name": "Get Element", "category": "Math/Vector4", - "tooltip": "returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z) (3 -> w)", - "subtitle": "Vector4" + "tooltip": "Returns the element corresponding to the index (0 -> x) (1 -> y) (2 -> z) (3 -> w)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Index", + "key": "DataInput_Index", "details": { - "name": "Number: Index" + "name": "Index" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names index a8f13b5e45..583d85d028 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsClose.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsClose", + "name": "Is Close", "category": "Math/Vector4", - "tooltip": "returns true if the difference between A and B is less than tolerance, else false", - "subtitle": "Vector4" + "tooltip": "Returns true if the difference between A and B is less than tolerance, else false" }, "slots": [ { @@ -24,27 +23,27 @@ } }, { - "key": "DataInput_Vector4: A", + "key": "DataInput_A", "details": { - "name": "Vector4: A" + "name": "A" } }, { - "key": "DataInput_Vector4: B", + "key": "DataInput_B", "details": { - "name": "Vector4: B" + "name": "B" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names index 8f28660e4a..603a38f9c8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsFinite.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsFinite", + "name": "Is Finite", "category": "Math/Vector4", - "tooltip": "returns true if every element in the source is finite, else false", - "subtitle": "Vector4" + "tooltip": "Returns true if every element in the source is finite, else false" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names index e35435903c..7ae2964f40 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsNormalized.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsNormalized", + "name": "Is Normalized", "category": "Math/Vector4", - "tooltip": "returns true if the length of the source is within tolerance of 1.0, else false", - "subtitle": "Vector4" + "tooltip": "Returns true if the length of the source is within tolerance of 1.0, else false" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names index 6a932da5f7..a1bbb08d27 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_IsZero.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "IsZero", + "name": "Is Zero", "category": "Math/Vector4", - "tooltip": "returns true if A is within tolerance of the zero vector, else false", - "subtitle": "Vector4" + "tooltip": "Returns true if A is within tolerance of the zero vector, else false" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Tolerance", + "key": "DataInput_Tolerance", "details": { - "name": "Number: Tolerance" + "name": "Tolerance" } }, { - "key": "DataOutput_Result: Boolean", + "key": "DataOutput_Result", "details": { - "name": "Result: Boolean" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names index 12a768cfb2..b6329060b3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Length.names @@ -7,8 +7,7 @@ "details": { "name": "Length", "category": "Math/Vector4", - "tooltip": "returns the magnitude of source", - "subtitle": "Vector4" + "tooltip": "Returns the magnitude of source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names index ba2e25e9a5..cfe495d8a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthReciprocal.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LengthReciprocal", + "name": "Length Reciprocal", "category": "Math/Vector4", - "tooltip": "returns the 1 / magnitude of the source", - "subtitle": "Vector4" + "tooltip": "Returns the 1 / magnitude of the source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names index a3115d3526..f4602d127a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_LengthSquared.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "LengthSquared", + "name": "Length Squared", "category": "Math/Vector4", - "tooltip": "returns the magnitude squared of the source, generally faster than getting the exact length", - "subtitle": "Vector4" + "tooltip": "Returns the magnitude squared of the source, generally faster than getting the exact length" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names index 873fedcd59..556582c9d8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_MultiplyByNumber.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyByNumber", + "name": "Multiply By Number", "category": "Math/Vector4", - "tooltip": "returns the vector Source with each element multiplied by Multipler", - "subtitle": "Vector4" + "tooltip": "Returns the vector Source with each element multiplied by Multipler" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names index 26acdf70f1..8cf9ae9226 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Negate.names @@ -7,8 +7,7 @@ "details": { "name": "Negate", "category": "Math/Vector4", - "tooltip": "returns the vector Source with each element multiplied by -1", - "subtitle": "Vector4" + "tooltip": "Returns the vector Source with each element multiplied by -1" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names index c0df4c0e86..5b1dc01d6f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Normalize.names @@ -7,8 +7,7 @@ "details": { "name": "Normalize", "category": "Math/Vector4", - "tooltip": "returns a unit length vector in the same direction as the source, or (1,0,0,0) if the source length is too small", - "subtitle": "Vector4" + "tooltip": "Returns a unit length vector in the same direction as the source, or (1,0,0,0) if the source length is too small" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names index c720cb5ecb..82a67c218a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_Reciprocal.names @@ -7,8 +7,7 @@ "details": { "name": "Reciprocal", "category": "Math/Vector4", - "tooltip": "returns the vector (1/x, 1/y, 1/z, 1/w) with elements from Source", - "subtitle": "Vector4" + "tooltip": "Returns the vector (1/x, 1/y, 1/z, 1/w) with elements from Source" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names index 5c645e28b6..79d028c7c3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetW.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetW", + "name": "Set W", "category": "Math/Vector4", - "tooltip": "returns a the vector(Source.X, Source.Y, Source.Z, W)", - "subtitle": "Vector4" + "tooltip": "Returns a the vector(Source.X, Source.Y, Source.Z, W)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: W", + "key": "DataInput_W", "details": { - "name": "Number: W" + "name": "W" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names index 0a1af22876..ea852cfdc5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetX.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetX", + "name": "Set X", "category": "Math/Vector4", - "tooltip": "returns a the vector(X, Source.Y, Source.Z, Source.W)", - "subtitle": "Vector4" + "tooltip": "Returns a the vector(X, Source.Y, Source.Z, Source.W)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: X", + "key": "DataInput_X", "details": { - "name": "Number: X" + "name": "X" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names index f416090c07..9f3e456472 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetY.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetY", + "name": "Set Y", "category": "Math/Vector4", - "tooltip": "returns a the vector(Source.X, Y, Source.Z, Source.W)", - "subtitle": "Vector4" + "tooltip": "Returns a the vector(Source.X, Y, Source.Z, Source.W)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Y", + "key": "DataInput_Y", "details": { - "name": "Number: Y" + "name": "Y" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names index f42628d158..b3db2cb06c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/MathVector4_SetZ.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "SetZ", + "name": "Set Z", "category": "Math/Vector4", - "tooltip": "returns a the vector(Source.X, Source.Y, Z, Source.W)", - "subtitle": "Vector4" + "tooltip": "Returns a the vector(Source.X, Source.Y, Z, Source.W)" }, "slots": [ { @@ -24,21 +23,21 @@ } }, { - "key": "DataInput_Vector4: Source", + "key": "DataInput_Source", "details": { - "name": "Vector4: Source" + "name": "Source" } }, { - "key": "DataInput_Number: Z", + "key": "DataInput_Z", "details": { - "name": "Number: Z" + "name": "Z" } }, { - "key": "DataOutput_Result: Vector4", + "key": "DataOutput_Result", "details": { - "name": "Result: Vector4" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names index 19532b0a5a..accfab49fc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_MultiplyAndAdd.names @@ -5,9 +5,8 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "MultiplyAndAdd", - "category": "Math", - "subtitle": "Math" + "name": "Multiply And Add", + "category": "Math" }, "slots": [ { @@ -23,27 +22,27 @@ } }, { - "key": "DataInput_Number: Multiplicand", + "key": "DataInput_Multiplicand", "details": { - "name": "Number: Multiplicand" + "name": "Multiplicand" } }, { - "key": "DataInput_Number: Multiplier", + "key": "DataInput_Multiplier", "details": { - "name": "Number: Multiplier" + "name": "Multiplier" } }, { - "key": "DataInput_Number: Addend", + "key": "DataInput_Addend", "details": { - "name": "Number: Addend" + "name": "Addend" } }, { - "key": "DataOutput_Result: Number", + "key": "DataOutput_Result", "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names index c23f7dcb4b..e6423917de 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Math_StringToNumber.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "StringToNumber", + "name": "String To Number", "category": "Math", - "tooltip": "Converts the given string to it's numeric representation if possible.", - "subtitle": "Math" + "tooltip": "Converts the given string to it's numeric representation if possible." }, "slots": [ { @@ -24,15 +23,9 @@ } }, { - "key": "DataInput_String: ", + "key": "DataOutput_Result", "details": { - "name": "String: " - } - }, - { - "key": "DataOutput_Result: Number", - "details": { - "name": "Result: Number" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names index b789413cc4..67aca7a003 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Duration.names @@ -6,9 +6,8 @@ "variant": "", "details": { "name": "Duration", - "category": "Nodeables", - "tooltip": "Triggers a signal every frame during the specified duration.", - "subtitle": "Nodeables" + "category": "Timing", + "tooltip": "Triggers a signal every frame during the specified duration." }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names index af5cf38a81..7f2fe575d7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_Repeater.names @@ -6,9 +6,8 @@ "variant": "", "details": { "name": "Repeater", - "category": "Nodeables", - "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out.", - "subtitle": "Nodeables" + "category": "Timing", + "tooltip": "Repeats the output signal the given number of times using the specified delay to space the signals out." }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names index 821329bfd5..fdf9afb0a1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Nodeables_TimeDelay.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "TimeDelay", - "category": "Nodeables", - "tooltip": "Delays all incoming execution for the specified number of ticks", - "subtitle": "Nodeables" + "name": "Time Delay", + "category": "Timing", + "tooltip": "Delays all incoming execution for the specified number of ticks" }, "slots": [ { diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names new file mode 100644 index 0000000000..ceed8314ba --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_BoxCastWithGroup.names @@ -0,0 +1,100 @@ +{ + "entries": [ + { + "key": "{022255F7-DD50-5654-967E-6E00E8360F00}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Box Cast With Group", + "category": "PhysX/World", + "tooltip": "Box Cast" + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataInput_Pose", + "details": { + "name": "Pose" + } + }, + { + "key": "DataInput_Direction", + "details": { + "name": "Direction" + } + }, + { + "key": "DataInput_Dimensions", + "details": { + "name": "Dimensions" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Object Hit", + "details": { + "name": "Object Hit" + } + }, + { + "key": "DataOutput_Position", + "details": { + "name": "Position" + } + }, + { + "key": "DataOutput_Normal", + "details": { + "name": "Normal" + } + }, + { + "key": "DataOutput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataOutput_EntityId", + "details": { + "name": "EntityId" + } + }, + { + "key": "DataOutput_Surface", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names new file mode 100644 index 0000000000..a38ace417c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_CapsuleCastWithGroup.names @@ -0,0 +1,106 @@ +{ + "entries": [ + { + "key": "{1467D2BE-D829-5A8A-976D-6D06FDCD3310}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Capsule Cast With Group", + "category": "PhysX/World", + "tooltip": "CapsuleCast" + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataInput_Pose", + "details": { + "name": "Pose" + } + }, + { + "key": "DataInput_Direction", + "details": { + "name": "Direction" + } + }, + { + "key": "DataInput_Height", + "details": { + "name": "Height" + } + }, + { + "key": "DataInput_Radius", + "details": { + "name": "Radius" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Object Hit", + "details": { + "name": "Object Hit" + } + }, + { + "key": "DataOutput_Position", + "details": { + "name": "Position" + } + }, + { + "key": "DataOutput_Normal", + "details": { + "name": "Normal" + } + }, + { + "key": "DataOutput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataOutput_EntityId", + "details": { + "name": "EntityId" + } + }, + { + "key": "DataOutput_Surface", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names new file mode 100644 index 0000000000..9b2e0a6c0b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapBoxWithGroup.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "key": "{B4F46A1B-7C2F-553F-BAE8-867066A365FA}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Overlap Box With Group", + "category": "PhysX/World", + "tooltip": "Returns the objects overlapping a box at a position" + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Pose", + "details": { + "name": "Pose" + } + }, + { + "key": "DataInput_Dimensions", + "details": { + "name": "Dimensions" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Result", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names new file mode 100644 index 0000000000..c7ac36a35e --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapCapsuleWithGroup.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "key": "{588E1C8F-D18E-5C00-AF13-C4FCD5A9519D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Overlap Capsule With Group", + "category": "PhysX/World", + "tooltip": "Returns the objects overlapping a capsule at a position" + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Pose", + "details": { + "name": "Pose" + } + }, + { + "key": "DataInput_Height", + "details": { + "name": "Height" + } + }, + { + "key": "DataInput_Radius", + "details": { + "name": "Radius" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Result", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names new file mode 100644 index 0000000000..de088ff96b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_OverlapSphereWithGroup.names @@ -0,0 +1,58 @@ +{ + "entries": [ + { + "key": "{4BEFF98E-4147-55AF-B105-29085951CBA9}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Overlap Sphere With Group", + "category": "PhysX/World", + "tooltip": "Returns the objects overlapping a sphere at a position" + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Position", + "details": { + "name": "Position" + } + }, + { + "key": "DataInput_Radius", + "details": { + "name": "Radius" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Result", + "details": { + "name": "Result" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names new file mode 100644 index 0000000000..3724ef2bc0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastLocalSpaceWithGroup.names @@ -0,0 +1,94 @@ +{ + "entries": [ + { + "key": "{BD7F9C50-62EA-56C0-9B8B-D23E5D28300D}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Ray Cast Local Space With Group", + "category": "PhysX/World", + "tooltip": "Returns the first entity hit by a ray cast in local space from the source entity in the specified direction." + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Source", + "details": { + "name": "Source" + } + }, + { + "key": "DataInput_Direction", + "details": { + "name": "Direction" + } + }, + { + "key": "DataInput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Object hit", + "details": { + "name": "Object hit" + } + }, + { + "key": "DataOutput_Position", + "details": { + "name": "Position" + } + }, + { + "key": "DataOutput_Normal", + "details": { + "name": "Normal" + } + }, + { + "key": "DataOutput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataOutput_EntityId", + "details": { + "name": "EntityId" + } + }, + { + "key": "DataOutput_Surface", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names new file mode 100644 index 0000000000..4d0504b0fd --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastMultipleLocalSpaceWithGroup.names @@ -0,0 +1,64 @@ +{ + "entries": [ + { + "key": "{FB91B476-0015-508A-AC0B-18F8A860EB7A}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Ray Cast Multiple Local Space With Group", + "category": "PhysX/World", + "tooltip": "Returns all entities hit by a ray cast in local space from the source entity in the specified direction." + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Source", + "details": { + "name": "Source" + } + }, + { + "key": "DataInput_Direction", + "details": { + "name": "Direction" + } + }, + { + "key": "DataInput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Objects hit", + "details": { + "name": "Objects hit" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names new file mode 100644 index 0000000000..194f9aebf0 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_RayCastWorldSpaceWithGroup.names @@ -0,0 +1,94 @@ +{ + "entries": [ + { + "key": "{33EE1562-D9B5-5DA2-BB9E-F1F75B927B9C}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Ray Cast World Space With Group", + "category": "PhysX/World", + "tooltip": "Returns the first entity hit by a ray cast in world space from the start position in the specified direction." + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Start", + "details": { + "name": "Start" + } + }, + { + "key": "DataInput_Direction", + "details": { + "name": "Direction" + } + }, + { + "key": "DataInput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Object hit", + "details": { + "name": "Object hit" + } + }, + { + "key": "DataOutput_Position", + "details": { + "name": "Position" + } + }, + { + "key": "DataOutput_Normal", + "details": { + "name": "Normal" + } + }, + { + "key": "DataOutput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataOutput_EntityId", + "details": { + "name": "EntityId" + } + }, + { + "key": "DataOutput_Surface", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names new file mode 100644 index 0000000000..1190d91bca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/PhysXWorld_SphereCastWithGroup.names @@ -0,0 +1,100 @@ +{ + "entries": [ + { + "key": "{FF1EE92C-FD34-51E9-B128-00595ABB78E6}", + "context": "ScriptCanvas::Node", + "variant": "", + "details": { + "name": "Sphere Cast With Group", + "category": "PhysX/World", + "tooltip": "SphereCast" + }, + "slots": [ + { + "key": "Input_In", + "details": { + "name": "In" + } + }, + { + "key": "Output_Out", + "details": { + "name": "Out" + } + }, + { + "key": "DataInput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataInput_Pose", + "details": { + "name": "Pose" + } + }, + { + "key": "DataInput_Direction", + "details": { + "name": "Direction" + } + }, + { + "key": "DataInput_Radius", + "details": { + "name": "Radius" + } + }, + { + "key": "DataInput_Collision group", + "details": { + "name": "Collision group" + } + }, + { + "key": "DataInput_Ignore", + "details": { + "name": "Ignore" + } + }, + { + "key": "DataOutput_Object Hit", + "details": { + "name": "Object Hit" + } + }, + { + "key": "DataOutput_Position", + "details": { + "name": "Position" + } + }, + { + "key": "DataOutput_Normal", + "details": { + "name": "Normal" + } + }, + { + "key": "DataOutput_Distance", + "details": { + "name": "Distance" + } + }, + { + "key": "DataOutput_EntityId", + "details": { + "name": "EntityId" + } + }, + { + "key": "DataOutput_Surface", + "details": { + "name": "Surface" + } + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names index 363f234f19..dd50ef41be 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToLower.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToLower", + "name": "To Lower", "category": "String", - "tooltip": "Makes all the characters in the string lower case", - "subtitle": "String" + "tooltip": "Makes all the characters in the string lower case" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_String: Source", + "key": "DataInput_Source", "details": { - "name": "String: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: String", + "key": "DataOutput_Result", "details": { - "name": "Result: String" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names index 3ee857bff1..e66ac56087 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/String_ToUpper.names @@ -5,10 +5,9 @@ "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "ToUpper", + "name": "To Upper", "category": "String", - "tooltip": "Makes all the characters in the string upper case", - "subtitle": "String" + "tooltip": "Makes all the characters in the string upper case" }, "slots": [ { @@ -24,15 +23,15 @@ } }, { - "key": "DataInput_String: Source", + "key": "DataInput_Source", "details": { - "name": "String: Source" + "name": "Source" } }, { - "key": "DataOutput_Result: String", + "key": "DataOutput_Result", "details": { - "name": "Result: String" + "name": "Result" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names index 3b556a246a..5cc50f1e7d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Nodes/Timing_HeartBeat.names @@ -1,14 +1,13 @@ { "entries": [ { - "key": "{BA107060-249D-4818-9CEC-7573718273FC}", + "key": "{E73DB180-A325-763B-A1FE-517B548AF66E}", "context": "ScriptCanvas::Node", "variant": "", "details": { - "name": "HeartBeat", + "name": "Heart Beat", "category": "Timing", - "tooltip": "While active, will signal the output at the given interval.", - "subtitle": "Timing" + "tooltip": "While active, will signal the output at the given interval." }, "slots": [ { @@ -17,6 +16,18 @@ "name": "Start" } }, + { + "key": "DataInput_Interval", + "details": { + "name": "Interval" + } + }, + { + "key": "Output_On Start", + "details": { + "name": "On Start" + } + }, { "key": "Input_Stop", "details": { @@ -24,15 +35,16 @@ } }, { - "key": "Output_Pulse", + "key": "Output_On Stop", "details": { - "name": "Pulse" + "name": "On Stop" } }, { - "key": "DataInput_Interval", + "key": "Output_Pulse", "details": { - "name": "Interval" + "name": "Pulse", + "tooltip": "Signaled at each specified interval." } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ALPHA.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ALPHA.names deleted file mode 100644 index 3ec467cbfd..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ALPHA.names +++ /dev/null @@ -1,13 +0,0 @@ -{ - "entries": [ - { - "key": "ALPHA", - "context": "Constant", - "variant": "", - "details": { - "name": "ALPHA::Getter", - "category": "Constants" - } - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaBlenderComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaBlenderComponentTypeId.names new file mode 100644 index 0000000000..2082bae8c1 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaBlenderComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "AreaBlenderComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Area Blender Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetAreaBlenderComponentTypeId", + "details": { + "name": "Get Area Blender Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaLightComponentTypeId.names index 2585ca9071..4bace9efd3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaLightComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AreaLightComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "AreaLightComponentTypeId::Getter", - "category": "Constants" - } + "name": "Area Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetAreaLightComponentTypeId", + "details": { + "name": "Get Area Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_Ignore.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_Ignore.names index a8099784d0..0fc41d9cc0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_Ignore.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_Ignore.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "AudioObstructionType_Ignore::Getter", - "category": "Constants" - } + "name": " Ignore", + "category": "Constants/Audio Obstruction" + }, + "methods": [ + { + "key": "GetAudioObstructionType_Ignore", + "details": { + "name": "Ignore" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_MultiRay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_MultiRay.names index 4c0cdc5803..353dd5a480 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_MultiRay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_MultiRay.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "AudioObstructionType_MultiRay::Getter", - "category": "Constants" - } + "name": "Multi Ray", + "category": "Constants/Audio Obstruction" + }, + "methods": [ + { + "key": "GetAudioObstructionType_MultiRay", + "details": { + "name": "Multi Ray" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_SingleRay.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_SingleRay.names index bf61f3430f..cfd4b08ada 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_SingleRay.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioObstructionType_SingleRay.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "AudioObstructionType_SingleRay::Getter", - "category": "Constants" - } + "name": "Single Ray", + "category": "Constants/Audio Obstruction" + }, + "methods": [ + { + "key": "GetAudioObstructionType_SingleRay", + "details": { + "name": "Single Ray" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Auto.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Auto.names index 0522c4b2e8..42a4678689 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Auto.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Auto.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "AudioPreloadComponentLoadType_Auto::Getter", - "category": "Constants" - } + "name": "Load Type Auto", + "category": "Constants/Audio Preload" + }, + "methods": [ + { + "key": "GetAudioPreloadComponentLoadType_Auto", + "details": { + "name": "Load Type Auto" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Manual.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Manual.names index e81b8fd73c..ff0548b4d5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Manual.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AudioPreloadComponentLoadType_Manual.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "AudioPreloadComponentLoadType_Manual::Getter", - "category": "Constants" - } + "name": "Load Type Manual", + "category": "Constants/Audio Preload" + }, + "methods": [ + { + "key": "GetAudioPreloadComponentLoadType_Manual", + "details": { + "name": "Load Type Manual" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AxisAlignedBoxShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AxisAlignedBoxShapeComponentTypeId.names index 5437a6a5c9..f2669d1486 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AxisAlignedBoxShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/AxisAlignedBoxShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "AxisAlignedBoxShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Axis Aligned Box Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetAxisAlignedBoxShapeComponentTypeId", + "details": { + "name": "Get Axis Aligned Box Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BRAVO.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BRAVO.names deleted file mode 100644 index c1cd1a28bf..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BRAVO.names +++ /dev/null @@ -1,13 +0,0 @@ -{ - "entries": [ - { - "key": "BRAVO", - "context": "Constant", - "variant": "", - "details": { - "name": "BRAVO::Getter", - "category": "Constants" - } - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDest.names index 74f2fe9c14..121e36f159 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDest.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDest.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_AlphaDest::Getter", - "category": "Constants" - } + "name": "Alpha Dest", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_AlphaDest", + "details": { + "name": "Get Alpha Dest" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDestInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDestInverse.names index ae1804aa64..297c930e3a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDestInverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaDestInverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_AlphaDestInverse::Getter", - "category": "Constants" - } + "name": "Alpha Dest Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_AlphaDestInverse", + "details": { + "name": "Get Alpha Dest Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource.names index 252dca2bcb..29c8fefc3a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_AlphaSource::Getter", - "category": "Constants" - } + "name": "Alpha Source", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "AlphaSource", + "details": { + "name": "Get Alpha Source" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1.names index 8924ea6c15..7b6903bbc1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_AlphaSource1::Getter", - "category": "Constants" - } + "name": "Alpha Source 1", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_AlphaSource1", + "details": { + "name": "Get Alpha Source 1" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1Inverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1Inverse.names index af6c0b6dd5..f2a547b532 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1Inverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSource1Inverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_AlphaSource1Inverse::Getter", - "category": "Constants" - } + "name": "Alpha Source 1 Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_AlphaSource1Inverse", + "details": { + "name": "Get Alpha Source 1 Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceInverse.names index f933c877a8..fffd959b55 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceInverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceInverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_AlphaSourceInverse::Getter", - "category": "Constants" - } + "name": "Alpha Source Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_AlphaSourceInverse", + "details": { + "name": "Get Alpha Source Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceSaturate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceSaturate.names index a2a027ea6b..8314fc4883 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceSaturate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_AlphaSourceSaturate.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_AlphaSourceSaturate::Getter", - "category": "Constants" - } + "name": "Alpha Source Saturate", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_AlphaSourceSaturate", + "details": { + "name": "Get Alpha Source Saturate" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDest.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDest.names index 1f9c086e82..1528aa60d6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDest.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDest.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_ColorDest::Getter", - "category": "Constants" - } + "name": "Color Dest", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_ColorDest", + "details": { + "name": "Get Color Dest" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDestInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDestInverse.names index 93fa5750ef..902dc74f8c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDestInverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorDestInverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_ColorDestInverse::Getter", - "category": "Constants" - } + "name": "Color Dest Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_ColorDestInverse", + "details": { + "name": "Get Color Dest Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource.names index 317b1f283b..6d96e116a7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_ColorSource::Getter", - "category": "Constants" - } + "name": "Color Source", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_ColorSource", + "details": { + "name": "Get Color Source" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1.names index 0a9db7be52..71f421585e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_ColorSource1::Getter", - "category": "Constants" - } + "name": "Color Source 1", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_ColorSource1", + "details": { + "name": "Get Color Source 1" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1Inverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1Inverse.names index 68e4f3e1ca..0b41014722 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1Inverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSource1Inverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_ColorSource1Inverse::Getter", - "category": "Constants" - } + "name": "Color Source 1 Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_ColorSource1Inverse", + "details": { + "name": "Get Color Source 1 Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSourceInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSourceInverse.names index cd84b391d8..90764c6e1a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSourceInverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_ColorSourceInverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_ColorSourceInverse::Getter", - "category": "Constants" - } + "name": "Color Source Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_ColorSourceInverse", + "details": { + "name": "Get Color Source Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Factor.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Factor.names index 2b7648e44c..cdde70371b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Factor.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Factor.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_Factor::Getter", - "category": "Constants" - } + "name": "Factor", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_Factor", + "details": { + "name": "Get Factor" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_FactorInverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_FactorInverse.names index f5a6d3ae3a..e2ceb0ad91 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_FactorInverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_FactorInverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_FactorInverse::Getter", - "category": "Constants" - } + "name": "Factor Inverse", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_FactorInverse", + "details": { + "name": "Get Factor Inverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Invalid.names index c5b269624b..a3fc69cf25 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_Invalid", + "details": { + "name": "Get Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_One.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_One.names index fee52d4844..78cb105c4e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_One.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_One.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_One::Getter", - "category": "Constants" - } + "name": "One", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_One", + "details": { + "name": "Get One" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Zero.names index 35c7e8df15..230913d961 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendFactor_Zero.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendFactor_Zero::Getter", - "category": "Constants" - } + "name": "Zero", + "category": "Constants/Blend Factor" + }, + "methods": [ + { + "key": "GetBlendFactor_Zero", + "details": { + "name": "Get Zero" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Add.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Add.names index e27d493605..b425f2038b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Add.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Add.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendOp_Add::Getter", - "category": "Constants" - } + "name": "Add", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "key": "GetBlendOp_Add", + "details": { + "name": "Get Add" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Invalid.names index 7d099cc394..9aa3ee6903 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendOp_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "key": "GetBlendOp_Invalid", + "details": { + "name": "Get Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Maximum.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Maximum.names index 1970242769..12e6b0f955 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Maximum.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Maximum.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendOp_Maximum::Getter", - "category": "Constants" - } + "name": "Maximum", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "key": "GetBlendOp_Maximum", + "details": { + "name": "Get Maximum" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Minimum.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Minimum.names index 714568e008..ca08b9af27 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Minimum.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Minimum.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendOp_Minimum::Getter", - "category": "Constants" - } + "name": "Minimum", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "key": "Minimum", + "details": { + "name": "Get Minimum" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Subtract.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Subtract.names index 6faf93dbf4..1b3ad085e5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Subtract.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_Subtract.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendOp_Subtract::Getter", - "category": "Constants" - } + "name": "Subtract", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "key": "GetBlendOp_Subtract", + "details": { + "name": "Get Subtract" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_SubtractReverse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_SubtractReverse.names index b8f98b7600..53df604d84 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_SubtractReverse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlendOp_SubtractReverse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BlendOp_SubtractReverse::Getter", - "category": "Constants" - } + "name": "Subtract Reverse", + "category": "Constants/Blend Operation" + }, + "methods": [ + { + "key": "GetBlendOp_SubtractReverse", + "details": { + "name": "Get Subtract Reverse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlockerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlockerComponentTypeId.names new file mode 100644 index 0000000000..4f5ecb7f53 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BlockerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "BlockerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Blocker Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetBlockerComponentTypeId", + "details": { + "name": "Get Blocker Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BloomComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BloomComponentTypeId.names index 0d8ba9a325..64cce778c6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BloomComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BloomComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BloomComponentTypeId::Getter", - "category": "Constants" - } + "name": "Bloom Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetBloomComponentTypeId", + "details": { + "name": "Get Bloom Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BoxShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BoxShapeComponentTypeId.names index 5f076bd6a5..fd99213100 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BoxShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/BoxShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "BoxShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Box Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetBoxShapeComponentTypeId", + "details": { + "name": "Get Box Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CHARLIE.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CHARLIE.names deleted file mode 100644 index 85f7c894f4..0000000000 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CHARLIE.names +++ /dev/null @@ -1,13 +0,0 @@ -{ - "entries": [ - { - "key": "CHARLIE", - "context": "Constant", - "variant": "", - "details": { - "name": "CHARLIE::Getter", - "category": "Constants" - } - } - ] -} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CUBE.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CUBE.names new file mode 100644 index 0000000000..b51cbc89e5 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CUBE.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "CUBE", + "context": "Constant", + "variant": "", + "details": { + "name": "Cube", + "category": "Constants/White Box" + }, + "methods": [ + { + "key": "GetCUBE", + "details": { + "name": "Cube" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CYLINDER.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CYLINDER.names new file mode 100644 index 0000000000..bffa51f9ca --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CYLINDER.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "CYLINDER", + "context": "Constant", + "variant": "", + "details": { + "name": "Cylinder", + "category": "Constants/White Box" + }, + "methods": [ + { + "key": "GetCYLINDER", + "details": { + "name": "Cylinder" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CapsuleShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CapsuleShapeComponentTypeId.names index a17f6781d4..9ed7a47c5c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CapsuleShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CapsuleShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "CapsuleShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Capsule Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetCapsuleShapeComponentTypeId", + "details": { + "name": "Get Capsule Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ConstantGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ConstantGradientComponentTypeId.names index 0ff818c566..cdf8701183 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ConstantGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ConstantGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ConstantGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Constant Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetConstantGradientComponentTypeId", + "details": { + "name": "Get Constant Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Back.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Back.names index 61d2c8369e..bdba8338db 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Back.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Back.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "CullMode_Back::Getter", - "category": "Constants" - } + "name": "Back", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "key": "GetCullMode_Back", + "details": { + "name": "Get Back" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Front.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Front.names index 7f5a35a7f2..b75bf908d2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Front.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Front.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "CullMode_Front::Getter", - "category": "Constants" - } + "name": "Front", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "key": "GetCullMode_Front", + "details": { + "name": "Get Front" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Invalid.names index 4eb73b06ea..150e1cc258 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "CullMode_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "key": "GetCullMode_Invalid", + "details": { + "name": "Get Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_None.names index 182e9c7573..6dee6b2bd8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CullMode_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "CullMode_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/Cull Mode" + }, + "methods": [ + { + "key": "GetCullMode_None", + "details": { + "name": "Get None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CylinderShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CylinderShapeComponentTypeId.names index 3dadc415fd..ed35cb40b5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CylinderShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/CylinderShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "CylinderShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Cylinder Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetCylinderShapeComponentTypeId", + "details": { + "name": "Get Cylinder Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DecalComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DecalComponentTypeId.names index 2a6aaa134e..ee13b45215 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DecalComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DecalComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DecalComponentTypeId::Getter", - "category": "Constants" - } + "name": "Decal Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDecalComponentTypeId", + "details": { + "name": "Get Decal Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodOverride.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodOverride.names index c46ee43b8b..aa356e7ce8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodOverride.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodOverride.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DefaultLodOverride::Getter", - "category": "Constants" - } + "name": "Default Lod Override", + "category": "Constants/Defaults" + }, + "methods": [ + { + "key": "GetDefaultLodOverride", + "details": { + "name": "Get Default Lod Override" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodType.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodType.names index 6e166c3480..ca4dbc315f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodType.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultLodType.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DefaultLodType::Getter", - "category": "Constants" - } + "name": "Default Lod Type", + "category": "Constants/Defaults" + }, + "methods": [ + { + "key": "GetDefaultLodType", + "details": { + "name": "Get Default Lod Type" + }, + "results": [ + { + "typeid": "{72B9409A-7D1A-4831-9CFE-FCB3FADD3426}", + "details": { + "name": "unsigned char" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignment.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignment.names index f435b539a8..55d2a1bff0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignment.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignment.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DefaultMaterialAssignment::Getter", - "category": "Constants" - } + "name": "Default Material Assignment", + "category": "Constants/Defaults" + }, + "methods": [ + { + "key": "GetDefaultMaterialAssignment", + "details": { + "name": "Get Default Material Assignment" + }, + "results": [ + { + "typeid": "{C66E5214-A24B-4722-B7F0-5991E6F8F163}", + "details": { + "name": "AZ:: Render:: Material Assignment" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentId.names index b3188d9452..5d105b63c5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DefaultMaterialAssignmentId::Getter", - "category": "Constants" - } + "name": "Default Material Assignment Id", + "category": "Constants/Defaults" + }, + "methods": [ + { + "key": "GetDefaultMaterialAssignmentId", + "details": { + "name": "Get Default Material Assignment Id" + }, + "results": [ + { + "typeid": "{EB603581-4654-4C17-B6DE-AE61E79EDA97}", + "details": { + "name": "AZ:: Render:: Material Assignment Id" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentMap.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentMap.names index 248cf3f7ae..c64da412e1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentMap.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultMaterialAssignmentMap.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DefaultMaterialAssignmentMap::Getter", - "category": "Constants" - } + "name": "Default Material Assignment Map", + "category": "Constants/Defaults" + }, + "methods": [ + { + "key": "GetDefaultMaterialAssignmentMap", + "details": { + "name": "Get Default Material Assignment Map" + }, + "results": [ + { + "typeid": "{50F6716F-698B-5A6C-AACD-940597FDEC24}", + "details": { + "name": "AZ Std::unordered_map" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneId.names index 142b97a590..5868303abd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DefaultPhysicsSceneId::Getter", - "category": "Constants" - } + "name": "Default Physics Scene Id", + "category": "Constants/Defaults" + }, + "methods": [ + { + "key": "GetDefaultPhysicsSceneId", + "details": { + "name": "Get Default Physics Scene Id" + }, + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc 32" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneName.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneName.names index bb32deaea4..0d83dbeaa4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneName.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DefaultPhysicsSceneName.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DefaultPhysicsSceneName::Getter", - "category": "Constants" - } + "name": "Default Physics Scene Name", + "category": "Constants/Defaults" + }, + "methods": [ + { + "key": "GetDefaultPhysicsSceneName", + "details": { + "name": "Get Default Physics Scene Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DeferredFogComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DeferredFogComponentTypeId.names index 4c4899f264..dbfcf1ceab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DeferredFogComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DeferredFogComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DeferredFogComponentTypeId::Getter", - "category": "Constants" - } + "name": "Deferred Fog Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDeferredFogComponentTypeId", + "details": { + "name": "Get Deferred Fog Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthOfFieldComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthOfFieldComponentTypeId.names index 2104b9642f..e166e29ac2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthOfFieldComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthOfFieldComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DepthOfFieldComponentTypeId::Getter", - "category": "Constants" - } + "name": "Depth Of Field Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDepthOfFieldComponentTypeId", + "details": { + "name": "Get Depth Of Field Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_All.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_All.names index e169a19258..4e01e31626 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_All.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_All.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DepthWriteMask_All::Getter", - "category": "Constants" - } + "name": "All", + "category": "Constants/Depth Write Mask" + }, + "methods": [ + { + "key": "GetDepthWriteMask_All", + "details": { + "name": "All" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Invalid.names index 4789194d25..121170fff3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DepthWriteMask_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/Depth Write Mask" + }, + "methods": [ + { + "key": "GetDepthWriteMask_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Zero.names index 4268b4d8f8..3ee05feb70 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DepthWriteMask_Zero.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DepthWriteMask_Zero::Getter", - "category": "Constants" - } + "name": "Zero", + "category": "Constants/Depth Write Mask" + }, + "methods": [ + { + "key": "GetDepthWriteMask_Zero", + "details": { + "name": "Zero" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListCombinerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListCombinerComponentTypeId.names new file mode 100644 index 0000000000..5be6ea02cc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListCombinerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "DescriptorListCombinerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Descriptor List Combiner Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDescriptorListCombinerComponentTypeId", + "details": { + "name": "Get Descriptor List Combiner Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListComponentTypeId.names new file mode 100644 index 0000000000..fab274e61a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorListComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "DescriptorListComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Descriptor List Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDescriptorListComponentTypeId", + "details": { + "name": "Get Descriptor List Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorWeightSelectorComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorWeightSelectorComponentTypeId.names new file mode 100644 index 0000000000..4c34e62926 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DescriptorWeightSelectorComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "DescriptorWeightSelectorComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Descriptor Weight Selector Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDescriptorWeightSelectorComponentTypeId", + "details": { + "name": "Get Descriptor Weight Selector Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseGlobalIlluminationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseGlobalIlluminationComponentTypeId.names index 2e633a1192..6b1e0d2274 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseGlobalIlluminationComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseGlobalIlluminationComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DiffuseGlobalIlluminationComponentTypeId::Getter", - "category": "Constants" - } + "name": "Diffuse Global Illumination Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDiffuseGlobalIlluminationComponentTypeId", + "details": { + "name": "Get Diffuse Global Illumination Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseProbeGridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseProbeGridComponentTypeId.names index c5b5f17bde..17b3fe0d71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseProbeGridComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiffuseProbeGridComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DiffuseProbeGridComponentTypeId::Getter", - "category": "Constants" - } + "name": "Diffuse Probe Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDiffuseProbeGridComponentTypeId", + "details": { + "name": "Get Diffuse Probe Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DirectionalLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DirectionalLightComponentTypeId.names index 0ad98b326e..e26bad9485 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DirectionalLightComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DirectionalLightComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DirectionalLightComponentTypeId::Getter", - "category": "Constants" - } + "name": "Directional Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDirectionalLightComponentTypeId", + "details": { + "name": "Get Directional Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiskShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiskShapeComponentTypeId.names index cac82ca189..3785153499 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiskShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DiskShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DiskShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Disk Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDiskShapeComponentTypeId", + "details": { + "name": "Get Disk Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplayMapperComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplayMapperComponentTypeId.names index 9117f367ee..14ac43a4f1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplayMapperComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplayMapperComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplayMapperComponentTypeId::Getter", - "category": "Constants" - } + "name": "Display Mapper Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDisplayMapperComponentTypeId", + "details": { + "name": "Get Display Mapper Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideHelpers.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideHelpers.names index 488a8f7ec2..39edc099c6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideHelpers.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideHelpers.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_HideHelpers::Getter", - "category": "Constants" - } + "name": "Hide Helpers", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_HideHelpers", + "details": { + "name": "Get Hide Helpers" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideLinks.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideLinks.names index d532e8ff35..718bfd6bb9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideLinks.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideLinks.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_HideLinks::Getter", - "category": "Constants" - } + "name": "Hide Links", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_HideLinks", + "details": { + "name": "Get Hide Links" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideTracks.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideTracks.names index ade09a965c..92d364f846 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideTracks.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_HideTracks.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_HideTracks::Getter", - "category": "Constants" - } + "name": "Hide Tracks", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_HideTracks", + "details": { + "name": "Get Hide Tracks" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoCollision.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoCollision.names index 0cece10c67..1d889e2a36 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoCollision.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoCollision.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_NoCollision::Getter", - "category": "Constants" - } + "name": "No Collision", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_NoCollision", + "details": { + "name": "Get No Collision" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoLabels.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoLabels.names index d855c9ce0e..d5e7eac4ea 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoLabels.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_NoLabels.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_NoLabels::Getter", - "category": "Constants" - } + "name": "No Labels", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_NoLabels", + "details": { + "name": "Get No Labels" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_Physics.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_Physics.names index 237968c10e..211f15d61c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_Physics.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_Physics.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_Physics::Getter", - "category": "Constants" - } + "name": "Physics", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_Physics", + "details": { + "name": "Get Physics" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_SerializableFlagsMask.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_SerializableFlagsMask.names index c6e4c44cb2..c58ff484a5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_SerializableFlagsMask.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_SerializableFlagsMask.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_SerializableFlagsMask::Getter", - "category": "Constants" - } + "name": "Serializable Flags Mask", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_SerializableFlagsMask", + "details": { + "name": "Get Serializable Flags Mask" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_ShowDimensionFigures.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_ShowDimensionFigures.names index 2c3f42a6c5..c9e85d3655 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_ShowDimensionFigures.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DisplaySettings_ShowDimensionFigures.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DisplaySettings_ShowDimensionFigures::Getter", - "category": "Constants" - } + "name": "Show Dimension Figures", + "category": "Constants/Display Settings" + }, + "methods": [ + { + "key": "GetDisplaySettings_ShowDimensionFigures", + "details": { + "name": "Get Show Dimension Figures" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistanceBetweenFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistanceBetweenFilterComponentTypeId.names new file mode 100644 index 0000000000..02b22eb18b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistanceBetweenFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "DistanceBetweenFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Distance Between Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDistanceBetweenFilterComponentTypeId", + "details": { + "name": "Get Distance Between Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistributionFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistributionFilterComponentTypeId.names new file mode 100644 index 0000000000..9397391c26 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DistributionFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "DistributionFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Distribution Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetDistributionFilterComponentTypeId", + "details": { + "name": "Get Distribution Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DitherGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DitherGradientComponentTypeId.names index f4be6282d0..e1e8fc004e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DitherGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/DitherGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "DitherGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Dither Gradient Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "key": "GetDitherGradientComponentTypeId", + "details": { + "name": "Get Dither Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorAreaLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorAreaLightComponentTypeId.names index fd410df4f9..3ccdef3c90 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorAreaLightComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorAreaLightComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorAreaLightComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Area Light Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "key": "GetEditorAreaLightComponentTypeId", + "details": { + "name": "Get Editor Area Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorBloomComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorBloomComponentTypeId.names index 2d2f101be0..ea31089a11 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorBloomComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorBloomComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorBloomComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Bloom Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "key": "GetEditorBloomComponentTypeId", + "details": { + "name": "Get Editor Bloom Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDecalComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDecalComponentTypeId.names index a40f551364..b69fcb372a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDecalComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDecalComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorDecalComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Decal Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "key": "GetEditorDecalComponentTypeId", + "details": { + "name": "Get Editor Decal Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDeferredFogComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDeferredFogComponentTypeId.names index c0f17922f6..6db10fabfb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDeferredFogComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDeferredFogComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorDeferredFogComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Deferred Fog Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "key": "GetEditorDeferredFogComponentTypeId", + "details": { + "name": "Get Editor Deferred Fog Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDepthOfFieldComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDepthOfFieldComponentTypeId.names index fc16e176bd..2dfe8dc95f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDepthOfFieldComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDepthOfFieldComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorDepthOfFieldComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Depth Of Field Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "key": "GetEditorDepthOfFieldComponentTypeId", + "details": { + "name": "Get Editor Depth Of Field Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseGlobalIlluminationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseGlobalIlluminationComponentTypeId.names index ab9f4e04f0..936e7d3dcc 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseGlobalIlluminationComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseGlobalIlluminationComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorDiffuseGlobalIlluminationComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Diffuse Global Illumination Component Type Id", + "category": "Constants/Editor/Component Type Id" + }, + "methods": [ + { + "key": "GetEditorDiffuseGlobalIlluminationComponentTypeId", + "details": { + "name": "Get Editor Diffuse Global Illumination Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseProbeGridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseProbeGridComponentTypeId.names index 24e649c4b0..41fe82f546 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseProbeGridComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDiffuseProbeGridComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorDiffuseProbeGridComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Diffuse Probe Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorDiffuseProbeGridComponentTypeId", + "details": { + "name": "Get Editor Diffuse Probe Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDirectionalLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDirectionalLightComponentTypeId.names index 0caf18913a..0df16ac38a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDirectionalLightComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDirectionalLightComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorDirectionalLightComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Directional Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorDirectionalLightComponentTypeId", + "details": { + "name": "Get Editor Directional Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDisplayMapperComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDisplayMapperComponentTypeId.names index 6a449cb643..115f43abc6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDisplayMapperComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorDisplayMapperComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorDisplayMapperComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Display Mapper Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorDisplayMapperComponentTypeId", + "details": { + "name": "Get Editor Display Mapper Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityReferenceComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityReferenceComponentTypeId.names index f0214aec06..fb4126a455 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityReferenceComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityReferenceComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorEntityReferenceComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Entity Reference Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorEntityReferenceComponentTypeId", + "details": { + "name": "Get Editor Entity Reference Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_EditorOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_EditorOnly.names index e4ca34fdb0..9c661077d4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_EditorOnly.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_EditorOnly.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorEntityStartStatus_EditorOnly::Getter", - "category": "Constants" - } + "name": "Editor Entity Start Status_ Editor Only", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorEntityStartStatus_EditorOnly", + "details": { + "name": "Get Editor Entity Start Status_ Editor Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartActive.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartActive.names index 51e4369297..16256448a3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartActive.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartActive.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorEntityStartStatus_StartActive::Getter", - "category": "Constants" - } + "name": "Editor Entity Start Status_ Start Active", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorEntityStartStatus_StartActive", + "details": { + "name": "Get Editor Entity Start Status_ Start Active" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartInactive.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartInactive.names index fa41555722..b65178acca 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartInactive.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorEntityStartStatus_StartInactive.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorEntityStartStatus_StartInactive::Getter", - "category": "Constants" - } + "name": "Editor Entity Start Status_ Start Inactive", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorEntityStartStatus_StartInactive", + "details": { + "name": "Get Editor Entity Start Status_ Start Inactive" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorExposureControlComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorExposureControlComponentTypeId.names index 3b9c6f893f..6048df512b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorExposureControlComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorExposureControlComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorExposureControlComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Exposure Control Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorExposureControlComponentTypeId", + "details": { + "name": "Get Editor Exposure Control Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGradientWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGradientWeightModifierComponentTypeId.names index dc20398559..089ce77046 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGradientWeightModifierComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGradientWeightModifierComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorGradientWeightModifierComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Gradient Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorGradientWeightModifierComponentTypeId", + "details": { + "name": "Get Editor Gradient Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGridComponentTypeId.names index 5f3dbe3e87..82d83055b5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGridComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorGridComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorGridComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorGridComponentTypeId", + "details": { + "name": "Get Editor Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHDRiSkyboxComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHDRiSkyboxComponentTypeId.names index d1e49132a9..21db0e71f6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHDRiSkyboxComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHDRiSkyboxComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorHDRiSkyboxComponentTypeId::Getter", - "category": "Constants" - } + "name": "EditorHD Ri Skybox Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorHDRiSkyboxComponentTypeId", + "details": { + "name": "Get EditorHD Ri Skybox Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHairComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHairComponentTypeId.names new file mode 100644 index 0000000000..4023cf04bf --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorHairComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "EditorHairComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Hair Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorHairComponentTypeId", + "details": { + "name": "Get Editor Hair Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorImageBasedLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorImageBasedLightComponentTypeId.names index e6ddff36a2..8163c59d3e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorImageBasedLightComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorImageBasedLightComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorImageBasedLightComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Image Based Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorImageBasedLightComponentTypeId", + "details": { + "name": "Get Editor Image Based Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorLookModificationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorLookModificationComponentTypeId.names index 39bcdad1e5..285f3a3666 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorLookModificationComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorLookModificationComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorLookModificationComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Look Modification Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorLookModificationComponentTypeId", + "details": { + "name": "Get Editor Look Modification Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMaterialComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMaterialComponentTypeId.names index 35b3db3305..e6b3f37bf9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMaterialComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMaterialComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorMaterialComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Material Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorMaterialComponentTypeId", + "details": { + "name": "Get Editor Material Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMeshComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMeshComponentTypeId.names index 8ca2af81eb..a2def3a185 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMeshComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorMeshComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorMeshComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Mesh Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorMeshComponentTypeId", + "details": { + "name": "Get Editor Mesh Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorNonUniformScaleComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorNonUniformScaleComponentTypeId.names index ea5a58d742..6b6b0b9ca9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorNonUniformScaleComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorNonUniformScaleComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorNonUniformScaleComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Non Uniform Scale Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorNonUniformScaleComponentTypeId", + "details": { + "name": "Get Editor Non Uniform Scale Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorOcclusionCullingPlaneComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorOcclusionCullingPlaneComponentTypeId.names index 4c2b06be1a..73f96098d9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorOcclusionCullingPlaneComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorOcclusionCullingPlaneComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorOcclusionCullingPlaneComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Occlusion Culling Plane Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorOcclusionCullingPlaneComponentTypeId", + "details": { + "name": "Get Editor Occlusion Culling Plane Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicalSkyComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicalSkyComponentTypeId.names index a1ec685c88..6309ed6321 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicalSkyComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicalSkyComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorPhysicalSkyComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Physical Sky Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorPhysicalSkyComponentTypeId", + "details": { + "name": "Get Editor Physical Sky Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneId.names index d98a729c34..99a9d21ddf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorPhysicsSceneId::Getter", - "category": "Constants" - } + "name": "Editor Physics Scene Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorPhysicsSceneId", + "details": { + "name": "Get Editor Physics Scene Id" + }, + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc 32" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneName.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneName.names index 0a209f241c..2ac4fb9bab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneName.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPhysicsSceneName.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorPhysicsSceneName::Getter", - "category": "Constants" - } + "name": "Editor Physics Scene Name", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorPhysicsSceneName", + "details": { + "name": "Get Editor Physics Scene Name" + }, + "results": [ + { + "typeid": "{3AB0037F-AF8D-48CE-BCA0-A170D18B2C03}", + "details": { + "name": "char" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPostFxLayerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPostFxLayerComponentTypeId.names index d6372c4c94..76336a7ae0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPostFxLayerComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPostFxLayerComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorPostFxLayerComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Post Fx Layer Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorPostFxLayerComponentTypeId", + "details": { + "name": "Get Editor Post Fx Layer Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPrefabComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPrefabComponentTypeId.names new file mode 100644 index 0000000000..23f9abfa1c --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorPrefabComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "EditorPrefabComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Prefab Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorPrefabComponentTypeId", + "details": { + "name": "Get Editor Prefab Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorRadiusWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorRadiusWeightModifierComponentTypeId.names index e8d4299ea7..899d0a0da1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorRadiusWeightModifierComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorRadiusWeightModifierComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorRadiusWeightModifierComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Radius Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorRadiusWeightModifierComponentTypeId", + "details": { + "name": "Get Editor Radius Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorReflectionProbeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorReflectionProbeComponentTypeId.names index 2bbbb9d789..aaea2f0d5c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorReflectionProbeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorReflectionProbeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorReflectionProbeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Reflection Probe Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorReflectionProbeComponentTypeId", + "details": { + "name": "Get Editor Reflection Probe Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorShapeWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorShapeWeightModifierComponentTypeId.names index 3abeafda2a..32910e23cb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorShapeWeightModifierComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorShapeWeightModifierComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorShapeWeightModifierComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Shape Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorShapeWeightModifierComponentTypeId", + "details": { + "name": "Get Editor Shape Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorSsaoComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorSsaoComponentTypeId.names index d1d030c18b..163d0b924f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorSsaoComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorSsaoComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorSsaoComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Ssao Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorSsaoComponentTypeId", + "details": { + "name": "Get Editor Ssao Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorTransformComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorTransformComponentTypeId.names index ce90232aea..2e925bacb5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorTransformComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EditorTransformComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EditorTransformComponentTypeId::Getter", - "category": "Constants" - } + "name": "Editor Transform Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEditorTransformComponentTypeId", + "details": { + "name": "Get Editor Transform Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EntityReferenceComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EntityReferenceComponentTypeId.names index d2e2fd6713..3028bc10a9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EntityReferenceComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/EntityReferenceComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "EntityReferenceComponentTypeId::Getter", - "category": "Constants" - } + "name": "Entity Reference Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetEntityReferenceComponentTypeId", + "details": { + "name": "Get Entity Reference Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ExposureControlComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ExposureControlComponentTypeId.names index e88dd26549..e647de6ad3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ExposureControlComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ExposureControlComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ExposureControlComponentTypeId::Getter", - "category": "Constants" - } + "name": "Exposure Control Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetExposureControlComponentTypeId", + "details": { + "name": "Get Exposure Control Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FastNoiseGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FastNoiseGradientComponentTypeId.names new file mode 100644 index 0000000000..041c43701a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FastNoiseGradientComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "FastNoiseGradientComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Fast Noise Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetFastNoiseGradientComponentTypeId", + "details": { + "name": "Get Fast Noise Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Invalid.names index 27cd936beb..f93f276062 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FillMode_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/Fill Mode" + }, + "methods": [ + { + "key": "GetFillMode_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Solid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Solid.names index e3f52f0784..7dc99cfd1d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Solid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Solid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FillMode_Solid::Getter", - "category": "Constants" - } + "name": "Solid", + "category": "Constants/Fill Mode" + }, + "methods": [ + { + "key": "GetFillMode_Solid", + "details": { + "name": "Solid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Wireframe.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Wireframe.names index cdbe3521f7..f820d7d106 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Wireframe.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FillMode_Wireframe.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FillMode_Wireframe::Getter", - "category": "Constants" - } + "name": "Wireframe", + "category": "Constants/Fill Mode" + }, + "methods": [ + { + "key": "GetFillMode_Wireframe", + "details": { + "name": "Wireframe" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FloatEpsilon.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FloatEpsilon.names index 438ba833c5..017cd8a36b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FloatEpsilon.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FloatEpsilon.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FloatEpsilon::Getter", - "category": "Constants" - } + "name": "Float Epsilon", + "category": "Constants/Numeric" + }, + "methods": [ + { + "key": "GetFloatEpsilon", + "details": { + "name": "Float Epsilon" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_FileWriteError.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_FileWriteError.names index f0e0e3e68e..8a9f90d664 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_FileWriteError.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_FileWriteError.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FrameCaptureResult_FileWriteError::Getter", - "category": "Constants" - } + "name": "File Write Error", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "key": "GetFrameCaptureResult_FileWriteError", + "details": { + "name": "File Write Error" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InternalError.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InternalError.names index 823225c397..0bee22fd8d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InternalError.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InternalError.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FrameCaptureResult_InternalError::Getter", - "category": "Constants" - } + "name": "Internal Error", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "key": "GetFrameCaptureResult_InternalError", + "details": { + "name": "Internal Error" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InvalidArgument.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InvalidArgument.names index 360800ac3e..21699eef84 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InvalidArgument.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_InvalidArgument.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FrameCaptureResult_InvalidArgument::Getter", - "category": "Constants" - } + "name": "Invalid Argument", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "key": "GetFrameCaptureResult_InvalidArgument", + "details": { + "name": "Invalid Argument" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_None.names index a6ba18d32f..95b49529b3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FrameCaptureResult_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "key": "GetFrameCaptureResult_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_Success.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_Success.names index 789fd31acf..1b9a6a257e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_Success.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_Success.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FrameCaptureResult_Success::Getter", - "category": "Constants" - } + "name": "Success", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "key": "GetFrameCaptureResult_Success", + "details": { + "name": "Success" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_UnsupportedFormat.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_UnsupportedFormat.names index 136406261d..bda7719923 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_UnsupportedFormat.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/FrameCaptureResult_UnsupportedFormat.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "FrameCaptureResult_UnsupportedFormat::Getter", - "category": "Constants" - } + "name": "Unsupported Format", + "category": "Constants/Frame Capture Result" + }, + "methods": [ + { + "key": "GetFrameCaptureResult_UnsupportedFormat", + "details": { + "name": "Unsupported Format" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientSurfaceDataComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientSurfaceDataComponentTypeId.names index 90e43a4a20..738344fe5d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientSurfaceDataComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientSurfaceDataComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "GradientSurfaceDataComponentTypeId::Getter", - "category": "Constants" - } + "name": "Gradient Surface Data Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetGradientSurfaceDataComponentTypeId", + "details": { + "name": "Get Gradient Surface Data Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientTransformComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientTransformComponentTypeId.names index 339c4d2904..4a87849a90 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientTransformComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientTransformComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "GradientTransformComponentTypeId::Getter", - "category": "Constants" - } + "name": "Gradient Transform Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetGradientTransformComponentTypeId", + "details": { + "name": "Get Gradient Transform Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientWeightModifierComponentTypeId.names index cee5ed45f5..6c330f20a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientWeightModifierComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GradientWeightModifierComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "GradientWeightModifierComponentTypeId::Getter", - "category": "Constants" - } + "name": "Gradient Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetGradientWeightModifierComponentTypeId", + "details": { + "name": "Get Gradient Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GridComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GridComponentTypeId.names index e6ca6375da..47ceaedf7d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GridComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/GridComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "GridComponentTypeId::Getter", - "category": "Constants" - } + "name": "Grid Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetGridComponentTypeId", + "details": { + "name": "Get Grid Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HDRiSkyboxComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HDRiSkyboxComponentTypeId.names index ce30501f5a..e751828cbd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HDRiSkyboxComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HDRiSkyboxComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "HDRiSkyboxComponentTypeId::Getter", - "category": "Constants" - } + "name": "HD Ri Skybox Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetHDRiSkyboxComponentTypeId", + "details": { + "name": "GetHD Ri Skybox Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HairComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HairComponentTypeId.names new file mode 100644 index 0000000000..622365e02b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/HairComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "HairComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Hair Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetHairComponentTypeId", + "details": { + "name": "Get Hair Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ICOSAHEDRON.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ICOSAHEDRON.names new file mode 100644 index 0000000000..a682faf391 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ICOSAHEDRON.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ICOSAHEDRON", + "context": "Constant", + "variant": "", + "details": { + "name": "Icosahedron", + "category": "Constants/White Box" + }, + "methods": [ + { + "key": "GetICOSAHEDRON", + "details": { + "name": "Icosahedron" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageBasedLightComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageBasedLightComponentTypeId.names index 7669ee6318..ce12489188 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageBasedLightComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageBasedLightComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ImageBasedLightComponentTypeId::Getter", - "category": "Constants" - } + "name": "Image Based Light Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetImageBasedLightComponentTypeId", + "details": { + "name": "Get Image Based Light Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageGradientComponentTypeId.names index 6fa8464e57..33833b9276 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ImageGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ImageGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Image Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetImageGradientComponentTypeId", + "details": { + "name": "Get Image Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidComponentId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidComponentId.names index 5b2d673f0b..fd02ea1cff 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidComponentId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidComponentId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "InvalidComponentId::Getter", - "category": "Constants" - } + "name": "Invalid Component Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetInvalidComponentId", + "details": { + "name": "Get Invalid Component Id" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidParameterIndex.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidParameterIndex.names index 9d3edcdbee..7b51f760c6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidParameterIndex.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidParameterIndex.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "InvalidParameterIndex::Getter", - "category": "Constants" - } + "name": "Invalid Parameter Index", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetInvalidParameterIndex", + "details": { + "name": "Get Invalid Parameter Index" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidTemplateId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidTemplateId.names index 30f928664c..06a39600c4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidTemplateId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvalidTemplateId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "InvalidTemplateId::Getter", - "category": "Constants" - } + "name": "Invalid Template Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetInvalidTemplateId", + "details": { + "name": "Get Invalid Template Id" + }, + "results": [ + { + "typeid": "{D6597933-47CD-4FC8-B911-63F3E2B0993A}", + "details": { + "name": "AZ::u 64" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvertGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvertGradientComponentTypeId.names index 0c6d3253b5..bbf4a4894d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvertGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/InvertGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "InvertGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Invert Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetInvertGradientComponentTypeId", + "details": { + "name": "Get Invert Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonMergePatch.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonMergePatch.names index 53e973e3a5..d9d2570e7f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonMergePatch.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonMergePatch.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "JsonMergePatch::Getter", - "category": "Constants" - } + "name": "Json Merge Patch", + "category": "Constants/Json" + }, + "methods": [ + { + "key": "GetJsonMergePatch", + "details": { + "name": "Get Json Merge Patch" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonPatch.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonPatch.names index fec9372c25..f6ac94bc60 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonPatch.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/JsonPatch.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "JsonPatch::Getter", - "category": "Constants" - } + "name": "Json Patch", + "category": "Constants/Json" + }, + "methods": [ + { + "key": "GetJsonPatch", + "details": { + "name": "Get Json Patch" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LANDSCAPE_CANVAS_EDITOR_ID.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LANDSCAPE_CANVAS_EDITOR_ID.names new file mode 100644 index 0000000000..533d7bc0e4 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LANDSCAPE_CANVAS_EDITOR_ID.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "LANDSCAPE_CANVAS_EDITOR_ID", + "context": "Constant", + "variant": "", + "details": { + "name": "Editor Id", + "category": "Constants/Landscape Canvas" + }, + "methods": [ + { + "key": "GetLANDSCAPE_CANVAS_EDITOR_ID", + "details": { + "name": "Editor Id" + }, + "results": [ + { + "typeid": "{9F4E062E-06A0-46D4-85DF-E0DA96467D3A}", + "details": { + "name": "Crc 32" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelSettingsComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelSettingsComponentTypeId.names new file mode 100644 index 0000000000..cae16f3af6 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelSettingsComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "LevelSettingsComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Level Settings Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetLevelSettingsComponentTypeId", + "details": { + "name": "Get Level Settings Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelsGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelsGradientComponentTypeId.names index 294b87f61e..1fb4d80484 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelsGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LevelsGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "LevelsGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Levels Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetLevelsGradientComponentTypeId", + "details": { + "name": "Get Levels Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Automatic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Automatic.names index 2bbf9c2d54..82997c40a5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Automatic.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Automatic.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "LightAttenuationRadiusMode_Automatic::Getter", - "category": "Constants" - } + "name": "Automatic", + "category": "Constants/Light Attenuation Radius Mode" + }, + "methods": [ + { + "key": "GetLightAttenuationRadiusMode_Automatic", + "details": { + "name": "Automatic" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Explicit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Explicit.names index 7f24ff6286..546a8f21d8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Explicit.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LightAttenuationRadiusMode_Explicit.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "LightAttenuationRadiusMode_Explicit::Getter", - "category": "Constants" - } + "name": "Explicit", + "category": "Constants/Light Attenuation Radius Mode" + }, + "methods": [ + { + "key": "GetLightAttenuationRadiusMode_Explicit", + "details": { + "name": "Explicit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LookModificationComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LookModificationComponentTypeId.names index cd9bf7661f..ee6f688929 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LookModificationComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/LookModificationComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "LookModificationComponentTypeId::Getter", - "category": "Constants" - } + "name": "Look Modification Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetLookModificationComponentTypeId", + "details": { + "name": "Get Look Modification Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialComponentTypeId.names index 0f13cdb0d6..c4804c0db2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MaterialComponentTypeId::Getter", - "category": "Constants" - } + "name": "Material Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetMaterialComponentTypeId", + "details": { + "name": "Get Material Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Enabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Enabled.names index 22ced2479c..76b190410d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Enabled.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Enabled.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MaterialPropertyGroupVisibility_Enabled::Getter", - "category": "Constants" - } + "name": "Enabled", + "category": "Constants/Material Property Group Visibility" + }, + "methods": [ + { + "key": "GetMaterialPropertyGroupVisibility_Enabled", + "details": { + "name": "Enabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Hidden.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Hidden.names index 0b332ba6e4..b2457aed71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Hidden.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyGroupVisibility_Hidden.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MaterialPropertyGroupVisibility_Hidden::Getter", - "category": "Constants" - } + "name": "Hidden", + "category": "Constants/Material Property Group Visibility" + }, + "methods": [ + { + "key": "GetMaterialPropertyGroupVisibility_Hidden", + "details": { + "name": "Hidden" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Disabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Disabled.names index 7b22c9120c..a04dc06e3a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Disabled.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Disabled.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MaterialPropertyVisibility_Disabled::Getter", - "category": "Constants" - } + "name": "Disabled", + "category": "Constants/Material Property Visibility" + }, + "methods": [ + { + "key": "GetMaterialPropertyVisibility_Disabled", + "details": { + "name": "Disabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Enabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Enabled.names index 7da9316556..b6343d4452 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Enabled.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Enabled.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MaterialPropertyVisibility_Enabled::Getter", - "category": "Constants" - } + "name": "Enabled", + "category": "Constants/Material Property Visibility" + }, + "methods": [ + { + "key": "GetMaterialPropertyVisibility_Enabled", + "details": { + "name": "Enabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Hidden.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Hidden.names index 0d79119c32..d585f38b3d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Hidden.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MaterialPropertyVisibility_Hidden.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MaterialPropertyVisibility_Hidden::Getter", - "category": "Constants" - } + "name": "Hidden", + "category": "Constants/Material Property Visibility" + }, + "methods": [ + { + "key": "GetMaterialPropertyVisibility_Hidden", + "details": { + "name": "Hidden" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshBlockerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshBlockerComponentTypeId.names new file mode 100644 index 0000000000..73ff4a28d7 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshBlockerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "MeshBlockerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Mesh Blocker Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetMeshBlockerComponentTypeId", + "details": { + "name": "Get Mesh Blocker Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshComponentTypeId.names index ba1709fcf2..d34efd836f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MeshComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MeshComponentTypeId::Getter", - "category": "Constants" - } + "name": "Mesh Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetMeshComponentTypeId", + "details": { + "name": "Get Mesh Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MixedGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MixedGradientComponentTypeId.names index f0364c7c45..d58bfe9c55 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MixedGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MixedGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MixedGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Mixed Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetMixedGradientComponentTypeId", + "details": { + "name": "Get Mixed Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Blended.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Blended.names index 7e95390e2e..5584463927 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Blended.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Blended.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MultiPositionBehaviorType_Blended::Getter", - "category": "Constants" - } + "name": "Blended", + "category": "Constants/Multi Position Behavior Type" + }, + "methods": [ + { + "key": "GetMultiPositionBehaviorType_Blended", + "details": { + "name": "Blended" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Separate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Separate.names index 476c8b91ef..6aa2d44c74 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Separate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/MultiPositionBehaviorType_Separate.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "MultiPositionBehaviorType_Separate::Getter", - "category": "Constants" - } + "name": "Separate", + "category": "Constants/Multi Position Behavior Type" + }, + "methods": [ + { + "key": "GetMultiPositionBehaviorType_Separate", + "details": { + "name": "Separate" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/OcclusionCullingPlaneComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/OcclusionCullingPlaneComponentTypeId.names index 471b5d63d3..8f8b5a8449 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/OcclusionCullingPlaneComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/OcclusionCullingPlaneComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "OcclusionCullingPlaneComponentTypeId::Getter", - "category": "Constants" - } + "name": "Occlusion Culling Plane Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetOcclusionCullingPlaneComponentTypeId", + "details": { + "name": "Get Occlusion Culling Plane Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PerlinGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PerlinGradientComponentTypeId.names index 0779352f77..761277822f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PerlinGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PerlinGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PerlinGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Perlin Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetPerlinGradientComponentTypeId", + "details": { + "name": "Get Perlin Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Candela.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Candela.names index 0923efc251..777b65e033 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Candela.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Candela.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhotometricUnit_Candela::Getter", - "category": "Constants" - } + "name": "Candela", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "key": "GetPhotometricUnit_Candela", + "details": { + "name": "Candela" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Illuminance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Illuminance.names index 841af8eb4d..0be63e5f79 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Illuminance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Illuminance.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhotometricUnit_Ev100_Illuminance::Getter", - "category": "Constants" - } + "name": "Ev 100 Illuminance", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "key": "GetPhotometricUnit_Ev100_Illuminance", + "details": { + "name": "Ev 100 Illuminance" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Luminance.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Luminance.names index b6df92e7d2..c0d66a0bff 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Luminance.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Ev100_Luminance.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhotometricUnit_Ev100_Luminance::Getter", - "category": "Constants" - } + "name": "Ev 100 Luminance", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "key": "GetPhotometricUnit_Ev100_Luminance", + "details": { + "name": "Ev 100 Luminance" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lumen.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lumen.names index 2d06fd13a3..4484ca6141 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lumen.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lumen.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhotometricUnit_Lumen::Getter", - "category": "Constants" - } + "name": "Lumen", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "key": "GetPhotometricUnit_Lumen", + "details": { + "name": "Lumen" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lux.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lux.names index b16b5a6b9e..8b0fba4085 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lux.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Lux.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhotometricUnit_Lux::Getter", - "category": "Constants" - } + "name": "Lux", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "key": "GetPhotometricUnit_Lux", + "details": { + "name": "Lux" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Nit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Nit.names index 33af8d043e..5e5326dc76 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Nit.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Nit.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhotometricUnit_Nit::Getter", - "category": "Constants" - } + "name": "Nit", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "key": "GetPhotometricUnit_Nit", + "details": { + "name": "Nit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Unknown.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Unknown.names index d748e688e2..aa7a690895 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Unknown.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhotometricUnit_Unknown.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhotometricUnit_Unknown::Getter", - "category": "Constants" - } + "name": "Unknown", + "category": "Constants/Photometric Unit" + }, + "methods": [ + { + "key": "GetPhotometricUnit_Unknown", + "details": { + "name": "Unknown" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhysicalSkyComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhysicalSkyComponentTypeId.names index 05b71703e9..b1dcaa1816 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhysicalSkyComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PhysicalSkyComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PhysicalSkyComponentTypeId::Getter", - "category": "Constants" - } + "name": "Physical Sky Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetPhysicalSkyComponentTypeId", + "details": { + "name": "Get Physical Sky Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PositionModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PositionModifierComponentTypeId.names new file mode 100644 index 0000000000..72757fc200 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PositionModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "PositionModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Position Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetPositionModifierComponentTypeId", + "details": { + "name": "Get Position Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PostFxLayerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PostFxLayerComponentTypeId.names index b45a4432ef..c82036d25d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PostFxLayerComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PostFxLayerComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PostFxLayerComponentTypeId::Getter", - "category": "Constants" - } + "name": "Post Fx Layer Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetPostFxLayerComponentTypeId", + "details": { + "name": "Get Post Fx Layer Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PosterizeGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PosterizeGradientComponentTypeId.names index 1325364e24..64bcc46fd5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PosterizeGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/PosterizeGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "PosterizeGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Posterize Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetPosterizeGradientComponentTypeId", + "details": { + "name": "Get Posterize Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_AWSCognitoIDP.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_AWSCognitoIDP.names new file mode 100644 index 0000000000..51b18f6a3f --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_AWSCognitoIDP.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ProviderNameEnum_AWSCognitoIDP", + "context": "Constant", + "variant": "", + "details": { + "name": "AWS Cognito IDP", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "key": "GetProviderNameEnum_AWSCognitoIDP", + "details": { + "name": "AWS Cognito IDP" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_Google.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_Google.names new file mode 100644 index 0000000000..c6f5875b85 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_Google.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ProviderNameEnum_Google", + "context": "Constant", + "variant": "", + "details": { + "name": "Google", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "key": "GetProviderNameEnum_Google", + "details": { + "name": "Google" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_LoginWithAmazon.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_LoginWithAmazon.names new file mode 100644 index 0000000000..9ce06d95bc --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_LoginWithAmazon.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ProviderNameEnum_LoginWithAmazon", + "context": "Constant", + "variant": "", + "details": { + "name": "Amazon", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "key": "GetProviderNameEnum_LoginWithAmazon", + "details": { + "name": "Amazon" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_None.names new file mode 100644 index 0000000000..cbdd311d17 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ProviderNameEnum_None.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ProviderNameEnum_None", + "context": "Constant", + "variant": "", + "details": { + "name": "None", + "category": "Constants/Provider Name" + }, + "methods": [ + { + "key": "GetProviderNameEnum_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/QuadShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/QuadShapeComponentTypeId.names index 5d98a25b38..b76b48d344 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/QuadShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/QuadShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "QuadShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Quad Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetQuadShapeComponentTypeId", + "details": { + "name": "Get Quad Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RadiusWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RadiusWeightModifierComponentTypeId.names index 43cfe542c0..6afb19615a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RadiusWeightModifierComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RadiusWeightModifierComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "RadiusWeightModifierComponentTypeId::Getter", - "category": "Constants" - } + "name": "Radius Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetRadiusWeightModifierComponentTypeId", + "details": { + "name": "Get Radius Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RandomGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RandomGradientComponentTypeId.names index 58045dbdec..7c13c137eb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RandomGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RandomGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "RandomGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Random Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetRandomGradientComponentTypeId", + "details": { + "name": "Get Random Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceGradientComponentTypeId.names index 89e3a955d1..b4efb57b58 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ReferenceGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Reference Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetReferenceGradientComponentTypeId", + "details": { + "name": "Get Reference Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceShapeComponentTypeId.names new file mode 100644 index 0000000000..9341b6e685 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReferenceShapeComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ReferenceShapeComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Reference Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetReferenceShapeComponentTypeId", + "details": { + "name": "Get Reference Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReflectionProbeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReflectionProbeComponentTypeId.names index 9d8cf61239..a2b4a72f2a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReflectionProbeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ReflectionProbeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ReflectionProbeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Reflection Probe Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetReflectionProbeComponentTypeId", + "details": { + "name": "Get Reflection Probe Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RotationModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RotationModifierComponentTypeId.names new file mode 100644 index 0000000000..28ca1a8234 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/RotationModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "RotationModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Rotation Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetRotationModifierComponentTypeId", + "details": { + "name": "Get Rotation Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SPHERE.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SPHERE.names new file mode 100644 index 0000000000..d5477cdc51 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SPHERE.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "SPHERE", + "context": "Constant", + "variant": "", + "details": { + "name": "Sphere", + "category": "Constants/White Box" + }, + "methods": [ + { + "key": "GetSPHERE", + "details": { + "name": "Sphere" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ScaleModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ScaleModifierComponentTypeId.names new file mode 100644 index 0000000000..7a626da7fa --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ScaleModifierComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ScaleModifierComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Scale Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetScaleModifierComponentTypeId", + "details": { + "name": "Get Scale Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM.names index 3542ed76bb..2c61e96479 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowFilterMethod_ESM::Getter", - "category": "Constants" - } + "name": "ESM", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "key": "GetShadowFilterMethod_ESM", + "details": { + "name": "ESM" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM_PCF.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM_PCF.names index 57736a0912..af77df03ec 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM_PCF.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_ESM_PCF.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowFilterMethod_ESM_PCF::Getter", - "category": "Constants" - } + "name": "ESM_PCF", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "key": "GetShadowFilterMethod_ESM_PCF", + "details": { + "name": "ESM_PCF" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_None.names index 90a1da18fe..872c8175d4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowFilterMethod_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "key": "GetShadowFilterMethod_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_PCF.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_PCF.names index 0600bfc8d2..3186d0931a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_PCF.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowFilterMethod_PCF.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowFilterMethod_PCF::Getter", - "category": "Constants" - } + "name": "PCF", + "category": "Constants/Shadowmap/Filter" + }, + "methods": [ + { + "key": "GetShadowFilterMethod_PCF", + "details": { + "name": "PCF" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_1024.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_1024.names index 0814f06cce..5f8abb02c3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_1024.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_1024.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowmapSize_1024::Getter", - "category": "Constants" - } + "name": "1024", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "key": "GetShadowmapSize_1024", + "details": { + "name": "1024" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_2045.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_2045.names index 4ed139c23a..18b12dbdaa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_2045.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_2045.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowmapSize_2045::Getter", - "category": "Constants" - } + "name": "2045", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "key": "GetShadowmapSize_2045", + "details": { + "name": "2045" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_256.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_256.names index 174dcbd1e7..0711591646 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_256.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_256.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowmapSize_256::Getter", - "category": "Constants" - } + "name": "256", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "key": "GetShadowmapSize_256", + "details": { + "name": "256" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_512.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_512.names index 476a558ad6..b2d763f207 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_512.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_512.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowmapSize_512::Getter", - "category": "Constants" - } + "name": "512", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "key": "GetShadowmapSize_512", + "details": { + "name": "512" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_None.names index a1f9c51c8f..58a6bc303f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShadowmapSize_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShadowmapSize_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/Shadowmap/Size" + }, + "methods": [ + { + "key": "GetShadowmapSize_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{43DA906B-7DEF-4CA8-9790-854106D3F983}", + "details": { + "name": "unsigned int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeAreaFalloffGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeAreaFalloffGradientComponentTypeId.names index a1e9881e41..f37ce58bed 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeAreaFalloffGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeAreaFalloffGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShapeAreaFalloffGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Shape Area Falloff Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetShapeAreaFalloffGradientComponentTypeId", + "details": { + "name": "Get Shape Area Falloff Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_ShapeChanged.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_ShapeChanged.names index 700decf418..ebe7eb050b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_ShapeChanged.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_ShapeChanged.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShapeChangeReasons_ShapeChanged::Getter", - "category": "Constants" - } + "name": "Shape Change Reasons_ Shape Changed", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetShapeChangeReasons_ShapeChanged", + "details": { + "name": "Get Shape Change Reasons_ Shape Changed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_TransformChanged.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_TransformChanged.names index 441ee1a3bc..fa38216c96 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_TransformChanged.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeChangeReasons_TransformChanged.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShapeChangeReasons_TransformChanged::Getter", - "category": "Constants" - } + "name": "Shape Change Reasons_ Transform Changed", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetShapeChangeReasons_TransformChanged", + "details": { + "name": "Get Shape Change Reasons_ Transform Changed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeIntersectionFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeIntersectionFilterComponentTypeId.names new file mode 100644 index 0000000000..681b7c550b --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeIntersectionFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "ShapeIntersectionFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Shape Intersection Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetShapeIntersectionFilterComponentTypeId", + "details": { + "name": "Get Shape Intersection Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Heightfield.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Heightfield.names new file mode 100644 index 0000000000..51c2b8eb0a --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeType_Heightfield.names @@ -0,0 +1,30 @@ +{ + "entries": [ + { + "key": "ShapeType_Heightfield", + "context": "Constant", + "variant": "", + "details": { + "name": "Get Shape Type: Heightfield", + "category": "Constants/Physics" + }, + "methods": [ + { + "key": "GetShapeType_Heightfield", + "details": { + "name": "Get Shape Type: Heightfield", + "subtitle": "Shape Type" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "Shape Type" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeWeightModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeWeightModifierComponentTypeId.names index 947f0d1a0d..063249f099 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeWeightModifierComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ShapeWeightModifierComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ShapeWeightModifierComponentTypeId::Getter", - "category": "Constants" - } + "name": "Shape Weight Modifier Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetShapeWeightModifierComponentTypeId", + "details": { + "name": "Get Shape Weight Modifier Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SlopeAlignmentModifierComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SlopeAlignmentModifierComponentTypeId.names index 74e704cb34..6888e86823 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SlopeAlignmentModifierComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SlopeAlignmentModifierComponentTypeId.names @@ -5,19 +5,20 @@ "context": "Constant", "variant": "", "details": { - "name": "" + "name": "Slope Alignment Modifier Component Type Id", + "category": "Constants/Editor" }, "methods": [ { - "key": "SlopeAlignmentModifierComponentTypeId", + "key": "GetSlopeAlignmentModifierComponentTypeId", "details": { - "name": "SlopeAlignmentModifierComponentTypeId::Getter" + "name": "Get Slope Alignment Modifier Component Type Id" }, "results": [ { "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", "details": { - "name": "AZ::Uuid" + "name": "AZ:: Uuid" } } ] diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SmoothStepGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SmoothStepGradientComponentTypeId.names index 0e2ee25219..fafba6ee97 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SmoothStepGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SmoothStepGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SmoothStepGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Smooth Step Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSmoothStepGradientComponentTypeId", + "details": { + "name": "Get Smooth Step Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SpawnerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SpawnerComponentTypeId.names index 72a66d38e8..246a3f7355 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SpawnerComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SpawnerComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SpawnerComponentTypeId::Getter", - "category": "Constants" - } + "name": "Spawner Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSpawnerComponentTypeId", + "details": { + "name": "Get Spawner Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SphereShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SphereShapeComponentTypeId.names index cedd42ef6a..1b551366f7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SphereShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SphereShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SphereShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Sphere Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSphereShapeComponentTypeId", + "details": { + "name": "Get Sphere Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SsaoComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SsaoComponentTypeId.names index 525dbdcdd0..3c4cb0c86a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SsaoComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SsaoComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SsaoComponentTypeId::Getter", - "category": "Constants" - } + "name": "Ssao Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSsaoComponentTypeId", + "details": { + "name": "Get Ssao Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Decrement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Decrement.names index da6699bfbe..0a0c624384 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Decrement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Decrement.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_Decrement::Getter", - "category": "Constants" - } + "name": "Decrement", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_Decrement", + "details": { + "name": "Decrement" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_DecrementSaturate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_DecrementSaturate.names index 46fce46fc3..2731512d65 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_DecrementSaturate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_DecrementSaturate.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_DecrementSaturate::Getter", - "category": "Constants" - } + "name": "Decrement Saturate", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_DecrementSaturate", + "details": { + "name": "Decrement Saturate" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Increment.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Increment.names index 9d20ca70fb..5db4556355 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Increment.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Increment.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_Increment::Getter", - "category": "Constants" - } + "name": "Increment", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_Increment", + "details": { + "name": "Increment" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_IncrementSaturate.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_IncrementSaturate.names index 77bfc0a95e..58fab39678 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_IncrementSaturate.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_IncrementSaturate.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_IncrementSaturate::Getter", - "category": "Constants" - } + "name": "Increment Saturate", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_IncrementSaturate", + "details": { + "name": "Increment Saturate" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invalid.names index 7f6e5fc38a..88db34395d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invert.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invert.names index 021e089ac1..fca3c17879 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invert.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Invert.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_Invert::Getter", - "category": "Constants" - } + "name": "Invert", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_Invert", + "details": { + "name": "Invert" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Keep.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Keep.names index e4e4fc1956..f8b7a01331 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Keep.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Keep.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_Keep::Getter", - "category": "Constants" - } + "name": "Keep", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_Keep", + "details": { + "name": "Keep" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Replace.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Replace.names index 331397d027..cca0e966da 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Replace.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Replace.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_Replace::Getter", - "category": "Constants" - } + "name": "Replace", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_Replace", + "details": { + "name": "Replace" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Zero.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Zero.names index 9d17600aad..097a299965 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Zero.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/StencilOp_Zero.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "StencilOp_Zero::Getter", - "category": "Constants" - } + "name": "Zero", + "category": "Constants/Stencil Op" + }, + "methods": [ + { + "key": "GetStencilOp_Zero", + "details": { + "name": "Zero" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeFilterComponentTypeId.names new file mode 100644 index 0000000000..076e6cb4ac --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "SurfaceAltitudeFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Altitude Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSurfaceAltitudeFilterComponentTypeId", + "details": { + "name": "Get Surface Altitude Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeGradientComponentTypeId.names index 01d0ca9912..0ee59615d4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceAltitudeGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SurfaceAltitudeGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Surface Altitude Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSurfaceAltitudeGradientComponentTypeId", + "details": { + "name": "Get Surface Altitude Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskDepthFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskDepthFilterComponentTypeId.names new file mode 100644 index 0000000000..d1a59d8734 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskDepthFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "SurfaceMaskDepthFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Mask Depth Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSurfaceMaskDepthFilterComponentTypeId", + "details": { + "name": "Get Surface Mask Depth Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskFilterComponentTypeId.names new file mode 100644 index 0000000000..30f887a203 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "SurfaceMaskFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Mask Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSurfaceMaskFilterComponentTypeId", + "details": { + "name": "Get Surface Mask Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskGradientComponentTypeId.names index d98abc6e80..7b015e0e05 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceMaskGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SurfaceMaskGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Surface Mask Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSurfaceMaskGradientComponentTypeId", + "details": { + "name": "Get Surface Mask Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeFilterComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeFilterComponentTypeId.names new file mode 100644 index 0000000000..25861d5f82 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeFilterComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "SurfaceSlopeFilterComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Surface Slope Filter Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSurfaceSlopeFilterComponentTypeId", + "details": { + "name": "Get Surface Slope Filter Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeGradientComponentTypeId.names index 29955c91f4..9d245b8937 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SurfaceSlopeGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SurfaceSlopeGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Surface Slope Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetSurfaceSlopeGradientComponentTypeId", + "details": { + "name": "Get Surface Slope Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Android.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Android.names index b615174731..92b95f2eaf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Android.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Android.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigPlatform_Android::Getter", - "category": "Constants" - } + "name": "Android", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "key": "GetSystemConfigPlatform_Android", + "details": { + "name": "Android" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_InvalidPlatform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_InvalidPlatform.names index ebb0dc01bf..eef4a9709b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_InvalidPlatform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_InvalidPlatform.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigPlatform_InvalidPlatform::Getter", - "category": "Constants" - } + "name": "Invalid Platform", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "key": "GetSystemConfigPlatform_InvalidPlatform", + "details": { + "name": "Invalid Platform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Ios.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Ios.names index 2de01a41e9..176c31ae50 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Ios.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Ios.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigPlatform_Ios::Getter", - "category": "Constants" - } + "name": "Ios", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "key": "GetSystemConfigPlatform_Ios", + "details": { + "name": "Ios" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Mac.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Mac.names index 50dc9a573f..86e2686493 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Mac.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Mac.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigPlatform_Mac::Getter", - "category": "Constants" - } + "name": "Mac", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "key": "GetSystemConfigPlatform_Mac", + "details": { + "name": "Mac" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_OsxMetal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_OsxMetal.names index 8005565fca..b65d572c09 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_OsxMetal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_OsxMetal.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigPlatform_OsxMetal::Getter", - "category": "Constants" - } + "name": "Osx Metal", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "key": "GetSystemConfigPlatform_OsxMetal", + "details": { + "name": "Osx Metal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Pc.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Pc.names index a1b962ea90..7653461096 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Pc.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Pc.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigPlatform_Pc::Getter", - "category": "Constants" - } + "name": "Pc", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "key": "GetSystemConfigPlatform_Pc", + "details": { + "name": "Pc" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Provo.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Provo.names index 46e8d46b17..62f4f8eda5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Provo.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigPlatform_Provo.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigPlatform_Provo::Getter", - "category": "Constants" - } + "name": "Provo", + "category": "Constants/System Configuration" + }, + "methods": [ + { + "key": "GetSystemConfigPlatform_Provo", + "details": { + "name": "Provo" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Auto.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Auto.names index 51484e63d5..0646ab299a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Auto.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Auto.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigSpec_Auto::Getter", - "category": "Constants" - } + "name": "Auto", + "category": "Constants/System Spec" + }, + "methods": [ + { + "key": "GetSystemConfigSpec_Auto", + "details": { + "name": "Auto" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_High.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_High.names index 80c2de7669..dfaa1277cf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_High.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_High.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigSpec_High::Getter", - "category": "Constants" - } + "name": "High", + "category": "Constants/System Spec" + }, + "methods": [ + { + "key": "GetSystemConfigSpec_High", + "details": { + "name": "High" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Low.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Low.names index 5a4dee45d5..af875a7704 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Low.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Low.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigSpec_Low::Getter", - "category": "Constants" - } + "name": "Low", + "category": "Constants/System Spec" + }, + "methods": [ + { + "key": "GetSystemConfigSpec_Low", + "details": { + "name": "Low" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Medium.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Medium.names index 52485ed95b..c4b7c9aefd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Medium.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_Medium.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigSpec_Medium::Getter", - "category": "Constants" - } + "name": "Medium", + "category": "Constants/System Spec" + }, + "methods": [ + { + "key": "GetSystemConfigSpec_Medium", + "details": { + "name": "Medium" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_VeryHigh.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_VeryHigh.names index 9d71dadc2d..169f3fb7ea 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_VeryHigh.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemConfigSpec_VeryHigh.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemConfigSpec_VeryHigh::Getter", - "category": "Constants" - } + "name": "Very High", + "category": "Constants/System Spec" + }, + "methods": [ + { + "key": "GetSystemConfigSpec_VeryHigh", + "details": { + "name": "Very High" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemEntityId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemEntityId.names index 3a6a3c2c04..79a659cdf7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemEntityId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/SystemEntityId.names @@ -5,9 +5,26 @@ "context": "Constant", "variant": "", "details": { - "name": "SystemEntityId::Getter", - "category": "Constants" - } + "name": "System Entity Id", + "category": "Constants/System" + }, + "methods": [ + { + "key": "GetSystemEntityId", + "details": { + "name": "Get System Entity Id" + }, + "results": [ + { + "typeid": "{6383F1D3-BB27-4E6B-A49A-6409B2059EAA}", + "details": { + "name": "Entity Id", + "tooltip": "Entity Unique Id" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TETRAHEDRON.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TETRAHEDRON.names new file mode 100644 index 0000000000..4a6e78add2 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TETRAHEDRON.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "TETRAHEDRON", + "context": "Constant", + "variant": "", + "details": { + "name": "Tetrahedron", + "category": "Constants/White Box" + }, + "methods": [ + { + "key": "GetTETRAHEDRON", + "details": { + "name": "Tetrahedron" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ThresholdGradientComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ThresholdGradientComponentTypeId.names index c40a8f1281..616332678e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ThresholdGradientComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/ThresholdGradientComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "ThresholdGradientComponentTypeId::Getter", - "category": "Constants" - } + "name": "Threshold Gradient Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetThresholdGradientComponentTypeId", + "details": { + "name": "Get Threshold Gradient Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformComponentTypeId.names index a140864cdc..29d57c5b38 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformComponentTypeId::Getter", - "category": "Constants" - } + "name": "Transform Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetTransformComponentTypeId", + "details": { + "name": "Get Transform Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Rotation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Rotation.names index a573b13ba1..3b70a204a8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Rotation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Rotation.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformMode_Rotation::Getter", - "category": "Constants" - } + "name": "Rotation", + "category": "Constants/Transform/Mode" + }, + "methods": [ + { + "key": "GetTransformMode_Rotation", + "details": { + "name": "Rotation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Scale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Scale.names index d04c443780..5e425db9b1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Scale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Scale.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformMode_Scale::Getter", - "category": "Constants" - } + "name": "Scale", + "category": "Constants/Transform/Mode" + }, + "methods": [ + { + "key": "GetTransformMode_Scale", + "details": { + "name": "Scale" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Translation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Translation.names index 05fb942bd8..23eca9bd48 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Translation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformMode_Translation.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformMode_Translation::Getter", - "category": "Constants" - } + "name": "Translation", + "category": "Constants/Transform/Mode" + }, + "methods": [ + { + "key": "GetTransformMode_Translation", + "details": { + "name": "Translation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Center.names index a2aef08ec4..a4d5f859b0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Center.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Center.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformPivot_Center::Getter", - "category": "Constants" - } + "name": "Center", + "category": "Constants/Transform/Pivot" + }, + "methods": [ + { + "key": "GetTransformPivot_Center", + "details": { + "name": "Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Object.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Object.names index 010e4a0eb2..3c4f11fb3a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Object.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformPivot_Object.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformPivot_Object::Getter", - "category": "Constants" - } + "name": "Object", + "category": "Constants/Transform/Pivot" + }, + "methods": [ + { + "key": "GetTransformPivot_Object", + "details": { + "name": "Object" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_All.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_All.names index 4161f154b3..844376c960 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_All.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_All.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformRefreshType_All::Getter", - "category": "Constants" - } + "name": "All", + "category": "Constants/Transform/Refresh Type" + }, + "methods": [ + { + "key": "GetTransformRefreshType_All", + "details": { + "name": "All" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Orientation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Orientation.names index 920fc60dfd..37ee133fb6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Orientation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Orientation.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformRefreshType_Orientation::Getter", - "category": "Constants" - } + "name": "Orientation", + "category": "Constants/Transform/Refresh Type" + }, + "methods": [ + { + "key": "GetTransformRefreshType_Orientation", + "details": { + "name": "Orientation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Translation.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Translation.names index 80b256f896..11c492d799 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Translation.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TransformRefreshType_Translation.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TransformRefreshType_Translation::Getter", - "category": "Constants" - } + "name": "Translation", + "category": "Constants/Transform/Refresh Type" + }, + "methods": [ + { + "key": "GetTransformRefreshType_Translation", + "details": { + "name": "Translation" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TubeShapeComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TubeShapeComponentTypeId.names index dad5748f53..0f674980a7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TubeShapeComponentTypeId.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/TubeShapeComponentTypeId.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "TubeShapeComponentTypeId::Getter", - "category": "Constants" - } + "name": "Tube Shape Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetTubeShapeComponentTypeId", + "details": { + "name": "Get Tube Shape Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/UiLayoutCellUnspecifiedSize.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/UiLayoutCellUnspecifiedSize.names index d9b6976e89..21292a03d5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/UiLayoutCellUnspecifiedSize.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/UiLayoutCellUnspecifiedSize.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "UiLayoutCellUnspecifiedSize::Getter", - "category": "Constants" - } + "name": "Cell Unspecified Size", + "category": "Constants/UI/Ui Layout" + }, + "methods": [ + { + "key": "GetUiLayoutCellUnspecifiedSize", + "details": { + "name": "Layout Cell Unspecified Size" + }, + "results": [ + { + "typeid": "{EA2C3E90-AFBE-44D4-A90D-FAAF79BAF93D}", + "details": { + "name": "float" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/VegetationSpawnerComponentTypeId.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/VegetationSpawnerComponentTypeId.names new file mode 100644 index 0000000000..cc405ebb88 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/VegetationSpawnerComponentTypeId.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "VegetationSpawnerComponentTypeId", + "context": "Constant", + "variant": "", + "details": { + "name": "Vegetation Spawner Component Type Id", + "category": "Constants/Editor" + }, + "methods": [ + { + "key": "GetVegetationSpawnerComponentTypeId", + "details": { + "name": "Get Vegetation Spawner Component Type Id" + }, + "results": [ + { + "typeid": "{E152C105-A133-4D03-BBF8-3D4B2FBA3E2A}", + "details": { + "name": "AZ:: Uuid" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoEndTime.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoEndTime.names index 89b6606748..0f52fd70a6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoEndTime.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoEndTime.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eSSB_GotoEndTime::Getter", - "category": "Constants" - } + "name": "Goto End Time", + "category": "Constants/UI/Animation/Sequence Stop Behavior" + }, + "methods": [ + { + "key": "GeteSSB_GotoEndTime", + "details": { + "name": "Goto End Time" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoStartTime.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoStartTime.names index 69c4ae2f1f..f5ff272c4a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoStartTime.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_GotoStartTime.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eSSB_GotoStartTime::Getter", - "category": "Constants" - } + "name": "Goto Start Time", + "category": "Constants/UI/Animation/Sequence Stop Behavior" + }, + "methods": [ + { + "key": "GeteSSB_GotoStartTime", + "details": { + "name": "Goto Start Time" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_LeaveTime.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_LeaveTime.names index 55136e9f17..a018009749 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_LeaveTime.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eSSB_LeaveTime.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eSSB_LeaveTime::Getter", - "category": "Constants" - } + "name": "Leave Time", + "category": "Constants/UI/Animation/Sequence Stop Behavior" + }, + "methods": [ + { + "key": "GeteSSB_LeaveTime", + "details": { + "name": "Leave Time" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Aborted.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Aborted.names index e2feeb0734..9db98c8f4f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Aborted.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Aborted.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiAnimationEvent_Aborted::Getter", - "category": "Constants" - } + "name": "Aborted", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "key": "GeteUiAnimationEvent_Aborted", + "details": { + "name": "Aborted" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Started.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Started.names index 45c20aacf3..eed0cb1509 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Started.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Started.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiAnimationEvent_Started::Getter", - "category": "Constants" - } + "name": "Started", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "key": "GeteUiAnimationEvent_Started", + "details": { + "name": "Get Started" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Stopped.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Stopped.names index 20c8d48e42..16adfb71b6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Stopped.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Stopped.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiAnimationEvent_Stopped::Getter", - "category": "Constants" - } + "name": "Stopped", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "key": "GeteUiAnimationEvent_Stopped", + "details": { + "name": "Stopped" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Updated.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Updated.names index 69221891f7..a4005325dd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Updated.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiAnimationEvent_Updated.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiAnimationEvent_Updated::Getter", - "category": "Constants" - } + "name": "Updated", + "category": "Constants/UI/Animation Event" + }, + "methods": [ + { + "key": "GeteUiAnimationEvent_Updated", + "details": { + "name": "Updated" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Invalid.names index 6062cced48..b7391f4ac1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDragState_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/UI/Drag State" + }, + "methods": [ + { + "key": "GeteUiDragState_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Normal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Normal.names index c5c06e8057..08cf051848 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Normal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Normal.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDragState_Normal::Getter", - "category": "Constants" - } + "name": "Normal", + "category": "Constants/UI/Drag State" + }, + "methods": [ + { + "key": "GeteUiDragState_Normal", + "details": { + "name": "Normal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Valid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Valid.names index d8ad67098a..c8daad2e03 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Valid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDragState_Valid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDragState_Valid::Getter", - "category": "Constants" - } + "name": "Valid", + "category": "Constants/UI/Drag State" + }, + "methods": [ + { + "key": "GeteUiDragState_Valid", + "details": { + "name": "Valid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Invalid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Invalid.names index 7f0745b6f3..1c36980fda 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Invalid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Invalid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDropState_Invalid::Getter", - "category": "Constants" - } + "name": "Invalid", + "category": "Constants/UI/Drop State" + }, + "methods": [ + { + "key": "GeteUiDropState_Invalid", + "details": { + "name": "Invalid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Normal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Normal.names index b7325d9c15..11b6cc6366 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Normal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Normal.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDropState_Normal::Getter", - "category": "Constants" - } + "name": "Normal", + "category": "Constants/UI/Drop State" + }, + "methods": [ + { + "key": "GeteUiDropState_Normal", + "details": { + "name": "Normal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Valid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Valid.names index 19551341da..8438d8f5ad 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Valid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDropState_Valid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDropState_Valid::Getter", - "category": "Constants" - } + "name": "Valid", + "category": "Constants/UI/Drop State" + }, + "methods": [ + { + "key": "GeteUiDropState_Valid", + "details": { + "name": "Valid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Free.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Free.names index b3dbc87cac..77cf8713fd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Free.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Free.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDynamicContentDBColorType_Free::Getter", - "category": "Constants" - } + "name": "Color Type Free", + "category": "Constants/UI/Dynamic ContentDB" + }, + "methods": [ + { + "key": "GeteUiDynamicContentDBColorType_Free", + "details": { + "name": "Color Type Free" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Paid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Paid.names index b58a8484ee..209601c715 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Paid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiDynamicContentDBColorType_Paid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiDynamicContentDBColorType_Paid::Getter", - "category": "Constants" - } + "name": "Color Type Paid", + "category": "Constants/UI/Dynamic ContentDB" + }, + "methods": [ + { + "key": "GeteUiDynamicContentDBColorType_Paid", + "details": { + "name": "Color Type Paid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Circle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Circle.names index 7bcdda54e2..69925bb220 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Circle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Circle.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiEmitShape_Circle::Getter", - "category": "Constants" - } + "name": "Circle", + "category": "Constants/UI/Emit Shape" + }, + "methods": [ + { + "key": "GeteUiEmitShape_Circle", + "details": { + "name": "Circle" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Point.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Point.names index 60ef452594..2ccc0456a7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Point.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Point.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiEmitShape_Point::Getter", - "category": "Constants" - } + "name": "Point", + "category": "Constants/UI/Emit Shape" + }, + "methods": [ + { + "key": "GeteUiEmitShape_Point", + "details": { + "name": "Point" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Quad.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Quad.names index 25ec6925de..017f799b17 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Quad.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiEmitShape_Quad.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiEmitShape_Quad::Getter", - "category": "Constants" - } + "name": "Quad", + "category": "Constants/UI/Emit Shape" + }, + "methods": [ + { + "key": "GeteUiEmitShape_Quad", + "details": { + "name": "Quad" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomLeft.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomLeft.names index 11a00014b9..41ed31a1a0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomLeft.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomLeft.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillCornerOrigin_BottomLeft::Getter", - "category": "Constants" - } + "name": "Bottom Left", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "key": "GeteUiFillCornerOrigin_BottomLeft", + "details": { + "name": "Bottom Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomRight.names index b1121d2e37..fa80def3d8 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_BottomRight.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillCornerOrigin_BottomRight::Getter", - "category": "Constants" - } + "name": "Bottom Right", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "key": "GeteUiFillCornerOrigin_BottomRight", + "details": { + "name": "Bottom Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopLeft.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopLeft.names index 16e3c41732..527b84e8b6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopLeft.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopLeft.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillCornerOrigin_TopLeft::Getter", - "category": "Constants" - } + "name": "Top Left", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "key": "GeteUiFillCornerOrigin_TopLeft", + "details": { + "name": "Top Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopRight.names index a923c46942..918cd98730 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillCornerOrigin_TopRight.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillCornerOrigin_TopRight::Getter", - "category": "Constants" - } + "name": "Top Right", + "category": "Constants/UI/Fill Corner" + }, + "methods": [ + { + "key": "GeteUiFillCornerOrigin_TopRight", + "details": { + "name": "Top Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Bottom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Bottom.names index 914282a199..767449a8bb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Bottom.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Bottom.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillEdgeOrigin_Bottom::Getter", - "category": "Constants" - } + "name": "Bottom", + "category": "Constants/UI/Fill Edge" + }, + "methods": [ + { + "key": "GeteUiFillEdgeOrigin_Bottom", + "details": { + "name": "Bottom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Left.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Left.names index a88450c7b4..c03e600494 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Left.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Left.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillEdgeOrigin_Left::Getter", - "category": "Constants" - } + "name": "Left", + "category": "Constants/UI/Fill Edge" + }, + "methods": [ + { + "key": "GeteUiFillEdgeOrigin_Left", + "details": { + "name": "Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Right.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Right.names index db5d528b2e..5f2b9c3b94 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Right.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Right.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillEdgeOrigin_Right::Getter", - "category": "Constants" - } + "name": "Right", + "category": "Constants/UI/Fill Edge" + }, + "methods": [ + { + "key": "GeteUiFillEdgeOrigin_Right", + "details": { + "name": "Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Top.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Top.names index 6cb79b40d9..c301c1fd8f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Top.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillEdgeOrigin_Top.names @@ -5,9 +5,26 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillEdgeOrigin_Top::Getter", - "category": "Constants" - } + "name": "Top", + "category": "Constants/UI/Fill Edge", + "subtitle": "Fill Edge" + }, + "methods": [ + { + "key": "GeteUiFillEdgeOrigin_Top", + "details": { + "name": "Top" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Linear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Linear.names index 6a1530c0b3..4e5e6a8efd 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Linear.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Linear.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillType_Linear::Getter", - "category": "Constants" - } + "name": "Linear", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "key": "GeteUiFillType_Linear", + "details": { + "name": "Linear" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_None.names index 868d562df1..e417d91494 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillType_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "key": "GeteUiFillType_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Radial.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Radial.names index ae01ffdcf6..861dcc8fa4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Radial.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_Radial.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillType_Radial::Getter", - "category": "Constants" - } + "name": "Radial", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "key": "GeteUiFillType_Radial", + "details": { + "name": "Radial" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialCorner.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialCorner.names index 4dcecb752d..c301567d43 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialCorner.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialCorner.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillType_RadialCorner::Getter", - "category": "Constants" - } + "name": "Radial Corner", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "key": "GeteUiFillType_RadialCorner", + "details": { + "name": "Radial Corner" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialEdge.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialEdge.names index a8e9d490d2..bc738c6054 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialEdge.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFillType_RadialEdge.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFillType_RadialEdge::Getter", - "category": "Constants" - } + "name": "Radial Edge", + "category": "Constants/UI/Fill Type" + }, + "methods": [ + { + "key": "GeteUiFillType_RadialEdge", + "details": { + "name": "Radial Edge" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_FPS.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_FPS.names index 476f62879e..248e0da6aa 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_FPS.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_FPS.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFlipbookAnimationFramerateUnits_FPS::Getter", - "category": "Constants" - } + "name": "Frames Per Second", + "category": "Constants/UI/Flipbook Animation" + }, + "methods": [ + { + "key": "GeteUiFlipbookAnimationFramerateUnits_FPS", + "details": { + "name": "Frames Per Second" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_SecondsPerFrame.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_SecondsPerFrame.names index 2d567073a0..a1d309e3b2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_SecondsPerFrame.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationFramerateUnits_SecondsPerFrame.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFlipbookAnimationFramerateUnits_SecondsPerFrame::Getter", - "category": "Constants" - } + "name": "Seconds Per Frame", + "category": "Constants/UI/Flipbook Animation" + }, + "methods": [ + { + "key": "GeteUiFlipbookAnimationFramerateUnits_SecondsPerFrame", + "details": { + "name": "Seconds Per Frame" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_Linear.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_Linear.names index d794ec96f0..6877841a85 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_Linear.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_Linear.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFlipbookAnimationLoopType_Linear::Getter", - "category": "Constants" - } + "name": "Linear", + "category": "Constants/UI/Flipbook Animation/Loop Type" + }, + "methods": [ + { + "key": "GeteUiFlipbookAnimationLoopType_Linear", + "details": { + "name": "Linear" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_None.names index 2cdbfea52c..8f905a8cd5 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFlipbookAnimationLoopType_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/UI/Flipbook Animation/Loop Type" + }, + "methods": [ + { + "key": "GeteUiFlipbookAnimationLoopType_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_PingPong.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_PingPong.names index 9c9c1cd016..454498eec7 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_PingPong.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiFlipbookAnimationLoopType_PingPong.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiFlipbookAnimationLoopType_PingPong::Getter", - "category": "Constants" - } + "name": "Ping Pong", + "category": "Constants/UI/Flipbook Animation/Loop Type" + }, + "methods": [ + { + "key": "GeteUiFlipbookAnimationLoopType_PingPong", + "details": { + "name": "Ping Pong" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Center.names index faf4797114..b32ed9461e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Center.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Center.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiHAlign_Center::Getter", - "category": "Constants" - } + "name": "Horizontal Align Center", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "key": "GeteUiHAlign_Center", + "details": { + "name": "Horizontal Align: Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Left.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Left.names index 01cd8f3812..19cb732c31 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Left.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Left.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiHAlign_Left::Getter", - "category": "Constants" - } + "name": "Horizontal Align Left", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "key": "GeteUiHAlign_Left", + "details": { + "name": "Horizontal Align: Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Right.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Right.names index 03ff7072ef..4573fef1ea 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Right.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHAlign_Right.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiHAlign_Right::Getter", - "category": "Constants" - } + "name": "Horizontal Align Right", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "key": "GeteUiHAlign_Right", + "details": { + "name": "Horizontal Align: Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_LeftToRight.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_LeftToRight.names index f2a0494385..d800e93dd2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_LeftToRight.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_LeftToRight.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiHorizontalOrder_LeftToRight::Getter", - "category": "Constants" - } + "name": "Left To Right", + "category": "Constants/UI/Order/Horizontal" + }, + "methods": [ + { + "key": "GeteUiHorizontalOrder_LeftToRight", + "details": { + "name": "Left To Right" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_RightToLeft.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_RightToLeft.names index 133113e8ce..37e58d0133 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_RightToLeft.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiHorizontalOrder_RightToLeft.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiHorizontalOrder_RightToLeft::Getter", - "category": "Constants" - } + "name": "Right To Left", + "category": "Constants/UI/Order/Horizontal" + }, + "methods": [ + { + "key": "GeteUiHorizontalOrder_RightToLeft", + "details": { + "name": "Right To Left" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Fixed.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Fixed.names index f82d1d4eb0..ed0463cc65 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Fixed.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Fixed.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageSequenceImageType_Fixed::Getter", - "category": "Constants" - } + "name": "Image Type: Fixed", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "key": "GeteUiImageSequenceImageType_Fixed", + "details": { + "name": "Image Type: Fixed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Stretched.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Stretched.names index a4b48dc8ad..337d22613d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Stretched.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_Stretched.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageSequenceImageType_Stretched::Getter", - "category": "Constants" - } + "name": "Image Type: Stretched", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "key": "GeteUiImageSequenceImageType_Stretched", + "details": { + "name": "Image Type: Stretched" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFill.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFill.names index c59426f677..d696007a94 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFill.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFill.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageSequenceImageType_StretchedToFill::Getter", - "category": "Constants" - } + "name": "Image Type: Stretched To Fill", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "key": "GeteUiImageSequenceImageType_StretchedToFill", + "details": { + "name": "Image Type: Stretched To Fill" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFit.names index 9ba3d30e62..b6964caf7a 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFit.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageSequenceImageType_StretchedToFit.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageSequenceImageType_StretchedToFit::Getter", - "category": "Constants" - } + "name": "Image Type: Stretched To Fit", + "category": "Constants/UI/Image Sequence" + }, + "methods": [ + { + "key": "GeteUiImageSequenceImageType_StretchedToFit", + "details": { + "name": "Image Type: Stretched To Fit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Fixed.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Fixed.names index 0a65819fc1..4679be61eb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Fixed.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Fixed.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageType_Fixed::Getter", - "category": "Constants" - } + "name": "Fixed", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "key": "GeteUiImageType_Fixed", + "details": { + "name": "Fixed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Sliced.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Sliced.names index f9f1bc3743..b0cb0e83f2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Sliced.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Sliced.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageType_Sliced::Getter", - "category": "Constants" - } + "name": "Sliced", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "key": "GeteUiImageType_Sliced", + "details": { + "name": "Sliced" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Stretched.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Stretched.names index fc2312db15..3b2cc5cc71 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Stretched.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Stretched.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageType_Stretched::Getter", - "category": "Constants" - } + "name": "Stretched", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "key": "GeteUiImageType_Stretched", + "details": { + "name": "Stretched" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFill.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFill.names index a30508aa7e..d3caf1df5f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFill.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFill.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageType_StretchedToFill::Getter", - "category": "Constants" - } + "name": "Stretched To Fill", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "key": "GeteUiImageType_StretchedToFill", + "details": { + "name": "Stretched To Fill" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFit.names index be3b007a7e..f0921a21f0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFit.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_StretchedToFit.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageType_StretchedToFit::Getter", - "category": "Constants" - } + "name": "Stretched To Fit", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "key": "GeteUiImageType_StretchedToFit", + "details": { + "name": "Stretched To Fit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Tiled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Tiled.names index 0a6e5b0977..0bb880e96c 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Tiled.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiImageType_Tiled.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiImageType_Tiled::Getter", - "category": "Constants" - } + "name": "Tiled", + "category": "Constants/UI/Image Type" + }, + "methods": [ + { + "key": "GeteUiImageType_Tiled", + "details": { + "name": "Tiled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Disabled.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Disabled.names index 43ed9dfac2..e5c4b554d4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Disabled.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Disabled.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiInteractableState_Disabled::Getter", - "category": "Constants" - } + "name": "Disabled", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "key": "GeteUiInteractableState_Disabled", + "details": { + "name": "Disabled" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Hover.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Hover.names index 7e005729fd..db241dba54 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Hover.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Hover.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiInteractableState_Hover::Getter", - "category": "Constants" - } + "name": "Hover", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "key": "GeteUiInteractableState_Hover", + "details": { + "name": "Hover" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Normal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Normal.names index 51d7e81522..5e77a58173 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Normal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Normal.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiInteractableState_Normal::Getter", - "category": "Constants" - } + "name": "Normal", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "key": "GeteUiInteractableState_Normal", + "details": { + "name": "Normal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Pressed.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Pressed.names index b578408cd2..075983878d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Pressed.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiInteractableState_Pressed.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiInteractableState_Pressed::Getter", - "category": "Constants" - } + "name": "Pressed", + "category": "Constants/UI/Interactable State" + }, + "methods": [ + { + "key": "GeteUiInteractableState_Pressed", + "details": { + "name": "Pressed" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_HorizontalOrder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_HorizontalOrder.names index d0c3ef3a79..d90f8355f9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_HorizontalOrder.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_HorizontalOrder.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiLayoutGridStartingDirection_HorizontalOrder::Getter", - "category": "Constants" - } + "name": "Horizontal Order", + "category": "Constants/UI/Layout Grid Starting Direction" + }, + "methods": [ + { + "key": "GeteUiLayoutGridStartingDirection_HorizontalOrder", + "details": { + "name": "Horizontal Order" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_VerticalOrder.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_VerticalOrder.names index fd32fb89c9..5146e150ad 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_VerticalOrder.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiLayoutGridStartingDirection_VerticalOrder.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiLayoutGridStartingDirection_VerticalOrder::Getter", - "category": "Constants" - } + "name": "Vertical Order", + "category": "Constants/UI/Layout Grid Starting Direction" + }, + "methods": [ + { + "key": "GeteUiLayoutGridStartingDirection_VerticalOrder", + "details": { + "name": "Vertical Order" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Automatic.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Automatic.names index 1743a1ebdb..8b5ee13097 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Automatic.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Automatic.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiNavigationMode_Automatic::Getter", - "category": "Constants" - } + "name": "Automatic", + "category": "Constants/UI/Navigation Mode" + }, + "methods": [ + { + "key": "GeteUiNavigationMode_Automatic", + "details": { + "name": "Automatic" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Custom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Custom.names index 8a3ee33916..3fa1e4ae0d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Custom.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_Custom.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiNavigationMode_Custom::Getter", - "category": "Constants" - } + "name": "Custom", + "category": "Constants/UI/Navigation Mode" + }, + "methods": [ + { + "key": "GeteUiNavigationMode_Custom", + "details": { + "name": "Custom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_None.names index abc9248282..a8486f60c4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiNavigationMode_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiNavigationMode_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/UI/Navigation Mode" + }, + "methods": [ + { + "key": "GeteUiNavigationMode_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Cartesian.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Cartesian.names index 33a1db8e62..de73959a50 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Cartesian.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Cartesian.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiParticleCoordinateType_Cartesian::Getter", - "category": "Constants" - } + "name": "Cartesian", + "category": "Constants/UI/Particle Coordinate Type" + }, + "methods": [ + { + "key": "GeteUiParticleCoordinateType_Cartesian", + "details": { + "name": "Cartesian" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Polar.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Polar.names index 3ddbf1792c..e7cbd628b4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Polar.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleCoordinateType_Polar.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiParticleCoordinateType_Polar::Getter", - "category": "Constants" - } + "name": "Polar", + "category": "Constants/UI/Particle Coordinate Type" + }, + "methods": [ + { + "key": "GeteUiParticleCoordinateType_Polar", + "details": { + "name": "Polar" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitAngle.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitAngle.names index f9a8ae7ceb..c285810dab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitAngle.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitAngle.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiParticleInitialDirectionType_RelativeToEmitAngle::Getter", - "category": "Constants" - } + "name": "Relative To Emit Angle", + "category": "Constants/UI/Particle Initial Direction Type" + }, + "methods": [ + { + "key": "GeteUiParticleInitialDirectionType_RelativeToEmitAngle", + "details": { + "name": "Relative To Emit Angle" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitterCenter.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitterCenter.names index 6486a80003..c63cd92dc1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitterCenter.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiParticleInitialDirectionType_RelativeToEmitterCenter.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiParticleInitialDirectionType_RelativeToEmitterCenter::Getter", - "category": "Constants" - } + "name": "Relative To Emitter Center", + "category": "Constants/UI/Particle Initial Direction Type" + }, + "methods": [ + { + "key": "GeteUiParticleInitialDirectionType_RelativeToEmitterCenter", + "details": { + "name": "Relative To Emitter Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_NonUniformScale.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_NonUniformScale.names index 605ed1aba5..321d718ef9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_NonUniformScale.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_NonUniformScale.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_NonUniformScale::Getter", - "category": "Constants" - } + "name": "Non Uniform Scale", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_NonUniformScale", + "details": { + "name": "Non Uniform Scale" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_None.names index 88c08b06ec..e682613ba4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleXOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleXOnly.names index 5804e7aeaa..452396fec6 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleXOnly.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleXOnly.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_ScaleXOnly::Getter", - "category": "Constants" - } + "name": "Scale X Only", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_ScaleXOnly", + "details": { + "name": "Scale X Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleYOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleYOnly.names index e5ea4e5f5c..258af26dab 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleYOnly.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_ScaleYOnly.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_ScaleYOnly::Getter", - "category": "Constants" - } + "name": "Scale Y Only", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_ScaleYOnly", + "details": { + "name": "Scale Y Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFill.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFill.names index aa1f56984b..d72089664d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFill.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFill.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_UniformScaleToFill::Getter", - "category": "Constants" - } + "name": "Uniform Scale To Fill", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_UniformScaleToFill", + "details": { + "name": "Uniform Scale To Fill" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFit.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFit.names index 3b603fabc1..2428ebb6c3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFit.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFit.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_UniformScaleToFit::Getter", - "category": "Constants" - } + "name": "Uniform Scale To Fit", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_UniformScaleToFit", + "details": { + "name": "Uniform Scale To Fit" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitX.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitX.names index ce90c47c88..ea892546f4 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitX.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitX.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_UniformScaleToFitX::Getter", - "category": "Constants" - } + "name": "Uniform Scale To Fit X", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_UniformScaleToFitX", + "details": { + "name": "Uniform Scale To Fit X" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitY.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitY.names index a0ba060b36..69a7da174f 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitY.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScaleToDeviceMode_UniformScaleToFitY.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScaleToDeviceMode_UniformScaleToFitY::Getter", - "category": "Constants" - } + "name": "Uniform Scale To Fit Y", + "category": "Constants/UI/Scale To Device Mode" + }, + "methods": [ + { + "key": "GeteUiScaleToDeviceMode_UniformScaleToFitY", + "details": { + "name": "Uniform Scale To Fit Y" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AlwaysShow.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AlwaysShow.names index 61931775a9..fcbfa1ac3b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AlwaysShow.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AlwaysShow.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollBoxScrollBarVisibility_AlwaysShow::Getter", - "category": "Constants" - } + "name": "Always Show", + "category": "Constants/UI/Scroll Box Scroll Bar Visibility" + }, + "methods": [ + { + "key": "GeteUiScrollBoxScrollBarVisibility_AlwaysShow", + "details": { + "name": "Always Show" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHide.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHide.names index 48de4a7899..14cc2bc099 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHide.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHide.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollBoxScrollBarVisibility_AutoHide::Getter", - "category": "Constants" - } + "name": "Auto Hide", + "category": "Constants/UI/Scroll Box Scroll Bar Visibility" + }, + "methods": [ + { + "key": "GeteUiScrollBoxScrollBarVisibility_AutoHide", + "details": { + "name": "Auto Hide" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport.names index 560df7e007..e8d4412664 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport::Getter", - "category": "Constants" - } + "name": "Auto Hide And Resize Viewport", + "category": "Constants/UI/Scroll Box Scroll Bar Visibility" + }, + "methods": [ + { + "key": "GeteUiScrollBoxScrollBarVisibility_AutoHideAndResizeViewport", + "details": { + "name": "Auto Hide And Resize Viewport" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Children.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Children.names index 0b540c47a4..4015cd6d34 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Children.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Children.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollBoxSnapMode_Children::Getter", - "category": "Constants" - } + "name": "Children", + "category": "Constants/UI/Scroll Box Snap Mode" + }, + "methods": [ + { + "key": "GeteUiScrollBoxSnapMode_Children", + "details": { + "name": "Children" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Grid.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Grid.names index 5696a2ac17..ff071ef16b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Grid.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_Grid.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollBoxSnapMode_Grid::Getter", - "category": "Constants" - } + "name": "Grid", + "category": "Constants/UI/Scroll Box Snap Mode" + }, + "methods": [ + { + "key": "GeteUiScrollBoxSnapMode_Grid", + "details": { + "name": "Grid" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_None.names index 107536dc88..0057833d49 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollBoxSnapMode_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollBoxSnapMode_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/UI/Scroll Box Snap Mode" + }, + "methods": [ + { + "key": "GeteUiScrollBoxSnapMode_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Horizontal.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Horizontal.names index a9a7e4b62f..7f50d532ad 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Horizontal.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Horizontal.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollerOrientation_Horizontal::Getter", - "category": "Constants" - } + "name": "Horizontal", + "category": "Constants/UI/Scroller Orientation" + }, + "methods": [ + { + "key": "GeteUiScrollerOrientation_Horizontal", + "details": { + "name": "Horizontal" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Vertical.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Vertical.names index fee533f819..f781abf3ae 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Vertical.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiScrollerOrientation_Vertical.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiScrollerOrientation_Vertical::Getter", - "category": "Constants" - } + "name": "Vertical", + "category": "Constants/UI/Scroller Orientation" + }, + "methods": [ + { + "key": "GeteUiScrollerOrientation_Vertical", + "details": { + "name": "Vertical" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_RenderTarget.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_RenderTarget.names index f1b2b162d4..fcde09686e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_RenderTarget.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_RenderTarget.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiSpriteType_RenderTarget::Getter", - "category": "Constants" - } + "name": "Render Target", + "category": "Constants/UI/Sprite Type" + }, + "methods": [ + { + "key": "GeteUiSpriteType_RenderTarget", + "details": { + "name": "Render Target" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_SpriteAsset.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_SpriteAsset.names index 4fb031214f..90e11c7daf 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_SpriteAsset.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiSpriteType_SpriteAsset.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiSpriteType_SpriteAsset::Getter", - "category": "Constants" - } + "name": "Sprite Asset", + "category": "Constants/UI/Sprite Type" + }, + "methods": [ + { + "key": "GeteUiSpriteType_SpriteAsset", + "details": { + "name": "Sprite Asset" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_ClipText.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_ClipText.names index 4020030b26..972ae6cfc2 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_ClipText.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_ClipText.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextOverflowMode_ClipText::Getter", - "category": "Constants" - } + "name": "Clip Text", + "category": "Constants/UI/Text Overflow Mode" + }, + "methods": [ + { + "key": "GeteUiTextOverflowMode_ClipText", + "details": { + "name": "Clip Text" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_Ellipsis.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_Ellipsis.names index 340acecf48..ab13c84f66 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_Ellipsis.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_Ellipsis.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextOverflowMode_Ellipsis::Getter", - "category": "Constants" - } + "name": "Ellipsis", + "category": "Constants/UI/Text Overflow Mode" + }, + "methods": [ + { + "key": "GeteUiTextOverflowMode_Ellipsis", + "details": { + "name": "Ellipsis" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_OverflowText.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_OverflowText.names index 5de46b4a76..e291cf2f0e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_OverflowText.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextOverflowMode_OverflowText.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextOverflowMode_OverflowText::Getter", - "category": "Constants" - } + "name": "Overflow Text", + "category": "Constants/UI/Text Overflow Mode" + }, + "methods": [ + { + "key": "GeteUiTextOverflowMode_OverflowText", + "details": { + "name": "Overflow Text" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_None.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_None.names index 5331e830f4..e82d2af4eb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_None.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_None.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextShrinkToFit_None::Getter", - "category": "Constants" - } + "name": "None", + "category": "Constants/UI/Text Shrink To Fit" + }, + "methods": [ + { + "key": "GeteUiTextShrinkToFit_None", + "details": { + "name": "None" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_Uniform.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_Uniform.names index 175534eafd..d499a68e0d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_Uniform.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_Uniform.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextShrinkToFit_Uniform::Getter", - "category": "Constants" - } + "name": "Uniform", + "category": "Constants/UI/Text Shrink To Fit" + }, + "methods": [ + { + "key": "GeteUiTextShrinkToFit_Uniform", + "details": { + "name": "Uniform" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_WidthOnly.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_WidthOnly.names index 95b5d2b424..739888fd70 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_WidthOnly.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextShrinkToFit_WidthOnly.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextShrinkToFit_WidthOnly::Getter", - "category": "Constants" - } + "name": "Width Only", + "category": "Constants/UI/Text Shrink To Fit" + }, + "methods": [ + { + "key": "GeteUiTextShrinkToFit_WidthOnly", + "details": { + "name": "Width Only" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_NoWrap.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_NoWrap.names index 04dc16a0ae..b71d8cbb8b 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_NoWrap.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_NoWrap.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextWrapTextSetting_NoWrap::Getter", - "category": "Constants" - } + "name": "No Wrap", + "category": "Constants/UI/Text Wrap" + }, + "methods": [ + { + "key": "GeteUiTextWrapTextSetting_NoWrap", + "details": { + "name": "No Wrap" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_Wrap.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_Wrap.names index 75fe851271..39c2250114 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_Wrap.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTextWrapTextSetting_Wrap.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTextWrapTextSetting_Wrap::Getter", - "category": "Constants" - } + "name": "Wrap", + "category": "Constants/UI/Text Wrap" + }, + "methods": [ + { + "key": "GeteUiTextWrapTextSetting_Wrap", + "details": { + "name": "Wrap" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromElement.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromElement.names index 473b16b42d..88c75ee730 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromElement.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromElement.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTooltipDisplayAutoPositionMode_OffsetFromElement::Getter", - "category": "Constants" - } + "name": "Offset From Element", + "category": "Constants/UI/Tooltip Display Auto Position Mode" + }, + "methods": [ + { + "key": "GeteUiTooltipDisplayAutoPositionMode_OffsetFromElement", + "details": { + "name": "Offset From Element" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromMouse.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromMouse.names index 4876380d2b..c22716abbb 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromMouse.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayAutoPositionMode_OffsetFromMouse.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTooltipDisplayAutoPositionMode_OffsetFromMouse::Getter", - "category": "Constants" - } + "name": "Offset From Mouse", + "category": "Constants/UI/Tooltip Display Auto Position Mode" + }, + "methods": [ + { + "key": "GeteUiTooltipDisplayAutoPositionMode_OffsetFromMouse", + "details": { + "name": "Offset From Mouse" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnClick.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnClick.names index 607b9793a2..af10e96af1 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnClick.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnClick.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTooltipDisplayTriggerMode_OnClick::Getter", - "category": "Constants" - } + "name": "On Click", + "category": "Constants/UI/Tooltip Display Trigger Mode" + }, + "methods": [ + { + "key": "GeteUiTooltipDisplayTriggerMode_OnClick", + "details": { + "name": "On Click" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnHover.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnHover.names index 705be843d8..3cd2343053 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnHover.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnHover.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTooltipDisplayTriggerMode_OnHover::Getter", - "category": "Constants" - } + "name": "On Hover", + "category": "Constants/UI/Tooltip Display Trigger Mode" + }, + "methods": [ + { + "key": "GeteUiTooltipDisplayTriggerMode_OnHover", + "details": { + "name": "On Hover" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnPress.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnPress.names index 28eb9c5118..6fcfc3d88d 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnPress.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiTooltipDisplayTriggerMode_OnPress.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiTooltipDisplayTriggerMode_OnPress::Getter", - "category": "Constants" - } + "name": "On Press", + "category": "Constants/UI/Tooltip Display Trigger Mode" + }, + "methods": [ + { + "key": "GeteUiTooltipDisplayTriggerMode_OnPress", + "details": { + "name": "On Press" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Bottom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Bottom.names index 46aa499d0b..1ca5e4426e 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Bottom.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Bottom.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiVAlign_Bottom::Getter", - "category": "Constants" - } + "name": "Vertical Align Bottom", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "key": "GeteUiVAlign_Bottom", + "details": { + "name": "Vertical Align: Bottom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Center.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Center.names index 2f64297cf4..bd9b68a692 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Center.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Center.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiVAlign_Center::Getter", - "category": "Constants" - } + "name": "Vertical Align Center", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "key": "GeteUiVAlign_Center", + "details": { + "name": "Vertical Align: Center" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Top.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Top.names index d688313c21..6bbf6778b9 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Top.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVAlign_Top.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiVAlign_Top::Getter", - "category": "Constants" - } + "name": "Vertical Align Top", + "category": "Constants/UI/Align" + }, + "methods": [ + { + "key": "GeteUiVAlign_Top", + "details": { + "name": "Vertical Align: Top" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_BottomToTop.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_BottomToTop.names index a9f3b06c9a..3e9b9f61d3 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_BottomToTop.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_BottomToTop.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiVerticalOrder_BottomToTop::Getter", - "category": "Constants" - } + "name": "Bottom To Top", + "category": "Constants/UI/Order/Vertical" + }, + "methods": [ + { + "key": "GeteUiVerticalOrder_BottomToTop", + "details": { + "name": "Bottom To Top" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_TopToBottom.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_TopToBottom.names index 67532f62eb..3488c07a31 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_TopToBottom.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/eUiVerticalOrder_TopToBottom.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "eUiVerticalOrder_TopToBottom::Getter", - "category": "Constants" - } + "name": "Top To Bottom", + "category": "Constants/UI/Order/Vertical" + }, + "methods": [ + { + "key": "GeteUiVerticalOrder_TopToBottom", + "details": { + "name": "Top To Bottom" + }, + "results": [ + { + "typeid": "{72039442-EB38-4D42-A1AD-CB68F7E0EEF6}", + "details": { + "name": "int" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_ProfilerSystem.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_ProfilerSystem.names new file mode 100644 index 0000000000..6e1de3a3f9 --- /dev/null +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_ProfilerSystem.names @@ -0,0 +1,29 @@ +{ + "entries": [ + { + "key": "g_ProfilerSystem", + "context": "Constant", + "variant": "", + "details": { + "name": "Profiler System", + "category": "Constants/Profiler" + }, + "methods": [ + { + "key": "Getg_ProfilerSystem", + "details": { + "name": "Profiler System" + }, + "results": [ + { + "typeid": "{D671FB70-8B09-4C3A-96CD-06A339F3138E}", + "details": { + "name": "Profiler System Script Proxy" + } + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_SettingsRegistry.names b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_SettingsRegistry.names index a713b4f4fa..79ebec28d0 100644 --- a/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_SettingsRegistry.names +++ b/Gems/ScriptCanvas/Assets/TranslationAssets/Properties/g_SettingsRegistry.names @@ -5,9 +5,25 @@ "context": "Constant", "variant": "", "details": { - "name": "g_SettingsRegistry::Getter", - "category": "Constants" - } + "name": "Settings Registry", + "category": "Constants/Settings" + }, + "methods": [ + { + "key": "Getg_SettingsRegistry", + "details": { + "name": "Settings Registry" + }, + "results": [ + { + "typeid": "{795C80A0-D243-473B-972A-C32CA487BAA5}", + "details": { + "name": "Settings Registry Script Proxy" + } + } + ] + } + ] } ] } \ No newline at end of file diff --git a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp index ec6e7d8f4c..77f791483b 100644 --- a/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Components/EditorGraph.cpp @@ -1078,9 +1078,11 @@ namespace ScriptCanvasEditor return CanCreateConnectionBetween(scSourceEndpoint, scTargetEndpoint).IsSuccess(); } - AZStd::string Graph::GetDataTypeString(const AZ::Uuid& typeId) + AZStd::string Graph::GetDataTypeString(const AZ::Uuid&) { - return TranslationHelper::GetSafeTypeName(ScriptCanvas::Data::FromAZType(typeId)); + // This is used by the default tooltip setting in GraphCanvas, returning an empty string + // in order for tooltips to be fully controlled by ScriptCanvas + return {}; } void Graph::OnRemoveUnusedNodes() diff --git a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp index de7dc02530..26caa5fc2f 100644 --- a/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp +++ b/Gems/ScriptCanvas/Code/Editor/Nodes/NodeDisplayUtils.cpp @@ -331,13 +331,27 @@ namespace ScriptCanvasEditor::Nodes // Get the method's text data GraphCanvas::TranslationRequests::Details methodDetails; methodDetails.m_name = details.m_name; // fallback - key << "methods" << methodName; + key << "methods"; + AZStd::string updatedMethodName = methodName; + if (isAccessor) + { + if (methodNode->GetMethodType() == ScriptCanvas::MethodType::Getter || methodNode->GetMethodType() == ScriptCanvas::MethodType::Free) + { + updatedMethodName = "Get"; + } + else + { + updatedMethodName = "Set"; + } + updatedMethodName.append(methodName); + } + key << updatedMethodName; GraphCanvas::TranslationRequestBus::BroadcastResult(methodDetails, &GraphCanvas::TranslationRequests::GetDetails, key + ".details", methodDetails); if (methodDetails.m_subtitle.empty()) { - methodDetails.m_subtitle = details.m_name; + methodDetails.m_subtitle = details.m_category; } // Add to the tooltip the C++ class for reference @@ -377,7 +391,7 @@ namespace ScriptCanvasEditor::Nodes if (slot.IsData()) { key.clear(); - key << context << className << "methods" << methodName; + key << context << className << "methods" << updatedMethodName; if (slot.IsData() && slot.IsInput()) { key << "params"; diff --git a/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h b/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h index 189b665647..bd37ab0e2f 100644 --- a/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h +++ b/Gems/ScriptCanvas/Code/Editor/Translation/TranslationHelper.h @@ -14,7 +14,6 @@ #include #include -#include #include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp index e448f3ea40..dfa39b0047 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/CanvasWidget.cpp @@ -84,9 +84,10 @@ namespace ScriptCanvasEditor { m_assetId = assetId; - EditorGraphRequests* editorGraphRequests = EditorGraphRequestBus::FindFirstHandler(m_scriptCanvasId); - - editorGraphRequests->SetAssetId(m_assetId); + if (EditorGraphRequests* editorGraphRequests = EditorGraphRequestBus::FindFirstHandler(m_scriptCanvasId)) + { + editorGraphRequests->SetAssetId(m_assetId); + } } const GraphCanvas::ViewId& CanvasWidget::GetViewId() const diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp index 0b2b4f3bcc..a31444921b 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/DataTypePalette/DataTypePaletteModel.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include @@ -200,7 +199,7 @@ namespace ScriptCanvasEditor AZ::TypeId DataTypePaletteModel::FindTypeIdForIndex(const QModelIndex& index) const { - AZ::TypeId retVal; + AZ::TypeId retVal = AZ::TypeId::CreateNull(); if (index.row() >= 0 && index.row() < m_variableTypes.size()) { diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp index d8b72b6712..b6bd26fa6c 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/GeneralNodePaletteTreeItemTypes.cpp @@ -83,7 +83,16 @@ namespace ScriptCanvasEditor , m_propertyStatus(propertyStatus) { GraphCanvas::TranslationKey key; - key << "BehaviorClass" << className << "methods" << methodName << "details"; + + + AZStd::string updatedMethodName; + if (propertyStatus != ScriptCanvas::PropertyStatus::None) + { + updatedMethodName = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Get" : "Set"; + } + updatedMethodName.append(methodName); + + key << "BehaviorClass" << className << "methods" << updatedMethodName << "details"; GraphCanvas::TranslationRequests::Details details; details.m_name = methodName; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp index 28844e4b5a..f128537e1a 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/NodePalette/NodePaletteModel.cpp @@ -877,6 +877,7 @@ namespace ScriptCanvasEditor void NodePaletteModel::RepopulateModel() { + AZ_PROFILE_FUNCTION(ScriptCanvas); ClearRegistry(); PopulateNodePaletteModel((*this)); @@ -1019,12 +1020,19 @@ namespace ScriptCanvasEditor GraphCanvas::TranslationRequestBus::BroadcastResult(catdetails, &GraphCanvas::TranslationRequests::GetDetails, catkey, catdetails); GraphCanvas::TranslationKey key; - key << "BehaviorClass" << methodClass.c_str() << "methods" << methodName.c_str() << "details"; + + AZStd::string updatedMethodName; + if (propertyStatus != ScriptCanvas::PropertyStatus::None) + { + updatedMethodName = (propertyStatus == ScriptCanvas::PropertyStatus::Getter) ? "Get" : "Set"; + } + updatedMethodName += methodName; + key << "BehaviorClass" << methodClass.c_str() << "methods" << updatedMethodName << "details"; GraphCanvas::TranslationRequests::Details details; GraphCanvas::TranslationRequestBus::BroadcastResult(details, &GraphCanvas::TranslationRequests::GetDetails, key, details); - methodModelInformation->m_displayName = details.m_name.empty() ? methodName : details.m_name; + methodModelInformation->m_displayName = details.m_name.empty() ? updatedMethodName : details.m_name; methodModelInformation->m_toolTip = details.m_tooltip; methodModelInformation->m_categoryPath = categoryPath; diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp index 9b97d707d0..7ea4af9032 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/ScriptCanvasNodePaletteDockWidget.cpp @@ -877,17 +877,14 @@ namespace ScriptCanvasEditor { QModelIndexList indexList = GetTreeView()->selectionModel()->selectedRows(); - if (indexList.size() == 1) - { - QSortFilterProxyModel* filterModel = static_cast(GetTreeView()->model()); + QSortFilterProxyModel* filterModel = static_cast(GetTreeView()->model()); - for (const QModelIndex& index : indexList) - { - QModelIndex sourceIndex = filterModel->mapToSource(index); + for (const QModelIndex& index : indexList) + { + QModelIndex sourceIndex = filterModel->mapToSource(index); - GraphCanvas::NodePaletteTreeItem* nodePaletteItem = static_cast(sourceIndex.internalPointer()); - nodePaletteItem->GenerateTranslationData(); - } + GraphCanvas::NodePaletteTreeItem* nodePaletteItem = static_cast(sourceIndex.internalPointer()); + nodePaletteItem->GenerateTranslationData(); } } diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp index 00ce022cb5..2e9c5d1852 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/UnitTestPanel/UnitTestTreeView.cpp @@ -19,7 +19,6 @@ #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp index 56b0cb3e55..6fdf154d69 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Widgets/VariablePanel/VariablePaletteTableView.cpp @@ -18,7 +18,6 @@ #include -#include #include #include diff --git a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp index 1ad8b58317..e61b015aae 100644 --- a/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp +++ b/Gems/ScriptCanvas/Code/Editor/View/Windows/MainWindow.cpp @@ -428,6 +428,8 @@ namespace ScriptCanvasEditor , m_closeCurrentGraphAfterSave(false) , m_styleManager(ScriptCanvasEditor::AssetEditorId, "ScriptCanvas/StyleSheet/graphcanvas_style.json") { + AZ_PROFILE_FUNCTION(ScriptCanvas); + VariablePaletteRequestBus::Handler::BusConnect(); GraphCanvas::AssetEditorAutomationRequestBus::Handler::BusConnect(ScriptCanvasEditor::AssetEditorId); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp index 0dcd8ebbbd..d55fcf7838 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.cpp @@ -59,6 +59,7 @@ namespace ScriptCanvas m_script = AZStd::move(other.m_script); m_requiredAssets = AZStd::move(other.m_requiredAssets); m_requiredScriptEvents = AZStd::move(other.m_requiredScriptEvents); + m_areStaticsInitialized = AZStd::move(other.m_areStaticsInitialized); } return *this; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h index 24c83b20a1..8c5da5ac07 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAsset.h @@ -76,6 +76,9 @@ namespace ScriptCanvas AZStd::vector m_activationInputStorage; Execution::ActivationInputRange m_activationInputRange; + // used to initialize statics only once, and not necessarily on the loading thread + bool m_areStaticsInitialized = false; + bool RequiresStaticInitialization() const; bool RequiresDependencyConstructionParameters() const; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp index df7b07d37b..05b6f4397b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Asset/RuntimeAssetHandler.cpp @@ -94,7 +94,6 @@ namespace ScriptCanvas RuntimeAsset* runtimeAsset = asset.GetAs(); AZ_Assert(runtimeAsset, "RuntimeAssetHandler::InitAsset This should be a Script Canvas runtime asset, as this is the only type this handler processes!"); Execution::Context::InitializeActivationData(runtimeAsset->GetData()); - Execution::InitializeInterpretedStatics(runtimeAsset->GetData()); } } @@ -157,4 +156,5 @@ namespace ScriptCanvas } } } + } diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp index d6dff227ff..67f947004b 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/MethodConfiguration.cpp @@ -56,7 +56,7 @@ namespace ScriptCanvas { const Data::Type outputType = (unpackedTypes.size() == 1 && AZ::BehaviorContextHelper::IsStringParameter(*result)) ? Data::Type::String() : Data::FromAZType(unpackedTypes[resultIndex]); - AZStd::string resultSlotName(AZStd::string::format("Result: %s", Data::GetName(outputType).data())); + AZStd::string resultSlotName(Data::GetName(outputType)); AZStd::string className = outputConfig.config.m_className ? *outputConfig.config.m_className : ""; if (className.empty()) @@ -80,7 +80,6 @@ namespace ScriptCanvas if (outputConfig.isReturnValueOverloaded) { DynamicDataSlotConfiguration slotConfiguration; - //slotConfiguration.m_name = outputConfig.outputNamePrefix + resultSlotName; slotConfiguration.m_dynamicDataType = outputConfig.methodNode->GetOverloadedOutputType(resultIndex); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h index ece1cb8274..97916c8af6 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/Node.h @@ -1094,7 +1094,7 @@ protected: { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", t_Traits::GetResultName(0), Data::GetName(Data::FromAZType>()).data()); + slotConfiguration.m_name = t_Traits::GetResultName(0); slotConfiguration.SetType(Data::FromAZType>()); slotConfiguration.SetConnectionType(ConnectionType::Output); @@ -1116,7 +1116,7 @@ protected: { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", t_Traits::GetResultName(Index), Data::GetName(Data::FromAZType>>()).data()); + slotConfiguration.m_name = t_Traits::GetResultName(Index); slotConfiguration.SetType(Data::FromAZType>>()); slotConfiguration.SetConnectionType(connectionType); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h index 771a51f376..549c56d07d 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Core/NodeFunctionGeneric.h @@ -256,7 +256,7 @@ namespace ScriptCanvas { DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("%s: %s", Data::Traits::GetName().data(), t_Traits::GetArgName(Index)); + slotConfiguration.m_name = t_Traits::GetArgName(Index); slotConfiguration.ConfigureDatum(AZStd::move(Datum(Data::FromAZType(Data::Traits::GetAZType()), Datum::eOriginality::Copy))); slotConfiguration.SetConnectionType(connectionType); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h index 8c2f0a67c4..89ddf178f3 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/ExecutionState.h @@ -19,6 +19,10 @@ #include #include +#if !defined(_RELEASE) +#define SCRIPT_CANVAS_RUNTIME_ASSET_CHECK +#endif + namespace AZ { class ReflectContext; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp index 4d7c8a2cda..bba56847ce 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionInterpretedAPI.cpp @@ -506,6 +506,8 @@ namespace ScriptCanvas #if defined(AZ_PROFILE_BUILD) || defined(AZ_DEBUG_BUILD) Execution::InitializeFromLuaStackFunctions(const_cast(runtimeData.m_debugMap)); #endif + AZ_WarningOnce("ScriptCanvas", !runtimeData.m_areStaticsInitialized, "ScriptCanvas runtime data already initalized"); + if (runtimeData.RequiresStaticInitialization()) { AZ::ScriptLoadResult result{}; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp index 9224d4f9a4..a92c13ac63 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/Interpreted/ExecutionStateInterpreted.cpp @@ -6,14 +6,13 @@ * */ -#include "ExecutionStateInterpreted.h" - #include #include #include - -#include "Execution/Interpreted/ExecutionStateInterpretedUtility.h" -#include "Execution/RuntimeComponent.h" +#include +#include +#include +#include namespace ExecutionStateInterpretedCpp { @@ -33,7 +32,29 @@ namespace ScriptCanvas ExecutionStateInterpreted::ExecutionStateInterpreted(const ExecutionStateConfig& config) : ExecutionState(config) , m_interpretedAsset(config.runtimeData.m_script) - {} + { + RuntimeAsset* runtimeAsset = config.asset.Get(); + +#if defined(SCRIPT_CANVAS_RUNTIME_ASSET_CHECK) + if (!runtimeAsset) + { + AZ_Error("ScriptCanvas", false + , "ExecutionStateInterpreted created with ExecutionStateConfig that contained bad runtime asset data. %s" + , config.asset.GetId().ToString().data()); + return; + } +#else + AZ_Assert(false + , "ExecutionStateInterpreted created with ExecutionStateConfig that contained bad runtime asset data. %s" + , config.asset.GetId().ToString().data()); +#endif + + if (!runtimeAsset->GetData().m_areStaticsInitialized) + { + runtimeAsset->GetData().m_areStaticsInitialized = true; + Execution::InitializeInterpretedStatics(runtimeAsset->GetData()); + } + } void ExecutionStateInterpreted::ClearLuaRegistryIndex() { diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp index 5fe5c32a48..930b84abe4 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Execution/RuntimeComponent.cpp @@ -19,9 +19,8 @@ #include #include -#if !defined(_RELEASE) -#define SCRIPT_CANVAS_RUNTIME_ASSET_CHECK -#endif +#include +#include AZ_DECLARE_BUDGET(ScriptCanvas); @@ -112,11 +111,13 @@ namespace ScriptCanvas #if defined(SCRIPT_CANVAS_RUNTIME_ASSET_CHECK) if (!m_runtimeOverrides.m_runtimeAsset.Get()) { - AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); return; } #else - AZ_Assert(m_runtimeOverrides.m_runtimeAsset.Get(), "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Assert(m_runtimeOverrides.m_runtimeAsset.Get(), "RuntimeComponent::m_runtimeAsset AssetId: %s was valid, but the data was not pre-loaded, so this script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); #endif AZ_PROFILE_SCOPE(ScriptCanvas, "RuntimeComponent::InitializeExecution (%s)", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().c_str()); @@ -126,11 +127,13 @@ namespace ScriptCanvas #if defined(SCRIPT_CANVAS_RUNTIME_ASSET_CHECK) if (!m_executionState) { - AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Error("ScriptCanvas", false, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); return; } #else - AZ_Assert(m_executionState, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run", m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); + AZ_Assert(m_executionState, "RuntimeComponent::m_runtimeAsset AssetId: %s failed to create an execution state, possibly due to missing dependent asset, script will not run" + , m_runtimeOverrides.m_runtimeAsset.GetId().ToString().data()); #endif AZ::EntityBus::Handler::BusConnect(GetEntityId()); @@ -179,4 +182,3 @@ namespace ScriptCanvas } } -#undef SCRIPT_CANVAS_RUNTIME_ASSET_CHECK diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp index a2ccfd46f2..65d1f21518 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/EBusEventHandler.cpp @@ -518,7 +518,7 @@ namespace ScriptCanvas { const AZ::BehaviorParameter& argument(event.m_parameters[AZ::eBehaviorBusForwarderEventIndices::Result]); Data::Type inputType(AZ::BehaviorContextHelper::IsStringParameter(argument) ? Data::Type::String() : Data::FromAZType(argument.m_typeId)); - const AZStd::string argName(AZStd::string::format("Result: %s", Data::GetName(inputType).data()).data()); + const AZStd::string argName(Data::GetName(inputType)); DataSlotConfiguration resultConfiguration; diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp index c548176af5..14397d2be9 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp @@ -204,7 +204,7 @@ namespace ScriptCanvas DataSlotConfiguration slotConfiguration; - slotConfiguration.m_name = AZStd::string::format("Result: %s", argumentTypeName.c_str()); + slotConfiguration.m_name = argumentTypeName; slotConfiguration.SetConnectionType(ConnectionType::Input); slotConfiguration.ConfigureDatum(AZStd::move(Datum(inputType, Datum::eOriginality::Copy, nullptr, AZ::Uuid::CreateNull()))); diff --git a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp index 8569380d99..26a9b4fc96 100644 --- a/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp +++ b/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp @@ -272,7 +272,7 @@ namespace ScriptCanvas Data::Type outputType(AZ::BehaviorContextHelper::IsStringParameter(*result) ? Data::Type::String() : Data::FromAZType(result->m_typeId)); // multiple outs will need out value names - const AZStd::string resultSlotName(AZStd::string::format("Result: %s", Data::GetName(outputType).c_str())); + const AZStd::string resultSlotName(Data::GetName(outputType)); DataSlotConfiguration slotConfiguration; @@ -343,7 +343,7 @@ namespace ScriptCanvas { Data::Type outputType(AZ::BehaviorContextHelper::IsStringParameter(*result) ? Data::Type::String() : Data::FromAZType(result->m_typeId)); // multiple outs will need out value names - const AZStd::string resultSlotName(AZStd::string::format("Result: %s", Data::GetName(outputType).c_str())); + const AZStd::string resultSlotName(Data::GetName(outputType)); Slot* slot = GetSlotByName(resultSlotName); diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp index 7c70f879aa..4fcc904752 100644 --- a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include @@ -32,6 +33,7 @@ #include #include +#include namespace ScriptCanvasEditorTools { @@ -87,6 +89,8 @@ namespace ScriptCanvasEditorTools entry.m_details.m_name = prettyName; } + SplitCamelCase(entry.m_details.m_name); + for (auto event : behaviorEBus->m_events) { const AZ::BehaviorEBusEventSender& ebusSender = event.second; @@ -112,6 +116,8 @@ namespace ScriptCanvasEditorTools eventEntry.m_details.m_name = prettyName.empty() ? eventName : prettyName; eventEntry.m_details.m_tooltip = Helpers::ReadStringAttribute(event.second.m_attributes, AZ::Script::Attributes::ToolTip); + SplitCamelCase(eventEntry.m_details.m_name); + eventEntry.m_entry.m_name = "In"; eventEntry.m_entry.m_tooltip = AZStd::string::format("When signaled, this will invoke %s", eventEntry.m_details.m_name.c_str()); eventEntry.m_exit.m_name = "Out"; @@ -128,19 +134,21 @@ namespace ScriptCanvasEditorTools Helpers::GetTypeNameAndDescription(argumentType, argument.m_details.m_name, argument.m_details.m_tooltip); auto name = method->GetArgumentName(i); - if (!name->empty()) + if (name && !name->empty()) { argument.m_details.m_name = *name; } auto tooltip = method->GetArgumentToolTip(i); - if (!tooltip->empty()) + if (tooltip && !tooltip->empty()) { argument.m_details.m_tooltip = *tooltip; } argument.m_typeId = argumentType.ToString(); + SplitCamelCase(argument.m_details.m_name); + eventEntry.m_arguments.push_back(argument); } @@ -153,13 +161,15 @@ namespace ScriptCanvasEditorTools Helpers::GetTypeNameAndDescription(resultType, result.m_details.m_name, result.m_details.m_tooltip); auto tooltip = method->GetArgumentToolTip(0); - if (!tooltip->empty()) + if (tooltip && !tooltip->empty()) { result.m_details.m_tooltip = *tooltip; } result.m_typeId = resultType.ToString(); + SplitCamelCase(result.m_details.m_name); + eventEntry.m_results.push_back(result); } @@ -229,6 +239,8 @@ namespace ScriptCanvasEditorTools details.m_category = Helpers::GetStringAttribute(behaviorClass, AZ::Script::Attributes::Category); details.m_tooltip = Helpers::GetStringAttribute(behaviorClass, AZ::Script::Attributes::ToolTip); + SplitCamelCase(details.m_name); + if (!behaviorClass->m_methods.empty()) { for (const auto& methodPair : behaviorClass->m_methods) @@ -246,10 +258,14 @@ namespace ScriptCanvasEditorTools methodEntry.m_details.m_tooltip = ""; methodEntry.m_details.m_name = methodPair.second->m_name; + AZStd::string prefix = className + "::"; + AZ::StringFunc::Replace(methodEntry.m_details.m_name, prefix.c_str(), ""); + SplitCamelCase(methodEntry.m_details.m_name); + methodEntry.m_entry.m_name = "In"; - methodEntry.m_entry.m_tooltip = AZStd::string::format("When signaled, this will invoke %s", cleanName.c_str()); + methodEntry.m_entry.m_tooltip = AZStd::string::format("When signaled, this will invoke %s", methodEntry.m_details.m_name.c_str()); methodEntry.m_exit.m_name = "Out"; - methodEntry.m_exit.m_tooltip = AZStd::string::format("Signaled after %s is invoked", cleanName.c_str()); + methodEntry.m_exit.m_tooltip = AZStd::string::format("Signaled after %s is invoked", methodEntry.m_details.m_name.c_str()); if (!Helpers::MethodHasAttribute(behaviorMethod, AZ::ScriptCanvasAttributes::FloatingFunction)) { @@ -260,31 +276,40 @@ namespace ScriptCanvasEditorTools methodEntry.m_details.m_category = Helpers::ReadStringAttribute(behaviorMethod->m_attributes, AZ::Script::Attributes::Category); } - if (methodEntry.m_details.m_category.empty()) - { - methodEntry.m_details.m_category = "Other"; - } - // Arguments (Input Slots) if (behaviorMethod->GetNumArguments() > 0) { - for (size_t argIndex = 0; argIndex < behaviorMethod->GetNumArguments(); ++argIndex) + size_t startIndex = behaviorMethod->HasResult() ? 1 : 0; + for (size_t argIndex = startIndex; argIndex < behaviorMethod->GetNumArguments(); ++argIndex) { const AZ::BehaviorParameter* parameter = behaviorMethod->GetArgument(argIndex); Argument argument; AZStd::string argumentKey = parameter->m_typeId.ToString(); - AZStd::string argumentName = parameter->m_name; - AZStd::string argumentDescription = ""; + AZStd::string argumentName; + AZStd::string argumentDescription; Helpers::GetTypeNameAndDescription(parameter->m_typeId, argumentName, argumentDescription); + const AZStd::string* argName = behaviorMethod->GetArgumentName(argIndex); + if (argName && !(*argName).empty()) + { + argumentName = *argName; + } + + const AZStd::string* argDesc = behaviorMethod->GetArgumentToolTip(argIndex); + if (argDesc && !(*argDesc).empty()) + { + argumentDescription = *argDesc; + } + argument.m_typeId = argumentKey; - argument.m_details.m_name = parameter->m_name; - argument.m_details.m_category = ""; + argument.m_details.m_name = argumentName; argument.m_details.m_tooltip = argumentDescription; + SplitCamelCase(argument.m_details.m_name); + methodEntry.m_arguments.push_back(argument); } } @@ -305,6 +330,8 @@ namespace ScriptCanvasEditorTools result.m_details.m_name = resultParameter->m_name; result.m_details.m_tooltip = resultDescription; + SplitCamelCase(result.m_details.m_name); + methodEntry.m_results.push_back(result); } @@ -327,7 +354,8 @@ namespace ScriptCanvasEditorTools translationRoot.m_entries.push_back(entry); - AZStd::string fileName = AZStd::string::format("Classes/%s", className.c_str()); + AZStd::string sanitizedFilename = GraphCanvas::TranslationKey::Sanitize(className); + AZStd::string fileName = AZStd::string::format("Classes/%s", sanitizedFilename.c_str()); SaveJSONData(fileName, translationRoot); @@ -379,6 +407,8 @@ namespace ScriptCanvasEditorTools entry.m_context = "AZEventHandler"; entry.m_details.m_name = azEventEntry.m_eventName; + SplitCamelCase(entry.m_details.m_name); + for (const ScriptCanvas::Slot& slot : nodeComponent->GetSlots()) { Slot slotEntry; @@ -478,6 +508,8 @@ namespace ScriptCanvasEditorTools details.m_name = cleanName; } + SplitCamelCase(details.m_name); + // Tooltip attribute takes priority over the edit data description AZStd::string tooltip = Helpers::GetStringAttribute(classData, AZ::Script::Attributes::ToolTip); if (!tooltip.empty()) @@ -665,6 +697,7 @@ namespace ScriptCanvasEditorTools EntryDetails& details = entry.m_details; details.m_name = behaviorClass->m_name; + SplitCamelCase(details.m_name); // Get the pretty name AZStd::string prettyName; @@ -698,6 +731,7 @@ namespace ScriptCanvasEditorTools methodEntry.m_details.m_tooltip = Helpers::GetStringAttribute(behaviorMethod, AZ::Script::Attributes::ToolTip); methodEntry.m_details.m_name = methodPair.second->m_name; + SplitCamelCase(methodEntry.m_details.m_name); // Strip the className from the methodName AZStd::string qualifiedName = behaviorClass->m_name + "::"; @@ -730,6 +764,8 @@ namespace ScriptCanvasEditorTools argument.m_details.m_category = ""; argument.m_details.m_tooltip = argumentDescription; + SplitCamelCase(argument.m_details.m_name); + methodEntry.m_arguments.push_back(argument); } } @@ -750,6 +786,8 @@ namespace ScriptCanvasEditorTools result.m_details.m_name = resultName; result.m_details.m_tooltip = resultDescription; + SplitCamelCase(result.m_details.m_name); + methodEntry.m_results.push_back(result); } @@ -789,7 +827,8 @@ namespace ScriptCanvasEditorTools TranslationFormat translationRoot; translationRoot.m_entries.push_back(entry); - AZStd::string fileName = AZStd::string::format("Properties/%s", behaviorProperty->m_name.c_str()); + AZStd::string cleanName = GraphCanvas::TranslationKey::Sanitize(behaviorProperty->m_name); + AZStd::string fileName = AZStd::string::format("Properties/%s", cleanName.c_str()); SaveJSONData(fileName, translationRoot); } @@ -810,11 +849,14 @@ namespace ScriptCanvasEditorTools Helpers::GetTypeNameAndDescription(parameter->m_typeId, argumentName, argumentDescription); + const AZStd::string* argName = behaviorMethod->GetArgumentName(argIndex); argument.m_typeId = argumentKey; - argument.m_details.m_name = parameter->m_name; + argument.m_details.m_name = argName ? *argName : argumentName; argument.m_details.m_category = ""; argument.m_details.m_tooltip = argumentDescription; + SplitCamelCase(argument.m_details.m_name); + methodEntry.m_arguments.push_back(argument); } } @@ -831,10 +873,13 @@ namespace ScriptCanvasEditorTools Helpers::GetTypeNameAndDescription(resultParameter->m_typeId, resultName, resultDescription); + const AZStd::string* resName = behaviorMethod->GetArgumentName(0); result.m_typeId = resultKey; - result.m_details.m_name = resultParameter->m_name; + result.m_details.m_name = resName ? *resName : resultName; result.m_details.m_tooltip = resultDescription; + SplitCamelCase(result.m_details.m_name); + methodEntry.m_results.push_back(result); } } @@ -855,17 +900,26 @@ namespace ScriptCanvasEditorTools { entry->m_key = className; entry->m_context = context; + + entry->m_details.m_name = className; + SplitCamelCase(entry->m_details.m_name); } if (behaviorProperty->m_getter) { + AZStd::string cleanName = behaviorProperty->m_name; + AZ::StringFunc::Replace(cleanName, "::Getter", ""); + Method method; - auto methodName = behaviorProperty->m_getter->m_name; - method.m_key = behaviorProperty->m_name; + AZStd::string methodName = "Get"; + methodName.append(cleanName); + method.m_key = methodName; method.m_details.m_name = methodName; method.m_details.m_tooltip = behaviorProperty->m_getter->m_debugDescription ? behaviorProperty->m_getter->m_debugDescription : ""; + SplitCamelCase(method.m_details.m_name); + TranslateMethod(behaviorProperty->m_getter, method); entry->m_methods.push_back(method); @@ -874,13 +928,20 @@ namespace ScriptCanvasEditorTools if (behaviorProperty->m_setter) { + AZStd::string cleanName = behaviorProperty->m_name; + AZ::StringFunc::Replace(cleanName, "::Setter", ""); + Method method; - auto methodName = behaviorProperty->m_setter->m_name; - method.m_key = behaviorProperty->m_name; + AZStd::string methodName = "Set"; + methodName.append(cleanName); + + method.m_key = methodName; method.m_details.m_name = methodName; method.m_details.m_tooltip = behaviorProperty->m_setter->m_debugDescription ? behaviorProperty->m_getter->m_debugDescription : ""; + SplitCamelCase(method.m_details.m_name); + TranslateMethod(behaviorProperty->m_setter, method); entry->m_methods.push_back(method); @@ -910,6 +971,8 @@ namespace ScriptCanvasEditorTools entry.m_details.m_tooltip = behaviorEbus->m_toolTip; entry.m_details.m_category = "EBus Handlers"; + SplitCamelCase(entry.m_details.m_name); + for (const AZ::BehaviorEBusHandler::BusForwarderEvent& event : handler->GetEvents()) { Method methodEntry; @@ -920,6 +983,8 @@ namespace ScriptCanvasEditorTools methodEntry.m_details.m_tooltip = ""; methodEntry.m_details.m_name = event.m_name; + SplitCamelCase(methodEntry.m_details.m_name); + // Arguments (Input Slots) if (!event.m_parameters.empty()) { @@ -964,6 +1029,8 @@ namespace ScriptCanvasEditorTools argument.m_details.m_name = argumentName; argument.m_details.m_tooltip = argumentDescription; + SplitCamelCase(argument.m_details.m_name); + methodEntry.m_arguments.push_back(argument); } } @@ -994,6 +1061,8 @@ namespace ScriptCanvasEditorTools result.m_details.m_name = resultName; result.m_details.m_tooltip = resultDescription; + SplitCamelCase(result.m_details.m_name); + methodEntry.m_results.push_back(result); } @@ -1027,13 +1096,13 @@ namespace ScriptCanvasEditorTools rapidjson_ly::Value value(rapidjson_ly::kStringType); value.SetString(entrySource.m_key.c_str(), document.GetAllocator()); - entry.AddMember("key", value, document.GetAllocator()); + entry.AddMember(GraphCanvas::Schema::Field::key, value, document.GetAllocator()); value.SetString(entrySource.m_context.c_str(), document.GetAllocator()); - entry.AddMember("context", value, document.GetAllocator()); + entry.AddMember(GraphCanvas::Schema::Field::context, value, document.GetAllocator()); value.SetString(entrySource.m_variant.c_str(), document.GetAllocator()); - entry.AddMember("variant", value, document.GetAllocator()); + entry.AddMember(GraphCanvas::Schema::Field::variant, value, document.GetAllocator()); rapidjson_ly::Value details(rapidjson_ly::kObjectType); value.SetString(entrySource.m_details.m_name.c_str(), document.GetAllocator()); @@ -1054,12 +1123,12 @@ namespace ScriptCanvasEditorTools rapidjson_ly::Value theMethod(rapidjson_ly::kObjectType); value.SetString(methodSource.m_key.c_str(), document.GetAllocator()); - theMethod.AddMember("key", value, document.GetAllocator()); + theMethod.AddMember(GraphCanvas::Schema::Field::key, value, document.GetAllocator()); if (!methodSource.m_context.empty()) { value.SetString(methodSource.m_context.c_str(), document.GetAllocator()); - theMethod.AddMember("context", value, document.GetAllocator()); + theMethod.AddMember(GraphCanvas::Schema::Field::context, value, document.GetAllocator()); } if (!methodSource.m_entry.m_name.empty()) @@ -1167,7 +1236,7 @@ namespace ScriptCanvasEditorTools rapidjson_ly::Value theSlot(rapidjson_ly::kObjectType); value.SetString(slotSource.m_key.c_str(), document.GetAllocator()); - theSlot.AddMember("key", value, document.GetAllocator()); + theSlot.AddMember(GraphCanvas::Schema::Field::key, value, document.GetAllocator()); rapidjson_ly::Value sloDetails(rapidjson_ly::kObjectType); if (!slotSource.m_details.m_name.empty()) @@ -1242,6 +1311,14 @@ namespace ScriptCanvasEditorTools } + void TranslationGeneration::SplitCamelCase(AZStd::string& text) + { + AZStd::regex splitRegex(R"(/[a-z]+|[0-9]+|(?:[A-Z][a-z]+)|(?:[A-Z]+(?=(?:[A-Z][a-z])|[^AZa-z]|[$\d\n]))/g)"); + text = AZStd::regex_replace(text, splitRegex, " $&"); + text = AZ::StringFunc::LStrip(text); + AZ::StringFunc::Replace(text, " ", " "); + } + namespace Helpers { AZStd::string ReadStringAttribute(const AZ::AttributeArray& attributes, const AZ::Crc32& attribute) diff --git a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h index b86e1fe969..0f84c48b22 100644 --- a/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h +++ b/Gems/ScriptCanvas/Code/Tools/TranslationGeneration.h @@ -142,6 +142,9 @@ namespace ScriptCanvasEditorTools //! Utility function that saves a TranslationFormat object in the desired JSON format void SaveJSONData(const AZStd::string& filename, TranslationFormat& translationRoot); + //! Utility function that splits camel-case syntax string into separate words + void SplitCamelCase(AZStd::string&); + //! Evaluates if the specified object has exclusion flags and should be skipped from generation template bool ShouldSkip(const T* object) const diff --git a/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml b/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml index 0be3c8c81a..a2a89509e6 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml +++ b/Gems/ScriptCanvasTesting/Code/Source/Nodes/Nodeables/ValuePointerReferenceExample.ScriptCanvasNodeable.xml @@ -1,13 +1,22 @@ + + + @@ -24,9 +33,10 @@ PreferredClassName="Branch Input Type Example" Base="ScriptCanvas::Nodeable" Icon="Icons/ScriptCanvas/Placeholder.png" - Category="Tests" + Category="Examples" GeneratePropertyFriend="True" Namespace="None" + EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All" Description="Example of branch passing as input by value, pointer and reference."> @@ -46,9 +56,10 @@ PreferredClassName="Input Type Example" Base="ScriptCanvas::Nodeable" Icon="Icons/ScriptCanvas/Placeholder.png" - Category="Tests" + Category="Examples" GeneratePropertyFriend="True" Namespace="None" + EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All" Description="Example of passing as input by value, pointer and reference."> @@ -65,9 +76,10 @@ PreferredClassName="Property Example" Base="ScriptCanvas::Nodeable" Icon="Icons/ScriptCanvas/Placeholder.png" - Category="Tests" + Category="Examples" GeneratePropertyFriend="True" Namespace="None" + EditAttributes="AZ::Script::Attributes::ExcludeFrom@AZ::Script::Attributes::ExcludeFlags::All" Description="Example of using properties."> diff --git a/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp b/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp index 0a0f71bead..c983717a0d 100644 --- a/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp +++ b/Gems/ScriptCanvasTesting/Code/Source/ScriptCanvasTestBus.cpp @@ -26,9 +26,12 @@ namespace ScriptCanvasTesting if (AZ::BehaviorContext* behaviorContext = azrtti_cast(context)) { - behaviorContext->EnumProperty<(AZ::u32)TestEnum::Alpha>("ALPHA"); - behaviorContext->EnumProperty<(AZ::u32)TestEnum::Bravo>("BRAVO"); - behaviorContext->EnumProperty<(AZ::u32)TestEnum::Charlie>("CHARLIE"); + behaviorContext->EnumProperty<(AZ::u32)TestEnum::Alpha>("ALPHA") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + behaviorContext->EnumProperty<(AZ::u32)TestEnum::Bravo>("BRAVO") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); + behaviorContext->EnumProperty<(AZ::u32)TestEnum::Charlie>("CHARLIE") + ->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All); } } diff --git a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp index 5031f149b8..1d8d6adf6c 100644 --- a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp +++ b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.cpp @@ -9,8 +9,8 @@ #include "SlideAlongAxisBasedOnAngle.h" #include "StartingPointCamera/StartingPointCameraUtilities.h" #include -#include #include +#include namespace Camera { @@ -32,31 +32,43 @@ namespace Camera AZ::EditContext* editContext = serializeContext->GetEditContext(); if (editContext) { - editContext->Class("SlideAlongAxisBasedOnAngle", "Slide 0..SlideDistance along Axis based on Angle Type. Maps from 90..-90 degrees") - ->ClassElement(AZ::Edit::ClassElements::EditorData, "") - ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_axisToSlideAlong, "Axis to slide along", "The Axis to slide along") - ->EnumAttribute(RelativeAxisType::ForwardBackward, "Forwards and Backwards") - ->EnumAttribute(RelativeAxisType::LeftRight, "Right and Left") - ->EnumAttribute(RelativeAxisType::UpDown, "Up and Down") - ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_angleTypeToChangeFor, "Angle Type", "The angle type to base the slide off of") - ->EnumAttribute(EulerAngleType::Pitch, "Pitch") - ->EnumAttribute(EulerAngleType::Roll, "Roll") - ->EnumAttribute(EulerAngleType::Yaw, "Yaw") - ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance, "Max Positive Slide Distance", "The maximum distance to slide in the positive") - ->Attribute(AZ::Edit::Attributes::Suffix, "m") - ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance, "Max Negative Slide Distance", "The maximum distance to slide in the negative") - ->Attribute(AZ::Edit::Attributes::Suffix, "m") - ->ClassElement(AZ::Edit::ClassElements::Group, "Vector Components To Ignore") - ->Attribute(AZ::Edit::Attributes::AutoExpand, true) - ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreX, "X", "When active, the X Component will be ignored.") - ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreY, "Y", "When active, the Y Component will be ignored.") - ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreZ, "Z", "When active, the Z Component will be ignored.") + editContext->Class("SlideAlongAxisBasedOnAngle", + "Slide 0..SlideDistance along Axis based on Angle Type. Maps from 90..-90 degrees") + ->ClassElement(AZ::Edit::ClassElements::EditorData, "") + ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_axisToSlideAlong, "Axis to slide along", + "The Axis to slide along") + ->EnumAttribute(RelativeAxisType::ForwardBackward, "Forwards and Backwards") + ->EnumAttribute(RelativeAxisType::LeftRight, "Right and Left") + ->EnumAttribute(RelativeAxisType::UpDown, "Up and Down") + ->DataElement(AZ::Edit::UIHandlers::ComboBox, &SlideAlongAxisBasedOnAngle::m_angleTypeToChangeFor, "Angle Type", + "The angle type to base the slide off of") + ->EnumAttribute(EulerAngleType::Pitch, "Pitch") + ->EnumAttribute(EulerAngleType::Roll, "Roll") + ->EnumAttribute(EulerAngleType::Yaw, "Yaw") + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumPositiveSlideDistance, "Max Positive Slide Distance", + "The maximum distance to slide in the positive") + ->Attribute(AZ::Edit::Attributes::Suffix, "m") + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_maximumNegativeSlideDistance, "Max Negative Slide Distance", + "The maximum distance to slide in the negative") + ->Attribute(AZ::Edit::Attributes::Suffix, "m") + ->ClassElement(AZ::Edit::ClassElements::Group, "Vector Components To Ignore") + ->Attribute(AZ::Edit::Attributes::AutoExpand, true) + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreX, "X", "When active, the X Component will be ignored.") + ->Attribute(AZ::Edit::Attributes::ReadOnly, &SlideAlongAxisBasedOnAngle::YAndZIgnored) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::AttributesAndValues) + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreY, "Y", "When active, the Y Component will be ignored.") + ->Attribute(AZ::Edit::Attributes::ReadOnly, &SlideAlongAxisBasedOnAngle::XAndZIgnored) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::AttributesAndValues) + ->DataElement(0, &SlideAlongAxisBasedOnAngle::m_ignoreZ, "Z", "When active, the Z Component will be ignored.") + ->Attribute(AZ::Edit::Attributes::ReadOnly, &SlideAlongAxisBasedOnAngle::XAndYIgnored) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, AZ::Edit::PropertyRefreshLevels::AttributesAndValues) ; } } } - void SlideAlongAxisBasedOnAngle::AdjustLookAtTarget([[maybe_unused]] float deltaTime, [[maybe_unused]] const AZ::Transform& targetTransform, AZ::Transform& outLookAtTargetTransform) + void SlideAlongAxisBasedOnAngle::AdjustLookAtTarget( + [[maybe_unused]] float deltaTime, [[maybe_unused]] const AZ::Transform& targetTransform, AZ::Transform& outLookAtTargetTransform) { float angle = GetEulerAngleFromTransform(outLookAtTargetTransform, m_angleTypeToChangeFor); float currentPositionOnRange = -angle / AZ::Constants::HalfPi; @@ -67,4 +79,20 @@ namespace Camera outLookAtTargetTransform.SetTranslation(outLookAtTargetTransform.GetTranslation() + basis * currentPositionOnRange * slideScale); } -} + + bool SlideAlongAxisBasedOnAngle::XAndYIgnored() const + { + return m_ignoreX && m_ignoreY; + } + + bool SlideAlongAxisBasedOnAngle::XAndZIgnored() const + { + return m_ignoreX && m_ignoreZ; + } + + bool SlideAlongAxisBasedOnAngle::YAndZIgnored() const + { + return m_ignoreY && m_ignoreZ; + } + +} // namespace Camera diff --git a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h index 2c756d1ac7..e517b6ffbd 100644 --- a/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h +++ b/Gems/StartingPointCamera/Code/Source/CameraLookAtBehaviors/SlideAlongAxisBasedOnAngle.h @@ -6,11 +6,11 @@ * */ #pragma once -#include -#include -#include #include "StartingPointCamera/StartingPointCameraConstants.h" +#include #include +#include +#include namespace Camera { @@ -38,6 +38,10 @@ namespace Camera void Activate(AZ::EntityId) override {} void Deactivate() override {} + bool XAndYIgnored() const; + bool XAndZIgnored() const; + bool YAndZIgnored() const; + private: ////////////////////////////////////////////////////////////////////////// // Reflected data diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg index 57835e9c20..78af20cc2d 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainHeight.svg @@ -1,7 +1,5 @@ - - - icon / Environmental / Terrain Height - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg index df73d78276..ad7403d976 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainLayerSpawner.svg @@ -1,7 +1,5 @@ - - - icon / Environmental / Generate Terrian - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainMacroMaterial.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainMacroMaterial.svg new file mode 100644 index 0000000000..9a694bfbf7 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainMacroMaterial.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainPhysicsCollider.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainPhysicsCollider.svg new file mode 100644 index 0000000000..56ffb05464 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainPhysicsCollider.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceGradientList.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceGradientList.svg new file mode 100644 index 0000000000..c4e8ce79d2 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceGradientList.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceMaterials.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceMaterials.svg new file mode 100644 index 0000000000..5a25cb3be9 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainSurfaceMaterials.svg @@ -0,0 +1,3 @@ + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg index c6388d6215..f3c17f66e4 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorld.svg @@ -1,8 +1,5 @@ - - - icon / Environmental / Terrain Refactor - - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg index bd1512afda..b128d0f316 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldDebugger.svg @@ -1,8 +1,5 @@ - - - icon / Environmental / Terrain World Debugger - - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg index ab3716ad5d..de97c005fc 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/TerrainWorldRenderer.svg @@ -1,8 +1,5 @@ - - - icon / Environmental / Terrain World Renderer - - - - - \ No newline at end of file + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg index b87a0b4d7e..87a2d199bd 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainHeight.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain Height - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg index c078d32fe5..a89186819f 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Generate Terrian - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg new file mode 100644 index 0000000000..177469e46e --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg new file mode 100644 index 0000000000..302e585f6e --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg new file mode 100644 index 0000000000..19cb144936 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg new file mode 100644 index 0000000000..5179f61867 --- /dev/null +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg index 2aee65f2a8..5466395141 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorld.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain Refactor - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg index 1b729ab73f..ea9935fefb 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldDebugger.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain World Debugger - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg index 4287508f10..af235047db 100644 --- a/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg +++ b/Gems/Terrain/Assets/Editor/Icons/Components/Viewport/TerrainWorldRenderer.svg @@ -1,25 +1,22 @@ - - - icon / Environmental / Terrain World Renderer - box - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + + + + + + + + + + + + + + + + + + + + + + diff --git a/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material b/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material index d2acc2516a..7cf249a10d 100644 --- a/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material +++ b/Gems/Terrain/Assets/Materials/Terrain/DefaultPbrTerrain.material @@ -2,23 +2,5 @@ "description": "", "materialType": "PbrTerrain.materialtype", "parentMaterial": "", - "propertyLayoutVersion": 1, - "properties": { - "baseColor": { - "color": [ 0.18, 0.18, 0.18 ], - "useTexture": false - }, - "normal": - { - "useTexture": false - }, - "roughness": - { - "useTexture": false - }, - "specularF0": - { - "useTexture": false - } - } + "propertyLayoutVersion": 1 } diff --git a/Gems/Terrain/Code/CMakeLists.txt b/Gems/Terrain/Code/CMakeLists.txt index 4b2f32e172..d532284350 100644 --- a/Gems/Terrain/Code/CMakeLists.txt +++ b/Gems/Terrain/Code/CMakeLists.txt @@ -26,8 +26,6 @@ ly_add_target( Gem::GradientSignal Gem::SurfaceData Gem::LmbrCentral - - ) ly_add_target( @@ -49,14 +47,14 @@ ly_add_target( ) # the above module is for use in all client/server types -ly_create_alias(NAME Terrain.Servers NAMESPACE Gem TARGETS Gem::Terrain) -ly_create_alias(NAME Terrain.Clients NAMESPACE Gem TARGETS Gem::Terrain) +ly_create_alias(NAME Terrain.Servers NAMESPACE Gem TARGETS Gem::Terrain Gem::SurfaceData.Servers Gem::GradientSignal.Servers) +ly_create_alias(NAME Terrain.Clients NAMESPACE Gem TARGETS Gem::Terrain Gem::SurfaceData.Clients Gem::GradientSignal.Clients) # If we are on a host platform, we want to add the host tools targets like the Terrain.Editor target which # will also depend on Terrain.Static if(PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target( - NAME Terrain.Editor MODULE + NAME Terrain.Editor GEM_MODULE NAMESPACE Gem AUTOMOC FILES_CMAKE @@ -78,8 +76,8 @@ if(PAL_TRAIT_BUILD_HOST_TOOLS) ) # the above module is for use in dev tool situations - ly_create_alias(NAME Terrain.Builders NAMESPACE Gem TARGETS Gem::Terrain.Editor) - ly_create_alias(NAME Terrain.Tools NAMESPACE Gem TARGETS Gem::Terrain.Editor) + ly_create_alias(NAME Terrain.Builders NAMESPACE Gem TARGETS Gem::Terrain.Editor Gem::SurfaceData.Builders Gem::GradientSignal.Builders) + ly_create_alias(NAME Terrain.Tools NAMESPACE Gem TARGETS Gem::Terrain.Editor Gem::SurfaceData.Tools Gem::GradientSignal.Tools) endif() ################################################################################ diff --git a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp index 7395e66d06..65e8600d62 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainSurfaceDataSystemComponent.cpp @@ -214,10 +214,10 @@ namespace Terrain { AZ_Assert((m_providerHandle != SurfaceData::InvalidSurfaceDataRegistryHandle), "Invalid surface data handle"); - // Our terrain was valid before and after, it just changed in some way. If we have a valid dirty region passed in - // then it's possible that the heightmap has been modified in the Editor. Otherwise, just notify that the entire - // terrain has changed in some way. - if (dirtyRegion.IsValid()) + // Our terrain was valid before and after, it just changed in some way. If we have a valid dirty region, and the terrain + // bounds themselves haven't changed, just notify that our terrain data has changed within the bounds. Otherwise, notify + // that the entire terrain provider needs to be updated, since it either has new bounds or the entire set of data is dirty. + if (dirtyRegion.IsValid() && m_terrainBounds.IsClose(terrainBoundsBeforeUpdate)) { SurfaceData::SurfaceDataSystemRequestBus::Broadcast( &SurfaceData::SurfaceDataSystemRequestBus::Events::RefreshSurfaceData, dirtyRegion); diff --git a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h index d2254161a0..924426c262 100644 --- a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h +++ b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainPhysicsColliderComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr auto s_categoryName = "Terrain"; static constexpr auto s_componentName = "Terrain Physics Heightfield Collider"; static constexpr auto s_componentDescription = "Provides terrain data to a physics collider in the form of a heightfield and surface->material mapping."; - static constexpr auto s_icon = "Editor/Icons/Components/TerrainLayerSpawner.svg"; - static constexpr auto s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg"; + static constexpr auto s_icon = "Editor/Icons/Components/TerrainPhysicsCollider.svg"; + static constexpr auto s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainPhysicsCollider.svg"; static constexpr auto s_helpUrl = ""; }; } diff --git a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h index e2c5f1b280..3cf9e7fc47 100644 --- a/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h +++ b/Gems/Terrain/Code/Source/EditorComponents/EditorTerrainSurfaceGradientListComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr const char* const s_categoryName = "Terrain"; static constexpr const char* const s_componentName = "Terrain Surface Gradient List"; static constexpr const char* const s_componentDescription = "Provides a mapping between gradients and surface tags for use by the terrain system."; - static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainLayerSpawner.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainLayerSpawner.svg"; + static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainSurfaceGradientList.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainSurfaceGradientList.svg"; static constexpr const char* const s_helpUrl = ""; }; } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h index a2fddf5768..67897b7dec 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h +++ b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainMacroMaterialComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr const char* const s_categoryName = "Terrain"; static constexpr const char* const s_componentName = "Terrain Macro Material"; static constexpr const char* const s_componentDescription = "Provides a macro material for a region to the terrain renderer"; - static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainLayerRenderer.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainLayerRenderer.svg"; + static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainMacroMaterial.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainMacroMaterial.svg"; static constexpr const char* const s_helpUrl = ""; }; } diff --git a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h index f0d03a6082..7fe8c82522 100644 --- a/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h +++ b/Gems/Terrain/Code/Source/TerrainRenderer/EditorComponents/EditorTerrainSurfaceMaterialsListComponent.h @@ -25,8 +25,8 @@ namespace Terrain static constexpr const char* const s_categoryName = "Terrain"; static constexpr const char* const s_componentName = "Terrain Surface Materials List"; static constexpr const char* const s_componentDescription = "Provides a mapping between surface tags and render materials."; - static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainHeight.svg"; - static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainHeight.svg"; + static constexpr const char* const s_icon = "Editor/Icons/Components/TerrainSurfaceMaterials.svg"; + static constexpr const char* const s_viewportIcon = "Editor/Icons/Components/Viewport/TerrainSurfaceMaterials.svg"; static constexpr const char* const s_helpUrl = ""; }; } diff --git a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp index 4d149e8527..c2f8c2620c 100644 --- a/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp +++ b/Gems/Terrain/Code/Tests/TerrainSystemTest.cpp @@ -41,7 +41,6 @@ namespace UnitTest }; AZ::ComponentApplication m_app; - AZStd::unique_ptr m_terrainSystem; AZStd::unique_ptr> m_boxShapeRequests; AZStd::unique_ptr> m_shapeRequests; @@ -59,7 +58,6 @@ namespace UnitTest void TearDown() override { - m_terrainSystem.reset(); m_boxShapeRequests.reset(); m_shapeRequests.reset(); m_terrainAreaHeightRequests.reset(); @@ -96,16 +94,17 @@ namespace UnitTest // Create a terrain system with reasonable defaults for testing, but with the ability to override the defaults // on a test-by-test basis. - void CreateAndActivateTerrainSystem( + AZStd::unique_ptr CreateAndActivateTerrainSystem( AZ::Vector2 queryResolution = AZ::Vector2(1.0f), AZ::Aabb worldBounds = AZ::Aabb::CreateFromMinMax(AZ::Vector3(-128.0f), AZ::Vector3(128.0f))) { // Create the terrain system and give it one tick to fully initialize itself. - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->SetTerrainAabb(worldBounds); - m_terrainSystem->SetTerrainHeightQueryResolution(queryResolution); - m_terrainSystem->Activate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->SetTerrainAabb(worldBounds); + terrainSystem->SetTerrainHeightQueryResolution(queryResolution); + terrainSystem->Activate(); AZ::TickBus::Broadcast(&AZ::TickBus::Events::OnTick, 0.f, AZ::ScriptTimePoint{}); + return terrainSystem; } AZStd::unique_ptr CreateAndActivateMockTerrainLayerSpawner( @@ -144,16 +143,16 @@ namespace UnitTest { // Trivially verify that the terrain system can successfully be constructed and destructed without errors. - m_terrainSystem = AZStd::make_unique(); + auto terrainSystem = AZStd::make_unique(); } TEST_F(TerrainSystemTest, TrivialActivateDeactivate) { // Verify that the terrain system can be activated and deactivated without errors. - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->Activate(); - m_terrainSystem->Deactivate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->Activate(); + terrainSystem->Deactivate(); } TEST_F(TerrainSystemTest, CreateEventsCalledOnActivation) @@ -164,8 +163,8 @@ namespace UnitTest EXPECT_CALL(mockTerrainListener, OnTerrainDataCreateBegin()).Times(AtLeast(1)); EXPECT_CALL(mockTerrainListener, OnTerrainDataCreateEnd()).Times(AtLeast(1)); - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->Activate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->Activate(); } TEST_F(TerrainSystemTest, DestroyEventsCalledOnDeactivation) @@ -176,9 +175,9 @@ namespace UnitTest EXPECT_CALL(mockTerrainListener, OnTerrainDataDestroyBegin()).Times(AtLeast(1)); EXPECT_CALL(mockTerrainListener, OnTerrainDataDestroyEnd()).Times(AtLeast(1)); - m_terrainSystem = AZStd::make_unique(); - m_terrainSystem->Activate(); - m_terrainSystem->Deactivate(); + auto terrainSystem = AZStd::make_unique(); + terrainSystem->Activate(); + terrainSystem->Deactivate(); } TEST_F(TerrainSystemTest, TerrainDoesNotExistWhenNoTerrainLayerSpawnersAreRegistered) @@ -190,9 +189,9 @@ namespace UnitTest // a normal facing up the Z axis. // Create and activate the terrain system with our testing defaults for world bounds and query resolution. - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); - AZ::Aabb worldBounds = m_terrainSystem->GetTerrainAabb(); + AZ::Aabb worldBounds = terrainSystem->GetTerrainAabb(); // Loop through several points within the world bounds, including on the edges, and verify that they all return false for // terrainExists with default heights and normals. @@ -203,17 +202,17 @@ namespace UnitTest AZ::Vector3 position(x, y, 0.0f); bool terrainExists = true; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); EXPECT_FALSE(terrainExists); EXPECT_FLOAT_EQ(height, worldBounds.GetMin().GetZ()); terrainExists = true; AZ::Vector3 normal = - m_terrainSystem->GetNormal(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); + terrainSystem->GetNormal(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &terrainExists); EXPECT_FALSE(terrainExists); EXPECT_EQ(normal, AZ::Vector3::CreateAxisZ()); - bool isHole = m_terrainSystem->GetIsHoleFromFloats( + bool isHole = terrainSystem->GetIsHoleFromFloats( position.GetX(), position.GetY(), AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); EXPECT_TRUE(isHole); } @@ -242,7 +241,7 @@ namespace UnitTest // Verify that terrain exists within the layer spawner bounds, and doesn't exist outside of it. // Create and activate the terrain system with our testing defaults for world bounds and query resolution. - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); // Create a box that's twice as big as the layer spawner box. Loop through it and verify that points within the layer box contain // terrain and the expected height & normal values, and points outside the layer box don't contain terrain. @@ -255,9 +254,9 @@ namespace UnitTest { AZ::Vector3 position(x, y, 0.0f); bool heightQueryTerrainExists = false; - float height = m_terrainSystem->GetHeight( + float height = terrainSystem->GetHeight( position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); - bool isHole = m_terrainSystem->GetIsHoleFromFloats( + bool isHole = terrainSystem->GetIsHoleFromFloats( position.GetX(), position.GetY(), AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT); if (spawnerBox.Contains(AZ::Vector3(position.GetX(), position.GetY(), spawnerBox.GetMin().GetZ()))) @@ -297,7 +296,7 @@ namespace UnitTest // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution that exactly matches // the frequency of our sine wave. If our height queries rely on the query resolution, we should always get a value of 0. const AZ::Vector2 queryResolution(frequencyMeters); - CreateAndActivateTerrainSystem(queryResolution); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); // Test an arbitrary set of points that should all produce non-zero heights with the EXACT sampler. They're not aligned with the // query resolution, or with the 0 points on the sine wave. @@ -307,7 +306,7 @@ namespace UnitTest AZ::Vector3 position(nonZeroPoint.GetX(), nonZeroPoint.GetY(), 0.0f); bool heightQueryTerrainExists = false; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); // We've chosen a bunch of places on the sine wave that should return a non-zero positive or negative value. constexpr float epsilon = 0.0001f; @@ -322,7 +321,7 @@ namespace UnitTest AZ::Vector3 position(zeroPoint.GetX(), zeroPoint.GetY(), 0.0f); bool heightQueryTerrainExists = false; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::EXACT, &heightQueryTerrainExists); constexpr float epsilon = 0.0001f; EXPECT_NEAR(height, 0.0f, epsilon); @@ -348,7 +347,7 @@ namespace UnitTest // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution at 0.25 meter // intervals. const AZ::Vector2 queryResolution(0.25f); - CreateAndActivateTerrainSystem(queryResolution); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); // Test some points and verify that the results always go "downward", whether they're in positive or negative space. // (Z contains the the expected result for convenience). @@ -371,7 +370,7 @@ namespace UnitTest AZ::Vector3 position(testPoint.m_testLocation.GetX(), testPoint.m_testLocation.GetY(), 0.0f); bool heightQueryTerrainExists = false; float height = - m_terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP, &heightQueryTerrainExists); + terrainSystem->GetHeight(position, AzFramework::Terrain::TerrainDataRequests::Sampler::CLAMP, &heightQueryTerrainExists); constexpr float epsilon = 0.0001f; EXPECT_NEAR(height, expectedHeight, epsilon); @@ -410,7 +409,7 @@ namespace UnitTest // Create and activate the terrain system with our testing defaults for world bounds, and a query resolution at 1 meter intervals. const AZ::Vector2 queryResolution(frequencyMeters); - CreateAndActivateTerrainSystem(queryResolution); + auto terrainSystem = CreateAndActivateTerrainSystem(queryResolution); // Test some points and verify that the results are the expected bilinear filtered result, // whether they're in positive or negative space. @@ -466,7 +465,7 @@ namespace UnitTest AZ::Vector3 position(testPoint.m_testLocation.GetX(), testPoint.m_testLocation.GetY(), 0.0f); bool heightQueryTerrainExists = false; - float height = m_terrainSystem->GetHeight( + float height = terrainSystem->GetHeight( position, AzFramework::Terrain::TerrainDataRequests::Sampler::BILINEAR, &heightQueryTerrainExists); // Verify that our height query returned the bilinear filtered result we expect. @@ -479,7 +478,7 @@ namespace UnitTest { // When there is more than one surface/weight defined, they should all be returned in descending weight order. - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); const AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3::CreateZero(), AZ::Vector3::CreateOne()); auto entity = CreateAndActivateMockTerrainLayerSpawner( @@ -508,11 +507,11 @@ namespace UnitTest AzFramework::SurfaceData::SurfaceTagWeightList outSurfaceWeights; // Asking for values outside the layer spawner bounds, should result in no results. - m_terrainSystem->GetSurfaceWeights(aabb.GetMax() + AZ::Vector3::CreateOne(), outSurfaceWeights); + terrainSystem->GetSurfaceWeights(aabb.GetMax() + AZ::Vector3::CreateOne(), outSurfaceWeights); EXPECT_TRUE(outSurfaceWeights.empty()); // Inside the layer spawner box should give us all of the added surface weights. - m_terrainSystem->GetSurfaceWeights(aabb.GetCenter(), outSurfaceWeights); + terrainSystem->GetSurfaceWeights(aabb.GetCenter(), outSurfaceWeights); EXPECT_EQ(outSurfaceWeights.size(), 3); @@ -531,7 +530,7 @@ namespace UnitTest TEST_F(TerrainSystemTest, GetMaxSurfaceWeightsReturnsBiggestValidSurfaceWeight) { - CreateAndActivateTerrainSystem(); + auto terrainSystem = CreateAndActivateTerrainSystem(); const AZ::Aabb aabb = AZ::Aabb::CreateFromMinMax(AZ::Vector3::CreateZero(), AZ::Vector3::CreateOne()); auto entity = CreateAndActivateMockTerrainLayerSpawner( @@ -562,12 +561,12 @@ namespace UnitTest // Asking for values outside the layer spawner bounds, should result in an invalid result. AzFramework::SurfaceData::SurfaceTagWeight tagWeight = - m_terrainSystem->GetMaxSurfaceWeight(aabb.GetMax() + AZ::Vector3::CreateOne()); + terrainSystem->GetMaxSurfaceWeight(aabb.GetMax() + AZ::Vector3::CreateOne()); EXPECT_EQ(tagWeight.m_surfaceType, AZ::Crc32(AzFramework::SurfaceData::Constants::s_unassignedTagName)); // Inside the layer spawner box should give us the highest weighted tag (tag1). - tagWeight = m_terrainSystem->GetMaxSurfaceWeight(aabb.GetCenter()); + tagWeight = terrainSystem->GetMaxSurfaceWeight(aabb.GetCenter()); EXPECT_EQ(tagWeight.m_surfaceType, tagWeight1.m_surfaceType); EXPECT_NEAR(tagWeight.m_weight, tagWeight1.m_weight, 0.01f); diff --git a/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp b/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp index dd38daa633..85ba4bda61 100644 --- a/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp +++ b/Gems/Vegetation/Code/Source/InstanceSystemComponent.cpp @@ -15,9 +15,6 @@ #include #include -#include -#include - #include #include #include diff --git a/README.md b/README.md index 6f500a3dd3..11fec028bc 100644 --- a/README.md +++ b/README.md @@ -102,12 +102,12 @@ For more details on the steps above, refer to [Setting up O3DE from GitHub](http 1. Configure a solution for your project. ``` - cmake -B -S -G "Visual Studio 16" -DLY_3RDPARTY_PATH=<3rdParty cache path> + cmake -B -S -G "Visual Studio 16" ``` Example: ``` - cmake -B C:\my-project\build\windows_vs2019 -S C:\my-project -G "Visual Studio 16" -DLY_3RDPARTY_PATH=C:\o3de-packages + cmake -B C:\my-project\build\windows_vs2019 -S C:\my-project -G "Visual Studio 16" ``` > Note: Do not use trailing slashes for the <3rdParty cache path>. diff --git a/Registry/AssetProcessorPlatformConfig.setreg b/Registry/AssetProcessorPlatformConfig.setreg index c8d8dd9a80..cf793a9802 100644 --- a/Registry/AssetProcessorPlatformConfig.setreg +++ b/Registry/AssetProcessorPlatformConfig.setreg @@ -21,6 +21,19 @@ "Amazon": { "AssetProcessor": { "Settings": { + "Stats": { + // Setting MachineReadable to true will output stats in more of a CSV-like format that is ideal for script ingestion + "MachineReadable" : false, + // Setting HumanReadable to true will output stats in a friendly human format that is ideal for human reading + "HumanReadable" : true, + // To turn off stats output entirely, set both HumanReadable and MachineReadable to false. + // the maximum number of stats to show for cumulative stats like the time taken + // across all jobs of a certain type, or all jobs cumulative across a whole platform + "MaxCumulativeStats" : 4, + // the maximum number of stats to show for individual stats like how long a specific + // individual job took. + "MaxIndividualStats" : 4 + }, "Platform pc": { "tags": "tools,renderer,dx12,vulkan,null" }, diff --git a/Templates/CMakeLists.txt b/Templates/CMakeLists.txt index 9735907a6a..5f5d561a9f 100644 --- a/Templates/CMakeLists.txt +++ b/Templates/CMakeLists.txt @@ -14,5 +14,6 @@ ly_install_directory( DefaultGem DefaultProject MinimalProject + GemRepo VERBATIM ) diff --git a/Templates/DefaultProject/Template/cmake/CompilerSettings.cmake b/Templates/DefaultProject/Template/cmake/CompilerSettings.cmake index cf6614e4a5..60bda1d45b 100644 --- a/Templates/DefaultProject/Template/cmake/CompilerSettings.cmake +++ b/Templates/DefaultProject/Template/cmake/CompilerSettings.cmake @@ -9,5 +9,5 @@ # File to tweak compiler settings before compiler detection happens (before project() is called) # We dont have PAL enabled at this point, so we can only use pure-CMake variables if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") - include(cmake/Platform/${CMAKE_HOST_SYSTEM_NAME}/CompilerSettings.cmake) + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) endif() diff --git a/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings.cmake b/Templates/DefaultProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake similarity index 100% rename from Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings.cmake rename to Templates/DefaultProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake diff --git a/Templates/DefaultProject/template.json b/Templates/DefaultProject/template.json index a36926f632..fcffafcb34 100644 --- a/Templates/DefaultProject/template.json +++ b/Templates/DefaultProject/template.json @@ -193,8 +193,8 @@ "isOptional": false }, { - "file": "cmake/Platform/Linux/CompilerSettings.cmake", - "origin": "cmake/Platform/Linux/CompilerSettings.cmake", + "file": "cmake/Platform/Linux/CompilerSettings_linux.cmake", + "origin": "cmake/Platform/Linux/CompilerSettings_linux.cmake", "isTemplated": false, "isOptional": false }, diff --git a/Templates/GemRepo/Template/gem.json b/Templates/GemRepo/Template/gem.json new file mode 100644 index 0000000000..292681b2b5 --- /dev/null +++ b/Templates/GemRepo/Template/gem.json @@ -0,0 +1,19 @@ +{ + "gem_name": "${Name}Gem", + "display_name": "${Name}Gem", + "license": "What license ${Name}Gem uses goes here: i.e. Apache-2.0 Or MIT", + "license_url": "", + "origin": "The primary repo for ${Name}Gem goes here: i.e. http://www.mydomain.com", + "summary": "A short description of ${Name}Gem which is zipped up in an archive named gem.zip in the root of the Gem Repo. Though not required, it is recommended that the sha256 of the gem.zip file should be placed in the sha256 field of this gem.json so the download can be verified.", + "origin_uri": "${RepoURI}/gem.zip", + "sha256": "", + "type": "Code", + "canonical_tags": [ + "Gem" + ], + "user_tags": [ + "${Name}Gem" + ], + "icon_path": "preview.png", + "requirements": "" +} diff --git a/Templates/GemRepo/Template/repo.json b/Templates/GemRepo/Template/repo.json new file mode 100644 index 0000000000..2af1fcfd2a --- /dev/null +++ b/Templates/GemRepo/Template/repo.json @@ -0,0 +1,11 @@ +{ + "repo_name":"${Name}", + "origin":"Origin for the ${Name} Gem Repository", + "repo_uri": "${RepoURI}", + "summary": "A Gem Repository with a single Gem in the root of the repository.", + "additional_info": "Additional info for ${Name}", + "last_updated": "", + "gems": [ + "${RepoURI}" + ] +} diff --git a/Templates/GemRepo/preview.png b/Templates/GemRepo/preview.png new file mode 100644 index 0000000000..78a2a735d2 --- /dev/null +++ b/Templates/GemRepo/preview.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ae503ec99c8358991dc3c6e50737844d3602b81a49abbbed7d697d7238547c0 +size 28026 diff --git a/Templates/GemRepo/template.json b/Templates/GemRepo/template.json new file mode 100644 index 0000000000..88123a9dae --- /dev/null +++ b/Templates/GemRepo/template.json @@ -0,0 +1,27 @@ +{ + "template_name": "GemRepo", + "origin": "The primary repo for GemRepo goes here: i.e. http://www.mydomain.com", + "license": "What license GemRepo uses goes here: i.e. https://opensource.org/licenses/MIT", + "display_name": "GemRepo", + "summary": "A Gem Repository that contains a single Gem.", + "canonical_tags": [], + "user_tags": [ + "GemRepo" + ], + "icon_path": "preview.png", + "copyFiles": [ + { + "file": "gem.json", + "origin": "gem.json", + "isTemplated": true, + "isOptional": false + }, + { + "file": "repo.json", + "origin": "repo.json", + "isTemplated": true, + "isOptional": false + } + ], + "createDirectories": [] +} diff --git a/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake b/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake index cf6614e4a5..60bda1d45b 100644 --- a/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake +++ b/Templates/MinimalProject/Template/cmake/CompilerSettings.cmake @@ -9,5 +9,5 @@ # File to tweak compiler settings before compiler detection happens (before project() is called) # We dont have PAL enabled at this point, so we can only use pure-CMake variables if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") - include(cmake/Platform/${CMAKE_HOST_SYSTEM_NAME}/CompilerSettings.cmake) + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) endif() diff --git a/cmake/Platform/Linux/CompilerSettings.cmake b/Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake similarity index 100% rename from cmake/Platform/Linux/CompilerSettings.cmake rename to Templates/MinimalProject/Template/cmake/Platform/Linux/CompilerSettings_linux.cmake diff --git a/Templates/MinimalProject/template.json b/Templates/MinimalProject/template.json index 4260e71527..7d6a4f9b94 100644 --- a/Templates/MinimalProject/template.json +++ b/Templates/MinimalProject/template.json @@ -185,8 +185,8 @@ "isOptional": false }, { - "file": "cmake/Platform/Linux/CompilerSettings.cmake", - "origin": "cmake/Platform/Linux/CompilerSettings.cmake", + "file": "cmake/Platform/Linux/CompilerSettings_linux.cmake", + "origin": "cmake/Platform/Linux/CompilerSettings_linux.cmake", "isTemplated": false, "isOptional": false }, diff --git a/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py b/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py index ae6ed16321..29b6573f7a 100644 --- a/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py +++ b/Tools/LyTestTools/ly_test_tools/o3de/editor_test.py @@ -303,6 +303,8 @@ class EditorTestSuite(): use_null_renderer = True # Maximum time for a single editor to stay open on a shared test timeout_editor_shared_test = 300 + # Flag to determine whether to use new prefab system or use deprecated slice system for this test suite + enable_prefab_system = True # Function to calculate number of editors to run in parallel, this can be overriden by the user @staticmethod @@ -741,7 +743,11 @@ class EditorTestSuite(): test_cmdline_args += ["--attach-debugger"] if test_spec.wait_for_debugger: test_cmdline_args += ["--wait-for-debugger"] - + if self.enable_prefab_system: + test_cmdline_args += ["--regset=/Amazon/Preferences/EnablePrefabSystem=true"] + else: + test_cmdline_args += ["--regset=/Amazon/Preferences/EnablePrefabSystem=false"] + # Cycle any old crash report in case it wasn't cycled properly editor_utils.cycle_crash_report(run_id, workspace) @@ -804,7 +810,11 @@ class EditorTestSuite(): test_cmdline_args += ["--attach-debugger"] if any([t.wait_for_debugger for t in test_spec_list]): test_cmdline_args += ["--wait-for-debugger"] - + if self.enable_prefab_system: + test_cmdline_args += ["--regset=/Amazon/Preferences/EnablePrefabSystem=true"] + else: + test_cmdline_args += ["--regset=/Amazon/Preferences/EnablePrefabSystem=false"] + # Cycle any old crash report in case it wasn't cycled properly editor_utils.cycle_crash_report(run_id, workspace) diff --git a/cmake/3rdParty.cmake b/cmake/3rdParty.cmake index 4b7f929279..7d98c3ea3e 100644 --- a/cmake/3rdParty.cmake +++ b/cmake/3rdParty.cmake @@ -25,6 +25,15 @@ define_property(TARGET PROPERTY LY_SYSTEM_LIBRARY # \arg:output_third_party_path name of variable to set the default project directory into # It defaults to the ~/.o3de/3rdParty directory function(get_default_third_party_folder output_third_party_path) + + # 1. Highest priority, cache variable, that will override the value of any of the cases below + # 2. if defined in an env variable, take it from there + if($ENV{LY_3RDPARTY_PATH}) + set(${output_third_party_path} $ENV{LY_3RDPARTY_PATH} PARENT_SCOPE) + return() + endif() + + # 3. If defined in the o3de_manifest.json, take it from there cmake_path(SET home_directory "$ENV{USERPROFILE}") # Windows if(NOT EXISTS ${home_directory}) cmake_path(SET home_directory "$ENV{HOME}") # Unix @@ -33,7 +42,20 @@ function(get_default_third_party_folder output_third_party_path) endif() endif() + set(manifest_path ${home_directory}/.o3de/o3de_manifest.json) + if(EXISTS ${manifest_path}) + file(READ ${manifest_path} manifest_json) + string(JSON default_third_party_folder ERROR_VARIABLE json_error GET ${manifest_json} default_third_party_folder) + if(NOT json_error) + set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS ${manifest_path}) + set(${output_third_party_path} ${default_third_party_folder} PARENT_SCOPE) + return() + endif() + endif() + + # 4. Lowest priority, use the home directory as the location for 3rdparty set(${output_third_party_path} ${home_directory}/.o3de/3rdParty PARENT_SCOPE) + endfunction() get_default_third_party_folder(o3de_default_third_party_path) diff --git a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake index 9dbdbbd8aa..16478b2f35 100644 --- a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake +++ b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake @@ -20,7 +20,7 @@ ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev4-android TARGETS TIF ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-android TARGETS freetype PACKAGE_HASH df9e4d559ea0f03b0666b48c79813b1cd4d9624429148a249865de9f5c2c11cd) ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.9.50-rev1-android TARGETS AWSNativeSDK PACKAGE_HASH 33771499f9080cbaab613459927e52911e68f94fa356397885e85005efbd1490) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-android TARGETS Lua PACKAGE_HASH 1f638e94a17a87fe9e588ea456d5893876094b4db191234380e4c4eb9e06c300) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-android TARGETS PhysX PACKAGE_HASH b8cb6aa46b2a21671f6cb1f6a78713a3ba88824d0447560ff5ce6c01014b9f43) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev4-android TARGETS PhysX PACKAGE_HASH 60777cbd5279a45dd9d9ee65525f662ce32253b88359162e54e4bb8581a4a262) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-android TARGETS mikkelsen PACKAGE_HASH 075e8e4940884971063b5a9963014e2e517246fa269c07c7dc55b8cf2cd99705) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-android TARGETS googletest PACKAGE_HASH 95671be75287a61c9533452835c3647e9c1b30f81b34b43bcb0ec1997cc23894) ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev2-android TARGETS GoogleBenchmark PACKAGE_HASH 20b46e572211a69d7d94ddad1c89ec37bb958711d6ad4025368ac89ea83078fb) diff --git a/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake b/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake index 995e6082f3..3ad49c6d7a 100644 --- a/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake +++ b/cmake/3rdParty/Platform/Linux/BuiltInPackages_linux.cmake @@ -27,7 +27,7 @@ ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-linux ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-linux TARGETS freetype PACKAGE_HASH 3f10c703d9001ecd2bb51a3bd003d3237c02d8f947ad0161c0252fdc54cbcf97) ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev6-linux TARGETS AWSNativeSDK PACKAGE_HASH 490291e4c8057975c3ab86feb971b8a38871c58bac5e5d86abdd1aeb7141eec4) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-linux TARGETS Lua PACKAGE_HASH 1adc812abe3dd0dbb2ca9756f81d8f0e0ba45779ac85bf1d8455b25c531a38b0) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-linux TARGETS PhysX PACKAGE_HASH a110249cbef4f266b0002c4ee9a71f59f373040cefbe6b82f1e1510c811edde6) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev4-linux TARGETS PhysX PACKAGE_HASH a5cba1c7e1f3df37869008ef18d99bdd15f8e9a44cbe259cf79374696f2b6515) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-linux TARGETS mcpp PACKAGE_HASH df7a998d0bc3fedf44b5bdebaf69ddad6033355b71a590e8642445ec77bc6c41) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-linux TARGETS mikkelsen PACKAGE_HASH 5973b1e71a64633588eecdb5b5c06ca0081f7be97230f6ef64365cbda315b9c8) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-linux TARGETS googletest PACKAGE_HASH 7b7ad330f369450c316a4c4592d17fbb4c14c731c95bd8f37757203e8c2bbc1b) @@ -46,3 +46,4 @@ ly_associate_package(PACKAGE_NAME squish-ccr-deb557d-rev1-linux ly_associate_package(PACKAGE_NAME astc-encoder-3.2-rev2-linux TARGETS astc-encoder PACKAGE_HASH 71549d1ca9e4d48391b92a89ea23656d3393810e6777879f6f8a9def2db1610c) ly_associate_package(PACKAGE_NAME ISPCTexComp-36b80aa-rev1-linux TARGETS ISPCTexComp PACKAGE_HASH 065fd12abe4247dde247330313763cf816c3375c221da030bdec35024947f259) ly_associate_package(PACKAGE_NAME lz4-1.9.3-vcpkg-rev4-linux TARGETS lz4 PACKAGE_HASH 5de3dbd3e2a3537c6555d759b3c5bb98e5456cf85c74ff6d046f809b7087290d) +ly_associate_package(PACKAGE_NAME pyside2-5.15.2-rev2-linux TARGETS pyside2 PACKAGE_HASH 7589c397c8224d0c3ad691ff02e1afd55d9a1f9de1967c14eb8105dd2b0c4dd1) diff --git a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake index eef6badf45..c10cc3e461 100644 --- a/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake +++ b/cmake/3rdParty/Platform/Mac/BuiltInPackages_mac.cmake @@ -28,7 +28,7 @@ ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-mac ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-mac TARGETS freetype PACKAGE_HASH f159b346ac3251fb29cb8dd5f805c99b0015ed7fdb3887f656945ca701a61d0d) ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev5-mac TARGETS AWSNativeSDK PACKAGE_HASH ffb890bd9cf23afb429b9214ad9bac1bf04696f07a0ebb93c42058c482ab2f01) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev6-mac TARGETS Lua PACKAGE_HASH b9079fd35634774c9269028447562c6b712dbc83b9c64975c095fd423ff04c08) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-mac TARGETS PhysX PACKAGE_HASH 5e092a11d5c0a50c4dd99bb681a04b566a4f6f29aa08443d9bffc8dc12c27c8e) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev4-mac TARGETS PhysX PACKAGE_HASH 5f65e798059ea945b53e8f308c0594f195118a64e3ce873f2fff971f4e207b4d) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-mac TARGETS mcpp PACKAGE_HASH be9558905c9c49179ef3d7d84f0a5472415acdf7fe2d76eb060d9431723ddf2e) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-mac TARGETS mikkelsen PACKAGE_HASH 83af99ca8bee123684ad254263add556f0cf49486c0b3e32e6d303535714e505) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-mac TARGETS googletest PACKAGE_HASH cbf020d5ef976c5db8b6e894c6c63151ade85ed98e7c502729dd20172acae5a8) diff --git a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake index 3038e8c561..23892c6d7d 100644 --- a/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake +++ b/cmake/3rdParty/Platform/Windows/BuiltInPackages_windows.cmake @@ -29,7 +29,7 @@ ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-windows ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-windows TARGETS freetype PACKAGE_HASH 9809255f1c59b07875097aa8d8c6c21c97c47a31fb35e30f2bb93188e99a85ff) ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev4-windows TARGETS AWSNativeSDK PACKAGE_HASH a900e80f7259e43aed5c847afee2599ada37f29db70505481397675bcbb6c76c) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-windows TARGETS Lua PACKAGE_HASH 136faccf1f73891e3fa3b95f908523187792e56f5b92c63c6a6d7e72d1158d40) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-windows TARGETS PhysX PACKAGE_HASH 0c5ffbd9fa588e5cf7643721a7cfe74d0fe448bf82252d39b3a96d06dfca2298) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev4-windows TARGETS PhysX PACKAGE_HASH 4591647debc80f9fd1db003206b25aeef0f0036fc4dba05b494558dcf045021b) ly_associate_package(PACKAGE_NAME mcpp-2.7.2_az.2-rev1-windows TARGETS mcpp PACKAGE_HASH 794789aba639bfe2f4e8fcb4424d679933dd6290e523084aa0a4e287ac44acb2) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-windows TARGETS mikkelsen PACKAGE_HASH 872c4d245a1c86139aa929f2b465b63ea4ea55b04ced50309135dd4597457a4e) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-windows TARGETS googletest PACKAGE_HASH 7e8f03ae8a01563124e3daa06386f25a2b311c10bb95bff05cae6c41eff83837) diff --git a/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake b/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake index 8042c888c7..978f26d1f8 100644 --- a/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake +++ b/cmake/3rdParty/Platform/iOS/BuiltInPackages_ios.cmake @@ -21,7 +21,7 @@ ly_associate_package(PACKAGE_NAME tiff-4.2.0.15-rev3-ios TARGETS TIFF ly_associate_package(PACKAGE_NAME freetype-2.10.4.16-ios TARGETS freetype PACKAGE_HASH 3ac3c35e056ae4baec2e40caa023d76a7a3320895ef172b6655e9261b0dc2e29) ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev4-ios TARGETS AWSNativeSDK PACKAGE_HASH d10e7496ca705577032821011beaf9f2507689f23817bfa0ed4d2a2758afcd02) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-ios TARGETS Lua PACKAGE_HASH c2d3c4e67046c293049292317a7d60fdb8f23effeea7136aefaef667163e5ffe) -ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev3-ios TARGETS PhysX PACKAGE_HASH b1bbc1fc068d2c6e1eb18eecd4e8b776adc516833e8da3dcb1970cef2a8f0cbd) +ly_associate_package(PACKAGE_NAME PhysX-4.1.2.29882248-rev4-ios TARGETS PhysX PACKAGE_HASH fb2295974eccd7a05b62efd774c5c4b1ce2b7e45ba65c0b9c1f59c0dab0d34f9) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-ios TARGETS mikkelsen PACKAGE_HASH 976aaa3ccd8582346132a10af253822ccc5d5bcc9ea5ba44d27848f65ee88a8a) ly_associate_package(PACKAGE_NAME googletest-1.8.1-rev4-ios TARGETS googletest PACKAGE_HASH 2f121ad9784c0ab73dfaa58e1fee05440a82a07cc556bec162eeb407688111a7) ly_associate_package(PACKAGE_NAME googlebenchmark-1.5.0-rev2-ios TARGETS GoogleBenchmark PACKAGE_HASH c2ffaed2b658892b1bcf81dee4b44cd1cb09fc78d55584ef5cb8ab87f2d8d1ae) diff --git a/cmake/3rdPartyPackages.cmake b/cmake/3rdPartyPackages.cmake index efe67b4d24..a3f15bdb22 100644 --- a/cmake/3rdPartyPackages.cmake +++ b/cmake/3rdPartyPackages.cmake @@ -7,7 +7,7 @@ include_guard() -include(cmake/LySet.cmake) +include(${LY_ROOT_FOLDER}/cmake/LySet.cmake) # OVERVIEW: # this is the Open 3D Engine Package system. @@ -80,10 +80,7 @@ macro(ly_package_message) endif() endmacro() -file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/packages) - -include(cmake/LYPackage_S3Downloader.cmake) - +include(${LY_ROOT_FOLDER}/cmake/LYPackage_S3Downloader.cmake) # Attempts one time to download a file. # sets should_retry to true if the caller should retry due to an intermittent problem @@ -711,11 +708,11 @@ if (NOT CMAKE_SCRIPT_MODE_FILE) # include the built in 3rd party packages that are for every platform. # you can put your package associations anywhere, but this provides # a good starting point. - include(cmake/3rdParty/BuiltInPackages.cmake) + include(${LY_ROOT_FOLDER}/cmake/3rdParty/BuiltInPackages.cmake) endif() if(PAL_TRAIT_BUILD_HOST_TOOLS) - include(cmake/LYWrappers.cmake) + include(${LY_ROOT_FOLDER}/cmake/LYWrappers.cmake) # Importing this globally to handle AUTOMOC, AUTOUIC, AUTORCC ly_parse_third_party_dependencies(3rdParty::Qt) endif() diff --git a/cmake/CompilerSettings.cmake b/cmake/CompilerSettings.cmake index cf6614e4a5..60bda1d45b 100644 --- a/cmake/CompilerSettings.cmake +++ b/cmake/CompilerSettings.cmake @@ -9,5 +9,5 @@ # File to tweak compiler settings before compiler detection happens (before project() is called) # We dont have PAL enabled at this point, so we can only use pure-CMake variables if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux") - include(cmake/Platform/${CMAKE_HOST_SYSTEM_NAME}/CompilerSettings.cmake) + include(cmake/Platform/Linux/CompilerSettings_linux.cmake) endif() diff --git a/cmake/Deployment.cmake b/cmake/Deployment.cmake index b6b7aa1869..1f6f2fc0f3 100644 --- a/cmake/Deployment.cmake +++ b/cmake/Deployment.cmake @@ -10,5 +10,3 @@ set(LY_ASSET_DEPLOY_MODE "LOOSE" CACHE STRING "Set the Asset deployment when deploying to the target platform (LOOSE, PAK, VFS)") set(LY_ASSET_OVERRIDE_PAK_FOLDER_ROOT "" CACHE STRING "Optional root path to where Pak file folders are stored. By default, blank will use a predefined 'paks' root.") - - diff --git a/cmake/LYWrappers.cmake b/cmake/LYWrappers.cmake index 0416d41ece..d4bf1d7423 100644 --- a/cmake/LYWrappers.cmake +++ b/cmake/LYWrappers.cmake @@ -354,7 +354,7 @@ function(ly_add_target) # of running the copy of runtime dependencies, the stamp file is touched so the timestamp is updated. # Adding a config as part of the name since the stamp file is added to the VS project. # Note the STAMP_OUTPUT_FILE need to match with the one used in runtime dependencies (e.g. RuntimeDependencies_common.cmake) - set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${ly_add_target_NAME}_$.stamp) + set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${ly_add_target_NAME}.stamp) add_custom_command( OUTPUT ${STAMP_OUTPUT_FILE} DEPENDS "$>" @@ -367,7 +367,7 @@ function(ly_add_target) # stamp file on each configuration so it gets properly excluded by the generator unset(stamp_files_per_config) foreach(conf IN LISTS CMAKE_CONFIGURATION_TYPES) - set(stamp_file_conf ${CMAKE_BINARY_DIR}/runtime_dependencies/${conf}/${ly_add_target_NAME}_${conf}.stamp) + set(stamp_file_conf ${CMAKE_BINARY_DIR}/runtime_dependencies/${conf}/${ly_add_target_NAME}.stamp) set_source_files_properties(${stamp_file_conf} PROPERTIES GENERATED TRUE SKIP_AUTOGEN TRUE) list(APPEND stamp_files_per_config $<$:${stamp_file_conf}>) endforeach() @@ -653,36 +653,6 @@ function(ly_add_source_properties) endfunction() -#! ly_project_add_subdirectory: calls add_subdirectory() if the project name is in the project list -# -# This can be useful when including subdirs in the restricted folder only if the project is in the project list -# If you give it a second parameter it will add_subdirectory using that instead, if the project is in the project list -# -# add_subdirectory(AutomatedTesting) if Automatedtesting is in the project list -# EX. ly_project_add_subdirectory(AutomatedTesting) -# -# add_subdirectory(SamplesProject) if Automatedtesting is in the project list -# EX. ly_project_add_subdirectory(AutomatedTesting SamplesProject) -# -# \arg:project_name the name of the project that may be enabled -# \arg:binary_project_dir optional, if supplied that binary_project_dir will be added when project name is enabled. -# -function(ly_project_add_subdirectory project_name) - if(${project_name} IN_LIST LY_PROJECTS) - if(ARGC GREATER 1) - list(GET ARGN 0 subdir) - endif() - if(ARGC GREATER 2) - list(GET ARGN 1 binary_project_dir) - endif() - if(subdir) - add_subdirectory(${subdir} ${binary_project_dir}) - else() - add_subdirectory(${project_name} ${binary_project_dir}) - endif() - endif() -endfunction() - # given a target name, returns the "real" name of the target if its an alias. # this function recursively de-aliases function(ly_de_alias_target target_name output_variable_name) diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index 6a1e2d8cef..d716efb225 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -24,18 +24,23 @@ number will automatically appended as '/'. If LY_INSTALLER_AUTO_ full URL format will be: //" ) -set(LY_INSTALLER_UPLOAD_URL "" CACHE STRING -"Base URL used to upload the installer artifacts after generation, the host target and version number \ -will automatically appended as '/'. If LY_INSTALLER_AUTO_GEN_TAG is set, the full URL \ -format will be: //. Can also be set via LY_INSTALLER_UPLOAD_URL environment \ -variable. Currently only accepts S3 URLs e.g. s3:///" +set(CPACK_UPLOAD_URL "" CACHE STRING +"URL used to upload the installer artifacts after generation, the host target and version number \ +will automatically appended as '/'. If LY_INSTALLER_AUTO_GEN_TAG is set, the full URL \ +format will be: //. Currently only accepts S3 URLs e.g. s3:///" ) -set(LY_INSTALLER_AWS_PROFILE "" CACHE STRING -"AWS CLI profile for uploading artifacts. Can also be set via LY_INSTALLER_AWS_PROFILE environment variable." +set(CPACK_AWS_PROFILE "" CACHE STRING +"AWS CLI profile for uploading artifacts." ) +set(CPACK_THREADS 0) set(CPACK_DESIRED_CMAKE_VERSION 3.20.2) +if(${CPACK_DESIRED_CMAKE_VERSION} VERSION_LESS ${CMAKE_MINIMUM_REQUIRED_VERSION}) + message(FATAL_ERROR + "The desired version of CMake to be included in the package is " + "below the minimum required version of CMake to run") +endif() # set all common cpack variable overrides first so they can be accessible via configure_file # when the platform specific settings are applied below. additionally, any variable with @@ -44,15 +49,16 @@ set(CPACK_DESIRED_CMAKE_VERSION 3.20.2) set(CPACK_PACKAGE_NAME "${PROJECT_NAME}") set(CPACK_PACKAGE_FULL_NAME "Open3D Engine") set(CPACK_PACKAGE_VENDOR "O3DE Binary Project a Series of LF Projects, LLC") +set(CPACK_PACKAGE_CONTACT "info@o3debinaries.org") set(CPACK_PACKAGE_VERSION "${LY_VERSION_STRING}") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installation Tool") string(TOLOWER "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}" CPACK_PACKAGE_FILE_NAME) set(DEFAULT_LICENSE_NAME "Apache-2.0") -set(DEFAULT_LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") -set(CPACK_RESOURCE_FILE_LICENSE ${DEFAULT_LICENSE_FILE}) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") +set(CPACK_RESOURCE_FILE_README "${CMAKE_CURRENT_SOURCE_DIR}/README.md") set(CPACK_LICENSE_URL ${LY_INSTALLER_LICENSE_URL}) set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSION}") @@ -60,6 +66,7 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSI # neither of the SOURCE_DIR variables equate to anything during execution of pre/post build scripts set(CPACK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(CPACK_BINARY_DIR ${CMAKE_BINARY_DIR}/_CPack) # to match other CPack out dirs +set(CPACK_OUTPUT_FILE_PREFIX CPackUploads) # this config file allows the dynamic setting of cpack variables at cpack-time instead of cmake configure set(CPACK_PROJECT_CONFIG_FILE ${CPACK_SOURCE_DIR}/PackagingConfig.cmake) @@ -74,132 +81,37 @@ if(NOT CPACK_GENERATOR) return() endif() -if(${CPACK_DESIRED_CMAKE_VERSION} VERSION_LESS ${CMAKE_MINIMUM_REQUIRED_VERSION}) - message(FATAL_ERROR - "The desired version of CMake to be included in the package is " - "below the minimum required version of CMake to run") -endif() - -# pull down the desired copy of CMake so it can be included in the package +# We will download the desired copy of CMake so it can be included in the package, we defer the downloading +# to the install process, to do so we generate a script that will perform the download and execute such script +# during the install process (before packaging) if(NOT (CPACK_CMAKE_PACKAGE_FILE AND CPACK_CMAKE_PACKAGE_HASH)) message(FATAL_ERROR "Packaging is missing one or more following properties required to include CMake: " " CPACK_CMAKE_PACKAGE_FILE, CPACK_CMAKE_PACKAGE_HASH") endif() -set(_cmake_package_dest ${CPACK_BINARY_DIR}/${CPACK_CMAKE_PACKAGE_FILE}) - -if(EXISTS ${_cmake_package_dest}) - file(SHA256 ${_cmake_package_dest} hash_of_downloaded_file) - if (NOT "${hash_of_downloaded_file}" STREQUAL "${CPACK_CMAKE_PACKAGE_HASH}") - message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found at ${_cmake_package_dest} but expected hash missmatches, re-downloading...") - file(REMOVE ${_cmake_package_dest}) - else() - message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found") - endif() -endif() -if(NOT EXISTS ${_cmake_package_dest}) - # download it - string(REPLACE "." ";" _version_componets "${CPACK_DESIRED_CMAKE_VERSION}") - list(GET _version_componets 0 _major_version) - list(GET _version_componets 1 _minor_version) - - set(_url_version_tag "v${_major_version}.${_minor_version}") - set(_package_url "https://cmake.org/files/${_url_version_tag}/${CPACK_CMAKE_PACKAGE_FILE}") - - message(STATUS "Downloading CMake ${CPACK_DESIRED_CMAKE_VERSION} for packaging...") - download_file( - URL ${_package_url} - TARGET_FILE ${_cmake_package_dest} - EXPECTED_HASH ${CPACK_CMAKE_PACKAGE_HASH} - RESULTS _results - ) - list(GET _results 0 _status_code) +# We download it to a different location because CPACK_PACKAGING_INSTALL_PREFIX will be removed during +# cpack generation. CPACK_BINARY_DIR persists across cpack invocations +set(LY_CMAKE_PACKAGE_DOWNLOAD_PATH ${CPACK_BINARY_DIR}/${CPACK_CMAKE_PACKAGE_FILE}) - if (${_status_code} EQUAL 0 AND EXISTS ${_cmake_package_dest}) - message(STATUS "CMake ${CPACK_DESIRED_CMAKE_VERSION} found") - else() - file(REMOVE ${_cmake_package_dest}) - list(REMOVE_AT _results 0) - - set(_error_message "An error occurred, code ${_status_code}. URL ${_package_url} - ${_results}") - - if(${_status_code} EQUAL 1) - string(APPEND _error_message - " Please double check the CPACK_CMAKE_PACKAGE_FILE and " - "CPACK_CMAKE_PACKAGE_HASH properties before trying again.") - endif() - - message(FATAL_ERROR ${_error_message}) - endif() -endif() - -ly_install(FILES ${_cmake_package_dest} - DESTINATION ./Tools/Redistributables/CMake +configure_file(${LY_ROOT_FOLDER}/cmake/Packaging/CMakeDownload.cmake.in + ${CPACK_BINARY_DIR}/CMakeDownload.cmake + @ONLY +) +ly_install(SCRIPT ${CPACK_BINARY_DIR}/CMakeDownload.cmake + COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} +) +ly_install(FILES ${LY_CMAKE_PACKAGE_DOWNLOAD_PATH} + DESTINATION Tools/Redistributables/CMake COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} ) -# the version string and git tags are intended to be synchronized so it should be safe to use that instead -# of directly calling into git which could get messy in certain scenarios -if(${CPACK_PACKAGE_VERSION} VERSION_GREATER "0.0.0.0") - set(_3rd_party_license_filename NOTICES.txt) - - set(_3rd_party_license_url "https://raw.githubusercontent.com/o3de/3p-package-source/${CPACK_PACKAGE_VERSION}/${_3rd_party_license_filename}") - set(_3rd_party_license_dest ${CPACK_BINARY_DIR}/${_3rd_party_license_filename}) - - # use the plain file downloader as we don't have the file hash available and using a dummy will - # delete the file once it fails hash verification - file(DOWNLOAD - ${_3rd_party_license_url} - ${_3rd_party_license_dest} - STATUS _status - TLS_VERIFY ON - ) - list(POP_FRONT _status _status_code) - - if (${_status_code} EQUAL 0 AND EXISTS ${_3rd_party_license_dest}) - ly_install(FILES ${_3rd_party_license_dest} - DESTINATION . - COMPONENT ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME} - ) - else() - file(REMOVE ${_3rd_party_license_dest}) - message(FATAL_ERROR "Failed to acquire the 3rd Party license manifest file at ${_3rd_party_license_url}. Error: ${_status}") - endif() -endif() - -# checks for and removes trailing slash -function(strip_trailing_slash in_url out_url) - string(LENGTH ${in_url} _url_length) - MATH(EXPR _url_length "${_url_length}-1") - - string(SUBSTRING ${in_url} 0 ${_url_length} _clean_url) - if("${in_url}" STREQUAL "${_clean_url}/") - set(${out_url} ${_clean_url} PARENT_SCOPE) - else() - set(${out_url} ${in_url} PARENT_SCOPE) - endif() -endfunction() - -if(NOT LY_INSTALLER_UPLOAD_URL AND DEFINED ENV{LY_INSTALLER_UPLOAD_URL}) - set(LY_INSTALLER_UPLOAD_URL $ENV{LY_INSTALLER_UPLOAD_URL}) -endif() - -if(LY_INSTALLER_UPLOAD_URL) - ly_is_s3_url(${LY_INSTALLER_UPLOAD_URL} _is_s3_bucket) - if(NOT _is_s3_bucket) - message(FATAL_ERROR "Only S3 installer uploading is supported at this time") - endif() - - if (LY_INSTALLER_AWS_PROFILE) - set(CPACK_AWS_PROFILE ${LY_INSTALLER_AWS_PROFILE}) - elseif (DEFINED ENV{LY_INSTALLER_AWS_PROFILE}) - set(CPACK_AWS_PROFILE $ENV{LY_INSTALLER_AWS_PROFILE}) - endif() - - strip_trailing_slash(${LY_INSTALLER_UPLOAD_URL} LY_INSTALLER_UPLOAD_URL) - set(CPACK_UPLOAD_URL ${LY_INSTALLER_UPLOAD_URL}) -endif() +# Set common CPACK variables to all platforms/generators +set(CPACK_STRIP_FILES TRUE) # always strip symbols on packaging +set(CPACK_PACKAGE_CHECKSUM SHA256) # Generate checksum file +set(CPACK_PRE_BUILD_SCRIPTS ${pal_dir}/PackagingPreBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) +set(CPACK_POST_BUILD_SCRIPTS ${pal_dir}/PackagingPostBuild_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) +set(CPACK_LY_PYTHON_CMD ${LY_PYTHON_CMD}) # IMPORTANT: required to be included AFTER setting all property overrides include(CPack REQUIRED) @@ -268,13 +180,26 @@ foreach(external_dir ${LY_INSTALL_EXTERNAL_BUILD_DIRS}) ) endforeach() +# checks for and removes trailing slash +function(strip_trailing_slash in_url out_url) + string(LENGTH ${in_url} _url_length) + MATH(EXPR _url_length "${_url_length}-1") + + string(SUBSTRING ${in_url} 0 ${_url_length} _clean_url) + if("${in_url}" STREQUAL "${_clean_url}/") + set(${out_url} ${_clean_url} PARENT_SCOPE) + else() + set(${out_url} ${in_url} PARENT_SCOPE) + endif() +endfunction() + if(LY_INSTALLER_DOWNLOAD_URL) strip_trailing_slash(${LY_INSTALLER_DOWNLOAD_URL} LY_INSTALLER_DOWNLOAD_URL) # this will set the following variables: CPACK_DOWNLOAD_SITE, CPACK_DOWNLOAD_ALL, and CPACK_UPLOAD_DIRECTORY (local) cpack_configure_downloads( ${LY_INSTALLER_DOWNLOAD_URL} - UPLOAD_DIRECTORY ${CMAKE_BINARY_DIR}/_CPack_Uploads # to match the _CPack_Packages directory + UPLOAD_DIRECTORY ${CMAKE_BINARY_DIR}/CPackUploads # to match the _CPack_Packages directory ALL ) endif() diff --git a/cmake/Packaging/CMakeDownload.cmake.in b/cmake/Packaging/CMakeDownload.cmake.in new file mode 100644 index 0000000000..e84611b354 --- /dev/null +++ b/cmake/Packaging/CMakeDownload.cmake.in @@ -0,0 +1,54 @@ +# +# 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 +# +# + +set(LY_ROOT_FOLDER "@LY_ROOT_FOLDER@") +set(CMAKE_SCRIPT_MODE_FILE TRUE) +include(@LY_ROOT_FOLDER@/cmake/3rdPartyPackages.cmake) + +if(EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + file(SHA256 "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@" hash_of_downloaded_file) + if (NOT "${hash_of_downloaded_file}" STREQUAL "@CPACK_CMAKE_PACKAGE_HASH@") + message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found at @LY_CMAKE_PACKAGE_DOWNLOAD_PATH@ but expected hash missmatches, re-downloading...") + file(REMOVE "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + else() + message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found") + endif() +endif() +if(NOT EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + # download it + string(REPLACE "." ";" _version_components "@CPACK_DESIRED_CMAKE_VERSION@") + list(GET _version_components 0 _major_version) + list(GET _version_components 1 _minor_version) + + set(_url_version_tag "v${_major_version}.${_minor_version}") + set(_package_url "https://cmake.org/files/${_url_version_tag}/@CPACK_CMAKE_PACKAGE_FILE@") + + message(STATUS "Downloading CMake @CPACK_DESIRED_CMAKE_VERSION@ for packaging...") + download_file( + URL ${_package_url} + TARGET_FILE @LY_CMAKE_PACKAGE_DOWNLOAD_PATH@ + EXPECTED_HASH @CPACK_CMAKE_PACKAGE_HASH@ + RESULTS _results + ) + list(GET _results 0 _status_code) + + if (${_status_code} EQUAL 0 AND EXISTS "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + message(STATUS "CMake @CPACK_DESIRED_CMAKE_VERSION@ found") + else() + file(REMOVE "@LY_CMAKE_PACKAGE_DOWNLOAD_PATH@") + list(REMOVE_AT _results 0) + + set(_error_message "An error occurred, code ${_status_code}. URL ${_package_url} - ${_results}") + if(${_status_code} EQUAL 1) + string(APPEND _error_message + " Please double check the CPACK_CMAKE_PACKAGE_FILE and " + "CPACK_CMAKE_PACKAGE_HASH properties before trying again.") + endif() + message(FATAL_ERROR ${_error_message}) + endif() +endif() diff --git a/cmake/Platform/Android/Toolchain_android.cmake b/cmake/Platform/Android/Toolchain_android.cmake index aff5c6faf8..b5c4a56fd6 100644 --- a/cmake/Platform/Android/Toolchain_android.cmake +++ b/cmake/Platform/Android/Toolchain_android.cmake @@ -11,10 +11,14 @@ if(LY_TOOLCHAIN_NDK_API_LEVEL) endif() # Verify that the NDK environment is set and points to the support NDK - +if(NOT ${LY_NDK_DIR}) + if($ENV{LY_NDK_DIR}) + set(LY_NDK_DIR $ENV{LY_NDK_DIR}) + endif() +endif() file(TO_CMAKE_PATH "${LY_NDK_DIR}" LY_NDK_DIR) if(NOT LY_NDK_DIR) - message(FATAL_ERROR "Environment var for NDK is empty. Could not find the NDK installation folder") + message(FATAL_ERROR "Environment and cache var for NDK is empty. Could not find the NDK installation folder") endif() set(LY_ANDROID_NDK_TOOLCHAIN ${LY_NDK_DIR}/build/cmake/android.toolchain.cmake) diff --git a/cmake/Platform/Common/Install_common.cmake b/cmake/Platform/Common/Install_common.cmake index 5e9f6ad0ce..46130f1345 100644 --- a/cmake/Platform/Common/Install_common.cmake +++ b/cmake/Platform/Common/Install_common.cmake @@ -202,18 +202,16 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar endforeach() list(JOIN INCLUDE_DIRECTORIES_PLACEHOLDER "\n" INCLUDE_DIRECTORIES_PLACEHOLDER) - string(REPEAT " " 8 PLACEHOLDER_INDENT) - get_target_property(RUNTIME_DEPENDENCIES_PLACEHOLDER ${TARGET_NAME} MANUALLY_ADDED_DEPENDENCIES) - if(RUNTIME_DEPENDENCIES_PLACEHOLDER) # not found properties return the name of the variable with a "-NOTFOUND" at the end, here we set it to empty if not found - set(RUNTIME_DEPENDENCIES_PLACEHOLDER "${PLACEHOLDER_INDENT}${RUNTIME_DEPENDENCIES_PLACEHOLDER}") - list(JOIN RUNTIME_DEPENDENCIES_PLACEHOLDER "\n${PLACEHOLDER_INDENT}" RUNTIME_DEPENDENCIES_PLACEHOLDER) - else() - unset(RUNTIME_DEPENDENCIES_PLACEHOLDER) - endif() - string(REPEAT " " 12 PLACEHOLDER_INDENT) get_property(interface_build_dependencies_props TARGET ${TARGET_NAME} PROPERTY LY_DELAYED_LINK) unset(INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER) + # We can have private build dependencies that contains direct or indirect runtime dependencies. + # Since imported targets cannot contain build dependencies, we need another way to propagate the runtime dependencies. + # We dont want to put such dependencies in the interface because a user can mistakenly use a symbol that is not available + # when using the engine from source (and that the author of the target didn't want to set public). + # To overcome this, we will actually expose the private build dependencies as runtime dependencies. Our runtime dependency + # algorithm will walk recursively also through static libraries and will only copy binaries to the output. + unset(RUNTIME_DEPENDENCIES_PLACEHOLDER) if(interface_build_dependencies_props) cmake_parse_arguments(build_deps "" "" "PRIVATE;PUBLIC;INTERFACE" ${interface_build_dependencies_props}) # Interface and public dependencies should always be exposed @@ -226,6 +224,14 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar if("${target_type}" STREQUAL "STATIC_LIBRARY") set(build_deps_target "${build_deps_target};${build_deps_PRIVATE}") endif() + + # But we will also pass the private dependencies as runtime dependencies (as long as they are targets, note the comment above) + foreach(build_dep_private IN LISTS build_deps_PRIVATE) + if(TARGET ${build_dep_private}) + list(APPEND RUNTIME_DEPENDENCIES_PLACEHOLDER "${build_dep_private}") + endif() + endforeach() + foreach(build_dependency IN LISTS build_deps_target) # Skip wrapping produced when targets are not created in the same directory if(build_dependency) @@ -235,6 +241,18 @@ function(ly_setup_target OUTPUT_CONFIGURED_TARGET ALIAS_TARGET_NAME absolute_tar endif() list(JOIN INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER "\n" INTERFACE_BUILD_DEPENDENCIES_PLACEHOLDER) + string(REPEAT " " 8 PLACEHOLDER_INDENT) + get_target_property(manually_added_dependencies ${TARGET_NAME} MANUALLY_ADDED_DEPENDENCIES) + if(manually_added_dependencies) # not found properties return the name of the variable with a "-NOTFOUND" at the end, here we set it to empty if not found + list(APPEND RUNTIME_DEPENDENCIES_PLACEHOLDER ${manually_added_dependencies}) + endif() + if(RUNTIME_DEPENDENCIES_PLACEHOLDER) + set(RUNTIME_DEPENDENCIES_PLACEHOLDER "${PLACEHOLDER_INDENT}${RUNTIME_DEPENDENCIES_PLACEHOLDER}") + list(JOIN RUNTIME_DEPENDENCIES_PLACEHOLDER "\n${PLACEHOLDER_INDENT}" RUNTIME_DEPENDENCIES_PLACEHOLDER) + else() + unset(RUNTIME_DEPENDENCIES_PLACEHOLDER) + endif() + string(REPEAT " " 8 PLACEHOLDER_INDENT) # If a target has an LY_PROJECT_NAME property, forward that property to new target get_target_property(target_project_association ${TARGET_NAME} LY_PROJECT_NAME) @@ -557,9 +575,13 @@ function(ly_setup_runtime_dependencies) string(TOUPPER ${conf} UCONF) ly_install(CODE "function(ly_copy source_file target_directory) - cmake_path(GET source_file FILENAME file_name) - if(NOT EXISTS \${target_directory}/\${file_name}) - file(COPY \"\${source_file}\" DESTINATION \"\${target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS}) + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND full_target_directory \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}\" \"\${target_directory}\") + cmake_path(APPEND target_file \"\${full_target_directory}\" \"\${target_filename}\") + if(\"\${source_file}\" IS_NEWER_THAN \"\${target_file}\") + message(STATUS \"Copying \${source_file} to \${full_target_directory}...\") + file(COPY \"\${source_file}\" DESTINATION \"\${full_target_directory}\" FILE_PERMISSIONS ${LY_COPY_PERMISSIONS} FOLLOW_SYMLINK_CHAIN) + file(TOUCH_NOCREATE \"${target_file}\") endif() endfunction()" COMPONENT ${LY_INSTALL_PERMUTATION_COMPONENT}_${UCONF} @@ -584,12 +606,7 @@ endfunction()" endif() # runtime dependencies that need to be copied to the output - # Anywhere CMAKE_INSTALL_PREFIX is used, it has to be escaped so it is baked into the cmake_install.cmake script instead - # of baking the path. This is needed so `cmake --install --prefix ` works regardless of the CMAKE_INSTALL_PREFIX - # used to generate the solution. - # CMAKE_INSTALL_PREFIX is still used when building the INSTALL target - set(install_output_folder "\${CMAKE_INSTALL_PREFIX}/${runtime_output_directory}") - set(target_file_dir "${install_output_folder}/${target_runtime_output_subdirectory}") + set(target_file_dir "${runtime_output_directory}/${target_runtime_output_subdirectory}") ly_get_runtime_dependencies(runtime_dependencies ${target}) foreach(runtime_dependency ${runtime_dependencies}) unset(runtime_command) @@ -798,4 +815,4 @@ set(LY_CORE_COMPONENT_ALREADY_INCLUDED FALSE)" ly_post_install_steps() endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/cmake/Platform/Common/PackagingPostBuild_common.cmake b/cmake/Platform/Common/PackagingPostBuild_common.cmake new file mode 100644 index 0000000000..6e3c7ddf0b --- /dev/null +++ b/cmake/Platform/Common/PackagingPostBuild_common.cmake @@ -0,0 +1,114 @@ +# +# 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 +# +# + +message(STATUS "Executing packaging postbuild...") + +# ly_is_s3_url +# if the given URL is a s3 url of thr form "s3://(stuff)" then sets +# the output_variable_name to TRUE otherwise unsets it. +function (ly_is_s3_url download_url output_variable_name) + if ("${download_url}" MATCHES "s3://.*") + set(${output_variable_name} TRUE PARENT_SCOPE) + else() + unset(${output_variable_name} PARENT_SCOPE) + endif() +endfunction() + +function(ly_upload_to_url in_url in_local_path in_file_regex) + + message(STATUS "Uploading ${in_local_path}/${in_file_regex} artifacts to ${CPACK_UPLOAD_URL}") + ly_is_s3_url(${in_url} _is_s3_bucket) + if(NOT _is_s3_bucket) + message(FATAL_ERROR "Only S3 installer uploading is supported at this time") + endif() + + # strip the scheme and extract the bucket/key prefix from the URL + string(REPLACE "s3://" "" _stripped_url ${in_url}) + string(REPLACE "/" ";" _tokens ${_stripped_url}) + + list(POP_FRONT _tokens _bucket) + string(JOIN "/" _prefix ${_tokens}) + + set(_extra_args [[{"ACL":"bucket-owner-full-control"}]]) + + file(TO_NATIVE_PATH "${LY_ROOT_FOLDER}/scripts/build/tools/upload_to_s3.py" _upload_script) + + set(_upload_command + ${CPACK_LY_PYTHON_CMD} -s + -u ${_upload_script} + --base_dir ${in_local_path} + --file_regex="${in_file_regex}" + --bucket ${_bucket} + --key_prefix ${_prefix} + --extra_args ${_extra_args} + ) + + if(CPACK_AWS_PROFILE) + list(APPEND _upload_command --profile ${CPACK_AWS_PROFILE}) + endif() + + execute_process( + COMMAND ${_upload_command} + RESULT_VARIABLE _upload_result + OUTPUT_VARIABLE _upload_output + ERROR_VARIABLE _upload_error + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + if (${_upload_result} EQUAL 0) + message(STATUS "Artifact uploading complete!") + else() + message(FATAL_ERROR "An error occurred uploading to s3.\n Output: ${_upload_output}\n\ Error: ${_upload_error}") + endif() +endfunction() + +function(ly_upload_to_latest in_url in_path) + + message(STATUS "Updating latest tagged build") + + # make sure we can extra the commit info from the URL first + string(REGEX MATCH "([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9a-zA-Z]+)" + commit_info ${in_url} + ) + if(NOT commit_info) + message(FATAL_ERROR "Failed to extract the build tag") + endif() + + # Create a temp directory where we are going to rename the file to take out the version + # and then upload it + set(temp_dir ${CPACK_BINARY_DIR}/temp) + if(NOT EXISTS ${temp_dir}) + file(MAKE_DIRECTORY ${temp_dir}) + endif() + file(COPY ${in_path} DESTINATION ${temp_dir}) + + cmake_path(GET in_path FILENAME in_path_filename) + string(REPLACE "_${CPACK_PACKAGE_VERSION}" "" non_versioned_in_path_filename ${in_path_filename}) + file(RENAME "${temp_dir}/${in_path_filename}" "${temp_dir}/${non_versioned_in_path_filename}") + + # include the commit info in a text file that will live next to the exe + set(_temp_info_file ${temp_dir}/build_tag.txt) + file(WRITE ${_temp_info_file} ${commit_info}) + + # update the URL and upload + string(REPLACE + ${commit_info} "Latest" + latest_upload_url ${in_url} + ) + + ly_upload_to_url( + ${latest_upload_url} + ${temp_dir} + ".*(${non_versioned_in_path_filename}|build_tag.txt)$" + ) + + # cleanup the temp files + file(REMOVE_RECURSE ${temp_dir}) + message(STATUS "Latest build update complete!") + +endfunction() \ No newline at end of file diff --git a/cmake/Platform/Common/PackagingPreBuild_common.cmake b/cmake/Platform/Common/PackagingPreBuild_common.cmake new file mode 100644 index 0000000000..e6b8a7796e --- /dev/null +++ b/cmake/Platform/Common/PackagingPreBuild_common.cmake @@ -0,0 +1,5 @@ +# For complete copyright and license terms please see the LICENSE at the root of this distribution. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT +# +# diff --git a/cmake/Platform/Common/RuntimeDependencies_common.cmake b/cmake/Platform/Common/RuntimeDependencies_common.cmake index 60e55453f8..a03f7f667b 100644 --- a/cmake/Platform/Common/RuntimeDependencies_common.cmake +++ b/cmake/Platform/Common/RuntimeDependencies_common.cmake @@ -272,7 +272,7 @@ function(ly_delayed_generate_runtime_dependencies) endforeach() # Generate the output file, note the STAMP_OUTPUT_FILE need to match with the one defined in LYWrappers.cmake - set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${target}_$.stamp) + set(STAMP_OUTPUT_FILE ${CMAKE_BINARY_DIR}/runtime_dependencies/$/${target}.stamp) set(target_file_dir "$") set(target_file "$") ly_file_read(${LY_RUNTIME_DEPENDENCIES_TEMPLATE} template_file) diff --git a/cmake/Platform/Common/runtime_dependencies_common.cmake.in b/cmake/Platform/Common/runtime_dependencies_common.cmake.in index 6e41dbaad1..8717710a3b 100644 --- a/cmake/Platform/Common/runtime_dependencies_common.cmake.in +++ b/cmake/Platform/Common/runtime_dependencies_common.cmake.in @@ -9,14 +9,22 @@ cmake_policy(SET CMP0012 NEW) # new policy for the if that evaluates a boolean out of "if(NOT ${same_location})" function(ly_copy source_file target_directory) - get_filename_component(target_filename "${source_file}" NAME) - cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND target_file "${target_directory}" "${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_file}" same_location) if(NOT ${same_location}) - file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300) - if("${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") + file(LOCK ${target_file}.lock GUARD FUNCTION TIMEOUT 300) + file(SIZE "${source_file}" source_file_size) + if(EXISTS "${target_file}") + file(SIZE "${target_file}" target_file_size) + else() + set(target_file_size 0) + endif() + if((NOT source_file_size EQUAL target_file_size) OR "${source_file}" IS_NEWER_THAN "${target_file}") message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") + file(MAKE_DIRECTORY "${full_target_directory}") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - file(TOUCH_NOCREATE ${target_directory}/${target_filename}) + file(TOUCH_NOCREATE ${target_file}) endif() endif() endfunction() diff --git a/cmake/Platform/Linux/CompilerSettings_linux.cmake b/cmake/Platform/Linux/CompilerSettings_linux.cmake new file mode 100644 index 0000000000..9bb629c53b --- /dev/null +++ b/cmake/Platform/Linux/CompilerSettings_linux.cmake @@ -0,0 +1,34 @@ +# +# 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 +# +# + +if(NOT CMAKE_C_COMPILER AND NOT CMAKE_CXX_COMPILER AND NOT "$ENV{CC}" AND NOT "$ENV{CXX}") + set(path_search + /bin + /usr/bin + /usr/local/bin + /sbin + /usr/sbin + /usr/local/sbin + ) + list(TRANSFORM path_search APPEND "/clang-[0-9]*") + file(GLOB clang_versions ${path_search}) + if(clang_versions) + # Find and pick the highest installed version + list(SORT clang_versions COMPARE NATURAL) + list(GET clang_versions 0 clang_higher_version_path) + string(REGEX MATCH "clang-([0-9.]*)" clang_higher_version ${clang_higher_version_path}) + if(CMAKE_MATCH_1) + set(CMAKE_C_COMPILER clang-${CMAKE_MATCH_1}) + set(CMAKE_CXX_COMPILER clang++-${CMAKE_MATCH_1}) + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() + else() + message(FATAL_ERROR "Clang not found, please install clang") + endif() +endif() diff --git a/cmake/Platform/Linux/Install_linux.cmake b/cmake/Platform/Linux/Install_linux.cmake index 02baa6e61e..0f5494131a 100644 --- a/cmake/Platform/Linux/Install_linux.cmake +++ b/cmake/Platform/Linux/Install_linux.cmake @@ -9,14 +9,27 @@ #! ly_setup_runtime_dependencies_copy_function_override: Linux-specific copy function to handle RPATH fixes set(ly_copy_template [[ function(ly_copy source_file target_directory) - file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - get_filename_component(target_filename_ext "${source_file}" LAST_EXT) - if("${source_file}" MATCHES "qt/plugins" AND "${target_filename_ext}" STREQUAL ".so") - get_filename_component(target_filename "${source_file}" NAME) - file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") - elseif("${source_file}" MATCHES "lrelease") - get_filename_component(target_filename "${source_file}" NAME) - file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../lib" NEW_RPATH "\$ORIGIN") + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND full_target_directory "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}" "${target_directory}") + cmake_path(APPEND target_file "${full_target_directory}" "${target_filename}") + if("${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying ${source_file} to ${full_target_directory}...") + file(MAKE_DIRECTORY "${full_target_directory}") + file(COPY "${source_file}" DESTINATION "${full_target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) + file(TOUCH_NOCREATE "${target_file}") + + # Special case for install + cmake_PATH(GET source_file EXTENSION target_filename_ext) + if("${target_filename_ext}" STREQUAL ".so") + if("${source_file}" MATCHES "qt/plugins") + file(RPATH_CHANGE FILE "${target_file}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") + endif() + if(CMAKE_INSTALL_DO_STRIP) + execute_process(COMMAND @CMAKE_STRIP@ "${target_file}") + endif() + elseif("${source_file}" MATCHES "lrelease") + file(RPATH_CHANGE FILE "${target_file}" OLD_RPATH "\$ORIGIN/../lib" NEW_RPATH "\$ORIGIN") + endif() endif() endfunction()]]) diff --git a/cmake/Platform/Linux/PAL_linux.cmake b/cmake/Platform/Linux/PAL_linux.cmake index 4941f143a6..b7fd062c8c 100644 --- a/cmake/Platform/Linux/PAL_linux.cmake +++ b/cmake/Platform/Linux/PAL_linux.cmake @@ -16,7 +16,7 @@ ly_set(PAL_TRAIT_BUILD_TESTS_SUPPORTED TRUE) ly_set(PAL_TRAIT_BUILD_UNITY_SUPPORTED TRUE) ly_set(PAL_TRAIT_BUILD_UNITY_EXCLUDE_EXTENSIONS) ly_set(PAL_TRAIT_BUILD_EXCLUDE_ALL_TEST_RUNS_FROM_IDE FALSE) -ly_set(PAL_TRAIT_BUILD_CPACK_SUPPORTED FALSE) +ly_set(PAL_TRAIT_BUILD_CPACK_SUPPORTED TRUE) ly_set(PAL_TRAIT_PROF_PIX_SUPPORTED FALSE) diff --git a/cmake/Platform/Linux/Packaging/postinst.in b/cmake/Platform/Linux/Packaging/postinst.in new file mode 100644 index 0000000000..c6c0ba228d --- /dev/null +++ b/cmake/Platform/Linux/Packaging/postinst.in @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +# +# 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 +# +# + +set -o errexit # exit on the first failure encountered + +{ + if [[ ! -f "/usr/lib/x86_64-linux-gnu/libffi.so.6" ]]; then + sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6 + fi + + pushd @CPACK_PACKAGING_INSTALL_PREFIX@ + python/get_python.sh + chown -R $SUDO_USER . + popd +} &> /dev/null # hide output diff --git a/cmake/Platform/Linux/Packaging/postrm.in b/cmake/Platform/Linux/Packaging/postrm.in new file mode 100644 index 0000000000..acda38bf1e --- /dev/null +++ b/cmake/Platform/Linux/Packaging/postrm.in @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# 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 +# +# + +set -o errexit # exit on the first failure encountered + +{ + pushd @CPACK_PACKAGING_INSTALL_PREFIX@ + popd +} &> /dev/null # hide output diff --git a/cmake/Platform/Linux/Packaging/prerm.in b/cmake/Platform/Linux/Packaging/prerm.in new file mode 100644 index 0000000000..5595d7010f --- /dev/null +++ b/cmake/Platform/Linux/Packaging/prerm.in @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# 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 +# +# + +set -o errexit # exit on the first failure encountered + +{ + # We dont remove this symlink that we potentially created because the user could have + # installed themselves. + #if [[ -L "/usr/lib/x86_64-linux-gnu/libffi.so.6" ]]; then + # sudo rm /usr/lib/x86_64-linux-gnu/libffi.so.6 + #fi + + pushd @CPACK_PACKAGING_INSTALL_PREFIX@ + # delete python downloads + rm -rf python/downloaded_packages python/runtime + popd +} &> /dev/null # hide output diff --git a/cmake/Platform/Linux/PackagingPostBuild_linux.cmake b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake new file mode 100644 index 0000000000..d92ee908fd --- /dev/null +++ b/cmake/Platform/Linux/PackagingPostBuild_linux.cmake @@ -0,0 +1,62 @@ +# +# 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 +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) + +file(${CPACK_PACKAGE_CHECKSUM} ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb file_checksum) +file(WRITE ${CPACK_TOPLEVEL_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb.sha256 "${file_checksum} ${CPACK_PACKAGE_FILE_NAME}.deb") + +if(CPACK_UPLOAD_URL) + + # use the internal default path if somehow not specified from cpack_configure_downloads + if(NOT CPACK_UPLOAD_DIRECTORY) + set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) + endif() + + # Copy the artifacts intended to be uploaded to a remote server into the folder specified + # through CPACK_UPLOAD_DIRECTORY. This mimics the same process cpack does natively for + # some other frameworks that have built-in online installer support. + message(STATUS "Copying packaging artifacts to upload directory...") + file(REMOVE_RECURSE ${CPACK_UPLOAD_DIRECTORY}) + file(GLOB _artifacts + "${CPACK_TOPLEVEL_DIRECTORY}/*.deb" + "${CPACK_TOPLEVEL_DIRECTORY}/*.sha256" + ) + file(COPY ${_artifacts} + DESTINATION ${CPACK_UPLOAD_DIRECTORY} + ) + message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") + + # TODO: copy gpg file to CPACK_UPLOAD_DIRECTORY + + ly_upload_to_url( + ${CPACK_UPLOAD_URL} + ${CPACK_UPLOAD_DIRECTORY} + ".*(.deb|.gpg|.sha256)$" + ) + + # for auto tagged builds, we will also upload a second copy of just the boostrapper + # to a special "Latest" folder under the branch in place of the commit date/hash + if(CPACK_AUTO_GEN_TAG) + + set(latest_deb_package "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb") + file(COPY_FILE + ${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_FILE_NAME}.deb + ${latest_deb_package} + ) + ly_upload_to_latest(${CPACK_UPLOAD_URL} ${latest_deb_package}) + + # TODO: upload gpg file to latest + + # Generate a checksum file for latest and upload it + set(latest_hash_file "${CPACK_UPLOAD_DIRECTORY}/${CPACK_PACKAGE_NAME}_latest.deb.sha256") + file(WRITE "${latest_hash_file}" "${file_checksum} ${CPACK_PACKAGE_NAME}_latest.deb") + ly_upload_to_latest(${CPACK_UPLOAD_URL} "${latest_hash_file}") + endif() +endif() diff --git a/cmake/Platform/Linux/PackagingPreBuild_linux.cmake b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake new file mode 100644 index 0000000000..31dc393307 --- /dev/null +++ b/cmake/Platform/Linux/PackagingPreBuild_linux.cmake @@ -0,0 +1,16 @@ +# +# 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 +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) + +if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package + return() +endif() + +# TODO: do signing diff --git a/cmake/Platform/Linux/Packaging_linux.cmake b/cmake/Platform/Linux/Packaging_linux.cmake new file mode 100644 index 0000000000..2e178429c3 --- /dev/null +++ b/cmake/Platform/Linux/Packaging_linux.cmake @@ -0,0 +1,56 @@ +# +# 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 +# +# + +set(CPACK_GENERATOR DEB) + +set(CPACK_PACKAGING_INSTALL_PREFIX "/opt/${CPACK_PACKAGE_NAME}/${LY_VERSION_STRING}") + +set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-linux-x86_64") +set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.tar.gz") +set(CPACK_CMAKE_PACKAGE_HASH "3f827544f9c82e74ddf5016461fdfcfea4ede58a26f82612f473bf6bfad8bfc2") + +# get all the package dependencies, extracted from scripts\build\build_node\Platform\Linux\package-list.ubuntu-focal.txt +set(package_dependencies + libffi7 + clang-12 + ninja-build + # Build Libraries + libglu1-mesa-dev # For Qt (GL dependency) + libxcb-xinerama0 # For Qt plugins at runtime + libxcb-xinput0 # For Qt plugins at runtime + libfontconfig1-dev # For Qt plugins at runtime + libcurl4-openssl-dev # For HttpRequestor + # libsdl2-dev # for WWise/Audio + libxcb-xkb-dev # For xcb keyboard input + libxkbcommon-x11-dev # For xcb keyboard input + libxkbcommon-dev # For xcb keyboard input + libxcb-xfixes0-dev # For mouse input + libxcb-xinput-dev # For mouse input + zlib1g-dev + mesa-common-dev +) +list(JOIN package_dependencies "," CPACK_DEBIAN_PACKAGE_DEPENDS) + +# Post-installation and pre/post removal scripts +configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postinst.in" + "${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postinst" + @ONLY +) +configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/prerm.in" + "${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/prerm" + @ONLY +) +configure_file("${LY_ROOT_FOLDER}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postrm.in" + "${CMAKE_BINARY_DIR}/cmake/Platform/${PAL_PLATFORM_NAME}/Packaging/postrm" + @ONLY +) +set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA + ${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/postinst + ${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/prerm + ${CMAKE_BINARY_DIR}/cmake/Platform/Linux/Packaging/postrm +) diff --git a/cmake/Platform/Linux/platform_linux_files.cmake b/cmake/Platform/Linux/platform_linux_files.cmake index fa5545cd26..d30959b8d2 100644 --- a/cmake/Platform/Linux/platform_linux_files.cmake +++ b/cmake/Platform/Linux/platform_linux_files.cmake @@ -10,11 +10,19 @@ set(FILES ../Common/Configurations_common.cmake ../Common/Clang/Configurations_clang.cmake ../Common/Install_common.cmake + ../Common/PackagingPostBuild_common.cmake + ../Common/PackagingPreBuild_common.cmake + CompilerSettings_linux.cmake Configurations_linux.cmake Install_linux.cmake LYTestWrappers_linux.cmake LYWrappers_linux.cmake + Packaging_linux.cmake + PackagingPostBuild_linux.cmake + PackagingPreBuild_linux.cmake PAL_linux.cmake PALDetection_linux.cmake RPathChange.cmake + runtime_dependencies_linux.cmake.in + RuntimeDependencies_linux.cmake ) diff --git a/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in b/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in index 394252e284..4ccf123e27 100644 --- a/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in +++ b/cmake/Platform/Linux/runtime_dependencies_linux.cmake.in @@ -9,23 +9,33 @@ cmake_policy(SET CMP0012 NEW) # new policy for the if that evaluates a boolean out of "if(NOT ${same_location})" function(ly_copy source_file target_directory) - get_filename_component(target_filename "${source_file}" NAME) - get_filename_component(target_filename_ext "${source_file}" LAST_EXT) - cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND target_file "${target_directory}" "${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_file}" same_location) if(NOT ${same_location}) - file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300) - if("${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") + file(LOCK ${target_file}.lock GUARD FUNCTION TIMEOUT 300) + file(SIZE "${source_file}" source_file_size) + if(EXISTS "${target_file}") + file(SIZE "${target_file}" target_file_size) + else() + set(target_file_size 0) + endif() + if((NOT source_file_size EQUAL target_file_size) OR "${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") + file(MAKE_DIRECTORY "${full_target_directory}") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - + file(TOUCH_NOCREATE "${target_file}") + # Special case, shared libraries that are copied from qt/plugins have their RPATH set to \$ORIGIN/../../lib # which is the correct relative path based on the source location. But when we copy it to their subfolder, # the rpath needs to be adjusted to the parent ($ORIGIN/..) if("${source_file}" MATCHES "qt/plugins" AND "${target_filename_ext}" STREQUAL ".so") - file(RPATH_CHANGE FILE "${target_directory}/${target_filename}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") + file(RPATH_CHANGE FILE "${target_file}" OLD_RPATH "\$ORIGIN/../../lib" NEW_RPATH "\$ORIGIN/..") endif() - endif() endif() endfunction() @LY_COPY_COMMANDS@ + +file(TOUCH @STAMP_OUTPUT_FILE@) diff --git a/cmake/Platform/Mac/InstallUtils_mac.cmake.in b/cmake/Platform/Mac/InstallUtils_mac.cmake.in index d73c4db459..89ce4a59f2 100644 --- a/cmake/Platform/Mac/InstallUtils_mac.cmake.in +++ b/cmake/Platform/Mac/InstallUtils_mac.cmake.in @@ -130,27 +130,36 @@ endfunction() function(ly_copy source_file target_directory) - if("${source_file}" MATCHES "\\.[Ff]ramework[^\\.]") + if("${source_file}" MATCHES "\\.[Ff]ramework") # fixup origin to copy the whole Framework folder string(REGEX REPLACE "(.*\\.[Ff]ramework).*" "\\1" source_file "${source_file}") endif() - get_filename_component(target_filename "${source_file}" NAME) - file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - - # Our Qt and Python frameworks aren't in the correct bundle format to be codesigned. - if("${target_filename}" MATCHES "(Qt[^.]+)\\.[Ff]ramework") - fixup_qt_framework(${CMAKE_MATCH_1} "${target_directory}/${target_filename}") - # For some Qt frameworks(QtCore), signing the bundle doesn't work because of bundle - # format issues(despite the fixes above). But once we've patched the framework above, there's - # only one executable that we need to sign so we can do it directly. - set(target_filename "${target_filename}/Versions/5/${CMAKE_MATCH_1}") - elseif("${target_filename}" MATCHES "Python.framework") - fixup_python_framework("${target_directory}/${target_filename}") - codesign_python_framework_binaries("${target_directory}/${target_filename}") + + cmake_path(GET source_file FILENAME target_filename) + cmake_path(APPEND full_target_directory "$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}" "${target_directory}") + cmake_path(APPEND target_file "${full_target_directory}" "${target_filename}") + + if("${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying ${source_file} to ${full_target_directory}...") + file(MAKE_DIRECTORY "${full_target_directory}") + file(COPY "${source_file}" DESTINATION "${full_target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) + file(TOUCH_NOCREATE "${target_file}") + + # Our Qt and Python frameworks aren't in the correct bundle format to be codesigned. + if("${target_filename}" MATCHES "(Qt[^.]+)\\.[Ff]ramework") + fixup_qt_framework(${CMAKE_MATCH_1} "${target_file}") + # For some Qt frameworks(QtCore), signing the bundle doesn't work because of bundle + # format issues(despite the fixes above). But once we've patched the framework above, there's + # only one executable that we need to sign so we can do it directly. + set(target_filename "${target_filename}/Versions/5/${CMAKE_MATCH_1}") + elseif("${target_filename}" MATCHES "Python.framework") + fixup_python_framework("${target_file}") + codesign_python_framework_binaries("${target_file}") + endif() + codesign_file("${target_file}" "none") endif() - codesign_file("${target_directory}/${target_filename}" "none") endfunction() diff --git a/cmake/Platform/Mac/Install_mac.cmake b/cmake/Platform/Mac/Install_mac.cmake index c75d860c3e..d5ab5d0fed 100644 --- a/cmake/Platform/Mac/Install_mac.cmake +++ b/cmake/Platform/Mac/Install_mac.cmake @@ -147,4 +147,3 @@ function(ly_post_install_steps) ") endfunction() - diff --git a/cmake/Platform/Mac/PackagingPostBuild_mac.cmake b/cmake/Platform/Mac/PackagingPostBuild_mac.cmake new file mode 100644 index 0000000000..5fa3787c21 --- /dev/null +++ b/cmake/Platform/Mac/PackagingPostBuild_mac.cmake @@ -0,0 +1,10 @@ +# +# 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 +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) diff --git a/cmake/Platform/Mac/PackagingPreBuild_mac.cmake b/cmake/Platform/Mac/PackagingPreBuild_mac.cmake new file mode 100644 index 0000000000..1d30e21767 --- /dev/null +++ b/cmake/Platform/Mac/PackagingPreBuild_mac.cmake @@ -0,0 +1,10 @@ +# +# 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 +# +# + +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) diff --git a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in index 11551f608f..892a90640f 100644 --- a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in +++ b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in @@ -34,7 +34,7 @@ endif() function(ly_copy source_file target_directory) - get_filename_component(target_filename "${source_file}" NAME) + cmake_path(GET source_file FILENAME target_filename) # If target_directory is a bundle if("${target_directory}" MATCHES "\\.app/Contents/MacOS") @@ -113,20 +113,37 @@ function(ly_copy source_file target_directory) endif() - cmake_path(COMPARE "${source_file}" EQUAL "${target_directory}/${target_filename}" same_location) + cmake_path(APPEND target_file "${target_directory}" "${target_filename}") + cmake_path(COMPARE "${source_file}" EQUAL "${target_file}" same_location) if(NOT ${same_location}) if(NOT EXISTS "${target_directory}") file(MAKE_DIRECTORY "${target_directory}") endif() - if(NOT EXISTS "${target_directory}/${target_filename}" OR "${source_file}" IS_NEWER_THAN "${target_directory}/${target_filename}") - message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") - if(NOT target_is_bundle) - # if it is a bundle, there is no contention about the files in the destination, each bundle target will copy everything - # we dont want these files to invalidate the bundle and cause a new signature - file(LOCK ${target_directory}/${target_filename}.lock GUARD FUNCTION TIMEOUT 300) + + set(is_framework FALSE) + if("${source_file}" MATCHES "\\.[Ff]ramework") + set(is_framework TRUE) + endif() + if(NOT is_framework) + # if it is a bundle, there is no contention about the files in the destination, each bundle target will copy everything + # we dont want these files to invalidate the bundle and cause a new signature + file(LOCK ${target_file}.lock GUARD FUNCTION TIMEOUT 300) + file(SIZE "${source_file}" source_file_size) + if(EXISTS "${target_file}") + file(SIZE "${target_file}" target_file_size) + else() + set(target_file_size 0) endif() + else() + set(source_file_size 0) + set(target_file_size 0) + endif() + + if((NOT source_file_size EQUAL target_file_size) OR "${source_file}" IS_NEWER_THAN "${target_file}") + message(STATUS "Copying \"${source_file}\" to \"${target_directory}\"...") + file(MAKE_DIRECTORY "${target_directory}") file(COPY "${source_file}" DESTINATION "${target_directory}" FILE_PERMISSIONS @LY_COPY_PERMISSIONS@ FOLLOW_SYMLINK_CHAIN) - file(TOUCH_NOCREATE ${target_directory}/${target_filename}) + file(TOUCH_NOCREATE "${target_file}") set(anything_new TRUE PARENT_SCOPE) endif() endif() diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake similarity index 52% rename from cmake/Platform/Windows/PackagingPostBuild.cmake rename to cmake/Platform/Windows/PackagingPostBuild_windows.cmake index ac457bea87..0993135c23 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild_windows.cmake @@ -6,6 +6,9 @@ # # +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPostBuild_common.cmake) + # convert the path to a windows style path using string replace because TO_NATIVE_PATH # only works on real paths string(REPLACE "/" "\\" _fixed_package_install_dir ${CPACK_PACKAGE_INSTALL_DIRECTORY}) @@ -56,8 +59,7 @@ set(_light_command ) if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) - file(TO_NATIVE_PATH "${_root_path}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) + file(TO_NATIVE_PATH "${LY_ROOT_FOLDER}/scripts/signer/Platform/Windows/signer.ps1" _sign_script) unset(_signing_command) find_program(_psiexec_path psexec.exe) @@ -111,16 +113,12 @@ if(NOT ${_light_result} EQUAL 0) message(FATAL_ERROR "An error occurred invoking light.exe. ${_light_errors}") endif() -file(COPY ${_bootstrap_output_file} - DESTINATION ${CPACK_PACKAGE_DIRECTORY} -) - -message(STATUS "Bootstrap installer generated to ${CPACK_PACKAGE_DIRECTORY}/${_bootstrap_filename}") +message(STATUS "Bootstrap installer generated to ${_bootstrap_output_file}") if(CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package - message(STATUS "Signing bootstrap installer in ${CPACK_PACKAGE_DIRECTORY}") + message(STATUS "Signing bootstrap installer in ${_bootstrap_output_file}") execute_process( - COMMAND ${_signing_command} -bootstrapPath ${CPACK_PACKAGE_DIRECTORY}/${_bootstrap_filename} + COMMAND ${_signing_command} -bootstrapPath ${_bootstrap_output_file} RESULT_VARIABLE _signing_result ERROR_VARIABLE _signing_errors OUTPUT_VARIABLE _signing_output @@ -137,113 +135,32 @@ if(NOT CPACK_UPLOAD_DIRECTORY) set(CPACK_UPLOAD_DIRECTORY ${CPACK_PACKAGE_DIRECTORY}/CPackUploads) endif() -# copy the artifacts intended to be uploaded to a remote server into the folder specified -# through cpack_configure_downloads. this mimics the same process cpack does natively for +# Copy the artifacts intended to be uploaded to a remote server into the folder specified +# through CPACK_UPLOAD_DIRECTORY. This mimics the same process cpack does natively for # some other frameworks that have built-in online installer support. -message(STATUS "Copying installer artifacts to upload directory...") +message(STATUS "Copying packaging artifacts to upload directory...") file(REMOVE_RECURSE ${CPACK_UPLOAD_DIRECTORY}) -file(GLOB _artifacts "${_cpack_wix_out_dir}/*.msi" "${_cpack_wix_out_dir}/*.cab") +file(GLOB _artifacts + "${_cpack_wix_out_dir}/*.msi" + "${_cpack_wix_out_dir}/*.cab" + "${_cpack_wix_out_dir}/*.exe" +) file(COPY ${_artifacts} DESTINATION ${CPACK_UPLOAD_DIRECTORY} ) message(STATUS "Artifacts copied to ${CPACK_UPLOAD_DIRECTORY}") -if(NOT CPACK_UPLOAD_URL) - return() -endif() - -file(TO_NATIVE_PATH "${_cpack_wix_out_dir}" _cpack_wix_out_dir) -file(TO_NATIVE_PATH "${_root_path}/python/python.cmd" _python_cmd) -file(TO_NATIVE_PATH "${_root_path}/scripts/build/tools/upload_to_s3.py" _upload_script) - -function(upload_to_s3 in_url in_local_path in_file_regex) - - # strip the scheme and extract the bucket/key prefix from the URL - string(REPLACE "s3://" "" _stripped_url ${in_url}) - string(REPLACE "/" ";" _tokens ${_stripped_url}) - - list(POP_FRONT _tokens _bucket) - string(JOIN "/" _prefix ${_tokens}) - - set(_extra_args [[{"ACL":"bucket-owner-full-control"}]]) - - set(_upload_command - ${_python_cmd} -s - -u ${_upload_script} - --base_dir ${in_local_path} - --file_regex="${in_file_regex}" - --bucket ${_bucket} - --key_prefix ${_prefix} - --extra_args ${_extra_args} - ) - - if(CPACK_AWS_PROFILE) - list(APPEND _upload_command --profile ${CPACK_AWS_PROFILE}) - endif() - - execute_process( - COMMAND ${_upload_command} - RESULT_VARIABLE _upload_result - OUTPUT_VARIABLE _upload_output - OUTPUT_STRIP_TRAILING_WHITESPACE +if(CPACK_UPLOAD_URL) + file(TO_NATIVE_PATH "${_cpack_wix_out_dir}" _cpack_wix_out_dir) + ly_upload_to_url( + ${CPACK_UPLOAD_URL} + ${_cpack_wix_out_dir} + ".*(cab|exe|msi)$" ) - if (NOT ${_upload_result} EQUAL 0) - message(FATAL_ERROR "An error occurred uploading to s3.\nOutput:\n${_upload_output}") + # for auto tagged builds, we will also upload a second copy of just the boostrapper + # to a special "Latest" folder under the branch in place of the commit date/hash + if(CPACK_AUTO_GEN_TAG) + ly_upload_to_latest(${CPACK_UPLOAD_URL} ${_bootstrap_output_file}) endif() -endfunction() - -message(STATUS "Uploading artifacts to ${CPACK_UPLOAD_URL}") -upload_to_s3( - ${CPACK_UPLOAD_URL} - ${_cpack_wix_out_dir} - ".*(cab|exe|msi)$" -) -message(STATUS "Artifact uploading complete!") - -# for auto tagged builds, we will also upload a second copy of just the boostrapper -# to a special "Latest" folder under the branch in place of the commit date/hash -if(CPACK_AUTO_GEN_TAG) - message(STATUS "Updating latest tagged build") - - # make sure we can extra the commit info from the URL first - string(REGEX MATCH "([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]-[0-9a-zA-Z]+)" - _commit_info ${CPACK_UPLOAD_URL} - ) - if(NOT _commit_info) - message(FATAL_ERROR "Failed to extract the build tag") - endif() - - set(_temp_dir ${_cpack_wix_out_dir}/temp) - if(NOT EXISTS ${_temp_dir}) - file(MAKE_DIRECTORY ${_temp_dir}) - endif() - - # strip the version number form the exe name in the one uploaded to latest - string(TOLOWER "${CPACK_PACKAGE_NAME}_installer.exe" _non_versioned_exe) - set(_temp_exe_copy ${_temp_dir}/${_non_versioned_exe}) - - file(COPY ${_bootstrap_output_file} DESTINATION ${_temp_dir}) - file(RENAME "${_temp_dir}/${_bootstrap_filename}" ${_temp_exe_copy}) - - # include the commit info in a text file that will live next to the exe - set(_temp_info_file ${_temp_dir}/build_tag.txt) - file(WRITE ${_temp_info_file} ${_commit_info}) - - # update the URL and upload - string(REPLACE - ${_commit_info} "Latest" - _latest_upload_url ${CPACK_UPLOAD_URL} - ) - - upload_to_s3( - ${_latest_upload_url} - ${_temp_dir} - ".*(${_non_versioned_exe}|build_tag.txt)$" - ) - - # cleanup the temp files - file(REMOVE_RECURSE ${_temp_dir}) - - message(STATUS "Latest build update complete!") endif() diff --git a/cmake/Platform/Windows/PackagingPreBuild.cmake b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake similarity index 93% rename from cmake/Platform/Windows/PackagingPreBuild.cmake rename to cmake/Platform/Windows/PackagingPreBuild_windows.cmake index 7f2eedf352..29995518da 100644 --- a/cmake/Platform/Windows/PackagingPreBuild.cmake +++ b/cmake/Platform/Windows/PackagingPreBuild_windows.cmake @@ -6,6 +6,9 @@ # # +file(REAL_PATH "${CPACK_SOURCE_DIR}/.." LY_ROOT_FOLDER) +include(${LY_ROOT_FOLDER}/cmake/Platform/Common/PackagingPreBuild_common.cmake) + if(NOT CPACK_UPLOAD_URL) # Skip signing if we are not uploading the package return() endif() diff --git a/cmake/Platform/Windows/Packaging_windows.cmake b/cmake/Platform/Windows/Packaging_windows.cmake index 7b8f5a6c19..f24e9dee1c 100644 --- a/cmake/Platform/Windows/Packaging_windows.cmake +++ b/cmake/Platform/Windows/Packaging_windows.cmake @@ -23,7 +23,6 @@ set(CPACK_WIX_ROOT ${LY_INSTALLER_WIX_ROOT}) set(CPACK_GENERATOR WIX) -set(CPACK_THREADS 0) set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-windows-x86_64") set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.zip") set(CPACK_CMAKE_PACKAGE_HASH "15a49e2ab81c1822d75b1b1a92f7863f58e31f6d6aac1c4103eef2b071be3112") @@ -105,46 +104,34 @@ set(_raw_text_license [[ #(loc.InstallEulaAcceptance) ]]) -# The offline installer generation will be a single monolithic MSI. The WIX burn tool for the bootstrapper EXE has a size limitation. -# So we will exclude the generation of the boostrapper EXE in the offline case. -if(LY_INSTALLER_DOWNLOAD_URL) - set(WIX_THEME_WARNING_IMAGE ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/warning.png) - - if(LY_INSTALLER_LICENSE_URL) - set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_hyperlink_license}) - set(WIX_THEME_EULA_ACCEPTANCE_TEXT "<a href=\"#\">Terms of Use</a>") - else() - set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_raw_text_license}) - set(WIX_THEME_EULA_ACCEPTANCE_TEXT "Terms of Use above") - endif() - - # theme ux file - configure_file( - "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.xml.in" - "${CPACK_BINARY_DIR}/BootstrapperTheme.xml" - @ONLY - ) +set(WIX_THEME_WARNING_IMAGE ${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/warning.png) - # theme localization file - configure_file( - "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.wxl.in" - "${CPACK_BINARY_DIR}/BootstrapperTheme.wxl" - @ONLY - ) +if(LY_INSTALLER_LICENSE_URL) + set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_hyperlink_license}) + set(WIX_THEME_EULA_ACCEPTANCE_TEXT "<a href=\"#\">Terms of Use</a>") +else() + set(WIX_THEME_INSTALL_LICENSE_ELEMENTS ${_raw_text_license}) + set(WIX_THEME_EULA_ACCEPTANCE_TEXT "Terms of Use above") +endif() - set(_embed_artifacts "no") +# theme ux file +configure_file( + "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.xml.in" + "${CPACK_BINARY_DIR}/BootstrapperTheme.xml" + @ONLY +) - # the bootstrapper will at the very least need a different upgrade guid - generate_wix_guid(CPACK_WIX_BOOTSTRAP_UPGRADE_GUID "${_guid_seed_base}_Bootstrap_UpgradeCode") +# theme localization file +configure_file( + "${CPACK_SOURCE_DIR}/Platform/Windows/Packaging/BootstrapperTheme.wxl.in" + "${CPACK_BINARY_DIR}/BootstrapperTheme.wxl" + @ONLY +) - set(CPACK_PRE_BUILD_SCRIPTS - ${CPACK_SOURCE_DIR}/Platform/Windows/PackagingPreBuild.cmake - ) +set(_embed_artifacts "no") - set(CPACK_POST_BUILD_SCRIPTS - ${CPACK_SOURCE_DIR}/Platform/Windows/PackagingPostBuild.cmake - ) -endif() +# the bootstrapper will at the very least need a different upgrade guid +generate_wix_guid(CPACK_WIX_BOOTSTRAP_UPGRADE_GUID "${_guid_seed_base}_Bootstrap_UpgradeCode") set(CPACK_WIX_CANDLE_EXTRA_FLAGS -dCPACK_EMBED_ARTIFACTS=${_embed_artifacts} diff --git a/cmake/Platform/Windows/platform_windows_files.cmake b/cmake/Platform/Windows/platform_windows_files.cmake index fcc47ab6eb..984d985380 100644 --- a/cmake/Platform/Windows/platform_windows_files.cmake +++ b/cmake/Platform/Windows/platform_windows_files.cmake @@ -15,6 +15,8 @@ set(FILES ../Common/MSVC/VisualStudio_common.cmake ../Common/Install_common.cmake ../Common/LYWrappers_default.cmake + ../Common/PackagingPostBuild_common.cmake + ../Common/PackagingPreBuild_common.cmake ../Common/TargetIncludeSystemDirectories_unsupported.cmake Configurations_windows.cmake LYTestWrappers_windows.cmake @@ -23,7 +25,8 @@ set(FILES PALDetection_windows.cmake Install_windows.cmake Packaging_windows.cmake - PackagingPostBuild.cmake + PackagingPostBuild_windows.cmake + PackagingPreBuild_windows.cmake Packaging/Bootstrapper.wxs Packaging/BootstrapperTheme.wxl.in Packaging/BootstrapperTheme.xml.in diff --git a/cmake/SettingsRegistry.cmake b/cmake/SettingsRegistry.cmake index c677aba7cf..e8c14ac8a0 100644 --- a/cmake/SettingsRegistry.cmake +++ b/cmake/SettingsRegistry.cmake @@ -33,6 +33,34 @@ set(gems_json_template [[ [=[ }]=] ) +#!ly_detect_cycle_through_visitation: Detects if there is a cycle based on a list of visited +# items. If the passed item is in the list, then there is a cycle. +# \arg:item - item being checked for the cycle +# \arg:visited_items - list of visited items +# \arg:visited_items_var - list of visited items variable, "item" will be added to the list +# \arg:cycle(variable) - empty string if there is no cycle (an empty string in cmake evaluates +# to false). If there is a cycle a cycle dependency string detailing the sequence of items +# that produce a cycle, e.g. A --> B --> C --> A +# +function(ly_detect_cycle_through_visitation item visited_items visited_items_var cycle) + if(item IN_LIST visited_items) + unset(dependency_cycle_loop) + foreach(visited_item IN LISTS visited_items) + string(APPEND dependency_cycle_loop ${visited_item}) + if(visited_item STREQUAL item) + string(APPEND dependency_cycle_loop " (cycle starts)") + endif() + string(APPEND dependency_cycle_loop " --> ") + endforeach() + string(APPEND dependency_cycle_loop "${item} (cycle ends)") + set(${cycle} "${dependency_cycle_loop}" PARENT_SCOPE) + else() + set(cycle "" PARENT_SCOPE) # no cycles + endif() + list(APPEND visited_items ${item}) + set(${visited_items_var} "${visited_items}" PARENT_SCOPE) +endfunction() + #!ly_get_gem_load_dependencies: Retrieves the list of "load" dependencies for a target # Visits through only MANUALLY_ADDED_DEPENDENCIES of targets with a GEM_MODULE property # to determine which gems a target needs to load @@ -44,6 +72,13 @@ function(ly_get_gem_load_dependencies ly_GEM_LOAD_DEPENDENCIES ly_TARGET) if(NOT TARGET ${ly_TARGET}) return() # Nothing to do endif() + # Internally we use a third parameter to pass the list of targets that we have traversed. This is + # used to detect runtime cycles + if(ARGC EQUAL 3) + set(ly_CYCLE_DETECTION_TARGETS ${ARGV2}) + else() + set(ly_CYCLE_DETECTION_TARGETS "") + endif() # Optimize the search by caching gem load dependencies get_property(are_dependencies_cached GLOBAL PROPERTY LY_GEM_LOAD_DEPENDENCIES_${ly_TARGET} SET) @@ -54,6 +89,13 @@ function(ly_get_gem_load_dependencies ly_GEM_LOAD_DEPENDENCIES ly_TARGET) return() endif() + # detect cycles + unset(cycle_detected) + ly_detect_cycle_through_visitation(${ly_TARGET} "${ly_CYCLE_DETECTION_TARGETS}" ly_CYCLE_DETECTION_TARGETS cycle_detected) + if(cycle_detected) + message(FATAL_ERROR "Runtime dependency detected: ${cycle_detected}") + endif() + unset(all_gem_load_dependencies) # For load dependencies, we want to copy over the dependency and traverse them @@ -69,7 +111,7 @@ function(ly_get_gem_load_dependencies ly_GEM_LOAD_DEPENDENCIES ly_TARGET) # and recurse into its manually added dependencies if (is_gem_target) unset(dependencies) - ly_get_gem_load_dependencies(dependencies ${dealias_load_dependency}) + ly_get_gem_load_dependencies(dependencies ${dealias_load_dependency} "${ly_CYCLE_DETECTION_TARGETS}") list(APPEND all_gem_load_dependencies ${dependencies}) list(APPEND all_gem_load_dependencies ${dealias_load_dependency}) endif() diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 662e75c3db..de93ebefef 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -11,3 +11,8 @@ set(LY_VERSION_COPYRIGHT_YEAR ${current_year} CACHE STRING "Open 3D Engine's cop set(LY_VERSION_STRING "0.0.0.0" CACHE STRING "Open 3D Engine's version") set(LY_VERSION_BUILD_NUMBER 0 CACHE STRING "Open 3D Engine's build number") set(LY_VERSION_ENGINE_NAME "o3de" CACHE STRING "Open 3D Engine's engine name") + +if("$ENV{O3DE_VERSION}") + # Overriding through environment + set(LY_VERSION_STRING "$ENV{O3DE_VERSION}") +endif() diff --git a/engine.json b/engine.json index 05ccd0abfd..2d182c78aa 100644 --- a/engine.json +++ b/engine.json @@ -90,6 +90,7 @@ "AutomatedTesting" ], "templates": [ + "Templates/GemRepo", "Templates/AssetGem", "Templates/DefaultGem", "Templates/DefaultProject", diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index beb4a21620..98011503af 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -102,10 +102,6 @@ def IsJobEnabled(branchName, buildTypeMap, pipelineName, platformName) { } } -def IsAPLogUpload(branchName, jobName) { - return !IsPullRequest(branchName) && jobName.toLowerCase().contains('asset') && env.AP_LOGS_S3_BUCKET -} - def GetRunningPipelineName(JENKINS_JOB_NAME) { // If the job name has an underscore def job_parts = JENKINS_JOB_NAME.tokenize('/')[0].tokenize('_') @@ -433,26 +429,37 @@ def ExportTestScreenshots(Map options, String branchName, String platformName, S } } -def UploadAPLogs(Map options, String branchName, String platformName, String jobName, String workspace, Map params) { - dir("${workspace}/${ENGINE_REPOSITORY_NAME}") { - projects = params.CMAKE_LY_PROJECTS.split(",") - projects.each{ project -> - def apLogsPath = "${project}/user/log" - def s3UploadScriptPath = "scripts/build/tools/upload_to_s3.py" - if(env.IS_UNIX) { - pythonPath = "${options.PYTHON_DIR}/python.sh" - } - else { - pythonPath = "${options.PYTHON_DIR}/python.cmd" - } - def command = "${pythonPath} -u ${s3UploadScriptPath} --base_dir ${apLogsPath} " + - "--file_regex \".*\" --bucket ${env.AP_LOGS_S3_BUCKET} " + - "--search_subdirectories True --key_prefix ${env.JENKINS_JOB_NAME}/${branchName}/${env.BUILD_NUMBER}/${platformName}/${jobName} " + - '--extra_args {\\"ACL\\":\\"bucket-owner-full-control\\"}' - palSh(command, "Uploading AP logs for job ${jobName} for branch ${branchName}", false) +// All files are included by default. +// --include will only re-include files that have been excluded from an --exclude filter. +//See more details at https://docs.aws.amazon.com/cli/latest/reference/s3/#use-of-exclude-and-include-filters +def ArchiveArtifactsOnS3(String artifactsSource, String s3Prefix="", boolean recursive=false, List includes=[], List excludes=[]) { + if (!fileExists(s3Prefix)) { + palMkdir(s3Prefix) + } + palSh("echo ${env.BUILD_URL} > ${s3Prefix}/build_url.txt") + // archiveArtifacts is very slow, so we only archive one file and upload the rest artifacts to the same bucket using S3 CLI. + archiveArtifacts artifacts: "${s3Prefix}/build_url.txt" + def command = "aws s3 cp ${artifactsSource} s3://${env.JENKINS_ARTIFACTS_S3_BUCKET}/${env.JENKINS_JOB_NAME}/${env.BUILD_NUMBER}/artifacts/${s3Prefix} " + excludes.each{ exclude -> + command += "--exclude \"${exclude}\" " + } + includes.each{ include -> + command += "--include \"${include}\" " + } + if (recursive) command += "--recursive " + palSh(command, "Archiving artifacts to ${env.JENKINS_JOB_NAME}/${env.BUILD_NUMBER}/artifacts/${s3Prefix}", false) +} + +def UploadAPLogs(String platformName, String jobName, String workspace, Map params) { + catchError(message: "Error archiving AssetProcessor logs (this won't fail the build)", buildResult: 'UNSTABLE', stageResult: 'FAILURE') { + dir("${workspace}/${ENGINE_REPOSITORY_NAME}") { + projects = params.CMAKE_LY_PROJECTS.split(",") + projects.each{ project -> + ArchiveArtifactsOnS3("${project}/user/log", "ap_logs/${platformName}/${jobName}/${project}", true) } } } +} def PostBuildCommonSteps(String workspace, boolean mount = true) { echo 'Starting post-build common steps...' @@ -517,10 +524,10 @@ def CreateExportTestScreenshotsStage(Map pipelineConfig, String branchName, Stri } } -def CreateUploadAPLogsStage(Map pipelineConfig, String branchName, String platformName, String jobName, String workspace, Map params) { +def CreateUploadAPLogsStage(String platformName, String jobName, String workspace, Map params) { return { stage("${jobName}_upload_ap_logs") { - UploadAPLogs(pipelineConfig, branchName, platformName, jobName, workspace, params) + UploadAPLogs(platformName, jobName, workspace, params) } } } @@ -576,8 +583,8 @@ def CreateSingleNode(Map pipelineConfig, def platform, def build_job, Map envVar error "Node disconnected during build: ${e}" // Error raised to retry stage on a new node } } - if (IsAPLogUpload(branchName, build_job_name)) { - CreateUploadAPLogsStage(pipelineConfig, branchName, platform.key, build_job_name, envVars['WORKSPACE'], platform.value.build_types[build_job_name].PARAMETERS).call() + if (build_job_name.toLowerCase().contains('asset') && env.IS_UPLOAD_AP_LOGS?.toBoolean()) { + CreateUploadAPLogsStage(platform.key, build_job_name, envVars['WORKSPACE'], platform.value.build_types[build_job_name].PARAMETERS).call() } // All other errors will be raised outside the retry block currentResult = envVars['ON_FAILURE_MARK'] ?: 'FAILURE' diff --git a/scripts/build/Platform/Android/build_config.json b/scripts/build/Platform/Android/build_config.json index 5e2da44a3c..dbdafcf97d 100644 --- a/scripts/build/Platform/Android/build_config.json +++ b/scripts/build/Platform/Android/build_config.json @@ -35,7 +35,7 @@ "PARAMETERS": { "CONFIGURATION":"debug", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\"", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\"", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" @@ -60,7 +60,7 @@ "PARAMETERS": { "CONFIGURATION":"profile", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\"", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\"", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" @@ -76,7 +76,7 @@ "PARAMETERS": { "CONFIGURATION":"profile", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\" -DLY_UNITY_BUILD=FALSE", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\" -DLY_UNITY_BUILD=FALSE", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" @@ -112,7 +112,7 @@ "PARAMETERS": { "CONFIGURATION":"release", "OUTPUT_DIRECTORY":"build\\android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\"", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\"", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" @@ -128,7 +128,7 @@ "PARAMETERS": { "CONFIGURATION":"release", "OUTPUT_DIRECTORY":"build\\mono_android", - "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_3RDPARTY_PATH!\\android-ndk\\r21d\" -DLY_MONOLITHIC_GAME=TRUE", + "CMAKE_OPTIONS":"-G \"Ninja Multi-Config\" -DCMAKE_TOOLCHAIN_FILE=cmake\\Platform\\Android\\Toolchain_android.cmake -DANDROID_ABI=arm64-v8a -DANDROID_ARM_MODE=arm -DANDROID_ARM_NEON=FALSE -DANDROID_NATIVE_API_LEVEL=21 -DLY_NDK_DIR=\"!LY_NDK_DIR!\" -DLY_MONOLITHIC_GAME=TRUE", "CMAKE_LY_PROJECTS":"AutomatedTesting", "CMAKE_TARGET":"all", "CMAKE_BUILD_ARGS":"-j!NUMBER_OF_PROCESSORS!" diff --git a/scripts/build/Platform/Android/gradle_windows.cmd b/scripts/build/Platform/Android/gradle_windows.cmd index b353a8f641..bb98799444 100644 --- a/scripts/build/Platform/Android/gradle_windows.cmd +++ b/scripts/build/Platform/Android/gradle_windows.cmd @@ -23,23 +23,6 @@ IF NOT EXIST "%GRADLE_BUILD_HOME%" ( GOTO :error ) -IF NOT EXIST "%LY_NINJA_PATH%" ( - SET LY_NINJA_PATH=%LY_3RDPARTY_PATH%/ninja/1.10.1/Windows -) -IF NOT EXIST "%LY_NINJA_PATH%" ( - ECHO [ci_build] FAIL: LY_NINJA_PATH=%LY_NINJA_PATH% - GOTO :error -) - -REM Make sure that Ninja in the Path variable -ECHO Testing ninja on the current path variable -call ninja --version -IF %ERRORLEVEL%==0 GOTO ninja_on_path -ECHO Ninja wasnt in the call path, add the value set by LY_NINJA_PATH -SET PATH=%PATH%;%LY_NINJA_PATH% - -:ninja_on_path - IF NOT "%ANDROID_GRADLE_PLUGIN%" == "" ( set ANDROID_GRADLE_PLUGIN_OPTION=--gradle-plugin-version=%ANDROID_GRADLE_PLUGIN% ) @@ -132,11 +115,11 @@ IF "%GENERATE_SIGNED_APK%"=="true" ( ECHO Using keystore file at %CI_ANDROID_KEYSTORE_FILE_ABS% ) - ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing - CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing ) ELSE ( - ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% %GRADLE_OVERRIDE_OPTION% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing - CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% %GRADLE_OVERRIDE_OPTION% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing ) REM Validate the android project generation diff --git a/scripts/build/Platform/Android/pipeline.json b/scripts/build/Platform/Android/pipeline.json index 551374a027..230d5d3477 100644 --- a/scripts/build/Platform/Android/pipeline.json +++ b/scripts/build/Platform/Android/pipeline.json @@ -2,7 +2,8 @@ "ENV": { "GRADLE_HOME": "C:/Gradle/gradle-7.0", "NODE_LABEL": "windows-b3c8994f1", - "LY_3RDPARTY_PATH": "C:/ly/3rdParty", + "LY_3RDPARTY_PATH": "D:/workspace/3rdParty", + "LY_NDK_DIR": "C:/ly/3rdParty/android-ndk/r21d", "TIMEOUT": 30, "WORKSPACE": "D:/workspace", "MOUNT_VOLUME": true diff --git a/scripts/build/Platform/Linux/build_config.json b/scripts/build/Platform/Linux/build_config.json index f485f43315..84d1726d47 100644 --- a/scripts/build/Platform/Linux/build_config.json +++ b/scripts/build/Platform/Linux/build_config.json @@ -37,7 +37,7 @@ "PARAMETERS": { "CONFIGURATION": "debug", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -53,7 +53,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -66,7 +66,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -80,7 +80,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::PrefabTests|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error", @@ -93,7 +93,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", "CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::PrefabTests|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error", @@ -110,7 +110,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "AssetProcessorBatch", "ASSET_PROCESSOR_BINARY": "bin/profile/AssetProcessorBatch", @@ -124,7 +124,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "AssetProcessorBatch", "ASSET_PROCESSOR_BINARY": "bin/profile/AssetProcessorBatch", @@ -142,7 +142,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_periodic", "CTEST_OPTIONS": "-L (SUITE_periodic) --no-tests=error", @@ -162,7 +162,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4 -DO3DE_HOME_PATH=\"${WORKSPACE}/home\" -DO3DE_REGISTER_ENGINE_PATH=\"${WORKSPACE}/o3de\" -DO3DE_REGISTER_THIS_ENGINE=TRUE", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all", "CTEST_OPTIONS": "-L (SUITE_sandbox) --no-tests=error" @@ -178,7 +178,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "TEST_SUITE_benchmark", "CTEST_OPTIONS": "-L (SUITE_benchmark) --no-tests=error", @@ -195,7 +195,7 @@ "PARAMETERS": { "CONFIGURATION": "release", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -210,7 +210,7 @@ "PARAMETERS": { "CONFIGURATION": "release", "OUTPUT_DIRECTORY": "build/mono_linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_MONOLITHIC_GAME=TRUE -DLY_PARALLEL_LINK_JOBS=4", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_MONOLITHIC_GAME=TRUE -DLY_PARALLEL_LINK_JOBS=4", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "all" } @@ -221,10 +221,25 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4 -DLY_DISABLE_TEST_MODULES=TRUE", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4 -DLY_DISABLE_TEST_MODULES=TRUE", "CMAKE_TARGET": "install" } }, + "installer": { + "TAGS": [ + "nightly-clean", + "nightly-installer" + ], + "COMMAND": "build_installer_linux.sh", + "PARAMETERS": { + "CONFIGURATION": "profile", + "OUTPUT_DIRECTORY": "build/linux", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4 -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk", + "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=TRUE -DLY_INSTALLER_DOWNLOAD_URL=${INSTALLER_DOWNLOAD_URL} -DLY_INSTALLER_LICENSE_URL=${INSTALLER_DOWNLOAD_URL}/license", + "CPACK_OPTIONS": "-D CPACK_UPLOAD_URL=${CPACK_UPLOAD_URL}", + "CMAKE_TARGET": "all" + } + }, "install_profile_pipe": { "TAGS": [ "nightly-incremental", @@ -254,7 +269,7 @@ "COMMAND_CWD": "${WORKSPACE}/${PROJECT_REPOSITORY_NAME}", "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/linux", - "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DCMAKE_C_COMPILER=clang-12 -DCMAKE_CXX_COMPILER=clang++-12 -DLY_PARALLEL_LINK_JOBS=4 -DCMAKE_MODULE_PATH=${WORKSPACE}/o3de/install/cmake", + "CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_PARALLEL_LINK_JOBS=4 -DCMAKE_MODULE_PATH=${WORKSPACE}/o3de/install/cmake", "CMAKE_TARGET": "all" } } diff --git a/scripts/build/Platform/Linux/build_installer_linux.sh b/scripts/build/Platform/Linux/build_installer_linux.sh new file mode 100755 index 0000000000..301eb5f16d --- /dev/null +++ b/scripts/build/Platform/Linux/build_installer_linux.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# +# 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 +# +# + +set -o errexit # exit on the first failure encountered + +BASEDIR=$(dirname "$0") +source $BASEDIR/build_linux.sh + +source $BASEDIR/installer_linux.sh diff --git a/scripts/build/Platform/Linux/build_linux.sh b/scripts/build/Platform/Linux/build_linux.sh index ab51913550..328445738b 100755 --- a/scripts/build/Platform/Linux/build_linux.sh +++ b/scripts/build/Platform/Linux/build_linux.sh @@ -17,7 +17,7 @@ SOURCE_DIRECTORY=${PWD} pushd $OUTPUT_DIRECTORY LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -CONFIGURE_CMD="cmake ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS} -DLY_3RDPARTY_PATH=${LY_3RDPARTY_PATH}" +CONFIGURE_CMD="cmake ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS}" if [[ -n "$CMAKE_LY_PROJECTS" ]]; then CONFIGURE_CMD="${CONFIGURE_CMD} -DLY_PROJECTS='${CMAKE_LY_PROJECTS}'" fi @@ -37,13 +37,13 @@ else fi if [[ ! -z "$RUN_CONFIGURE" ]]; then # have to use eval since $CMAKE_OPTIONS (${EXTRA_CMAKE_OPTIONS}) contains quotes that need to be processed - echo [ci_build] ${CONFIGURE_CMD} + eval echo [ci_build] ${CONFIGURE_CMD} eval ${CONFIGURE_CMD} # Save the run only if success - echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE} + eval echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE} fi -echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} -cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} +eval echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} +eval cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS} popd diff --git a/scripts/build/Platform/Linux/installer_linux.sh b/scripts/build/Platform/Linux/installer_linux.sh new file mode 100755 index 0000000000..3ded242522 --- /dev/null +++ b/scripts/build/Platform/Linux/installer_linux.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash +# +# 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 +# +# + +set -o errexit # exit on the first failure encountered + +BASEDIR=$(dirname "$0") +source $BASEDIR/env_linux.sh + +mkdir -p ${OUTPUT_DIRECTORY} +SOURCE_DIRECTORY=${PWD} +pushd $OUTPUT_DIRECTORY + +if ! command -v cpack &> /dev/null; then + echo "[ci_build] CPack not found" + exit 1 +fi + +echo [ci_build] cpack --version +cpack --version + +eval echo [ci_build] cpack -C ${CONFIGURATION} ${CPACK_OPTIONS} +eval cpack -C ${CONFIGURATION} ${CPACK_OPTIONS} + +popd diff --git a/scripts/build/Platform/Linux/pipeline.json b/scripts/build/Platform/Linux/pipeline.json index 7f16ec6ab5..f44ed5f9de 100644 --- a/scripts/build/Platform/Linux/pipeline.json +++ b/scripts/build/Platform/Linux/pipeline.json @@ -1,7 +1,7 @@ { "ENV": { "NODE_LABEL": "linux-707531fc7", - "LY_3RDPARTY_PATH": "/home/lybuilder/ly/workspace/3rdParty", + "LY_3RDPARTY_PATH": "/data/workspace/3rdParty", "TIMEOUT": 30, "WORKSPACE": "/data/workspace", "MOUNT_VOLUME": true diff --git a/scripts/build/Platform/Mac/build_mac.sh b/scripts/build/Platform/Mac/build_mac.sh index 169e91c24f..a0401f664c 100755 --- a/scripts/build/Platform/Mac/build_mac.sh +++ b/scripts/build/Platform/Mac/build_mac.sh @@ -17,7 +17,7 @@ SOURCE_DIRECTORY=${PWD} pushd $OUTPUT_DIRECTORY LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -CONFIGURE_CMD="cmake ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS} -DLY_3RDPARTY_PATH=${LY_3RDPARTY_PATH}" +CONFIGURE_CMD="cmake ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS}" if [[ -n "$CMAKE_LY_PROJECTS" ]]; then CONFIGURE_CMD="${CONFIGURE_CMD} -DLY_PROJECTS='${CMAKE_LY_PROJECTS}'" fi diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index 3260c9af79..6f1aaa1570 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -360,9 +360,9 @@ "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build\\windows_vs2019", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_DISABLE_TEST_MODULES=TRUE -DLY_VERSION_ENGINE_NAME=o3de-sdk -DLY_INSTALLER_WIX_ROOT=\"!WIX! \"", - "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=ON -DLY_INSTALLER_DOWNLOAD_URL=!INSTALLER_DOWNLOAD_URL! -DLY_INSTALLER_LICENSE_URL=!INSTALLER_DOWNLOAD_URL!/license", - "CPACK_BUCKET": "%INSTALLER_BUCKET%", + "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=TRUE -DLY_INSTALLER_DOWNLOAD_URL=!INSTALLER_DOWNLOAD_URL! -DLY_INSTALLER_LICENSE_URL=!INSTALLER_DOWNLOAD_URL!/license", "CMAKE_TARGET": "ALL_BUILD", + "CPACK_OPTIONS": "-D CPACK_UPLOAD_URL=\"!CPACK_UPLOAD_URL!\"", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, diff --git a/scripts/build/Platform/Windows/build_windows.cmd b/scripts/build/Platform/Windows/build_windows.cmd index b9e862e04f..9e9b124adb 100644 --- a/scripts/build/Platform/Windows/build_windows.cmd +++ b/scripts/build/Platform/Windows/build_windows.cmd @@ -9,13 +9,6 @@ REM SETLOCAL EnableDelayedExpansion -REM Jenkins reports MSB8029 when TMP/TEMP is not defined, define a dummy folder -SET TMP=%cd%/temp -SET TEMP=%cd%/temp -IF NOT EXIST %TMP% ( - MKDIR temp -) - CALL %~dp0env_windows.cmd IF NOT EXIST "%OUTPUT_DIRECTORY%" ( @@ -36,7 +29,7 @@ REM Compute half the amount of processors so some jobs can run SET /a HALF_PROCESSORS = NUMBER_OF_PROCESSORS / 2 SET LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -SET CONFIGURE_CMD=cmake %SOURCE_DIRECTORY% %CMAKE_OPTIONS% %EXTRA_CMAKE_OPTIONS% -DLY_3RDPARTY_PATH="%LY_3RDPARTY_PATH%" +SET CONFIGURE_CMD=cmake %SOURCE_DIRECTORY% %CMAKE_OPTIONS% %EXTRA_CMAKE_OPTIONS% IF NOT "%CMAKE_LY_PROJECTS%"=="" ( SET CONFIGURE_CMD=!CONFIGURE_CMD! -DLY_PROJECTS="%CMAKE_LY_PROJECTS%" ) diff --git a/scripts/build/Platform/Windows/env_windows.cmd b/scripts/build/Platform/Windows/env_windows.cmd index f11d394519..a78946caf6 100644 --- a/scripts/build/Platform/Windows/env_windows.cmd +++ b/scripts/build/Platform/Windows/env_windows.cmd @@ -7,6 +7,10 @@ REM SPDX-License-Identifier: Apache-2.0 OR MIT REM REM +REM To get recursive folder creation +SETLOCAL EnableExtensions +SETLOCAL EnableDelayedExpansion + where /Q cmake IF NOT %ERRORLEVEL%==0 ( ECHO [ci_build] CMake not found @@ -18,6 +22,20 @@ IF NOT "%COMMAND_CWD%"=="" ( CD %COMMAND_CWD% ) +REM Jenkins reports MSB8029 when TMP/TEMP is not defined, define a dummy folder +IF NOT "%TMP%"=="" ( + IF NOT "%WORKSPACE_TMP%"=="" ( + SET TMP=%WORKSPACE_TMP% + SET TEMP=%WORKSPACE_TMP% + ) ELSE ( + SET TMP=%cd%/temp + SET TEMP=%cd%/temp + ) +) +IF NOT EXIST "!TMP!" ( + MKDIR "!TMP!" +) + EXIT /b 0 :error diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index 87f53adc7f..bbde450973 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -17,10 +17,12 @@ IF NOT EXIST %OUTPUT_DIRECTORY% ( ) PUSHD %OUTPUT_DIRECTORY% -REM Override the temporary directory used by wix to the workspace -SET "WIX_TEMP=!WORKSPACE_TMP!/wix" -IF NOT EXIST "%WIX_TEMP%" ( - MKDIR "%WIX_TEMP%" +REM Override the temporary directory used by wix to the workspace (if we have a WORKSPACE_TMP) +IF NOT "%WORKSPACE_TMP%"=="" ( + SET "WIX_TEMP=!WORKSPACE_TMP!/wix" + IF NOT EXIST "!WIX_TEMP!" ( + MKDIR "!WIX_TEMP!" + ) ) REM Make sure we are using the CMake version of CPack and not the one that comes with chocolatey @@ -47,10 +49,6 @@ IF ERRORLEVEL 1 ( GOTO :popd_error ) -IF NOT "%CPACK_BUCKET%"=="" ( - SET "CPACK_OPTIONS=-D CPACK_UPLOAD_URL=s3://%CPACK_BUCKET% %CPACK_OPTIONS%" -) - ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS% "!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS% IF NOT %ERRORLEVEL%==0 ( diff --git a/scripts/build/Platform/Windows/pipeline.json b/scripts/build/Platform/Windows/pipeline.json index 6be55ec82d..b18a1e8c63 100644 --- a/scripts/build/Platform/Windows/pipeline.json +++ b/scripts/build/Platform/Windows/pipeline.json @@ -1,7 +1,7 @@ { "ENV": { "NODE_LABEL": "windows-b3c8994f1", - "LY_3RDPARTY_PATH": "C:/ly/3rdParty", + "LY_3RDPARTY_PATH": "D:/workspace/3rdParty", "TIMEOUT": 30, "WORKSPACE": "D:/workspace", "MOUNT_VOLUME": true diff --git a/scripts/build/Platform/iOS/build_config.json b/scripts/build/Platform/iOS/build_config.json index 895f74daae..ec2b763dda 100644 --- a/scripts/build/Platform/iOS/build_config.json +++ b/scripts/build/Platform/iOS/build_config.json @@ -76,7 +76,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/mac", - "CMAKE_OPTIONS": "-G Xcode -DO3DE_HOME_PATH=\"${WORKSPACE}/home\" -DO3DE_REGISTER_ENGINE_PATH=\"${WORKSPACE}/o3de\" -DO3DE_REGISTER_THIS_ENGINE=TRUE", + "CMAKE_OPTIONS": "-G Xcode", "CMAKE_LY_PROJECTS": "AutomatedTesting", "CMAKE_TARGET": "AssetProcessorBatch", "ASSET_PROCESSOR_BINARY": "bin/profile/AssetProcessorBatch", @@ -112,7 +112,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build/ios_test", - "CMAKE_OPTIONS": "-G Xcode -DCMAKE_TOOLCHAIN_FILE=cmake/Platform/iOS/Toolchain_ios.cmake -DLY_MONOLITHIC_GAME=FALSE -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=TRUE -DLY_IOS_CODE_SIGNING_IDENTITY=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=TRUE -DO3DE_HOME_PATH=\"${WORKSPACE}/home\" -DO3DE_REGISTER_ENGINE_PATH=\"${WORKSPACE}/o3de\" -DO3DE_REGISTER_THIS_ENGINE=TRUE", + "CMAKE_OPTIONS": "-G Xcode -DCMAKE_TOOLCHAIN_FILE=cmake/Platform/iOS/Toolchain_ios.cmake -DLY_MONOLITHIC_GAME=FALSE -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED=TRUE -DLY_IOS_CODE_SIGNING_IDENTITY=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS=\"\" -DCMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED=TRUE", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "", "TARGET_DEVICE_NAME": "Lumberyard", diff --git a/scripts/build/Platform/iOS/build_ios_test.sh b/scripts/build/Platform/iOS/build_ios_test.sh index b683948e72..7869b900db 100755 --- a/scripts/build/Platform/iOS/build_ios_test.sh +++ b/scripts/build/Platform/iOS/build_ios_test.sh @@ -19,7 +19,7 @@ SOURCE_DIRECTORY=${PWD} ECHO Configuring for iOS Testing LAST_CONFIGURE_CMD_FILE=ci_last_configure_cmd.txt -CONFIGURE_CMD="cmake -B ${OUTPUT_DIRECTORY} ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS} -DLY_3RDPARTY_PATH=${LY_3RDPARTY_PATH}" +CONFIGURE_CMD="cmake -B ${OUTPUT_DIRECTORY} ${SOURCE_DIRECTORY} ${CMAKE_OPTIONS} ${EXTRA_CMAKE_OPTIONS}" if [[ ! -e "CMakeCache.txt" ]]; then echo [ci_build] First run, generating RUN_CONFIGURE=1 diff --git a/scripts/build/Platform/iOS/pipeline.json b/scripts/build/Platform/iOS/pipeline.json index e8cea0f06d..a5e2ff710e 100644 --- a/scripts/build/Platform/iOS/pipeline.json +++ b/scripts/build/Platform/iOS/pipeline.json @@ -1,7 +1,7 @@ { "ENV": { "NODE_LABEL": "mac-bigsur-2fc3a22", - "LY_3RDPARTY_PATH": "/Users/lybuilder/3rdParty", + "LY_3RDPARTY_PATH": "/Users/lybuilder/workspace/3rdParty", "TIMEOUT": 30, "WORKSPACE": "/Users/lybuilder/workspace", "MOUNT_VOLUME": false diff --git a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt index 2af55ab180..30259a6dc7 100644 --- a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt +++ b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-bionic.txt @@ -12,7 +12,7 @@ libxcb-xinerama0 # For Qt plugins at runtime libxcb-xinput0 # For Qt plugins at runtime libfontconfig1-dev # For Qt plugins at runtime libcurl4-openssl-dev # For HttpRequestor -libsdl2-dev # For WWise/Audio +# libsdl2-dev # For WWise/Audio libxcb-xkb-dev # For xcb keyboard input libxkbcommon-x11-dev # For xcb keyboard input libxkbcommon-dev # For xcb keyboard input diff --git a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt index e0e03cda90..71958d74bd 100644 --- a/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt +++ b/scripts/build/build_node/Platform/Linux/package-list.ubuntu-focal.txt @@ -12,7 +12,7 @@ libxcb-xinerama0 # For Qt plugins at runtime libxcb-xinput0 # For Qt plugins at runtime libfontconfig1-dev # For Qt plugins at runtime libcurl4-openssl-dev # For HttpRequestor -libsdl2-dev # for WWise/Audio +# libsdl2-dev # for WWise/Audio libxcb-xkb-dev # For xcb keyboard input libxkbcommon-x11-dev # For xcb keyboard input libxkbcommon-dev # For xcb keyboard input diff --git a/scripts/build/tools/copy_file.py b/scripts/build/tools/copy_file.py new file mode 100644 index 0000000000..45b5e39d7a --- /dev/null +++ b/scripts/build/tools/copy_file.py @@ -0,0 +1,57 @@ +# +# 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 argparse +import os +import sys +import glob +import shutil + + +def parse_args(): + parser = argparse.ArgumentParser() + parser.add_argument('-s', '--src-dir', dest='src_dir', required=True, help='Source directory to copy files from, if not specified, current directory is used.') + parser.add_argument('-r', '--file-regex', dest='file_regex', required=True, help='Globbing pattern used to match file names to copy.') + parser.add_argument('-t', '--target-dir', dest="target_dir", required=True, help='Target directory to copy files to.') + args = parser.parse_args() + if not os.path.isdir(args.src_dir): + print('ERROR: src_dir is not a valid directory.') + exit(1) + return args + + +def extended_path(path): + """ + Maximum Path Length Limitation on Windows is 260 characters, use extended-length path to bypass this limitation + """ + if sys.platform in ('win32', 'cli') and len(path) >= 260: + if path.startswith('\\'): + return r'\\?\UNC\{}'.format(path.lstrip('\\')) + else: + return r'\\?\{}'.format(path) + else: + return path + + +def copy_file(src_dir, file_regex, target_dir): + if not os.path.isdir(args.target_dir): + os.makedirs(target_dir) + for f in glob.glob(os.path.join(src_dir, file_regex), recursive=True): + if os.path.isfile(f): + relative_path = os.path.relpath(f, src_dir) + target_file_path = os.path.join(target_dir, relative_path) + target_file_dir = os.path.dirname(target_file_path) + if not os.path.isdir(target_file_dir): + os.makedirs(target_file_dir) + shutil.copy2(f, extended_path(target_file_path)) + print(f'{f} -> {target_file_path}') + + +if __name__ == "__main__": + args = parse_args() + copy_file(args.src_dir, args.file_regex, args.target_dir) diff --git a/scripts/o3de/README.txt b/scripts/o3de/README.txt index 07d23fab82..ded52bb264 100644 --- a/scripts/o3de/README.txt +++ b/scripts/o3de/README.txt @@ -23,7 +23,7 @@ INSTALL It is recommended to set up these these tools with O3DE's CMake build commands. Assuming CMake is already setup on your operating system, below are some sample build commands: cd /path/to/od3e/ - cmake -B windows_vs2019 -S . -G"Visual Studio 16" -DLY_3RDPARTY_PATH="%LY_3RDPARTY_PATH%" + cmake -B windows_vs2019 -S . -G"Visual Studio 16" To manually install the project in development mode using your own installed Python interpreter: cd /path/to/od3e/o3de diff --git a/scripts/o3de/o3de/disable_gem.py b/scripts/o3de/o3de/disable_gem.py index 01324d8500..158507fca1 100644 --- a/scripts/o3de/o3de/disable_gem.py +++ b/scripts/o3de/o3de/disable_gem.py @@ -69,7 +69,7 @@ def disable_gem_in_project(gem_name: str = None, return 1 gem_path = pathlib.Path(gem_path).resolve() # make sure this gem already exists if we're adding. We can always remove a gem. - if not gem_path.is_dir(): + if not gem_path.exists(): logger.error(f'Gem Path {gem_path} does not exist.') return 1 diff --git a/scripts/o3de/o3de/download.py b/scripts/o3de/o3de/download.py index 9e576d64b5..e88355bf06 100644 --- a/scripts/o3de/o3de/download.py +++ b/scripts/o3de/o3de/download.py @@ -44,30 +44,34 @@ def validate_downloaded_zip_sha256(download_uri_json_data: dict, download_zip_pa try: sha256A = download_uri_json_data['sha256'] except KeyError as e: - logger.warn('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!' + logger.warning('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!' ' We cannot verify this is the actually the advertised object!!!') return 1 else: - sha256B = hashlib.sha256(download_zip_path.open('rb').read()).hexdigest() - if sha256A != sha256B: - logger.error(f'SECURITY VIOLATION: Downloaded zip sha256 {sha256B} does not match' - f' the advertised "sha256":{sha256A} in the f{manifest_json_name}.') - return 0 + if len(sha256A) == 0: + logger.warning('SECURITY WARNING: The advertised o3de object you downloaded has no "sha256"!!! Be VERY careful!!!' + ' We cannot verify this is the actually the advertised object!!!') + return 1 + + with download_zip_path.open('rb') as f: + sha256B = hashlib.sha256(f.read()).hexdigest() + if sha256A != sha256B: + logger.error(f'SECURITY VIOLATION: Downloaded zip sha256 {sha256B} does not match' + f' the advertised "sha256":{sha256A} in the f{manifest_json_name}.') + return 0 unzipped_manifest_json_data = unzip_manifest_json_data(download_zip_path, manifest_json_name) - # remove the sha256 if present in the advertised downloadable manifest json - # then compare it to the json in the zip, they should now be identical - try: - del download_uri_json_data['sha256'] - except KeyError as e: - pass + # do not include the data we know will not match/exist + for key in ['sha256','repo_name']: + if key in download_uri_json_data: + del download_uri_json_data[key] + if key in unzipped_manifest_json_data: + del unzipped_manifest_json_data[key] - sha256A = hashlib.sha256(json.dumps(download_uri_json_data, indent=4).encode('utf8')).hexdigest() - sha256B = hashlib.sha256(json.dumps(unzipped_manifest_json_data, indent=4).encode('utf8')).hexdigest() - if sha256A != sha256B: - logger.error('SECURITY VIOLATION: Downloaded manifest json does not match' - ' the advertised manifest json.') + if download_uri_json_data != unzipped_manifest_json_data: + logger.error(f'SECURITY VIOLATION: Downloaded {manifest_json_name} contents do not match' + ' the advertised manifest json contents.') return 0 return 1 @@ -102,10 +106,10 @@ def download_o3de_object(object_name: str, default_folder_name: str, dest_path: logger.error(f'Downloadable o3de object {object_name} not found.') return 1 - origin_uri = downloadable_object_data['originuri'] + origin_uri = downloadable_object_data['origin_uri'] parsed_uri = urllib.parse.urlparse(origin_uri) - download_zip_result = utils.download_zip_file(parsed_uri, download_zip_path, download_progress_callback) + download_zip_result = utils.download_zip_file(parsed_uri, download_zip_path, force_overwrite, download_progress_callback) if download_zip_result != 0: return download_zip_result @@ -237,13 +241,13 @@ def is_o3de_object_update_available(object_name: str, downloadable_kwarg_key, lo try: repo_copy_updated_string = downloadable_object_data['last_updated'] except KeyError: - logger.warn(f'last_updated field not found for {object_name}.') + logger.warning(f'last_updated field not found for {object_name}.') return False try: local_last_updated_time = datetime.fromisoformat(local_last_updated) except ValueError: - logger.warn(f'last_updated field has incorrect format for local copy of {downloadable_kwarg_key} {object_name}.') + logger.warning(f'last_updated field has incorrect format for local copy of {downloadable_kwarg_key} {object_name}.') # Possible that an earlier version did not have this field so still want to check against cached downloadable version local_last_updated_time = datetime.min diff --git a/scripts/o3de/o3de/manifest.py b/scripts/o3de/o3de/manifest.py index 297d8e39d2..e46b819a7c 100644 --- a/scripts/o3de/o3de/manifest.py +++ b/scripts/o3de/o3de/manifest.py @@ -108,75 +108,79 @@ def get_o3de_third_party_folder() -> pathlib.Path: # o3de manifest file methods +def get_default_o3de_manifest_json_data() -> dict: + """ + Returns dict with default values suitable for storing + in the o3de_manifests.json + """ + username = os.path.split(get_home_folder())[-1] + + o3de_folder = get_o3de_folder() + default_engines_folder = get_o3de_engines_folder() + default_projects_folder = get_o3de_projects_folder() + default_gems_folder = get_o3de_gems_folder() + default_templates_folder = get_o3de_templates_folder() + default_restricted_folder = get_o3de_restricted_folder() + default_third_party_folder = get_o3de_third_party_folder() + + default_projects_restricted_folder = default_projects_folder / 'Restricted' + default_projects_restricted_folder.mkdir(parents=True, exist_ok=True) + default_gems_restricted_folder = default_gems_folder / 'Restricted' + default_gems_restricted_folder.mkdir(parents=True, exist_ok=True) + default_templates_restricted_folder = default_templates_folder / 'Restricted' + default_templates_restricted_folder.mkdir(parents=True, exist_ok=True) + + json_data = {} + json_data.update({'o3de_manifest_name': f'{username}'}) + json_data.update({'origin': o3de_folder.as_posix()}) + json_data.update({'default_engines_folder': default_engines_folder.as_posix()}) + json_data.update({'default_projects_folder': default_projects_folder.as_posix()}) + json_data.update({'default_gems_folder': default_gems_folder.as_posix()}) + json_data.update({'default_templates_folder': default_templates_folder.as_posix()}) + json_data.update({'default_restricted_folder': default_restricted_folder.as_posix()}) + json_data.update({'default_third_party_folder': default_third_party_folder.as_posix()}) + + json_data.update({'engines': []}) + json_data.update({'projects': []}) + json_data.update({'external_subdirectories': []}) + json_data.update({'templates': []}) + json_data.update({'restricted': []}) + json_data.update({'repos': []}) + + default_restricted_folder_json = default_restricted_folder / 'restricted.json' + if not default_restricted_folder_json.is_file(): + with default_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'o3de'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + default_projects_restricted_folder_json = default_projects_restricted_folder / 'restricted.json' + if not default_projects_restricted_folder_json.is_file(): + with default_projects_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'projects'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + default_gems_restricted_folder_json = default_gems_restricted_folder / 'restricted.json' + if not default_gems_restricted_folder_json.is_file(): + with default_gems_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'gems'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + default_templates_restricted_folder_json = default_templates_restricted_folder / 'restricted.json' + if not default_templates_restricted_folder_json.is_file(): + with default_templates_restricted_folder_json.open('w') as s: + restricted_json_data = {} + restricted_json_data.update({'restricted_name': 'templates'}) + s.write(json.dumps(restricted_json_data, indent=4) + '\n') + + return json_data + def get_o3de_manifest() -> pathlib.Path: manifest_path = get_o3de_folder() / 'o3de_manifest.json' if not manifest_path.is_file(): - username = os.path.split(get_home_folder())[-1] - - o3de_folder = get_o3de_folder() - default_registry_folder = get_o3de_registry_folder() - default_cache_folder = get_o3de_cache_folder() - default_downloads_folder = get_o3de_download_folder() - default_logs_folder = get_o3de_logs_folder() - default_engines_folder = get_o3de_engines_folder() - default_projects_folder = get_o3de_projects_folder() - default_gems_folder = get_o3de_gems_folder() - default_templates_folder = get_o3de_templates_folder() - default_restricted_folder = get_o3de_restricted_folder() - default_third_party_folder = get_o3de_third_party_folder() - - default_projects_restricted_folder = default_projects_folder / 'Restricted' - default_projects_restricted_folder.mkdir(parents=True, exist_ok=True) - default_gems_restricted_folder = default_gems_folder / 'Restricted' - default_gems_restricted_folder.mkdir(parents=True, exist_ok=True) - default_templates_restricted_folder = default_templates_folder / 'Restricted' - default_templates_restricted_folder.mkdir(parents=True, exist_ok=True) - - json_data = {} - json_data.update({'o3de_manifest_name': f'{username}'}) - json_data.update({'origin': o3de_folder.as_posix()}) - json_data.update({'default_engines_folder': default_engines_folder.as_posix()}) - json_data.update({'default_projects_folder': default_projects_folder.as_posix()}) - json_data.update({'default_gems_folder': default_gems_folder.as_posix()}) - json_data.update({'default_templates_folder': default_templates_folder.as_posix()}) - json_data.update({'default_restricted_folder': default_restricted_folder.as_posix()}) - json_data.update({'default_third_party_folder': default_third_party_folder.as_posix()}) - - json_data.update({'engines': []}) - json_data.update({'projects': []}) - json_data.update({'external_subdirectories': []}) - json_data.update({'templates': []}) - json_data.update({'restricted': []}) - json_data.update({'repos': []}) - - default_restricted_folder_json = default_restricted_folder / 'restricted.json' - if not default_restricted_folder_json.is_file(): - with default_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'o3de'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - json_data.update({'default_restricted_folder': default_restricted_folder.as_posix()}) - - default_projects_restricted_folder_json = default_projects_restricted_folder / 'restricted.json' - if not default_projects_restricted_folder_json.is_file(): - with default_projects_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'projects'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - - default_gems_restricted_folder_json = default_gems_restricted_folder / 'restricted.json' - if not default_gems_restricted_folder_json.is_file(): - with default_gems_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'gems'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') - - default_templates_restricted_folder_json = default_templates_restricted_folder / 'restricted.json' - if not default_templates_restricted_folder_json.is_file(): - with default_templates_restricted_folder_json.open('w') as s: - restricted_json_data = {} - restricted_json_data.update({'restricted_name': 'templates'}) - s.write(json.dumps(restricted_json_data, indent=4) + '\n') + json_data = get_default_o3de_manifest_json_data() with manifest_path.open('w') as s: s.write(json.dumps(json_data, indent=4) + '\n') @@ -188,6 +192,7 @@ def load_o3de_manifest(manifest_path: pathlib.Path = None) -> dict: """ Loads supplied manifest file or ~/.o3de/o3de_manifest.json if None + raises Json.JSONDecodeError if manifest data could not be decoded to JSON :param manifest_path: optional path to manifest file to load """ if not manifest_path: @@ -196,8 +201,10 @@ def load_o3de_manifest(manifest_path: pathlib.Path = None) -> dict: try: json_data = json.load(f) except json.JSONDecodeError as e: - logger.error(f'Manifest json failed to load: {str(e)}') - return {} + logger.error(f'Manifest json failed to load at path "{manifest_path}": {str(e)}') + # Re-raise the exception and let the caller + # determine if they can proceed + raise else: return json_data @@ -455,7 +462,7 @@ def get_json_data_file(object_json: pathlib.Path, try: object_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{object_json} failed to load: {e}') + logger.warning(f'{object_json} failed to load: {e}') else: return object_json_data @@ -589,14 +596,14 @@ def get_registered(engine_name: str = None, if isinstance(engine, dict): engine_path = pathlib.Path(engine['path']).resolve() else: - engine_path = pathlib.Path(engine_object).resolve() + engine_path = pathlib.Path(engine).resolve() engine_json = engine_path / 'engine.json' with engine_json.open('r') as f: try: engine_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{engine_json} failed to load: {str(e)}') + logger.warning(f'{engine_json} failed to load: {str(e)}') else: this_engines_name = engine_json_data['engine_name'] if this_engines_name == engine_name: @@ -611,7 +618,7 @@ def get_registered(engine_name: str = None, try: project_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{project_json} failed to load: {str(e)}') + logger.warning(f'{project_json} failed to load: {str(e)}') else: this_projects_name = project_json_data['project_name'] if this_projects_name == project_name: @@ -626,7 +633,7 @@ def get_registered(engine_name: str = None, try: gem_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{gem_json} failed to load: {str(e)}') + logger.warning(f'{gem_json} failed to load: {str(e)}') else: this_gems_name = gem_json_data['gem_name'] if this_gems_name == gem_name: @@ -641,7 +648,7 @@ def get_registered(engine_name: str = None, try: template_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{template_path} failed to load: {str(e)}') + logger.warning(f'{template_path} failed to load: {str(e)}') else: this_templates_name = template_json_data['template_name'] if this_templates_name == template_name: @@ -656,7 +663,7 @@ def get_registered(engine_name: str = None, try: restricted_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{restricted_json} failed to load: {str(e)}') + logger.warning(f'{restricted_json} failed to load: {str(e)}') else: this_restricted_name = restricted_json_data['restricted_name'] if this_restricted_name == restricted_name: @@ -689,7 +696,7 @@ def get_registered(engine_name: str = None, try: repo_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{cache_file} failed to load: {str(e)}') + logger.warning(f'{cache_file} failed to load: {str(e)}') else: this_repos_name = repo_json_data['repo_name'] if this_repos_name == repo_name: diff --git a/scripts/o3de/o3de/print_registration.py b/scripts/o3de/o3de/print_registration.py index b164243b7c..4b4c9d6515 100644 --- a/scripts/o3de/o3de/print_registration.py +++ b/scripts/o3de/o3de/print_registration.py @@ -326,7 +326,7 @@ def print_repos_data(repos_data: dict) -> int: try: repo_json_data = json.load(s) except json.JSONDecodeError as e: - logger.warn(f'{cache_file} failed to load: {str(e)}') + logger.warning(f'{cache_file} failed to load: {str(e)}') else: print(f'{repo_uri}/repo.json cached as:') print(cache_file) diff --git a/scripts/o3de/o3de/register.py b/scripts/o3de/o3de/register.py index 8a2bb788aa..2500df1568 100644 --- a/scripts/o3de/o3de/register.py +++ b/scripts/o3de/o3de/register.py @@ -485,12 +485,12 @@ def register_repo(json_data: dict, json_data['repos'].remove(repo_uri) if remove: - logger.warn(f'Removing repo uri {repo_uri}.') + logger.warning(f'Removing repo uri {repo_uri}.') return 0 repo_sha256 = hashlib.sha256(url.encode()) cache_file = manifest.get_o3de_cache_folder() / str(repo_sha256.hexdigest() + '.json') - result = utils.download_file(parsed_uri, cache_file) + result = utils.download_file(parsed_uri, cache_file, True) if result == 0: json_data.setdefault('repos', []).insert(0, repo_uri) @@ -560,6 +560,107 @@ def register_default_third_party_folder(json_data: dict, manifest.get_o3de_third_party_folder() if remove else default_third_party_folder, 'default_third_party_folder') + +def remove_invalid_o3de_projects(manifest_path: pathlib.Path = None) -> int: + if not manifest_path: + manifest_path = manifest.get_o3de_manifest() + + json_data = manifest.load_o3de_manifest(manifest_path) + + result = 0 + + for project in json_data.get('projects', []): + if not validation.valid_o3de_project_json(pathlib.Path(project).resolve() / 'project.json'): + logger.warning(f"Project path {project} is invalid.") + # Attempt to unregister all invalid projects even if previous projects failed to unregister + # but combine the result codes of each command. + result = register(project_path=pathlib.Path(project), remove=True) or result + + return result + + +def remove_invalid_o3de_objects() -> None: + for engine_path in manifest.get_engines(): + if not validation.valid_o3de_engine_json(pathlib.Path(engine_path).resolve() / 'engine.json'): + logger.warning(f"Engine path {engine_path} is invalid.") + register(engine_path=engine_path, remove=True) + + remove_invalid_o3de_projects() + + for external in manifest.get_external_subdirectories(): + external = pathlib.Path(external).resolve() + if not external.is_dir(): + logger.warning(f"External subdirectory {external} is invalid.") + register(engine_path=engine_path, external_subdir_path=external, remove=True) + + for template in manifest.get_templates(): + if not validation.valid_o3de_template_json(pathlib.Path(template).resolve() / 'template.json'): + logger.warning(f"Template path {template} is invalid.") + register(template_path=template, remove=True) + + for restricted in manifest.get_restricted(): + if not validation.valid_o3de_restricted_json(pathlib.Path(restricted).resolve() / 'restricted.json'): + logger.warning(f"Restricted path {restricted} is invalid.") + register(restricted_path=restricted, remove=True) + + json_data = manifest.load_o3de_manifest() + default_engines_folder = pathlib.Path( + json_data.get('default_engines_folder', manifest.get_o3de_engines_folder())).resolve() + if not default_engines_folder.is_dir(): + new_default_engines_folder = manifest.get_o3de_folder() / 'Engines' + new_default_engines_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default engines folder {default_engines_folder} is invalid. Set default {new_default_engines_folder}") + register(default_engines_folder=new_default_engines_folder.as_posix()) + + default_projects_folder = pathlib.Path( + json_data.get('default_projects_folder', manifest.get_o3de_projects_folder())).resolve() + if not default_projects_folder.is_dir(): + new_default_projects_folder = manifest.get_o3de_folder() / 'Projects' + new_default_projects_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default projects folder {default_projects_folder} is invalid. Set default {new_default_projects_folder}") + register(default_projects_folder=new_default_projects_folder.as_posix()) + + default_gems_folder = pathlib.Path(json_data.get('default_gems_folder', manifest.get_o3de_gems_folder())).resolve() + if not default_gems_folder.is_dir(): + new_default_gems_folder = manifest.get_o3de_folder() / 'Gems' + new_default_gems_folder.mkdir(parents=True, exist_ok=True) + logger.warning(f"Default gems folder {default_gems_folder} is invalid." + f" Set default {new_default_gems_folder}") + register(default_gems_folder=new_default_gems_folder.as_posix()) + + default_templates_folder = pathlib.Path( + json_data.get('default_templates_folder', manifest.get_o3de_templates_folder())).resolve() + if not default_templates_folder.is_dir(): + new_default_templates_folder = manifest.get_o3de_folder() / 'Templates' + new_default_templates_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default templates folder {default_templates_folder} is invalid." + f" Set default {new_default_templates_folder}") + register(default_templates_folder=new_default_templates_folder.as_posix()) + + default_restricted_folder = pathlib.Path( + json_data.get('default_restricted_folder', manifest.get_o3de_restricted_folder())).resolve() + if not default_restricted_folder.is_dir(): + default_restricted_folder = manifest.get_o3de_folder() / 'Restricted' + default_restricted_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default restricted folder {default_restricted_folder} is invalid." + f" Set default {default_restricted_folder}") + register(default_restricted_folder=default_restricted_folder.as_posix()) + + default_third_party_folder = pathlib.Path( + json_data.get('default_third_party_folder', manifest.get_o3de_third_party_folder())).resolve() + if not default_third_party_folder.is_dir(): + default_third_party_folder = manifest.get_o3de_folder() / '3rdParty' + default_third_party_folder.mkdir(parents=True, exist_ok=True) + logger.warning( + f"Default 3rd Party folder {default_third_party_folder} is invalid." + f" Set default {default_third_party_folder}") + register(default_third_party_folder=default_third_party_folder.as_posix()) + + def register(engine_path: pathlib.Path = None, project_path: pathlib.Path = None, gem_path: pathlib.Path = None, @@ -604,7 +705,18 @@ def register(engine_path: pathlib.Path = None, :return: 0 for success or non 0 failure code """ - json_data = manifest.load_o3de_manifest() + try: + json_data = manifest.load_o3de_manifest() + except json.JSONDecodeError: + if not force: + logger.error('O3DE object registration has halted due to JSON Decode Error in manifest at path:' + f' "{manifest.get_o3de_manifest()}".' + '\n Registration can be forced using the --force option,' + ' but that will result in the manifest using default data') + return 1 + else: + # Use a default manifest data an proceed + json_data = manifest.get_default_o3de_manifest_json_data() result = 0 @@ -679,99 +791,6 @@ def register(engine_path: pathlib.Path = None, return result -def remove_invalid_o3de_projects(manifest_path: pathlib.Path = None) -> int: - if not manifest_path: - manifest_path = manifest.get_o3de_manifest() - - json_data = manifest.load_o3de_manifest(manifest_path) - - result = 0 - - for project in json_data.get('projects', []): - if not validation.valid_o3de_project_json(pathlib.Path(project).resolve() / 'project.json'): - logger.warn(f"Project path {project} is invalid.") - # Attempt to unregister all invalid projects even if previous projects failed to unregister - # but combine the result codes of each command. - result = register(project_path=pathlib.Path(project), remove=True) or result - - return result - -def remove_invalid_o3de_objects() -> None: - for engine_path in manifest.get_engines(): - if not validation.valid_o3de_engine_json(pathlib.Path(engine_path).resolve() / 'engine.json'): - logger.warn(f"Engine path {engine_path} is invalid.") - register(engine_path=engine_path, remove=True) - - remove_invalid_o3de_projects() - - for external in manifest.get_external_subdirectories(): - external = pathlib.Path(external).resolve() - if not external.is_dir(): - logger.warn(f"External subdirectory {external} is invalid.") - register(engine_path=engine_path, external_subdir_path=external, remove=True) - - for template in manifest.get_templates(): - if not validation.valid_o3de_template_json(pathlib.Path(template).resolve() / 'template.json'): - logger.warn(f"Template path {template} is invalid.") - register(template_path=template, remove=True) - - for restricted in manifest.get_restricted(): - if not validation.valid_o3de_restricted_json(pathlib.Path(restricted).resolve() / 'restricted.json'): - logger.warn(f"Restricted path {restricted} is invalid.") - register(restricted_path=restricted, remove=True) - - json_data = manifest.load_o3de_manifest() - default_engines_folder = pathlib.Path(json_data.get('default_engines_folder', manifest.get_o3de_engines_folder())).resolve() - if not default_engines_folder.is_dir(): - new_default_engines_folder = manifest.get_o3de_folder() / 'Engines' - new_default_engines_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default engines folder {default_engines_folder} is invalid. Set default {new_default_engines_folder}") - register(default_engines_folder=new_default_engines_folder.as_posix()) - - default_projects_folder = pathlib.Path(json_data.get('default_projects_folder', manifest.get_o3de_projects_folder())).resolve() - if not default_projects_folder.is_dir(): - new_default_projects_folder = manifest.get_o3de_folder() / 'Projects' - new_default_projects_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default projects folder {default_projects_folder} is invalid. Set default {new_default_projects_folder}") - register(default_projects_folder=new_default_projects_folder.as_posix()) - - default_gems_folder = pathlib.Path(json_data.get('default_gems_folder', manifest.get_o3de_gems_folder())).resolve() - if not default_gems_folder.is_dir(): - new_default_gems_folder = manifest.get_o3de_folder() / 'Gems' - new_default_gems_folder.mkdir(parents=True, exist_ok=True) - logger.warn(f"Default gems folder {default_gems_folder} is invalid." - f" Set default {new_default_gems_folder}") - register(default_gems_folder=new_default_gems_folder.as_posix()) - - default_templates_folder = pathlib.Path(json_data.get('default_templates_folder', manifest.get_o3de_templates_folder())).resolve() - if not default_templates_folder.is_dir(): - new_default_templates_folder = manifest.get_o3de_folder() / 'Templates' - new_default_templates_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default templates folder {default_templates_folder} is invalid." - f" Set default {new_default_templates_folder}") - register(default_templates_folder=new_default_templates_folder.as_posix()) - - default_restricted_folder = pathlib.Path(json_data.get('default_restricted_folder', manifest.get_o3de_restricted_folder())).resolve() - if not default_restricted_folder.is_dir(): - default_restricted_folder = manifest.get_o3de_folder() / 'Restricted' - default_restricted_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default restricted folder {default_restricted_folder} is invalid." - f" Set default {default_restricted_folder}") - register(default_restricted_folder=default_restricted_folder.as_posix()) - - default_third_party_folder = pathlib.Path(json_data.get('default_third_party_folder', manifest.get_o3de_third_party_folder())).resolve() - if not default_third_party_folder.is_dir(): - default_third_party_folder = manifest.get_o3de_folder() / '3rdParty' - default_third_party_folder.mkdir(parents=True, exist_ok=True) - logger.warn( - f"Default 3rd Party folder {default_third_party_folder} is invalid." - f" Set default {default_third_party_folder}") - register(default_third_party_folder=default_third_party_folder.as_posix()) - def _run_register(args: argparse) -> int: if args.override_home_folder: diff --git a/scripts/o3de/o3de/repo.py b/scripts/o3de/o3de/repo.py index a6b1505761..22c7c54c8f 100644 --- a/scripts/o3de/o3de/repo.py +++ b/scripts/o3de/o3de/repo.py @@ -9,7 +9,6 @@ import json import logging import pathlib -import shutil import urllib.parse import urllib.request import hashlib @@ -24,6 +23,7 @@ def process_add_o3de_repo(file_name: str or pathlib.Path, repo_set: set) -> int: file_name = pathlib.Path(file_name).resolve() if not validation.valid_o3de_repo_json(file_name): + logger.error(f'Repository JSON {file_name} could not be loaded or is missing required values') return 1 cache_folder = manifest.get_o3de_cache_folder() @@ -74,11 +74,11 @@ def process_add_o3de_repo(file_name: str or pathlib.Path, manifest_json_uri = f'{o3de_object_uri}/{manifest_json}' manifest_json_sha256 = hashlib.sha256(manifest_json_uri.encode()) cache_file = cache_folder / str(manifest_json_sha256.hexdigest() + '.json') - if not cache_file.is_file(): - parsed_uri = urllib.parse.urlparse(manifest_json_uri) - download_file_result = utils.download_file(parsed_uri, cache_file) - if download_file_result != 0: - return download_file_result + + parsed_uri = urllib.parse.urlparse(manifest_json_uri) + download_file_result = utils.download_file(parsed_uri, cache_file, True) + if download_file_result != 0: + return download_file_result # Having a repo is also optional repo_list = [] @@ -96,7 +96,7 @@ def process_add_o3de_repo(file_name: str or pathlib.Path, cache_file = cache_folder / str(manifest_json_sha256.hexdigest() + '.json') if cache_file.is_file(): cache_file.unlink() - download_file_result = utils.download_file(parsed_uri, cache_file) + download_file_result = utils.download_file(parsed_uri, cache_file, True) if download_file_result != 0: return download_file_result @@ -114,7 +114,7 @@ def get_gem_json_paths_from_cached_repo(repo_uri: str) -> set: file_name = pathlib.Path(cache_filename).resolve() if not file_name.is_file(): - logger.error(f'Could not find cached repo json file for {repo_uri}') + logger.error(f'Could not find cached repository json file for {repo_uri}. Try refreshing the repository.') return gem_set with file_name.open('r') as f: @@ -139,7 +139,7 @@ def get_gem_json_paths_from_cached_repo(repo_uri: str) -> set: if cache_gem_json_filepath.is_file(): gem_set.add(cache_gem_json_filepath) else: - logger.warn(f'Could not find cached gem json file {cache_gem_json_filepath} for {o3de_object_uri} in repo {repo_uri}') + logger.warning(f'Could not find cached gem json file {cache_gem_json_filepath} for {o3de_object_uri} in repo {repo_uri}') return gem_set @@ -165,8 +165,9 @@ def refresh_repo(repo_uri: str, repo_sha256 = hashlib.sha256(parsed_uri.geturl().encode()) cache_file = cache_folder / str(repo_sha256.hexdigest() + '.json') - download_file_result = utils.download_file(parsed_uri, cache_file) + download_file_result = utils.download_file(parsed_uri, cache_file, True) if download_file_result != 0: + logger.error(f'Repo json {repo_uri} could not download.') return download_file_result if not validation.valid_o3de_repo_json(cache_file): @@ -178,12 +179,7 @@ def refresh_repo(repo_uri: str, def refresh_repos() -> int: json_data = manifest.load_o3de_manifest() - - # clear the cache cache_folder = manifest.get_o3de_cache_folder() - shutil.rmtree(cache_folder) - cache_folder = manifest.get_o3de_cache_folder() # will recreate it - result = 0 # set will stop circular references @@ -222,10 +218,10 @@ def search_repo(manifest_json_data: dict, json_key = 'gem_name' search_func = lambda manifest_json_data: manifest_json_data if manifest_json_data.get(json_key, '') == gem_name else None elif isinstance(template_name, str) or isinstance(template_name, pathlib.PurePath): - o3de_object_uris = manifest_json_data['template'] + o3de_object_uris = manifest_json_data['templates'] manifest_json = 'template.json' json_key = 'template_name' - search_func = lambda manifest_json_data: manifest_json_data if manifest_json_data.get(json_key, '') == template_name_name else None + search_func = lambda manifest_json_data: manifest_json_data if manifest_json_data.get(json_key, '') == template_name else None elif isinstance(restricted_name, str) or isinstance(restricted_name, pathlib.PurePath): o3de_object_uris = manifest_json_data['restricted'] manifest_json = 'restricted.json' @@ -262,7 +258,7 @@ def search_o3de_object(manifest_json, o3de_object_uris, search_func): try: manifest_json_data = json.load(f) except json.JSONDecodeError as e: - logger.warn(f'{cache_file} failed to load: {str(e)}') + logger.warning(f'{cache_file} failed to load: {str(e)}') else: result_json_data = search_func(manifest_json_data) if result_json_data: diff --git a/scripts/o3de/o3de/utils.py b/scripts/o3de/o3de/utils.py old mode 100755 new mode 100644 index 9872c0779b..6f1dd8b2c5 --- a/scripts/o3de/o3de/utils.py +++ b/scripts/o3de/o3de/utils.py @@ -117,7 +117,7 @@ def backup_folder(folder: str or pathlib.Path) -> None: if backup_folder_name.is_dir(): renamed = True -def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite, download_progress_callback = None) -> int: +def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite: bool = False, download_progress_callback = None) -> int: """ :param parsed_uri: uniform resource identifier to zip file to download :param download_path: location path on disk to download file @@ -125,7 +125,8 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite, down """ if download_path.is_file(): if not force_overwrite: - logger.warn(f'File already downloaded to {download_path}.') + logger.error(f'File already downloaded to {download_path} and force_overwrite is not set.') + return 1 else: try: os.unlink(download_path) @@ -134,20 +135,25 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite, down return 1 if parsed_uri.scheme in ['http', 'https', 'ftp', 'ftps']: - with urllib.request.urlopen(parsed_uri.geturl()) as s: - download_file_size = 0 - try: - download_file_size = s.headers['content-length'] - except KeyError: - pass - def download_progress(blocks): - if download_progress_callback and download_file_size: - return download_progress_callback(int(blocks/int(download_file_size) * 100)) - return False - with download_path.open('wb') as f: - download_cancelled = copyfileobj(s, f, download_progress) - if download_cancelled: - return 1 + try: + with urllib.request.urlopen(parsed_uri.geturl()) as s: + download_file_size = 0 + try: + download_file_size = s.headers['content-length'] + except KeyError: + pass + def download_progress(downloaded_bytes): + if download_progress_callback: + return download_progress_callback(int(downloaded_bytes), int(download_file_size)) + return False + with download_path.open('wb') as f: + download_cancelled = copyfileobj(s, f, download_progress) + if download_cancelled: + logger.info(f'Download of file to {download_path} cancelled.') + return 1 + except urllib.error.HTTPError as e: + logger.error(f'HTTP Error {e.code} opening {parsed_uri.geturl()}') + return 1 else: origin_file = pathlib.Path(parsed_uri.geturl()).resolve() if not origin_file.is_file(): @@ -157,17 +163,17 @@ def download_file(parsed_uri, download_path: pathlib.Path, force_overwrite, down return 0 -def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, download_progress_callback = None) -> int: +def download_zip_file(parsed_uri, download_zip_path: pathlib.Path, force_overwrite: bool, download_progress_callback = None) -> int: """ :param parsed_uri: uniform resource identifier to zip file to download :param download_zip_path: path to output zip file """ - download_file_result = download_file(parsed_uri, download_zip_path, download_progress_callback) + download_file_result = download_file(parsed_uri, download_zip_path, force_overwrite, download_progress_callback) if download_file_result != 0: return download_file_result if not zipfile.is_zipfile(download_zip_path): - logger.error(f"File zip {download_zip_path} is invalid.") + logger.error(f"File zip {download_zip_path} is invalid. Try re-downloading the file.") download_zip_path.unlink() return 1 diff --git a/scripts/signer/Platform/Linux/o3de-releases.gpg b/scripts/signer/Platform/Linux/o3de-releases.gpg new file mode 100644 index 0000000000..602d822673 --- /dev/null +++ b/scripts/signer/Platform/Linux/o3de-releases.gpg @@ -0,0 +1,53 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGGWliEBEADq6bmhQbp42ZKQ4NwlnWeyFf6LhcnhafnBrGYV+XGyva2mP6kV +I4w80V9BQSHqpYt2R71tVDxfa+DicH4NDA1NmWte+hZ5eENgvoj6VJrqZzUZihwy +DZTaw4oMMabAK4a4b4G+BMV7iW7b4HWLEUH4Vmgq9LxU9qz9Ni5BIIyyp9Abh0kS +fbF3/ZQKdNTcyoVNOlm/5ohQsEJCftGi2CJzqybgS+fRQxaC/v9vAt3/A9gCEccD +LBFHkzz+58ZumEP2CXOoy/TDYhx7jMJFRzy0o/vJTEOKoWMQS3t9CIcOuE3enjsK +0GlFZPhTZREiTosJy9sNuTM8bJBEcrGfSfZZ0GUAF8IvAJiHppSTqFe/H3iqHnww +1I+ap/v2nI4AzRljQQ5RBsHJxHuHeuyUOFqwuGddvhYssiG9KzTeov03anA8BRY6 +235kWQkR5+CuMb0sgSkwhCQ3tz3Oc20l8g8jRTeLjIkqVNDN6+FffBuJgJjU7eHu +01xw0mRqjxIPp21XsOzw4+hNQM98QLUhJXu5/hImP37V9223qyZMeCyODHyrk0h8 +wi5J6ZMEVymNDNRJ2dgLrDM2GG5DbY5rOVPpu0bsPHqGMHpipDd7hNQd78tRh6Jf +CzhLFiIMnHH+7c7HxhJUvbewHUiCyRQ7H3RRHi8cZMn2Wa3g13rYtJzSgQARAQAB +tFtvM2RlYmluYXJpZXMub3JnIChPM0RFIEJpbmFyeSBQcm9qZWN0IGEgU2VyaWVz +IG9mIExGIFByb2plY3RzLCBMTEMpIDxpbmZvQG8zZGViaW5hcmllcy5vcmc+iQJU +BBMBCgA+FiEEXtkClauXt9hZ4PvRSNjOEOJZqKQFAmGWliECGwMFCQWmPYAFCwkI +BwIGFQoJCAsCBBYCAwECHgECF4AACgkQSNjOEOJZqKTy8hAAs9YueTc6a3UNjWbN +Zx9L3bmLqMITthadFv1LuntCrU/hte44FeP74acqSZDGfWN381iYMGlw0ECsJB/d +DnElITiO9W1MNelansiX5zHlVUd6HuuEVZTsoQodWgbIEvs5bLA2HqKk03Mcb9uW +vyeYfOjknedZ7sfoe7HnkYEaPBgb/5Fkn6wTnDTb4CMAdZoy6+nfVQdTHIQ+PsDY +hlCR2q+jgZaNyRiW3gIz4PPpgaNIxT8JmRvGC/gseDf3l6xy4p7SH8eEsK8+oy2G +SrFxE6Ez9SySVc3PZHiS9eCEsoNhqAzV5RRP/UvpWhxM/mAgJHJI+wy5pbpFeLr3 +zTEOcCgXxVGBSX3BocoP8SLFP5zNocKhiG7eXQWvg/I1oGr8qPxC4aE+h6xtTaw+ +6/Wpd2PRMXoVVHDCuJy3qTNLus5sF6vmUDc69MYfzCmLqZDVjVdcTMgvQYv1VnOz +Td+/pnTIs4AYM0pQY2P/GdjIdGWVuRc1ssDisdjzUQvZMNKC9hnkKlJF0utCDqb1 +FAyN8u9dpbR3Yy98qy1thp2hebd6lVpLPU0YKUSYBGiyU74lIEqJUM9bnlLxFWgL +lGdjSpDbNUPIZrhVk86xR7EI3W3Br/5ygi0imtah96jdoHdW0XJzWAOTJBSmJUgD +vRtomV24xuu/lZZCGUXhy3nIFfi5Ag0EYZaWIQEQAKp1dCgW1r9WXEEiOnrgHSBb +GLKmJJuJEM7+hEW18PoSph+lmO/gqz/GKf647HWFon101+d80yexT4mFdT9G24L6 +WmPsJeVswcFzRSergq7/OTD5jmmElMmohTOlAApzhb7UUFotgvSOiwrxyhK5Hhk3 ++XCZGurZdKd02BVrwdI06I+t6t1BJAazoEYMcmwhvweW1DtKjMCdf+kUMZ/YlTos +VKXFz0tEANu4BDgNdO/jTBh+dIFGjxfMPSYCnUpz4BJQLnlRagNj86SetNl5qFVn +K6d8CCuqax2vk9MLw+fLOTbvde+GzamEYXYA840nffHx11V4JaL+xqGSWofh+r1q +4XI0WD7Ly8BTj3Gx8xOeVKGSetfQf+6w7r2X5Yg1iGN5y8e+7VJ9j4Ntn0bbk2Go +O7WDx3yZBqS7PiII5+ItLOIFfVqwGZzJXR3OBoRQWji03K/RXjthiyEHv0JBQFJi +95vBT1X3u5dgngQNSAYkLfMjPqwCmzOrIeZhkB9g/qvDwp1i80L7jTR+iOQPYa+9 +JuUwBBKfi6GqqbAoD0tLV+1/rnoi5aalN7WcgfBvIK7KqeGGjM9oJlotrkJf5Lsu +1RLdHlOTPq7ZNQ6MFB7BOi6KWAiWTARZchEJKAR4jqLLnU+qcV0QM0jUK2E/yzCG +KoID/HV+xipxdzAW+MiBABEBAAGJAjwEGAEKACYWIQRe2QKVq5e32Fng+9FI2M4Q +4lmopAUCYZaWIQIbDAUJBaY9gAAKCRBI2M4Q4lmopGOsD/9qqiU13ohVX/UjCZj3 +0Q7ShuC0mgRh8zxsfeFVQu5JkYXgSbe+4emsmzbSJ9VaZe1AOa+UGBNJG0BdHlbb +kZ1uEJJ5TkKzuPbJnF5Bj6N1Qk8C4dBMyTuouF+s5fwBgiz+eDTyRa/N6QSbPkvA +QiuivECA13gahp9sfcn0TGwLmqR6GyKWHNp3bCsxL1j3YKfEP2FTT1ko0V3qURtV +8FNuzA/kupgPVFgG60kujJ/PzDZ772k5TEpHRBw3Z6xfrS56o/eSXJunjFQPsTuw +5zJoMXUybGoOdBErEHL0bYw42jobJ+d1mOda9LPaA/ea51WWuyXIr+S66aHSgn0F +K5QewNazYpGekmQ6gpP7B9dUcGxJW3Hl3qkUV98GLANtAiUhr99Hx4oYD5lXE3jy +HN4nzFCBxG35rQzJ/GQ7wX93HgMU8pq20sHDZxNY9tD/TEMdeY2UashkMjjjTmT0 +7HySlvYJLpElfNlhhm/8H5Lo2UBIex+xemssOT+De46fU0EQI6zDPnFxABIy7ECF +VEVuMAyPjgUgxD2XyXk7yfxHs0cO34k0lhlT3D1mGF8VYZuTLJVtI7TQ72JhLmGy +oec1he0q8civF8GrSfKSObm1pN0/q9TtfYso6T/D3J13eJ1FW06+6iTl9bqUMqqS +uPvKa1dp3CCS3lhFfmP1Gcxi+w== +=2u1v +-----END PGP PUBLIC KEY BLOCK-----